]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: fb: intimate fbcon to blank/unblank
authorNaveen Kumar S <nkumars@nvidia.com>
Tue, 20 Oct 2015 14:55:55 +0000 (20:25 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sat, 31 Oct 2015 04:57:12 +0000 (21:57 -0700)
Upon a hotplug/unplug, intimate fbcon to unblank or
blank accordingly. This helps in keeping dc and fbcon
in sync.

bug 1693204

Change-Id: I96b83bd8420e68ebb6048d50d9d9a422cd1fb706
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/820409
(cherry picked from commit 3a5c4678905a299e6ffadfaa8fab56bf4b29255d)
Reviewed-on: http://git-master/r/820822
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
drivers/video/tegra/fb.c

index 53485da90355bc7d8f4374ee20b0caa0b3ee3188..2116def505468d382d830d40e5279cffe5419821 100644 (file)
@@ -632,12 +632,16 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
 {
        struct fb_event event;
        int i;
+       int blank = FB_BLANK_UNBLANK;
 
        mutex_lock(&fb_info->info->lock);
        fb_destroy_modedb(fb_info->info->monspecs.modedb);
 
        fb_destroy_modelist(&fb_info->info->modelist);
 
+       event.info = fb_info->info;
+       event.data = &blank;
+
        /* Notify layers above fb.c that the hardware is unavailable */
        fb_info->info->state = FBINFO_STATE_SUSPENDED;
 
@@ -651,8 +655,12 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
                 */
                fb_info->info->mode = (struct fb_videomode*) NULL;
 #ifdef CONFIG_FRAMEBUFFER_CONSOLE
+               blank = FB_BLANK_POWERDOWN;
+               console_lock();
                fb_add_videomode(&tegra_dc_vga_mode, &fb_info->info->modelist);
                fb_videomode_to_var(&fb_info->info->var, &tegra_dc_vga_mode);
+               fb_notifier_call_chain(FB_EVENT_BLANK, &event);
+               console_unlock();
 #endif
 
                /* For L4T - After the next hotplug, framebuffer console will
@@ -682,7 +690,6 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
                }
        }
 
-       event.info = fb_info->info;
        /* Restoring to state running. */
        fb_info->info->state =  FBINFO_STATE_RUNNING;
 #ifdef CONFIG_FRAMEBUFFER_CONSOLE
@@ -691,6 +698,7 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
        fb_videomode_to_var(&fb_info->info->var, &specs->modedb[0]);
        fb_notifier_call_chain(FB_EVENT_MODE_CHANGE_ALL, &event);
        fb_notifier_call_chain(FB_EVENT_NEW_MODELIST, &event);
+       fb_notifier_call_chain(FB_EVENT_BLANK, &event);
        console_unlock();
 #else
        fb_notifier_call_chain(FB_EVENT_NEW_MODELIST, &event);