diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2016-02-09 13:56:11 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-02-26 06:28:35 -0500 |
commit | 2f9ba65d9d79311119470d9a5280b335c2fb023c (patch) | |
tree | 1df6d22157387c373adde4a31d74dccbe3e331bd | |
parent | e29f0d55e2b98f630d86892688a00a9d820b9989 (diff) |
fbdev: kill fb_rotate
The fb_rotate method in struct fb_ops is never actually invoked, and
it's been that way in the entire history of git (in fact, the last
occurrence of the string '->fb_rotate' vanished over 10 years ago,
with b4d8aea6d6, and that merely tested whether the callback
existed). So remove some dead code and make struct fb_obs a little
smaller.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/fbdev/atafb.c | 3 | ||||
-rw-r--r-- | drivers/video/fbdev/au1100fb.c | 22 | ||||
-rw-r--r-- | drivers/video/fbdev/bf537-lq035.c | 23 | ||||
-rw-r--r-- | drivers/video/fbdev/omap/omapfb_main.c | 22 | ||||
-rw-r--r-- | drivers/video/fbdev/skeletonfb.c | 17 | ||||
-rw-r--r-- | include/linux/fb.h | 3 |
6 files changed, 0 insertions, 90 deletions
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index d6ce613e12ad..fcd2dd670a65 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c | |||
@@ -313,9 +313,6 @@ extern unsigned char fontdata_8x16[]; | |||
313 | * * Draws cursor * | 313 | * * Draws cursor * |
314 | * int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor); | 314 | * int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor); |
315 | * | 315 | * |
316 | * * Rotates the display * | ||
317 | * void (*fb_rotate)(struct fb_info *info, int angle); | ||
318 | * | ||
319 | * * wait for blit idle, optional * | 316 | * * wait for blit idle, optional * |
320 | * int (*fb_sync)(struct fb_info *info); | 317 | * int (*fb_sync)(struct fb_info *info); |
321 | * | 318 | * |
diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c index 59560189b24a..35df2c1a8a63 100644 --- a/drivers/video/fbdev/au1100fb.c +++ b/drivers/video/fbdev/au1100fb.c | |||
@@ -334,27 +334,6 @@ int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi) | |||
334 | return 0; | 334 | return 0; |
335 | } | 335 | } |
336 | 336 | ||
337 | /* fb_rotate | ||
338 | * Rotate the display of this angle. This doesn't seems to be used by the core, | ||
339 | * but as our hardware supports it, so why not implementing it... | ||
340 | */ | ||
341 | void au1100fb_fb_rotate(struct fb_info *fbi, int angle) | ||
342 | { | ||
343 | struct au1100fb_device *fbdev = to_au1100fb_device(fbi); | ||
344 | |||
345 | print_dbg("fb_rotate %p %d", fbi, angle); | ||
346 | |||
347 | if (fbdev && (angle > 0) && !(angle % 90)) { | ||
348 | |||
349 | fbdev->regs->lcd_control &= ~LCD_CONTROL_GO; | ||
350 | |||
351 | fbdev->regs->lcd_control &= ~(LCD_CONTROL_SM_MASK); | ||
352 | fbdev->regs->lcd_control |= ((angle/90) << LCD_CONTROL_SM_BIT); | ||
353 | |||
354 | fbdev->regs->lcd_control |= LCD_CONTROL_GO; | ||
355 | } | ||
356 | } | ||
357 | |||
358 | /* fb_mmap | 337 | /* fb_mmap |
359 | * Map video memory in user space. We don't use the generic fb_mmap method mainly | 338 | * Map video memory in user space. We don't use the generic fb_mmap method mainly |
360 | * to allow the use of the TLB streaming flag (CCA=6) | 339 | * to allow the use of the TLB streaming flag (CCA=6) |
@@ -380,7 +359,6 @@ static struct fb_ops au1100fb_ops = | |||
380 | .fb_fillrect = cfb_fillrect, | 359 | .fb_fillrect = cfb_fillrect, |
381 | .fb_copyarea = cfb_copyarea, | 360 | .fb_copyarea = cfb_copyarea, |
382 | .fb_imageblit = cfb_imageblit, | 361 | .fb_imageblit = cfb_imageblit, |
383 | .fb_rotate = au1100fb_fb_rotate, | ||
384 | .fb_mmap = au1100fb_fb_mmap, | 362 | .fb_mmap = au1100fb_fb_mmap, |
385 | }; | 363 | }; |
386 | 364 | ||
diff --git a/drivers/video/fbdev/bf537-lq035.c b/drivers/video/fbdev/bf537-lq035.c index 7db3052b471d..ef29fb425122 100644 --- a/drivers/video/fbdev/bf537-lq035.c +++ b/drivers/video/fbdev/bf537-lq035.c | |||
@@ -554,28 +554,6 @@ static int bfin_lq035_fb_check_var(struct fb_var_screeninfo *var, | |||
554 | return 0; | 554 | return 0; |
555 | } | 555 | } |
556 | 556 | ||
557 | /* fb_rotate | ||
558 | * Rotate the display of this angle. This doesn't seems to be used by the core, | ||
559 | * but as our hardware supports it, so why not implementing it... | ||
560 | */ | ||
561 | static void bfin_lq035_fb_rotate(struct fb_info *fbi, int angle) | ||
562 | { | ||
563 | pr_debug("%s: %p %d", __func__, fbi, angle); | ||
564 | #if (defined(UD) && defined(LBR)) | ||
565 | switch (angle) { | ||
566 | |||
567 | case 180: | ||
568 | gpio_set_value(LBR, 0); | ||
569 | gpio_set_value(UD, 1); | ||
570 | break; | ||
571 | default: | ||
572 | gpio_set_value(LBR, 1); | ||
573 | gpio_set_value(UD, 0); | ||
574 | break; | ||
575 | } | ||
576 | #endif | ||
577 | } | ||
578 | |||
579 | static int bfin_lq035_fb_cursor(struct fb_info *info, struct fb_cursor *cursor) | 557 | static int bfin_lq035_fb_cursor(struct fb_info *info, struct fb_cursor *cursor) |
580 | { | 558 | { |
581 | if (nocursor) | 559 | if (nocursor) |
@@ -623,7 +601,6 @@ static struct fb_ops bfin_lq035_fb_ops = { | |||
623 | .fb_open = bfin_lq035_fb_open, | 601 | .fb_open = bfin_lq035_fb_open, |
624 | .fb_release = bfin_lq035_fb_release, | 602 | .fb_release = bfin_lq035_fb_release, |
625 | .fb_check_var = bfin_lq035_fb_check_var, | 603 | .fb_check_var = bfin_lq035_fb_check_var, |
626 | .fb_rotate = bfin_lq035_fb_rotate, | ||
627 | .fb_fillrect = cfb_fillrect, | 604 | .fb_fillrect = cfb_fillrect, |
628 | .fb_copyarea = cfb_copyarea, | 605 | .fb_copyarea = cfb_copyarea, |
629 | .fb_imageblit = cfb_imageblit, | 606 | .fb_imageblit = cfb_imageblit, |
diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index 393ae1bc07e8..6429f33167f5 100644 --- a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c | |||
@@ -594,27 +594,6 @@ static int set_fb_var(struct fb_info *fbi, | |||
594 | } | 594 | } |
595 | 595 | ||
596 | 596 | ||
597 | /* Set rotation (0, 90, 180, 270 degree), and switch to the new mode. */ | ||
598 | static void omapfb_rotate(struct fb_info *fbi, int rotate) | ||
599 | { | ||
600 | struct omapfb_plane_struct *plane = fbi->par; | ||
601 | struct omapfb_device *fbdev = plane->fbdev; | ||
602 | |||
603 | omapfb_rqueue_lock(fbdev); | ||
604 | if (rotate != fbi->var.rotate) { | ||
605 | struct fb_var_screeninfo *new_var = &fbdev->new_var; | ||
606 | |||
607 | memcpy(new_var, &fbi->var, sizeof(*new_var)); | ||
608 | new_var->rotate = rotate; | ||
609 | if (set_fb_var(fbi, new_var) == 0 && | ||
610 | memcmp(new_var, &fbi->var, sizeof(*new_var))) { | ||
611 | memcpy(&fbi->var, new_var, sizeof(*new_var)); | ||
612 | ctrl_change_mode(fbi); | ||
613 | } | ||
614 | } | ||
615 | omapfb_rqueue_unlock(fbdev); | ||
616 | } | ||
617 | |||
618 | /* | 597 | /* |
619 | * Set new x,y offsets in the virtual display for the visible area and switch | 598 | * Set new x,y offsets in the virtual display for the visible area and switch |
620 | * to the new mode. | 599 | * to the new mode. |
@@ -1256,7 +1235,6 @@ static struct fb_ops omapfb_ops = { | |||
1256 | .fb_ioctl = omapfb_ioctl, | 1235 | .fb_ioctl = omapfb_ioctl, |
1257 | .fb_check_var = omapfb_check_var, | 1236 | .fb_check_var = omapfb_check_var, |
1258 | .fb_set_par = omapfb_set_par, | 1237 | .fb_set_par = omapfb_set_par, |
1259 | .fb_rotate = omapfb_rotate, | ||
1260 | .fb_pan_display = omapfb_pan_display, | 1238 | .fb_pan_display = omapfb_pan_display, |
1261 | }; | 1239 | }; |
1262 | 1240 | ||
diff --git a/drivers/video/fbdev/skeletonfb.c b/drivers/video/fbdev/skeletonfb.c index fefde7c6add7..f948baa16d82 100644 --- a/drivers/video/fbdev/skeletonfb.c +++ b/drivers/video/fbdev/skeletonfb.c | |||
@@ -614,22 +614,6 @@ int xxxfb_cursor(struct fb_info *info, struct fb_cursor *cursor) | |||
614 | } | 614 | } |
615 | 615 | ||
616 | /** | 616 | /** |
617 | * xxxfb_rotate - NOT a required function. If your hardware | ||
618 | * supports rotation the whole screen then | ||
619 | * you would provide a hook for this. | ||
620 | * | ||
621 | * @info: frame buffer structure that represents a single frame buffer | ||
622 | * @angle: The angle we rotate the screen. | ||
623 | * | ||
624 | * This operation is used to set or alter the properities of the | ||
625 | * cursor. | ||
626 | */ | ||
627 | void xxxfb_rotate(struct fb_info *info, int angle) | ||
628 | { | ||
629 | /* Will be deprecated */ | ||
630 | } | ||
631 | |||
632 | /** | ||
633 | * xxxfb_sync - NOT a required function. Normally the accel engine | 617 | * xxxfb_sync - NOT a required function. Normally the accel engine |
634 | * for a graphics card take a specific amount of time. | 618 | * for a graphics card take a specific amount of time. |
635 | * Often we have to wait for the accelerator to finish | 619 | * Often we have to wait for the accelerator to finish |
@@ -665,7 +649,6 @@ static struct fb_ops xxxfb_ops = { | |||
665 | .fb_copyarea = xxxfb_copyarea, /* Needed !!! */ | 649 | .fb_copyarea = xxxfb_copyarea, /* Needed !!! */ |
666 | .fb_imageblit = xxxfb_imageblit, /* Needed !!! */ | 650 | .fb_imageblit = xxxfb_imageblit, /* Needed !!! */ |
667 | .fb_cursor = xxxfb_cursor, /* Optional !!! */ | 651 | .fb_cursor = xxxfb_cursor, /* Optional !!! */ |
668 | .fb_rotate = xxxfb_rotate, | ||
669 | .fb_sync = xxxfb_sync, | 652 | .fb_sync = xxxfb_sync, |
670 | .fb_ioctl = xxxfb_ioctl, | 653 | .fb_ioctl = xxxfb_ioctl, |
671 | .fb_mmap = xxxfb_mmap, | 654 | .fb_mmap = xxxfb_mmap, |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 55433f86f0a3..dfe88351341f 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -296,9 +296,6 @@ struct fb_ops { | |||
296 | /* Draws cursor */ | 296 | /* Draws cursor */ |
297 | int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor); | 297 | int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor); |
298 | 298 | ||
299 | /* Rotates the display */ | ||
300 | void (*fb_rotate)(struct fb_info *info, int angle); | ||
301 | |||
302 | /* wait for blit idle, optional */ | 299 | /* wait for blit idle, optional */ |
303 | int (*fb_sync)(struct fb_info *info); | 300 | int (*fb_sync)(struct fb_info *info); |
304 | 301 | ||