linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6][RESEND] tdfxfb fillrect fix for truecolor modes
@ 2004-03-17 23:36 Jakub Bogusz
  0 siblings, 0 replies; only message in thread
From: Jakub Bogusz @ 2004-03-17 23:36 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

tdfxfb fillrect (used e.g. for "clear" terminal commands) uses wrong
colour in 16/32-bpp modes - attached patch fixes it.

This change has been already applied into fbdev-2.5 tree, applies
cleanly to Linux 2.6.4 tree - so can be easily merged as small part
of integration.


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/

[-- Attachment #2: linux-tdfxfb-fillrect.patch --]
[-- Type: text/plain, Size: 900 bytes --]

This fixes background used for "clear" terminal commands (^[[J, ^[[K etc.)
in 16/24/32bpp modes.

This patch has been already integrated into fbdev-2.5 tree.

	-- Jakub Bogusz <qboosh@pld-linux.org>

--- linux-2.6.0-test2/drivers/video/tdfxfb.c.orig	2003-07-30 08:31:57.000000000 +0200
+++ linux-2.6.0-test2/drivers/video/tdfxfb.c	2003-07-31 00:44:26.000000000 +0200
@@ -890,7 +890,11 @@
 
 	banshee_make_room(par, 5);
 	tdfx_outl(par,	DSTFORMAT, fmt);
-	tdfx_outl(par,	COLORFORE, rect->color);
+	if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR) {
+		tdfx_outl(par,	COLORFORE, rect->color);
+	} else { /* FB_VISUAL_TRUECOLOR */
+		tdfx_outl(par, COLORFORE, ((u32*)(info->pseudo_palette))[rect->color]);
+	}
 	tdfx_outl(par,	COMMAND_2D, COMMAND_2D_FILLRECT | (tdfx_rop << 24));
 	tdfx_outl(par,	DSTSIZE,    rect->width | (rect->height << 16));
 	tdfx_outl(par,	LAUNCH_2D,  rect->dx | (rect->dy << 16));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-17 23:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-17 23:36 [PATCH 2.6][RESEND] tdfxfb fillrect fix for truecolor modes Jakub Bogusz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).