NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/46189: wsfb/genfb red adn blue colours are reversed on bit depths 15 16 24 and 32
>Number: 46189
>Category: kern
>Synopsis: wsfb/genfb red adn blue colours are reversed on bit depths 15
>16 24 and 32
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 14 01:10:00 +0000 2012
>Originator: Nat Sloss
>Release: NetBSD Current 6.99.3
>Organization:
>Environment:
NetBSD beast 6.99.3 NetBSD 6.99.3 (LOCKDEBUG) #16: Tue Mar 13 23:52:55 EST 2012
build@beast:/home/build/NetBSD-5.0.1_source_tree/usr/src/sys/arch/i386/compile/obj/LOCKDEBUG
i386
>Description:
When using wsfb console text mode the colours red and blue are reversed at bit
depths 15,16,24 and 32. 8 bits is OK.
>How-To-Repeat:
Boot with a vesa mode at a depth of 15,16,24 or 32.
Run a curses program that uses colours red, green, and blue.
Or compile a kernel that has kernel text as blue.
Note this was only noticed on 3386 I don't know if it is a problem on other
platforms.
>Fix:
What I noticed in rasops8.c was that the blue bits came first and the red bits
last and green was not a problem so I reversed redpos and bluepos for 15,16,24
and 32 bit depths.
--- rasops/rasops15.c.orig 2010-05-05 13:09:26.000000000 +1000
+++ rasops/rasops15.c 2012-03-13 23:49:58.000000000 +1100
@@ -99,11 +99,11 @@
if (ri->ri_rnum == 0) {
ri->ri_rnum = 5;
- ri->ri_rpos = 0;
+ ri->ri_rpos = 10 + (ri->ri_depth == 16);
ri->ri_gnum = 5 + (ri->ri_depth == 16);
ri->ri_gpos = 5;
ri->ri_bnum = 5;
- ri->ri_bpos = 10 + (ri->ri_depth == 16);
+ ri->ri_bpos = 0;
}
}--- rasops/rasops24.c.orig 2011-12-04 01:13:27.000000000 +1100
+++ rasops/rasops24.c 2012-03-13 23:50:34.000000000 +1100
@@ -101,11 +101,11 @@
if (ri->ri_rnum == 0) {
ri->ri_rnum = 8;
- ri->ri_rpos = 0;
+ ri->ri_rpos = 16;
ri->ri_gnum = 8;
ri->ri_gpos = 8;
ri->ri_bnum = 8;
- ri->ri_bpos = 16;
+ ri->ri_bpos = 0;
}
ri->ri_ops.erasecols = rasops24_erasecols;
--- rasops/rasops32.c.orig 2012-01-07 17:53:39.000000000 +1100
+++ rasops/rasops32.c 2012-03-13 23:51:20.000000000 +1100
@@ -54,11 +54,11 @@
if (ri->ri_rnum == 0) {
ri->ri_rnum = 8;
- ri->ri_rpos = 0;
+ ri->ri_rpos = 16;
ri->ri_gnum = 8;
ri->ri_gpos = 8;
ri->ri_bnum = 8;
- ri->ri_bpos = 16;
+ ri->ri_bpos = 0;
}
if (FONT_IS_ALPHA(ri->ri_font)) {
I hope this helps.
Regards,
Nat.
PS: Could you also pull up NetBSD 6 when an appropriate solution is found.
Home |
Main Index |
Thread Index |
Old Index