7 #include <linux/string.h>
61 static const u8 cursor_bits_lookup[16] = {
62 0x00, 0x40, 0x10, 0x50, 0x04, 0x44, 0x14, 0x54,
63 0x01, 0x41, 0x11, 0x51, 0x05, 0x45, 0x15, 0x55
79 wait_for_fifo(1, par);
89 x = cursor->
image.dx - cursor->
hot.x - info->
var.xoffset;
97 y = cursor->
image.dy - cursor->
hot.y - info->
var.yoffset;
115 wait_for_fifo(3, par);
118 ((
u32) (64 -
h + yoff) << 16) | xoff, par);
124 u32 fg_idx, bg_idx, fg,
bg;
126 fg_idx = cursor->
image.fg_color;
127 bg_idx = cursor->
image.bg_color;
129 fg = ((info->
cmap.red[fg_idx] & 0xff) << 24) |
130 ((info->
cmap.green[fg_idx] & 0xff) << 16) |
131 ((info->
cmap.blue[fg_idx] & 0xff) << 8) | 0xff;
133 bg = ((info->
cmap.red[bg_idx] & 0xff) << 24) |
134 ((info->
cmap.green[bg_idx] & 0xff) << 16) |
135 ((info->
cmap.blue[bg_idx] & 0xff) << 8);
137 wait_for_fifo(2, par);
146 unsigned int width = (cursor->
image.width + 7) >> 3;
156 offset = align -
width*2;
158 for (i = 0; i <
height; i++) {
159 for (j = 0; j <
width; j++) {
162 switch (cursor->
rop) {
165 fb_writeb(cursor_bits_lookup[(b ^ m) >> 4], dst++);
167 fb_writeb(cursor_bits_lookup[(b ^ m) & 0x0f],
172 fb_writeb(cursor_bits_lookup[(b & m) >> 4], dst++);
174 fb_writeb(cursor_bits_lookup[(b & m) & 0x0f],
197 addr = info->
fix.smem_start - 0x800000 + info->
fix.smem_len;
207 info->
sprite.scan_align = 16;
208 info->
sprite.buf_align = 16;
211 info->
fbops->fb_cursor = atyfb_cursor;