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>
This commit is contained in:
parent
e29f0d55e2
commit
2f9ba65d9d
|
@ -313,9 +313,6 @@ extern unsigned char fontdata_8x16[];
|
|||
* * Draws cursor *
|
||||
* int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor);
|
||||
*
|
||||
* * Rotates the display *
|
||||
* void (*fb_rotate)(struct fb_info *info, int angle);
|
||||
*
|
||||
* * wait for blit idle, optional *
|
||||
* int (*fb_sync)(struct fb_info *info);
|
||||
*
|
||||
|
|
|
@ -334,27 +334,6 @@ int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* fb_rotate
|
||||
* Rotate the display of this angle. This doesn't seems to be used by the core,
|
||||
* but as our hardware supports it, so why not implementing it...
|
||||
*/
|
||||
void au1100fb_fb_rotate(struct fb_info *fbi, int angle)
|
||||
{
|
||||
struct au1100fb_device *fbdev = to_au1100fb_device(fbi);
|
||||
|
||||
print_dbg("fb_rotate %p %d", fbi, angle);
|
||||
|
||||
if (fbdev && (angle > 0) && !(angle % 90)) {
|
||||
|
||||
fbdev->regs->lcd_control &= ~LCD_CONTROL_GO;
|
||||
|
||||
fbdev->regs->lcd_control &= ~(LCD_CONTROL_SM_MASK);
|
||||
fbdev->regs->lcd_control |= ((angle/90) << LCD_CONTROL_SM_BIT);
|
||||
|
||||
fbdev->regs->lcd_control |= LCD_CONTROL_GO;
|
||||
}
|
||||
}
|
||||
|
||||
/* fb_mmap
|
||||
* Map video memory in user space. We don't use the generic fb_mmap method mainly
|
||||
* to allow the use of the TLB streaming flag (CCA=6)
|
||||
|
@ -380,7 +359,6 @@ static struct fb_ops au1100fb_ops =
|
|||
.fb_fillrect = cfb_fillrect,
|
||||
.fb_copyarea = cfb_copyarea,
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_rotate = au1100fb_fb_rotate,
|
||||
.fb_mmap = au1100fb_fb_mmap,
|
||||
};
|
||||
|
||||
|
|
|
@ -554,28 +554,6 @@ static int bfin_lq035_fb_check_var(struct fb_var_screeninfo *var,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* fb_rotate
|
||||
* Rotate the display of this angle. This doesn't seems to be used by the core,
|
||||
* but as our hardware supports it, so why not implementing it...
|
||||
*/
|
||||
static void bfin_lq035_fb_rotate(struct fb_info *fbi, int angle)
|
||||
{
|
||||
pr_debug("%s: %p %d", __func__, fbi, angle);
|
||||
#if (defined(UD) && defined(LBR))
|
||||
switch (angle) {
|
||||
|
||||
case 180:
|
||||
gpio_set_value(LBR, 0);
|
||||
gpio_set_value(UD, 1);
|
||||
break;
|
||||
default:
|
||||
gpio_set_value(LBR, 1);
|
||||
gpio_set_value(UD, 0);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static int bfin_lq035_fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
|
||||
{
|
||||
if (nocursor)
|
||||
|
@ -623,7 +601,6 @@ static struct fb_ops bfin_lq035_fb_ops = {
|
|||
.fb_open = bfin_lq035_fb_open,
|
||||
.fb_release = bfin_lq035_fb_release,
|
||||
.fb_check_var = bfin_lq035_fb_check_var,
|
||||
.fb_rotate = bfin_lq035_fb_rotate,
|
||||
.fb_fillrect = cfb_fillrect,
|
||||
.fb_copyarea = cfb_copyarea,
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
|
|
|
@ -594,27 +594,6 @@ static int set_fb_var(struct fb_info *fbi,
|
|||
}
|
||||
|
||||
|
||||
/* Set rotation (0, 90, 180, 270 degree), and switch to the new mode. */
|
||||
static void omapfb_rotate(struct fb_info *fbi, int rotate)
|
||||
{
|
||||
struct omapfb_plane_struct *plane = fbi->par;
|
||||
struct omapfb_device *fbdev = plane->fbdev;
|
||||
|
||||
omapfb_rqueue_lock(fbdev);
|
||||
if (rotate != fbi->var.rotate) {
|
||||
struct fb_var_screeninfo *new_var = &fbdev->new_var;
|
||||
|
||||
memcpy(new_var, &fbi->var, sizeof(*new_var));
|
||||
new_var->rotate = rotate;
|
||||
if (set_fb_var(fbi, new_var) == 0 &&
|
||||
memcmp(new_var, &fbi->var, sizeof(*new_var))) {
|
||||
memcpy(&fbi->var, new_var, sizeof(*new_var));
|
||||
ctrl_change_mode(fbi);
|
||||
}
|
||||
}
|
||||
omapfb_rqueue_unlock(fbdev);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set new x,y offsets in the virtual display for the visible area and switch
|
||||
* to the new mode.
|
||||
|
@ -1256,7 +1235,6 @@ static struct fb_ops omapfb_ops = {
|
|||
.fb_ioctl = omapfb_ioctl,
|
||||
.fb_check_var = omapfb_check_var,
|
||||
.fb_set_par = omapfb_set_par,
|
||||
.fb_rotate = omapfb_rotate,
|
||||
.fb_pan_display = omapfb_pan_display,
|
||||
};
|
||||
|
||||
|
|
|
@ -613,22 +613,6 @@ int xxxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
|
|||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* xxxfb_rotate - NOT a required function. If your hardware
|
||||
* supports rotation the whole screen then
|
||||
* you would provide a hook for this.
|
||||
*
|
||||
* @info: frame buffer structure that represents a single frame buffer
|
||||
* @angle: The angle we rotate the screen.
|
||||
*
|
||||
* This operation is used to set or alter the properities of the
|
||||
* cursor.
|
||||
*/
|
||||
void xxxfb_rotate(struct fb_info *info, int angle)
|
||||
{
|
||||
/* Will be deprecated */
|
||||
}
|
||||
|
||||
/**
|
||||
* xxxfb_sync - NOT a required function. Normally the accel engine
|
||||
* for a graphics card take a specific amount of time.
|
||||
|
@ -665,7 +649,6 @@ static struct fb_ops xxxfb_ops = {
|
|||
.fb_copyarea = xxxfb_copyarea, /* Needed !!! */
|
||||
.fb_imageblit = xxxfb_imageblit, /* Needed !!! */
|
||||
.fb_cursor = xxxfb_cursor, /* Optional !!! */
|
||||
.fb_rotate = xxxfb_rotate,
|
||||
.fb_sync = xxxfb_sync,
|
||||
.fb_ioctl = xxxfb_ioctl,
|
||||
.fb_mmap = xxxfb_mmap,
|
||||
|
|
|
@ -296,9 +296,6 @@ struct fb_ops {
|
|||
/* Draws cursor */
|
||||
int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor);
|
||||
|
||||
/* Rotates the display */
|
||||
void (*fb_rotate)(struct fb_info *info, int angle);
|
||||
|
||||
/* wait for blit idle, optional */
|
||||
int (*fb_sync)(struct fb_info *info);
|
||||
|
||||
|
|
Loading…
Reference in New Issue