NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/46574: wsfb/genfb: single user boot sets the wrong colour palette if SPLASHSCREEN

>Number:         46574
>Category:       kern
>Synopsis:       wsfb/genfb: single user boot sets the wrong colour palette if 
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 10 11:10:00 +0000 2012
>Originator:     Nat Sloss
>Release:        NetBSD Current 6.99.7
NetBSD beast 6.99.7 NetBSD 6.99.7 (LOCKDEBUG) #81: Sun Jun 10 19:35:53 EST 2012 
 build@beast:/usr/src/sys/arch/i386/compile/obj/LOCKDEBUG i386

If you're using a kernel with the SPLASHSCREEN option and you boot with an 8 
bit colour depth vesa screen and single user the kernel messages change to blue 
when genfb attaches.

This is because wsfb/genfb.c sets the colour palette if there is a splashscreen 
or not (This is only relevant at 8 bit colour depth).

I tried testing if not DISABLESPLASH before restoring the palette in genfb.c to 
no avail as other parts of the code must be using the colour palette settings.
On a kernel compiled with the SPLASHSCREEN option type the following at the 
boot prompt:

vesa 640x480x8
boot -s

Then you will notice about half way through the booting process the kernel 
messages change to blue (as soon as genfb attaches).
Just one of many solutions is to initialise the colour palette and redraw the 
screen if DISABLESPLASH is set:

Index: sys/dev/wsfb/genfb.c
RCS file: /cvsroot/src/sys/dev/wsfb/genfb.c,v
retrieving revision 1.48
diff -u -r1.48 genfb.c
--- sys/dev/wsfb/genfb.c        12 Apr 2012 22:36:15 -0000      1.48
+++ sys/dev/wsfb/genfb.c        10 Jun 2012 10:45:37 -0000
@@ -314,6 +314,9 @@
+       } else {
+               genfb_init_palette(sc);
+               vcons_replay_msgbuf(&sc->sc_console_screen);

Note: This patch is my own work which I submit under the NetBSD license.



Home | Main Index | Thread Index | Old Index