Date: Mon, 6 Oct 1997 15:24:46 +0200
From: Roman Hodek <rnhodek@faui22c.informatik.uni-erlangen.de>
To: linux-m68k@lists.linux-m68k.org
In-Reply-To: <199710061301.PAA12460@kassandra.zx.basf-ag.de> (message from
	Juergen Orschiedt on Mon, 6 Oct 1997 15:01:32 +0200 (MET DST))
Subject: Re: L68K: patch for atafb - no more thermografic penguine
Sender: owner-linux-m68k@phil.uni-sb.de


> o 'cause we know how to modify the clut, we can use FB_PSEUDOCOLOR
> instead of FB_STATIC_PSEUDOCOLOR for cfb8 mode.

Hmm... haven't I fixed that already?? I can remember that I've posted
a patch (before the real logo patch) that based the
VISUAL_PSEUDOCOLOR/VISUAL_STATIC_PSEUDOCOLOR decision on
external_vgaiobase != NULL, and for all types, not only packed pixel.

Damn... can't find it also in my patch archive, so here it is again...

Roman

------------------------------------------------------------------------------
[old mail]
------------------------------------------------------------------------------

The following patch fixes a more cosmetical problem in the external
framebuffer: It always used STATIC_PSEUDOCOLOR as visual for
appropriate modes, which came from the times where there was no access
to color registers at all. (STATIC means the colors values in color
"registers" are fixed.)

The X server obviously never cared about that wrong visual type... but
for the generic logo function I want to rely on the visual here,
whether I have to set colors or not.

------------------------------------------------------------------------------
--- linux-2.1.55.orig/drivers/video/atafb.c	Sat Sep 20 13:43:56 1997
+++ linux-2.1.55/drivers/video/atafb.c	Mon Sep 22 15:56:39 1997
@@ -2119,26 +2121,27 @@
 					FB_VISUAL_MONO01;
 	}
 	else {
+		/* Use STATIC if we don't know how to access color registers */
+		int visual = external_vgaiobase ?
+					 FB_VISUAL_STATIC_PSEUDOCOLOR :
+					 FB_VISUAL_PSEUDOCOLOR;
 		switch (external_pmode) {
-			/* All visuals are STATIC, because we don't know how to change
-			 * colors :-(
-			 */
 		    case -1:              /* truecolor */
 			fix->type=FB_TYPE_PACKED_PIXELS;
 			fix->visual=FB_VISUAL_TRUECOLOR;
 			break;
 		    case FB_TYPE_PACKED_PIXELS:
 			fix->type=FB_TYPE_PACKED_PIXELS;
-			fix->visual=FB_VISUAL_STATIC_PSEUDOCOLOR;
+			fix->visual=visual;
 			break;
 		    case FB_TYPE_PLANES:
 			fix->type=FB_TYPE_PLANES;
-			fix->visual=FB_VISUAL_STATIC_PSEUDOCOLOR;
+			fix->visual=visual;
 			break;
 		    case FB_TYPE_INTERLEAVED_PLANES:
 			fix->type=FB_TYPE_INTERLEAVED_PLANES;
 			fix->type_aux=2;
-			fix->visual=FB_VISUAL_STATIC_PSEUDOCOLOR;
+			fix->visual=visual;
 			break;
 		}
 	}


