All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix colors in mach64 accelerator (fwd)
@ 2009-10-06 16:21 Mikulas Patocka
  2009-10-07  4:20 ` Paul Mackerras
  0 siblings, 1 reply; 3+ messages in thread
From: Mikulas Patocka @ 2009-10-06 16:21 UTC (permalink / raw)
  To: paulus; +Cc: linux-fbdev-devel

Hi

In the previous kernel cycle I sent you this patch, you acknowledged it 
but didn't put it to the kernel.

Did you forget it? Do you want to add it in this cycle?

The patch fixes mach64 fill rect routine for 15 and 16-bit modes.

Mikulas

---------- Forwarded message ----------
Date: Wed, 17 Jun 2009 06:00:53 -0400 (EDT)
From: Mikulas Patocka <mpatocka@redhat.com>
To: paulus@samba.org
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH] Fix colors in mach64 accelerator

Use the same color-calculating algorithm as in atyfb_imageblit in this driver
or in generic cfb_fillrect.

This patch fixes bad colors when using an accelerator in 15-bit and 16-bit
modes.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com

---
 drivers/video/aty/mach64_accel.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: linux-2.6.30-fast/drivers/video/aty/mach64_accel.c
===================================================================
--- linux-2.6.30-fast.orig/drivers/video/aty/mach64_accel.c	2009-06-15 21:42:10.000000000 +0200
+++ linux-2.6.30-fast/drivers/video/aty/mach64_accel.c	2009-06-17 08:49:01.000000000 +0200
@@ -239,7 +239,7 @@ void atyfb_copyarea(struct fb_info *info
 void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
 {
 	struct atyfb_par *par = (struct atyfb_par *) info->par;
-	u32 color = rect->color, dx = rect->dx, width = rect->width, rotation = 0;
+	u32 color, dx = rect->dx, width = rect->width, rotation = 0;
 
 	if (par->asleep)
 		return;
@@ -250,8 +250,11 @@ void atyfb_fillrect(struct fb_info *info
 		return;
 	}
 
-	color |= (rect->color << 8);
-	color |= (rect->color << 16);
+	if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
+	    info->fix.visual == FB_VISUAL_DIRECTCOLOR)
+		color = ((u32 *)(info->pseudo_palette))[rect->color];
+	else
+		color = rect->color;
 
 	if (info->var.bits_per_pixel == 24) {
 		/* In 24 bpp, the engine is in 8 bpp - this requires that all */

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf

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

* Re: [PATCH] Fix colors in mach64 accelerator (fwd)
  2009-10-06 16:21 [PATCH] Fix colors in mach64 accelerator (fwd) Mikulas Patocka
@ 2009-10-07  4:20 ` Paul Mackerras
  2009-10-07 12:13   ` Mikulas Patocka
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Mackerras @ 2009-10-07  4:20 UTC (permalink / raw)
  To: Mikulas Patocka; +Cc: linux-fbdev-devel

Mikulas Patocka writes:

> In the previous kernel cycle I sent you this patch, you acknowledged it 
> but didn't put it to the kernel.
> 
> Did you forget it? Do you want to add it in this cycle?
> 
> The patch fixes mach64 fill rect routine for 15 and 16-bit modes.

Huh?  Are you talking to me?  Why did you think I was responsible for
this driver?

Paul.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

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

* Re: [PATCH] Fix colors in mach64 accelerator (fwd)
  2009-10-07  4:20 ` Paul Mackerras
@ 2009-10-07 12:13   ` Mikulas Patocka
  0 siblings, 0 replies; 3+ messages in thread
From: Mikulas Patocka @ 2009-10-07 12:13 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linux-fbdev-devel

On Wed, 7 Oct 2009, Paul Mackerras wrote:

> Mikulas Patocka writes:
> 
> > In the previous kernel cycle I sent you this patch, you acknowledged it 
> > but didn't put it to the kernel.
> > 
> > Did you forget it? Do you want to add it in this cycle?
> > 
> > The patch fixes mach64 fill rect routine for 15 and 16-bit modes.
> 
> Huh?  Are you talking to me?  Why did you think I was responsible for
> this driver?
>
> Paul.

There's a line in the MAINTAINERS file:

RAGE128 FRAMEBUFFER DISPLAY DRIVER
M:      Paul Mackerras <paulus@samba.org>
L:      linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) S:      Maintained
F:      drivers/video/aty/aty128fb.c

This patch is for aty/mach64.c but you're closest to that, there is no 
entry for aty/mach64.c in Maintainers.

Mikulas

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

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

end of thread, other threads:[~2009-10-07 12:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-06 16:21 [PATCH] Fix colors in mach64 accelerator (fwd) Mikulas Patocka
2009-10-07  4:20 ` Paul Mackerras
2009-10-07 12:13   ` Mikulas Patocka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.