linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Eger <eger@havoc.gtf.org>
To: benh@kernel.crashing.org
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH] radeonfb: make pan and copyarea() play nice
Date: Thu, 3 Jun 2004 22:28:38 -0400	[thread overview]
Message-ID: <20040604022838.GB4175@havoc.gtf.org> (raw)


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

             reply	other threads:[~2004-06-04  2:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-04  2:28 David Eger [this message]
2004-06-04  4:12 ` [PATCH] radeonfb: make pan and copyarea() play nice 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=20040604022838.GB4175@havoc.gtf.org \
    --to=eger@havoc.gtf.org \
    --cc=benh@kernel.crashing.org \
    --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 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).