diff options
author | Rakesh Iyer <riyer@nvidia.com> | 2013-04-03 17:23:51 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:16:13 -0700 |
commit | cdabbda94ca38ce12f7841a361339549fb74b446 (patch) | |
tree | f12c4a15f32cc6b5904300043c89286d9db9708b /drivers/video/tegra/dc/hdmi.c | |
parent | 7c094297d35c277f2cb68ee99ab27cc628031091 (diff) |
video: tegra: hdmi: serialize hotplug processing
Serialize HDMI hot plug processing to handle boot init and spurious hotplugs.
Bug 1254317.
Change-Id: I7a695033eea659500c7b73da321ec3345084fa97
Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/217552
(cherry picked from commit fe0e7c5ffda8e6768d536f30d73d2e25a2c45852)
Reviewed-on: http://git-master/r/217098
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/hdmi.c')
-rw-r--r-- | drivers/video/tegra/dc/hdmi.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c index 011169db6126..cbe0286e5125 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -846,9 +846,14 @@ static bool tegra_dc_hdmi_detect(struct tegra_dc *dc) struct fb_monspecs specs; int err; + mutex_lock(&dc->lock); + if (!tegra_dc_hdmi_hpd(dc)) goto fail; + if (dc->connected) + goto success; + err = tegra_edid_get_monspecs(hdmi->edid, &specs); if (err < 0) { if (dc->out->n_modes) @@ -876,9 +881,14 @@ static bool tegra_dc_hdmi_detect(struct tegra_dc *dc) tegra_dc_hdmi_detect_config(dc, &specs); } +success: + mutex_unlock(&dc->lock); + return true; fail: + mutex_unlock(&dc->lock); + hdmi->eld_retrieved = false; #ifdef CONFIG_SWITCH switch_set_state(&hdmi->hpd_switch, 0); @@ -898,7 +908,7 @@ static void tegra_dc_hdmi_detect_worker(struct work_struct *work) /* Set default videomode on dc before enabling it*/ tegra_dc_set_default_videomode(dc); #endif - if (!tegra_dc_hdmi_detect(dc)) { + if (!tegra_dc_hdmi_detect(dc) && dc->connected) { dev_dbg(&dc->ndev->dev, "HDMI disconnect\n"); dc->connected = false; tegra_dc_disable(dc); |