linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] radeonfb: make pan and copyarea() play nice
@ 2004-06-04  2:28 David Eger
  2004-06-04  4:12 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: David Eger @ 2004-06-04  2:28 UTC (permalink / raw)
  To: benh; +Cc: linux-fbdev-devel


Dear Ben,

Please apply this to radeon with the previous fb accel capabilities patch
I sent you.  This patch solves a couple of screen garbage issues I saw when 
trying to use both panning and copyarea()/fillrect().   

For some reason, I've got to sync() the engine after each copyarea()/
fillrect() call.  I don't know why this should be, but when I do, the
corruption goes away...

-dte

radeonfb: make copyarea() and fillrect() play nicely with panning and large 
    virtual screens
 
# drivers/video/aty/radeon_base.c
#   2004/06/04 03:10:58+02:00 eger@rosencrantz.theboonies.us +1 -0
#   make radeon accel play nice when the user wants to have a large virtual
#   screen to pan on.  fix previous drain bramage.
# 
# drivers/video/aty/radeon_accel.c
#   2004/06/04 03:10:58+02:00 eger@rosencrantz.theboonies.us +6 -4
#   make radeon accel play nice when the user wants to have a large virtual
#   screen to pan on.  fix previous drain bramage.
# 
diff -Nru a/drivers/video/aty/radeon_accel.c b/drivers/video/aty/radeon_accel.c
--- a/drivers/video/aty/radeon_accel.c	Fri Jun  4 03:14:04 2004
+++ b/drivers/video/aty/radeon_accel.c	Fri Jun  4 03:14:04 2004
@@ -35,8 +35,8 @@
 		return;
 	}
 
-	vxres = info->var.xres;
-	vyres = info->var.yres;
+	vxres = info->var.xres_virtual;
+	vyres = info->var.yres_virtual;
 
 	memcpy(&modded, region, sizeof(struct fb_fillrect));
 
@@ -48,6 +48,7 @@
 	if(modded.dy + modded.height > vyres) modded.height = vyres - modded.dy;
 
 	radeonfb_prim_fillrect(rinfo, &modded);
+	radeonfb_sync(info);  /* is there a less weighty way? */
 }
 
 static void radeonfb_prim_copyarea(struct radeonfb_info *rinfo, 
@@ -101,8 +102,8 @@
 		return;
 	}
 
-	vxres = info->var.xres;
-	vyres = info->var.yres;
+	vxres = info->var.xres_virtual;
+	vyres = info->var.yres_virtual;
 
 	if(!modded.width || !modded.height ||
 	   modded.sx >= vxres || modded.sy >= vyres ||
@@ -115,6 +116,7 @@
 	if(modded.dy + modded.height > vyres) modded.height = vyres - modded.dy;
   
 	radeonfb_prim_copyarea(rinfo, &modded);
+	radeonfb_sync(info);  /* is there a less weighty way? */
 }
 
 void radeonfb_imageblit(struct fb_info *info, const struct fb_image *image)
diff -Nru a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
--- a/drivers/video/aty/radeon_base.c	Fri Jun  4 03:14:04 2004
+++ b/drivers/video/aty/radeon_base.c	Fri Jun  4 03:14:04 2004
@@ -1779,6 +1779,7 @@
 	info->par = rinfo;
 	info->pseudo_palette = rinfo->pseudo_palette;
 	info->flags = FBINFO_DEFAULT
+		    | FBINFO_READS_FAST
 		    | FBINFO_HWACCEL_COPYAREA
 		    | FBINFO_HWACCEL_FILLRECT
 		    | FBINFO_HWACCEL_XPAN


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504

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

end of thread, other threads:[~2004-06-04  4:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-04  2:28 [PATCH] radeonfb: make pan and copyarea() play nice David Eger
2004-06-04  4:12 ` Benjamin Herrenschmidt

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