linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tdfxfb in 2.6: fix for background used in fbcon_clear
@ 2003-08-14 20:13 Jakub Bogusz
  2003-08-14 20:50 ` James Simmons
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Bogusz @ 2003-08-14 20:13 UTC (permalink / raw)
  To: linux-kernel

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

It was already posted to linux-fbdev-devel, but I haven't got any
comments...
Attached patch is rather simple and obvious.

----- Forwarded message from Jakub Bogusz <qboosh at pld.org.pl> -----

Date: Thu, 31 Jul 2003 01:43:27 +0200
From: Jakub Bogusz <qboosh at pld.org.pl>
To: linux-fbdev-devel at lists.sourceforge.net
Subject: [PATCH] tdfxfb: fix for background used in fbcon_clear

Hello,

This time I checked recent linux-fbdev-devel archives - and didn't see
any patch for this issue. So here is my fix.

There was wrong color used in fillrect in 16/24/32bpp (pseudo_palette
mapping was omitted), which resulted in ugly black (well, almost black)
rectangles painted when some "clear" terminal command was sent (like
"^[[J", "^[[K") with background colour different than black.
It was visible e.g. in mc's View.

[...]

-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/
PLD Linux       http://www.pld-linux.org/

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

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

	-- 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] 2+ messages in thread

* Re: [PATCH] tdfxfb in 2.6: fix for background used in fbcon_clear
  2003-08-14 20:13 [PATCH] tdfxfb in 2.6: fix for background used in fbcon_clear Jakub Bogusz
@ 2003-08-14 20:50 ` James Simmons
  0 siblings, 0 replies; 2+ messages in thread
From: James Simmons @ 2003-08-14 20:50 UTC (permalink / raw)
  To: Jakub Bogusz; +Cc: linux-kernel


Applied. I will test it tonight.


On Thu, 14 Aug 2003, Jakub Bogusz wrote:

> It was already posted to linux-fbdev-devel, but I haven't got any
> comments...
> Attached patch is rather simple and obvious.
> 
> ----- Forwarded message from Jakub Bogusz <qboosh at pld.org.pl> -----
> 
> Date: Thu, 31 Jul 2003 01:43:27 +0200
> From: Jakub Bogusz <qboosh at pld.org.pl>
> To: linux-fbdev-devel at lists.sourceforge.net
> Subject: [PATCH] tdfxfb: fix for background used in fbcon_clear
> 
> Hello,
> 
> This time I checked recent linux-fbdev-devel archives - and didn't see
> any patch for this issue. So here is my fix.
> 
> There was wrong color used in fillrect in 16/24/32bpp (pseudo_palette
> mapping was omitted), which resulted in ugly black (well, almost black)
> rectangles painted when some "clear" terminal command was sent (like
> "^[[J", "^[[K") with background colour different than black.
> It was visible e.g. in mc's View.
> 
> [...]
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-14 20:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-14 20:13 [PATCH] tdfxfb in 2.6: fix for background used in fbcon_clear Jakub Bogusz
2003-08-14 20:50 ` James Simmons

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).