Resent-Date: Sun, 15 Nov 1998 00:41:03 +0100 (MET)
Date: Sat, 14 Nov 1998 17:36:15 -0600
From: Chris Lawrence <quango@watervalley.net>
To: Linux/m68k Mailing List <linux-m68k@lists.linux-m68k.org>
Cc: Jes Degn Sørensen <jds@kom.auc.dk>
Subject: 2.1.127 logo patch
Mail-Followup-To: Linux/m68k Mailing List <linux-m68k@lists.linux-m68k.org>,	Jes Degn Sørensen <jds@kom.auc.dk>
Organization: Kathie Lee's Sweatshops
X-Operating-System: Linux/m68k 2.1.127
Resent-From: linux-m68k@phil.uni-sb.de

This patch fixes the logo display on Amigas with video:ilbm.  It
should apply to 2.1.12[47].  It also avoids the MAP_X overhead if you
aren't using an Atari-style interleaved bitmap.

--- clean-linux-2.1.127/drivers/video/fbcon.c	Sat Nov 14 13:49:45 1998
+++ linux-2.1.127/drivers/video/fbcon.c	Sat Nov 14 13:43:48 1998
@@ -1786,8 +1786,15 @@
 	    unsigned char val, mask;
 	    int plane = p->next_plane;
 
+#if defined(CONFIG_FBCON_IPLAN2P2) || defined(CONFIG_FBCON_IPLAN2P4) || \
+    defined(CONFIG_FBCON_IPLAN2P8)
+	    int line_length = p->line_length;
+
 	    /* for support of Atari interleaved planes */
-#define MAP_X(x)	(plane > line ? x : (x & ~1)*depth + (x & 1))
+#define MAP_X(x)	(line_length ? x : (x & ~1)*depth + (x & 1))
+#else
+#define MAP_X(x)	(x)
+#endif
 	    /* extract a bit from the source image */
 #define	BIT(p,pix,bit)	(p[pix*logo_depth/8] & \
 			 (1 << ((8-((pix*logo_depth)&7)-logo_depth) + bit)))



Chris
-- 
=============================================================================
|        Chris Lawrence        |                My home page:               |
|   <quango@watervalley.net>   |     http://www.clark.net/pub/lawrencc/     |
|                              |                                            |
|   Grad Student, Pol. Sci.    |   Visit the Lurker's Guide to Babylon 5:   |
|  University of Mississippi   |   <*> http://www.midwinter.com/lurk/ <*>   |
=============================================================================

