Commit 93228a45 authored by Antonino Daplas's avatar Antonino Daplas Committed by Linus Torvalds

[PATCH] fbdev: Clean up i810fb cursor implementation

remove/modify all references to info->cursor
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c11f2253
...@@ -1416,62 +1416,50 @@ static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor) ...@@ -1416,62 +1416,50 @@ static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
i810_enable_cursor(mmio, OFF); i810_enable_cursor(mmio, OFF);
if (cursor->set & FB_CUR_SETHOT)
info->cursor.hot = cursor->hot;
if (cursor->set & FB_CUR_SETPOS) { if (cursor->set & FB_CUR_SETPOS) {
u32 tmp; u32 tmp;
info->cursor.image.dx = cursor->image.dx; tmp = (cursor->image.dx - info->var.xoffset) & 0xffff;
info->cursor.image.dy = cursor->image.dy; tmp |= (cursor->image.dy - info->var.yoffset) << 16;
tmp = (info->cursor.image.dx - info->var.xoffset) & 0xffff;
tmp |= (info->cursor.image.dy - info->var.yoffset) << 16;
i810_writel(CURPOS, mmio, tmp); i810_writel(CURPOS, mmio, tmp);
} }
if (cursor->set & FB_CUR_SETSIZE) { if (cursor->set & FB_CUR_SETSIZE)
i810_reset_cursor_image(par); i810_reset_cursor_image(par);
info->cursor.image.height = cursor->image.height;
info->cursor.image.width = cursor->image.width;
}
if (cursor->set & FB_CUR_SETCMAP) { if (cursor->set & FB_CUR_SETCMAP)
i810_load_cursor_colors(cursor->image.fg_color, i810_load_cursor_colors(cursor->image.fg_color,
cursor->image.bg_color, cursor->image.bg_color,
info); info);
info->cursor.image.fg_color = cursor->image.fg_color;
info->cursor.image.bg_color = cursor->image.bg_color;
} if (cursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) {
int size = ((cursor->image.width + 7) >> 3) *
if (cursor->set & (FB_CUR_SETSHAPE)) { cursor->image.height;
int size = ((info->cursor.image.width + 7) >> 3) *
info->cursor.image.height;
int i; int i;
u8 *data = kmalloc(64 * 8, GFP_KERNEL); u8 *data = kmalloc(64 * 8, GFP_KERNEL);
if (data == NULL) if (data == NULL)
return -ENOMEM; return -ENOMEM;
info->cursor.image.data = cursor->image.data;
switch (info->cursor.rop) { switch (cursor->rop) {
case ROP_XOR: case ROP_XOR:
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
data[i] = info->cursor.image.data[i] ^ info->cursor.mask[i]; data[i] = cursor->image.data[i] ^ cursor->mask[i];
break; break;
case ROP_COPY: case ROP_COPY:
default: default:
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
data[i] = info->cursor.image.data[i] & info->cursor.mask[i]; data[i] = cursor->image.data[i] & cursor->mask[i];
break; break;
} }
i810_load_cursor_image(info->cursor.image.width,
info->cursor.image.height, data, i810_load_cursor_image(cursor->image.width,
cursor->image.height, data,
par); par);
kfree(data); kfree(data);
} }
if (info->cursor.enable) if (cursor->enable)
i810_enable_cursor(mmio, ON); i810_enable_cursor(mmio, ON);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment