linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbdev: workaround for broken X servers
@ 2004-11-03  2:13 Benjamin Herrenschmidt
  2004-11-03  3:26 ` Ville Syrjälä
  0 siblings, 1 reply; 28+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-03  2:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linus Torvalds, Linux Fbdev development list

Hi !

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: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Index: linux-work/drivers/video/fbmem.c
===================================================================
--- linux-work.orig/drivers/video/fbmem.c	2004-10-26 13:15:55.000000000 +1000
+++ linux-work/drivers/video/fbmem.c	2004-11-03 13:10:41.324932256 +1100
@@ -748,6 +748,10 @@
 	u16 *black = NULL;
 	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))
 		return 0;
 




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2004-11-06 11:19 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-03  2:13 [PATCH] fbdev: workaround for broken X servers Benjamin Herrenschmidt
2004-11-03  3:26 ` Ville Syrjälä
2004-11-03 13:09   ` Antonino A. Daplas
2004-11-03 14:01     ` Ville Syrjälä
2004-11-03 21:42       ` Antonino A. Daplas
2004-11-05  5:49   ` Benjamin Herrenschmidt
2004-11-05  9:04     ` Geert Uytterhoeven
2004-11-05  9:36     ` Ville Syrjälä
2004-11-05  9:56       ` Geert Uytterhoeven
2004-11-05 10:43         ` Ville Syrjälä
2004-11-05 11:47         ` Benjamin Herrenschmidt
2004-11-05 12:15           ` Geert Uytterhoeven
2004-11-05 12:55             ` Antonino A. Daplas
2004-11-05 12:58               ` Geert Uytterhoeven
2004-11-05 13:15                 ` Antonino A. Daplas
2004-11-05 15:00                   ` Maciej W. Rozycki
2004-11-05 15:21                     ` Geert Uytterhoeven
2004-11-05 15:59                       ` Maciej W. Rozycki
2004-11-06  0:38               ` Benjamin Herrenschmidt
2004-11-06  2:02                 ` Antonino A. Daplas
2004-11-06  3:06                   ` Benjamin Herrenschmidt
2004-11-06 11:18                     ` Antonino A. Daplas
2004-11-05 15:30             ` Ville Syrjälä
2004-11-05 15:48               ` Geert Uytterhoeven
2004-11-06  0:37             ` Benjamin Herrenschmidt
2004-11-06  2:07               ` Antonino A. Daplas
2004-11-05 11:46       ` Benjamin Herrenschmidt
2004-11-05 12:25         ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).