fbcon margins colour fix
Subsystems (2)
PATCH RESEND 1/1 fbcon margins colour fix
I sent it a few times to linux-kernel and at least one to linux-fbdev-devel, but haven't seen any comments - and this annoying changing margins colour seems to be still there in 2.6.4 (at least on tdfxfb).
Signature · 1 line
Jakub Bogusz http://cyber.cs.net.pl/~qboosh/
This fixes "margin colour" (colour used to clear top and bottom margins - e.g. remaining half of line at the bottom of 100x37 console on 800x600 framebuffer).
I don't know what was the intention behind using attr_bgcol_ec() here, but it caused using of background colour of last erase character to clear margins (thus it was changing from time to time when switching consoles or so).
I think that margin colour should be equal overscan colour, which seems to be always black.
This patch changes margin colour to black (or colour 0 in palette modes) in accel_clear_margins() and removes unused then bgshift variable.
-- Jakub Bogusz <[email protected]>
drivers/video/console/fbcon.c renamed from drivers/video/console/fbcon.c.orig +1 -2
@@ -489,7 +489,6 @@void accel_clear_margins (struct vc_data *vc,struct fb_info *info,int bottom_only) { -int bgshift = (vc->vc_hi_font_mask) ?13 :12 ;unsigned int cw = vc->vc_font.width;unsigned int ch = vc->vc_font.height;unsigned int rw = info->var.xres - (vc->vc_cols*cw);
@@ -498,7 +497,7 @@unsigned int bs = info->var.yres - bh;struct fb_fillrect region; - region.color =attr_bgcol_ec (bgshift, vc); + region.color =0 ;/* margins color = overscan color */ region.rop =ROP_COPY ;if (rw && !bottom_only) {
Quoted 4 lines · Jakub Bogusz
I sent it a few times to linux-kernel and at least one to linux-fbdev-devel, but haven't seen any comments - and this annoying changing margins colour seems to be still there in 2.6.4 (at least on tdfxfb).
What happens on `reverse video' (i.e. black on white, like Sun) graphics cards? In that case the overscan color is white.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
Quoted 8 lines · Geert Uytterhoeven
Quoted 4 lines · Jakub Bogusz
I sent it a few times to linux-kernel and at least one to linux-fbdev-devel, but haven't seen any comments - and this annoying changing margins colour seems to be still there in 2.6.4 (at least on tdfxfb).
What happens on `reverse video' (i.e. black on white, like Sun) graphics cards? In that case the overscan color is white.
Uhm. What is palette entry for this white?
Or, more generally, how to find (palette colour number of) overscan colour for current console?
Video erase character colour is not proper one as it may be different even from background colour at the moment of vt switch.
Signature · 1 line
Jakub Bogusz http://cyber.cs.net.pl/~qboosh/
Quoted 11 lines · Jakub Bogusz
Quoted 8 lines · Geert Uytterhoeven
Quoted 4 lines · Jakub Bogusz
I sent it a few times to linux-kernel and at least one to linux-fbdev-devel, but haven't seen any comments - and this annoying changing margins colour seems to be still there in 2.6.4 (at least on tdfxfb).
What happens on `reverse video' (i.e. black on white, like Sun) graphics cards? In that case the overscan color is white.
Uhm. What is palette entry for this white?
0, on pseudocolor displays. So probably it's OK.
Quoted 4 lines
Or, more generally, how to find (palette colour number of) overscan colour for current console?
Video erase character colour is not proper one as it may be different even from background colour at the moment of vt switch.
There's no standardized way for that. So it may depend on the driver. I know ATI Mach64 has a special register for the overscan color, which is always set to black, IIRC.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click