All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Zielinski <grim@undead.cc>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: patch to radeonfb accel functions
Date: Fri, 23 Apr 2004 03:04:52 -0400	[thread overview]
Message-ID: <4088C014.7030505@undead.cc> (raw)

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

I haven't seen anything about this on the list so I'm posting it.  The 
first change adds the pseudo_palette lookup to the fillrect function 
which cleans up the ugliness when running make menuconfig among other 
things.  The second change I'm not 100% sure if it's right but I'm quite 
sure what was originally there isn't right.  DP_SRC_RECT has the same 
value as GMC_DST_8BPP and is listed in the DP_MIX section and not the 
GMC section .  I'm assuming it should have been GMC_DP_SRC_RECT .  Can 
someone else confirm this?

John


[-- Attachment #2: radeon_accel.patch --]
[-- Type: text/plain, Size: 908 bytes --]

diff -urNX dontdiff linux-2.6.5/drivers/video/aty/radeon_accel.c linux/drivers/video/aty/radeon_accel.c
--- linux-2.6.5/drivers/video/aty/radeon_accel.c	2004-04-03 22:37:36.000000000 -0500
+++ linux/drivers/video/aty/radeon_accel.c	2004-04-23 02:36:54.000000000 -0400
@@ -47,6 +47,10 @@
 	if(modded.dx + modded.width  > vxres) modded.width  = vxres - modded.dx;
 	if(modded.dy + modded.height > vyres) modded.height = vyres - modded.dy;
 
+	if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
+	    info->fix.visual == FB_VISUAL_DIRECTCOLOR )
+		modded.color = ((u32 *) (info->pseudo_palette))[modded.color];
+		
 	radeonfb_prim_fillrect(rinfo, &modded);
 }
 
@@ -58,7 +62,7 @@
 		rinfo->dp_gui_master_cntl /* i.e. GMC_DST_32BPP */
 		| GMC_SRC_DSTCOLOR
 		| ROP3_S 
-		| DP_SRC_RECT );
+		| GMC_DP_SRC_RECT );
 	OUTREG(DP_WRITE_MSK, 0xffffffff);
 	OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM));
 

             reply	other threads:[~2004-04-23  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-23  7:04 John Zielinski [this message]
2004-04-23 10:18 ` patch to radeonfb accel functions Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4088C014.7030505@undead.cc \
    --to=grim@undead.cc \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.