summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMin-wuk Lee <mlee@nvidia.com>2013-10-17 12:07:38 +0900
committerHarry Hong <hhong@nvidia.com>2013-10-23 18:20:50 -0700
commit4a1a9a31a5262a9d8c6b6ded2b003e526e023706 (patch)
tree776d7cd213038147a78410594b7485193ede758d
parent208a0d2810e91dc858457102bc9ee2d227730b39 (diff)
tegra: video: hdmi: WAR: check hdmi validity
It is possible that hdmi and its display controller are not used depending on hardware requirement. This change is checking hdmi validity and if it isn't valid, do not handle hdmi clk. Bug 1390118 Change-Id: I1ff422c29ee7228095bf057c11e37c479555e5ab Signed-off-by: Min-wuk Lee <mlee@nvidia.com> Reviewed-on: http://git-master/r/300307 (cherry picked from commit 19a5b58041e74b825469ebfef2ed9866fad90840) Reviewed-on: http://git-master/r/302766 Reviewed-by: Harry Hong <hhong@nvidia.com> Tested-by: Harry Hong <hhong@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/hdmi.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c
index 35fb3ead403e..19cba4578e30 100644
--- a/drivers/video/tegra/dc/hdmi.c
+++ b/drivers/video/tegra/dc/hdmi.c
@@ -475,7 +475,12 @@ static inline void tegra_hdmi_hotplug_enable(struct tegra_dc_hdmi_data *hdmi)
void tegra_hdmi_enable_clk(void)
{
struct tegra_dc_hdmi_data *hdmi = dc_hdmi;
- struct tegra_dc *dc = hdmi->dc;
+ struct tegra_dc *dc;
+
+ if (!hdmi)
+ return;
+
+ dc = hdmi->dc;
mutex_lock(&dc->lock);
clk_prepare_enable(hdmi->disp1_clk);
@@ -489,7 +494,12 @@ EXPORT_SYMBOL(tegra_hdmi_enable_clk);
void tegra_hdmi_disable_clk(void)
{
struct tegra_dc_hdmi_data *hdmi = dc_hdmi;
- struct tegra_dc *dc = hdmi->dc;
+ struct tegra_dc *dc;
+
+ if (!hdmi)
+ return;
+
+ dc = hdmi->dc;
atomic_set(&tf_hdmi_enable, 0);
mutex_lock(&dc->lock);