Commit 8e195fee authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

[PATCH] fbdev: workaround for broken X servers

XFree (and X.org) has both always been broken in their conversion of the DPMS
blanking mode when passing to the kernel ioctl FBIOBLANK (in fbdev mode).

This patch makes sure that at least the value passed by userland stays in the
legal range, which has the side effect that an X DPMS POWERDOWN request will
result as an fbdev VESA_POWERDOWN request at the fbdev level now, instead of
an out-of-range value.
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2e74a186
...@@ -748,6 +748,10 @@ fb_blank(struct fb_info *info, int blank) ...@@ -748,6 +748,10 @@ fb_blank(struct fb_info *info, int blank)
u16 *black = NULL; u16 *black = NULL;
int err = 0; int err = 0;
/* Workaround for broken X servers */
if (blank > VESA_POWERDOWN)
blank = VESA_POWERDOWN;
if (info->fbops->fb_blank && !info->fbops->fb_blank(blank, info)) if (info->fbops->fb_blank && !info->fbops->fb_blank(blank, info))
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment