X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fvideo%2Ftdfxfb.c;h=2873877622e3388b71161301725cf60a200f635c;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=89479a9eb7e0b1ad9604ee9a586d17feda44ed69;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c index 89479a9eb..287387762 100644 --- a/drivers/video/tdfxfb.c +++ b/drivers/video/tdfxfb.c @@ -166,7 +166,11 @@ static int tdfxfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *inf static void tdfxfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); static void tdfxfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image); +#ifdef CONFIG_FB_3DFX_ACCEL static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor); +#else /* !CONFIG_FB_3DFX_ACCEL */ +#define tdfxfb_cursor soft_cursor +#endif /* CONFIG_FB_3DFX_ACCEL */ static int banshee_wait_idle(struct fb_info *info); static struct fb_ops tdfxfb_ops = { @@ -180,7 +184,7 @@ static struct fb_ops tdfxfb_ops = { .fb_copyarea = tdfxfb_copyarea, .fb_imageblit = tdfxfb_imageblit, .fb_sync = banshee_wait_idle, - .fb_cursor = soft_cursor, + .fb_cursor = tdfxfb_cursor, }; /* @@ -1001,6 +1005,7 @@ static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image) banshee_wait_idle(info); } +#ifdef CONFIG_FB_3DFX_ACCEL static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor) { struct tdfx_par *par = (struct tdfx_par *) info->par; @@ -1045,7 +1050,7 @@ static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor) bg_color = ((cmap.red[cmap.start+1] << 16) | (cmap.green[cmap.start+1] << 8) | (cmap.blue[cmap.start+1])); - fb_copy_cmap(&cmap, &info->cursor.image.cmap, 0); + fb_copy_cmap(&cmap, &info->cursor.image.cmap); spin_lock_irqsave(&par->DAClock, flags); banshee_make_room(par, 2); tdfx_outl(par, HWCURC0, bg_color); @@ -1096,7 +1101,7 @@ static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor) */ u8 *cursorbase = (u8 *) info->cursor.image.data; char *bitmap = (char *)cursor->image.data; - char *mask = cursor->mask; + const char *mask = cursor->mask; int i, j, k, h = 0; for (i = 0; i < 64; i++) { @@ -1137,6 +1142,7 @@ static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor) spin_unlock_irqrestore(&par->DAClock, flags); return 0; } +#endif /* CONFIG_FB_3DFX_ACCEL */ /** * tdfxfb_probe - Device Initializiation