[patch] Correct monochrome selection (fwd)

DORMANTno replies

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2002-10-23 14:15:16

---------- Forwarded message ----------
Date: Sat, 19 Oct 2002 19:05:34 +0200
From: Martin Schulze <redacted>
To: Ralf Baechle <redacted>
Cc: linux-mips@linux-mips.org
Subject: [patch] Correct monochrome selection

Hi Ralf,

please apply the patch below which will add proper handling for
monochrome graphic cards.

Both changes are required since there are graphic cards out in the
voi^Wwild that are monochrome but have bits_per_pixel set to something
else than 1, e.g. PMAG-AA which uses 8 bits per pixel but ignores 7 of
it.

Since currently no such card is supported, this change wasn't
required.  However, we developed support for the PMAG-AA card and we
would like to add support for it to the Linux kernel, of course.

Regards,

	Joey


Index: fbcon.c
===================================================================
RCS file: /home/cvs/linux/drivers/video/fbcon.c,v
retrieving revision 1.28.2.4
diff -u -r1.28.2.4 fbcon.c
--- fbcon.c	2 Oct 2002 13:28:31 -0000	1.28.2.4
+++ fbcon.c	19 Oct 2002 16:57:40 -0000
@@ -711,7 +711,8 @@
     if ((p->var.yres % fontheight(p)) &&
 	(p->var.yres_virtual % fontheight(p) < p->var.yres % fontheight(p)))
 	p->vrows--;
-    conp->vc_can_do_color = p->var.bits_per_pixel != 1;
+    conp->vc_can_do_color = (p->fb_info->fix.visual != FB_VISUAL_MONO10 &&
+			     p->fb_info->fix.visual != FB_VISUAL_MONO01);
     conp->vc_complement_mask = conp->vc_can_do_color ? 0x7700 : 0x0800;
     if (charcnt == 256) {
     	conp->vc_hi_font_mask = 0;
@@ -2177,7 +2178,12 @@
 					   p->fb_info);
 	}
 	
-    if (depth >= 8) {
+    if (p->visual == FB_VISUAL_MONO10 ||
+	p->visual == FB_VISUAL_MONO01) {
+	logo = linux_logo_bw;
+	logo_depth = 1;
+    }
+    else if (depth >= 8) {
 	logo = linux_logo;
 	logo_depth = 8;
     }
-- 
Every use of Linux is a proper use of Linux.  -- Jon "Maddog" Hall



-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help