Thread (28 messages) 28 messages, 5 authors, 2004-11-06

Re: [PATCH] fbdev: workaround for broken X servers

flat view

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2004-11-05 09:56:17

On Fri, 5 Nov 2004, Ville [iso-8859-1] Syrjälä wrote:
On Fri, Nov 05, 2004 at 04:49:36PM +1100, Benjamin Herrenschmidt wrote:
quoted
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 ?
Maybe it's there because someone wanted to blank the display without 
disabling sync signals.
Yes of course! (/me wasn't completely awake yet)
quoted hunk ↗ jump to hunk
I suggest a new set of constants that cover all legal values. Here's the 
first drawft.
--- linux-orig/include/linux/fb.h	2004-11-05 12:25:14.087807848 +0200
+++ linux/include/linux/fb.h	2004-11-05 12:28:02.734169704 +0200
@@ -27,7 +27,7 @@
 /* #define FBIOSWITCH_MONIBIT	0x460E */
 #define FBIOGET_CON2FBMAP	0x460F
 #define FBIOPUT_CON2FBMAP	0x4610
-#define FBIOBLANK		0x4611		/* arg: 0 or vesa level + 1 */
+#define FBIOBLANK		0x4611		/* see FB_BLANK_* */
 #define FBIOGET_VBLANK		_IOR('F', 0x12, struct fb_vblank)
 #define FBIO_ALLOC              0x4613
 #define FBIO_FREE               0x4614
@@ -258,6 +258,12 @@
 #define VESA_HSYNC_SUSPEND      2
 #define VESA_POWERDOWN          3
 
+#define FB_BLANK_NO_BLANKING	0
+#define FB_BLANK_BLANKING	1
+#define FB_BLANK_VSYNC_SUSPEND	2
+#define FB_BLANK_HSYNC_SUSPEND	3
+#define FB_BLANK_POWERDOWN	4
+
Yep, these nicely cover the current intended behavior.

But every existing application that uses (shiver) the kernel headers will break
after this change...

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help