Thread (11 messages) 11 messages, 3 authors, 2004-08-17

Re: patch fixing background next to penguin logo in monochrome

From: Antonino A. Daplas <hidden>
Date: 2004-08-11 22:18:41

On Thursday 12 August 2004 03:56, Petr Stehlik wrote:
Hi all,

I have developed a simple workaround for a problem existing in
framebuffer when it interprets VGA attribute bits in monochrome mode.
Instead of empty chars we get underlines - you can see what I mean at
http://joy.sophics.cz/horizlines.jpg - the image shows the background
where the penguin logo will appear during linux kernel boot up. The logo
then looks like incorrectly drawn (due to the horizontal lines) and
people are complaining or reporting this as a sign of a kernel problems
with their hardware setup or something.
During the take_over_console() part in drivers/char/console.c, the
the framebuffer is initialized first before the character attributes are
updated. So, during the framebuffer initialization, when the space for
the logo is created, the space is erased using vc->vc_video_erase_char.  And
because the attributes are not updated yet, the vc_video_erase_char has still
the attributes of the initial console. If the initial console happens to be
color capable (vc->vc_can_do_color != 0), then the attributes will be 
misinterpreted when the monochrome console redraws the space for the logo.
You get the underline.

Anyway, the simplest solution is to use a vc->vc_video_erase_char with the
underline attribute removed.  Check drivers/video/fbcon.c and look at the
function fbcon_setup. Note, the logo space is erased using the scr_memsetw
function with conp->vc_video_erase_char. Just replace them with
(conp->vc_video_erase_char & ~0x400) if conp->can_do_color is false. (0x400
is the underline attribute). 

I haven't tried this in 2.4, but a similar fix is already present in the latest 2.6 rc
and mm tree. (I still need to add the bold attribute support though).

Tony




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help