From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Andrew Morton <akpm@osdl.org>,
Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>
Cc: Alexander Kern <alex.kern@gmx.de>
Subject: [PATCH 8/8] fbdev: Clean up mach64 cursor implementation
Date: Wed, 20 Oct 2004 08:16:25 +0800 [thread overview]
Message-ID: <200410200816.25527.adaplas@hotpop.com> (raw)
- remove/modify all references to info->cursor
Signed-off-by: Antonino Daplas <adaplas@pol.net>
---
mach64_cursor.c | 35 ++++++++++-------------------------
1 files changed, 10 insertions(+), 25 deletions(-)
diff -Nru a/drivers/video/aty/mach64_cursor.c b/drivers/video/aty/mach64_cursor.c
--- a/drivers/video/aty/mach64_cursor.c 2004-10-09 00:22:38 +08:00
+++ b/drivers/video/aty/mach64_cursor.c 2004-10-17 16:15:23 +08:00
@@ -88,22 +88,9 @@
wait_for_fifo(1, par);
aty_st_le32(GEN_TEST_CNTL, aty_ld_le32(GEN_TEST_CNTL, par) & ~HWCURSOR_ENABLE, par);
- /* Set size */
- if (cursor->set & FB_CUR_SETSIZE) {
- info->cursor.image.height = cursor->image.height;
- info->cursor.image.width = cursor->image.width;
- }
-
- /* Set hot spot */
- if (cursor->set & FB_CUR_SETHOT)
- info->cursor.hot = cursor->hot;
-
/* set position */
if (cursor->set & FB_CUR_SETPOS) {
- info->cursor.image.dx = cursor->image.dx;
- info->cursor.image.dy = cursor->image.dy;
-
- x = info->cursor.image.dx - info->cursor.hot.x - info->var.xoffset;
+ x = cursor->image.dx - cursor->hot.x - info->var.xoffset;
if (x < 0) {
xoff = -x;
x = 0;
@@ -111,7 +98,7 @@
xoff = 0;
}
- y = info->cursor.image.dy - info->cursor.hot.y - info->var.yoffset;
+ y = cursor->image.dy - cursor->hot.y - info->var.yoffset;
if (y < 0) {
yoff = -y;
y = 0;
@@ -128,7 +115,7 @@
wait_for_fifo(4, par);
aty_st_le32(CUR_OFFSET, (info->fix.smem_len >> 3) + (yoff << 1), par);
aty_st_le32(CUR_HORZ_VERT_OFF,
- ((u32) (64 - info->cursor.image.height + yoff) << 16) | xoff,
+ ((u32) (64 - cursor->image.height + yoff) << 16) | xoff,
par);
aty_st_le32(CUR_HORZ_VERT_POSN, ((u32) y << 16) | x, par);
}
@@ -137,10 +124,8 @@
if (cursor->set & FB_CUR_SETCMAP) {
u32 fg_idx, bg_idx, fg, bg;
- info->cursor.image.fg_color = cursor->image.fg_color;
- info->cursor.image.bg_color = cursor->image.bg_color;
- fg_idx = info->cursor.image.fg_color;
- bg_idx = info->cursor.image.bg_color;
+ fg_idx = cursor->image.fg_color;
+ bg_idx = cursor->image.bg_color;
fg = (info->cmap.red[fg_idx] << 24) |
(info->cmap.green[fg_idx] << 16) |
@@ -155,12 +140,12 @@
aty_st_le32(CUR_CLR1, fg, par);
}
- if (cursor->set & FB_CUR_SETSHAPE) {
+ if (cursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) {
u8 *src = (u8 *)cursor->image.data;
- u8 *msk = (u8 *)info->cursor.mask;
+ u8 *msk = (u8 *)cursor->mask;
u8 *dst = (u8 *)info->sprite.addr;
- unsigned int width = (info->cursor.image.width + 7) >> 3;
- unsigned int height = info->cursor.image.height;
+ unsigned int width = (cursor->image.width + 7) >> 3;
+ unsigned int height = cursor->image.height;
unsigned int align = info->sprite.scan_align;
unsigned int i, j, offset;
@@ -175,7 +160,7 @@
for (j = 0; j < width; j++) {
b = *src++;
m = *msk++;
- switch (info->cursor.rop) {
+ switch (cursor->rop) {
case ROP_XOR:
// Upper 4 bits of mask data
fb_writeb(cursor_mask_lookup[m >> 4 ] |
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
reply other threads:[~2004-10-20 0:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200410200816.25527.adaplas@hotpop.com \
--to=adaplas@hotpop.com \
--cc=akpm@osdl.org \
--cc=alex.kern@gmx.de \
--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).