Skip to contentSkip to conversation

patch to radeonfb accel functions

PATCH John Zielinski 2 participants 2 messages Apr 23, 2004 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

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

drivers/video/aty/radeon_accel.c +5 -1
diff -urNX dontdiff linux-2.6.5/drivers/video/aty/radeon_accel.c linux/drivers/video/aty/radeon_accel.c
@@ -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));
 
#1 lore raw
Quoted 8 lines · John Zielinski

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?

Your first patch wasn't lost, it's in my queue, I was planning to submit it along with other fixes as soon as we have sorted out the fbcon accel setting issue.

I'll look at this other question tomorrow hopefully

Ben.

-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297