Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30285
b: refs/heads/master
c: 72c24cc
h: refs/heads/master
i:
  30283: cbff93c
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Jun 26, 2006
1 parent 3f4ee42 commit f483131
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8eec4981080dc9dcf8fd5931a947c6f066ee0be6
refs/heads/master: 72c24cc51aef31219f2e258b4dcb68e09399e040
31 changes: 12 additions & 19 deletions trunk/drivers/video/aty/mach64_cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ static const u8 cursor_bits_lookup[16] = {
0x01, 0x41, 0x11, 0x51, 0x05, 0x45, 0x15, 0x55
};

static const u8 cursor_mask_lookup[16] = {
0xaa, 0x2a, 0x8a, 0x0a, 0xa2, 0x22, 0x82, 0x02,
0xa8, 0x28, 0x88, 0x08, 0xa0, 0x20, 0x80, 0x00
};

static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
{
struct atyfb_par *par = (struct atyfb_par *) info->par;
Expand Down Expand Up @@ -130,13 +125,13 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
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) |
(info->cmap.blue[fg_idx] << 8) | 15;
fg = ((info->cmap.red[fg_idx] & 0xff) << 24) |
((info->cmap.green[fg_idx] & 0xff) << 16) |
((info->cmap.blue[fg_idx] & 0xff) << 8) | 0xff;

bg = (info->cmap.red[bg_idx] << 24) |
(info->cmap.green[bg_idx] << 16) |
(info->cmap.blue[bg_idx] << 8);
bg = ((info->cmap.red[bg_idx] & 0xff) << 24) |
((info->cmap.green[bg_idx] & 0xff) << 16) |
((info->cmap.blue[bg_idx] & 0xff) << 8);

wait_for_fifo(2, par);
aty_st_le32(CUR_CLR0, bg, par);
Expand Down Expand Up @@ -166,19 +161,17 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
switch (cursor->rop) {
case ROP_XOR:
// Upper 4 bits of mask data
fb_writeb(cursor_mask_lookup[m >> 4 ] |
cursor_bits_lookup[(b ^ m) >> 4], dst++);
fb_writeb(cursor_bits_lookup[(b ^ m) >> 4], dst++);
// Lower 4 bits of mask
fb_writeb(cursor_mask_lookup[m & 0x0f ] |
cursor_bits_lookup[(b ^ m) & 0x0f], dst++);
fb_writeb(cursor_bits_lookup[(b ^ m) & 0x0f],
dst++);
break;
case ROP_COPY:
// Upper 4 bits of mask data
fb_writeb(cursor_mask_lookup[m >> 4 ] |
cursor_bits_lookup[(b & m) >> 4], dst++);
fb_writeb(cursor_bits_lookup[(b & m) >> 4], dst++);
// Lower 4 bits of mask
fb_writeb(cursor_mask_lookup[m & 0x0f ] |
cursor_bits_lookup[(b & m) & 0x0f], dst++);
fb_writeb(cursor_bits_lookup[(b & m) & 0x0f],
dst++);
break;
}
}
Expand Down

0 comments on commit f483131

Please sign in to comment.