Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rasmus Villemoes and committed by
Tomi Valkeinen
2f9ba65d e29f0d55

-90
-3
drivers/video/fbdev/atafb.c
··· 313 313 * * Draws cursor * 314 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 316 * * wait for blit idle, optional * 320 317 * int (*fb_sync)(struct fb_info *info); 321 318 *
-22
drivers/video/fbdev/au1100fb.c
··· 334 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 337 /* fb_mmap 359 338 * Map video memory in user space. We don't use the generic fb_mmap method mainly 360 339 * to allow the use of the TLB streaming flag (CCA=6) ··· 359 380 .fb_fillrect = cfb_fillrect, 360 381 .fb_copyarea = cfb_copyarea, 361 382 .fb_imageblit = cfb_imageblit, 362 - .fb_rotate = au1100fb_fb_rotate, 363 383 .fb_mmap = au1100fb_fb_mmap, 364 384 }; 365 385
-23
drivers/video/fbdev/bf537-lq035.c
··· 554 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 557 static int bfin_lq035_fb_cursor(struct fb_info *info, struct fb_cursor *cursor) 580 558 { 581 559 if (nocursor) ··· 601 623 .fb_open = bfin_lq035_fb_open, 602 624 .fb_release = bfin_lq035_fb_release, 603 625 .fb_check_var = bfin_lq035_fb_check_var, 604 - .fb_rotate = bfin_lq035_fb_rotate, 605 626 .fb_fillrect = cfb_fillrect, 606 627 .fb_copyarea = cfb_copyarea, 607 628 .fb_imageblit = cfb_imageblit,
-22
drivers/video/fbdev/omap/omapfb_main.c
··· 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 598 * Set new x,y offsets in the virtual display for the visible area and switch 620 599 * to the new mode. ··· 1235 1256 .fb_ioctl = omapfb_ioctl, 1236 1257 .fb_check_var = omapfb_check_var, 1237 1258 .fb_set_par = omapfb_set_par, 1238 - .fb_rotate = omapfb_rotate, 1239 1259 .fb_pan_display = omapfb_pan_display, 1240 1260 }; 1241 1261
-17
drivers/video/fbdev/skeletonfb.c
··· 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 617 * xxxfb_sync - NOT a required function. Normally the accel engine 634 618 * for a graphics card take a specific amount of time. 635 619 * Often we have to wait for the accelerator to finish ··· 649 665 .fb_copyarea = xxxfb_copyarea, /* Needed !!! */ 650 666 .fb_imageblit = xxxfb_imageblit, /* Needed !!! */ 651 667 .fb_cursor = xxxfb_cursor, /* Optional !!! */ 652 - .fb_rotate = xxxfb_rotate, 653 668 .fb_sync = xxxfb_sync, 654 669 .fb_ioctl = xxxfb_ioctl, 655 670 .fb_mmap = xxxfb_mmap,
-3
include/linux/fb.h
··· 296 296 /* Draws cursor */ 297 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 299 /* wait for blit idle, optional */ 303 300 int (*fb_sync)(struct fb_info *info); 304 301