Skip to content

Commit

Permalink
sunxi-disp: ignore invalid arguments for FBIOPUTCMAP
Browse files Browse the repository at this point in the history
Just do nothing and return 0 for the unsupported palette indexes
instead of returning -EINVAL. The vesafb and uvesafb drivers do
the same.

Otherwise xf86-video-fbdev or anything else derived from it writes
a lot of "FBIOPUTCMAP: Invalid argument" spam to /var/log/Xorg.0.log
when the X server starts. And apparently also when the screensaver
and/or screen blanking/unblanking kicks in. These error messages
are scaring the users and also distracting attention when doing
real troubleshooting. Not to mention slowing down the X server
startup and wasting extra disk space for storing logs.

Yes, it is ugly to ignore errors. And the right solution would
be to fix the userland code not to use this ioctl with wrong
arguments. But frankly speaking, I don't want to touch the
prehistoric paletted formats in the X server as long as we don't
have a real use case where they can be tested.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
ssvb authored and amery committed Oct 28, 2013
1 parent ae70019 commit 957259c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/sunxi/disp/dev_fb.c
Expand Up @@ -1243,7 +1243,7 @@ static int Fb_setcolreg(unsigned regno, unsigned red, unsigned green,
val);
((__u32 *) info->pseudo_palette)[regno] = val;
} else {
ret = -EINVAL;
ret = 0;
}
break;
default:
Expand Down

0 comments on commit 957259c

Please sign in to comment.