X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fvideo%2Ftcx.c;h=fe4f63f3849d530b9511da463050bcb74cb174c2;hb=49d5c7b08713c3a482d62b5a0ad41b4ec32905a5;hp=e2fa9e1ddc3bfbd85db7d19bae9b0993f59ceabe;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=powerpc.git diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c index e2fa9e1ddc..fe4f63f384 100644 --- a/drivers/video/tcx.c +++ b/drivers/video/tcx.c @@ -36,6 +36,7 @@ static int tcx_blank(int, struct fb_info *); static int tcx_mmap(struct fb_info *, struct file *, struct vm_area_struct *); static int tcx_ioctl(struct inode *, struct file *, unsigned int, unsigned long, struct fb_info *); +static int tcx_pan_display(struct fb_var_screeninfo *, struct fb_info *); /* * Frame buffer operations @@ -45,12 +46,15 @@ static struct fb_ops tcx_ops = { .owner = THIS_MODULE, .fb_setcolreg = tcx_setcolreg, .fb_blank = tcx_blank, + .fb_pan_display = tcx_pan_display, .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, .fb_mmap = tcx_mmap, .fb_ioctl = tcx_ioctl, - .fb_cursor = soft_cursor, +#ifdef CONFIG_COMPAT + .fb_compat_ioctl = sbusfb_compat_ioctl, +#endif }; /* THC definitions */ @@ -153,6 +157,12 @@ static void tcx_reset (struct fb_info *info) spin_unlock_irqrestore(&par->lock, flags); } +static int tcx_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) +{ + tcx_reset(info); + return 0; +} + /** * tcx_setcolreg - Optional function. Sets a color register. * @regno: boolean, 0 copy local, 1 get_user() function @@ -366,6 +376,9 @@ static void tcx_init_one(struct sbus_dev *sdev) all->par.lowdepth = prom_getbool(sdev->prom_node, "tcx-8-bit"); sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); + all->info.var.red.length = 8; + all->info.var.green.length = 8; + all->info.var.blue.length = 8; linebytes = prom_getintdefault(sdev->prom_node, "linebytes", all->info.var.xres); @@ -439,6 +452,7 @@ static void tcx_init_one(struct sbus_dev *sdev) return; } + fb_set_cmap(&all->info.cmap, &all->info); tcx_init_fix(&all->info, linebytes); if (register_framebuffer(&all->info) < 0) { @@ -466,7 +480,7 @@ int __init tcx_init(void) return -ENODEV; for_all_sbusdev(sdev, sbus) { - if (!strcmp(sdev->prom_name, "tcx")) + if (!strcmp(sdev->prom_name, "SUNW,tcx")) tcx_init_one(sdev); }