From: David Eger <eger@havoc.gtf.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux 2.6.6
Date: Mon, 10 May 2004 09:27:57 -0400 [thread overview]
Message-ID: <20040510132756.GA16907@havoc.gtf.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0405091954240.3028@ppc970.osdl.org>
On Sun, May 09, 2004 at 07:58:01PM -0700, Linus Torvalds wrote:
>
> Holler if I missed anything,
The -mm branch has two radeonfb bug fixes; please apply them.
One is BenH's. Mine, which fixes a corruption problem with
overlapping copyarea()'s is below.
-dte
--- drivers/video/aty/radeon_accel.c.orig 2004-04-19 01:26:52.000000000 +0200
+++ drivers/video/aty/radeon_accel.c 2004-04-19 01:49:14.000000000 +0200
@@ -53,6 +53,18 @@
static void radeonfb_prim_copyarea(struct radeonfb_info *rinfo,
const struct fb_copyarea *area)
{
+ int xdir, ydir;
+ u32 sx, sy, dx, dy, w, h;
+
+ w = area->width; h = area->height;
+ dx = area->dx; dy = area->dy;
+ sx = area->sx; sy = area->sy;
+ xdir = sx - dx;
+ ydir = sy - dy;
+
+ if ( xdir < 0 ) { sx += w-1; dx += w-1; }
+ if ( ydir < 0 ) { sy += h-1; dy += h-1; }
+
radeon_fifo_wait(3);
OUTREG(DP_GUI_MASTER_CNTL,
rinfo->dp_gui_master_cntl /* i.e. GMC_DST_32BPP */
@@ -60,12 +72,13 @@
| ROP3_S
| DP_SRC_RECT );
OUTREG(DP_WRITE_MSK, 0xffffffff);
- OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM));
+ OUTREG(DP_CNTL, (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0)
+ | (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0));
radeon_fifo_wait(3);
- OUTREG(SRC_Y_X, (area->sy << 16) | area->sx);
- OUTREG(DST_Y_X, (area->dy << 16) | area->dx);
- OUTREG(DST_HEIGHT_WIDTH, (area->height << 16) | area->width);
+ OUTREG(SRC_Y_X, (sy << 16) | sx);
+ OUTREG(DST_Y_X, (dy << 16) | dx);
+ OUTREG(DST_HEIGHT_WIDTH, (h << 16) | w);
}
next prev parent reply other threads:[~2004-05-10 13:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-10 2:58 Linus Torvalds
2004-05-10 8:39 ` Olaf Hering
2004-05-10 8:48 ` Russell King
2004-05-10 10:40 ` Dave Jones
2004-05-10 10:49 ` Olaf Hering
2004-05-10 10:51 ` Daniele Venzano
2004-05-10 15:11 ` Linus Torvalds
2004-05-10 16:39 ` Daniele Venzano
2004-05-10 20:44 ` Tomas Szepe
2004-05-11 13:34 ` Mark Mielke
2004-05-10 13:27 ` David Eger [this message]
2004-05-10 14:58 ` Roland Dreier
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=20040510132756.GA16907@havoc.gtf.org \
--to=eger@havoc.gtf.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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
all inboxes | Powered by JetHome®