Re: [PATCH] fbdev: workaround for broken X servers
flat view
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2004-11-05 05:58:44
quoted
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 goes against documented behaviour (see fb.h). Also drivers/char/vt.c seems to agree with fb.h, as do at least atyfb and matroxfb. I also used the vesa level+1 convention in DirectFB. So AFAICS this patch would confuse console power management, XFree86/X.Org, DirectFB and some fb drivers.
Ok, can we agree here on what has to be done ? X is hard-coding numbers that don't seem to be make any sense vs. our constants. In radeonfb, I used switch case on constants, not +1, so there is something I'm not getting. Besides, radeon always try to power down TFT panels when blank != 0, maybe I should improve that ... What is this +1 thing, where does it comes from ? Ben. ------------------------------------------------------- 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