diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-05-20 16:27:44 -0400 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-05-20 16:27:44 -0400 |
commit | ad34ea2cc3845ef4dcd7d12fb0fa8484734bd672 (patch) | |
tree | ad434400f5ecaa33b433c8f830e40792d8d6c05c /drivers/video/tcx.c | |
parent | 90356ac3194bf91a441a5f9c3067af386ef62462 (diff) | |
parent | 88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff) |
merge by hand - fix up rejections in Documentation/DocBook/Makefile
Diffstat (limited to 'drivers/video/tcx.c')
-rw-r--r-- | drivers/video/tcx.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c index e2fa9e1ddc3b..1986a8b3833c 100644 --- a/drivers/video/tcx.c +++ b/drivers/video/tcx.c | |||
@@ -36,6 +36,7 @@ static int tcx_blank(int, struct fb_info *); | |||
36 | static int tcx_mmap(struct fb_info *, struct file *, struct vm_area_struct *); | 36 | static int tcx_mmap(struct fb_info *, struct file *, struct vm_area_struct *); |
37 | static int tcx_ioctl(struct inode *, struct file *, unsigned int, | 37 | static int tcx_ioctl(struct inode *, struct file *, unsigned int, |
38 | unsigned long, struct fb_info *); | 38 | unsigned long, struct fb_info *); |
39 | static int tcx_pan_display(struct fb_var_screeninfo *, struct fb_info *); | ||
39 | 40 | ||
40 | /* | 41 | /* |
41 | * Frame buffer operations | 42 | * Frame buffer operations |
@@ -45,6 +46,7 @@ static struct fb_ops tcx_ops = { | |||
45 | .owner = THIS_MODULE, | 46 | .owner = THIS_MODULE, |
46 | .fb_setcolreg = tcx_setcolreg, | 47 | .fb_setcolreg = tcx_setcolreg, |
47 | .fb_blank = tcx_blank, | 48 | .fb_blank = tcx_blank, |
49 | .fb_pan_display = tcx_pan_display, | ||
48 | .fb_fillrect = cfb_fillrect, | 50 | .fb_fillrect = cfb_fillrect, |
49 | .fb_copyarea = cfb_copyarea, | 51 | .fb_copyarea = cfb_copyarea, |
50 | .fb_imageblit = cfb_imageblit, | 52 | .fb_imageblit = cfb_imageblit, |
@@ -153,6 +155,12 @@ static void tcx_reset (struct fb_info *info) | |||
153 | spin_unlock_irqrestore(&par->lock, flags); | 155 | spin_unlock_irqrestore(&par->lock, flags); |
154 | } | 156 | } |
155 | 157 | ||
158 | static int tcx_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) | ||
159 | { | ||
160 | tcx_reset(info); | ||
161 | return 0; | ||
162 | } | ||
163 | |||
156 | /** | 164 | /** |
157 | * tcx_setcolreg - Optional function. Sets a color register. | 165 | * tcx_setcolreg - Optional function. Sets a color register. |
158 | * @regno: boolean, 0 copy local, 1 get_user() function | 166 | * @regno: boolean, 0 copy local, 1 get_user() function |
@@ -366,6 +374,9 @@ static void tcx_init_one(struct sbus_dev *sdev) | |||
366 | all->par.lowdepth = prom_getbool(sdev->prom_node, "tcx-8-bit"); | 374 | all->par.lowdepth = prom_getbool(sdev->prom_node, "tcx-8-bit"); |
367 | 375 | ||
368 | sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); | 376 | sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); |
377 | all->info.var.red.length = 8; | ||
378 | all->info.var.green.length = 8; | ||
379 | all->info.var.blue.length = 8; | ||
369 | 380 | ||
370 | linebytes = prom_getintdefault(sdev->prom_node, "linebytes", | 381 | linebytes = prom_getintdefault(sdev->prom_node, "linebytes", |
371 | all->info.var.xres); | 382 | all->info.var.xres); |
@@ -439,6 +450,7 @@ static void tcx_init_one(struct sbus_dev *sdev) | |||
439 | return; | 450 | return; |
440 | } | 451 | } |
441 | 452 | ||
453 | fb_set_cmap(&all->info.cmap, &all->info); | ||
442 | tcx_init_fix(&all->info, linebytes); | 454 | tcx_init_fix(&all->info, linebytes); |
443 | 455 | ||
444 | if (register_framebuffer(&all->info) < 0) { | 456 | if (register_framebuffer(&all->info) < 0) { |
@@ -466,7 +478,7 @@ int __init tcx_init(void) | |||
466 | return -ENODEV; | 478 | return -ENODEV; |
467 | 479 | ||
468 | for_all_sbusdev(sdev, sbus) { | 480 | for_all_sbusdev(sdev, sbus) { |
469 | if (!strcmp(sdev->prom_name, "tcx")) | 481 | if (!strcmp(sdev->prom_name, "SUNW,tcx")) |
470 | tcx_init_one(sdev); | 482 | tcx_init_one(sdev); |
471 | } | 483 | } |
472 | 484 | ||