From 91bfbf082fae9023f1a1978743c6662858e6aa47 Mon Sep 17 00:00:00 2001 From: Jong Kim Date: Tue, 2 Jul 2013 16:15:09 -0700 Subject: video: tegra: dc: hdmi: remove dead lock Remove dead lock for HDMI used as the primary display. tegra_dc_hdmi_detect should not acquire dc->lock, which generates dead lock because its sub-procedure such as tegra_dc_set_mode(), tegra_dc_enable(), tegra_dc_disable(), etc... try to acquire same dc->lock withing same process context. bug 1264520 Change-Id: I4d5f301a8f46e2ad2f990637b1f1c3b1d02a5054 Signed-off-by: Jong Kim Reviewed-on: http://git-master/r/243980 (cherry picked from commit 7d88a78ad46d3b6ef106da5b6aeafc77191dfe35) Reviewed-on: http://git-master/r/247278 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro --- drivers/video/tegra/dc/hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c index e14cda61a3d7..259c08431deb 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -896,7 +896,9 @@ static bool tegra_dc_hdmi_detect(struct tegra_dc *dc) struct fb_monspecs specs; int err; +#ifdef CONFIG_ANDROID mutex_lock(&dc->lock); +#endif /* CONFIG_ANDROID */ if (!tegra_dc_hdmi_hpd(dc)) goto fail; @@ -932,12 +934,16 @@ static bool tegra_dc_hdmi_detect(struct tegra_dc *dc) } success: +#ifdef CONFIG_ANDROID mutex_unlock(&dc->lock); +#endif /* CONFIG_ANDROID */ return true; fail: +#ifdef CONFIG_ANDROID mutex_unlock(&dc->lock); +#endif /* CONFIG_ANDROID */ hdmi->eld_retrieved = false; #ifdef CONFIG_SWITCH -- cgit v1.2.3