]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 28 May 2019 09:02:42 +0000 (11:02 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Jun 2019 18:28:11 +0000 (20:28 +0200)
It's dead code, and removing it avoids me having to understand
what it's doing with lock_fb_info.

v2: Also remove sh_mobile_lcdc_must_reconfigure, now unused (Sam).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> (v1)
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-12-daniel.vetter@ffwll.ch
drivers/video/fbdev/sh_mobile_lcdcfb.c
drivers/video/fbdev/sh_mobile_lcdcfb.h

index dc46be38c9706f4b0ef8e562475de1dd08a02ef2..1437695415c99ac59b62e78648f0493909c1c357 100644 (file)
@@ -534,89 +534,9 @@ static void sh_mobile_lcdc_display_off(struct sh_mobile_lcdc_chan *ch)
                ch->tx_dev->ops->display_off(ch->tx_dev);
 }
 
-static bool
-sh_mobile_lcdc_must_reconfigure(struct sh_mobile_lcdc_chan *ch,
-                               const struct fb_videomode *new_mode)
-{
-       dev_dbg(ch->info->dev, "Old %ux%u, new %ux%u\n",
-               ch->display.mode.xres, ch->display.mode.yres,
-               new_mode->xres, new_mode->yres);
-
-       /* It can be a different monitor with an equal video-mode */
-       if (fb_mode_is_equal(&ch->display.mode, new_mode))
-               return false;
-
-       dev_dbg(ch->info->dev, "Switching %u -> %u lines\n",
-               ch->display.mode.yres, new_mode->yres);
-       ch->display.mode = *new_mode;
-
-       return true;
-}
-
 static int sh_mobile_lcdc_check_var(struct fb_var_screeninfo *var,
                                    struct fb_info *info);
 
-static int sh_mobile_lcdc_display_notify(struct sh_mobile_lcdc_chan *ch,
-                                        enum sh_mobile_lcdc_entity_event event,
-                                        const struct fb_videomode *mode,
-                                        const struct fb_monspecs *monspec)
-{
-       struct fb_info *info = ch->info;
-       struct fb_var_screeninfo var;
-       int ret = 0;
-
-       switch (event) {
-       case SH_MOBILE_LCDC_EVENT_DISPLAY_CONNECT:
-               /* HDMI plug in */
-               console_lock();
-               if (lock_fb_info(info)) {
-
-
-                       ch->display.width = monspec->max_x * 10;
-                       ch->display.height = monspec->max_y * 10;
-
-                       if (!sh_mobile_lcdc_must_reconfigure(ch, mode) &&
-                           info->state == FBINFO_STATE_RUNNING) {
-                               /* First activation with the default monitor.
-                                * Just turn on, if we run a resume here, the
-                                * logo disappears.
-                                */
-                               info->var.width = ch->display.width;
-                               info->var.height = ch->display.height;
-                               sh_mobile_lcdc_display_on(ch);
-                       } else {
-                               /* New monitor or have to wake up */
-                               fb_set_suspend(info, 0);
-                       }
-
-
-                       unlock_fb_info(info);
-               }
-               console_unlock();
-               break;
-
-       case SH_MOBILE_LCDC_EVENT_DISPLAY_DISCONNECT:
-               /* HDMI disconnect */
-               console_lock();
-               if (lock_fb_info(info)) {
-                       fb_set_suspend(info, 1);
-                       unlock_fb_info(info);
-               }
-               console_unlock();
-               break;
-
-       case SH_MOBILE_LCDC_EVENT_DISPLAY_MODE:
-               /* Validate a proposed new mode */
-               fb_videomode_to_var(&var, mode);
-               var.bits_per_pixel = info->var.bits_per_pixel;
-               var.grayscale = info->var.grayscale;
-               ret = sh_mobile_lcdc_check_var(&var, info);
-               break;
-       }
-
-       return ret;
-}
-
 /* -----------------------------------------------------------------------------
  * Format helpers
  */
@@ -2540,8 +2460,6 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch)
        unsigned int max_size;
        unsigned int i;
 
-       ch->notify = sh_mobile_lcdc_display_notify;
-
        /* Validate the format. */
        format = sh_mobile_format_info(cfg->fourcc);
        if (format == NULL) {
index b8e47a8bd8abb57418f5a9bbad7eecadce8d074a..5894003720989d273c82d3a5dff64e5653f1fc83 100644 (file)
@@ -87,11 +87,6 @@ struct sh_mobile_lcdc_chan {
        unsigned long base_addr_c;
        unsigned int line_size;
 
-       int (*notify)(struct sh_mobile_lcdc_chan *ch,
-                     enum sh_mobile_lcdc_entity_event event,
-                     const struct fb_videomode *mode,
-                     const struct fb_monspecs *monspec);
-
        /* Backlight */
        struct backlight_device *bl;
        unsigned int bl_brightness;