diff options
author | Pankaj Dabade <pdabade@nvidia.com> | 2014-10-17 12:38:57 +0530 |
---|---|---|
committer | Matthew Pedro <mapedro@nvidia.com> | 2014-10-28 09:05:27 -0700 |
commit | 7a5aebfb401e2ac6db4104f15b4ffc79a7ac53e2 (patch) | |
tree | fdb0d9ba385a605cb0ff137c3aa03365001319a8 /drivers/video | |
parent | ea792ce96c51d67452810c46db6175c298700613 (diff) |
tegra: hdmi: Add enable functionality to hotplug
Function handle_enable_l will notify virtual terminals about
new hotplug, triggering notifier call chain to blank/unblank
sequence.
Bug 200045281
Change-Id: Iaa6cbf9ca201dd7ac5f390b79af1dae5eac8b3b0
Signed-off-by: Pankaj Dabade <pdabade@nvidia.com>
Reviewed-on: http://git-master/r/558798
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>
Tested-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-by: Jeffery Yu <jefferyy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/dc/hdmi_state_machine.c | 25 | ||||
-rw-r--r-- | drivers/video/tegra/fb.c | 17 |
2 files changed, 23 insertions, 19 deletions
diff --git a/drivers/video/tegra/dc/hdmi_state_machine.c b/drivers/video/tegra/dc/hdmi_state_machine.c index a055c5c028ac..5389ff17b42c 100644 --- a/drivers/video/tegra/dc/hdmi_state_machine.c +++ b/drivers/video/tegra/dc/hdmi_state_machine.c @@ -24,6 +24,7 @@ #include <linux/kernel.h> #include <mach/dc.h> #include <mach/fb.h> +#include <linux/console.h> #ifdef CONFIG_SWITCH #include <linux/switch.h> #endif @@ -172,6 +173,26 @@ static void hdmi_state_machine_handle_hpd_l(int cur_hpd) * internal state handlers and dispatch table * ************************************************************/ +static void handle_enable_l(struct tegra_dc_hdmi_data *hdmi) +{ + struct fb_event event; + struct fb_info *pfb = hdmi->dc->fb->info; + int blank = 1; + + event.info = pfb; + event.data = ␣ + + tegra_dc_enable(hdmi->dc); + + console_lock(); + /* blank */ + fb_notifier_call_chain(FB_EVENT_BLANK, &event); + blank = 0; + /* unblank */ + fb_notifier_call_chain(FB_EVENT_BLANK, &event); + console_unlock(); +} + static void hdmi_disable_l(struct tegra_dc_hdmi_data *hdmi) { #ifdef CONFIG_SWITCH @@ -305,7 +326,7 @@ static void handle_check_edid_l(struct tegra_dc_hdmi_data *hdmi) tegra_dc_io_end(hdmi->dc); } - hdmi_state_machine_set_state_l(HDMI_STATE_DONE_ENABLED, -1); + hdmi_state_machine_set_state_l(HDMI_STATE_DONE_ENABLED, 0); return; @@ -429,7 +450,7 @@ static const dispatch_func_t state_machine_dispatch[] = { handle_check_plug_state_l, /* STATE_CHECK_PLUG_STATE */ handle_check_edid_l, /* STATE_CHECK_EDID */ NULL, /* STATE_DONE_DISABLED */ - NULL, /* STATE_DONE_ENABLED */ + handle_enable_l, /* STATE_DONE_ENABLED */ handle_wait_for_hpd_reassert_l, /* STATE_DONE_WAIT_FOR_HPD_REASSERT */ handle_recheck_edid_l, /* STATE_DONE_RECHECK_EDID */ NULL, /* STATE_INIT_FROM_BOOTLOADER */ diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c index 33e1d7f76a08..72435db233e4 100644 --- a/drivers/video/tegra/fb.c +++ b/drivers/video/tegra/fb.c @@ -52,23 +52,6 @@ #define user_ptr(p) (p) #endif -struct tegra_fb_info { - struct tegra_dc_win win; - struct platform_device *ndev; - struct fb_info *info; - bool valid; - - struct resource *fb_mem; - - int xres; - int yres; - int curr_xoffset; - int curr_yoffset; - - struct fb_videomode mode; - phys_addr_t phys_start; -}; - /* palette array used by the fbcon */ static u32 pseudo_palette[16]; |