summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Zhang <mzhang@nvidia.com>2012-08-02 17:03:21 -0700
committerSimone Willett <swillett@nvidia.com>2012-09-05 11:37:20 -0700
commit43c9801e3dbef53750ac7c23eb2f1d3eb73c2e54 (patch)
treebf5c25f53cabf790a9eaca1dd4d4740c41723435
parent1a61c310b66245a73e021d786eea45c31cd9f6e9 (diff)
video: tegra: dc: move set default videomode out of _tegra_dc_enable.
Set default videomode happens during probe and resume. _tegra_dc_enable is also called during hotplug, setting default videomode there causes hdcp test failure. Bug 991805 Reviewed-on: http://git-master/r/121052 (cherry picked from commit 7d4e0461a88b8cf638963e69829274824fecc38b) Change-Id: I98be07e883699ba9fa6e222bb1d8ea68d199dfc6 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/128532 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/dc.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 80d052a6..4621b7c 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -1458,19 +1458,14 @@ static bool _tegra_dc_controller_reset_enable(struct tegra_dc *dc)
static int _tegra_dc_set_default_videomode(struct tegra_dc *dc)
{
- return tegra_dc_set_fb_mode(dc, &tegra_dc_hdmi_fallback_mode, 0);
-}
-
-static bool _tegra_dc_enable(struct tegra_dc *dc)
-{
if (dc->mode.pclk == 0) {
switch (dc->out->type) {
case TEGRA_DC_OUT_HDMI:
/* DC enable called but no videomode is loaded.
Check if HDMI is connected, then set fallback mdoe */
if (tegra_dc_hpd(dc)) {
- if (_tegra_dc_set_default_videomode(dc))
- return false;
+ return tegra_dc_set_fb_mode(dc,
+ &tegra_dc_hdmi_fallback_mode, 0);
} else
return false;
@@ -1486,6 +1481,14 @@ static bool _tegra_dc_enable(struct tegra_dc *dc)
}
}
+ return false;
+}
+
+static bool _tegra_dc_enable(struct tegra_dc *dc)
+{
+ if (dc->mode.pclk == 0)
+ return false;
+
if (!dc->out)
return false;
@@ -1871,8 +1874,10 @@ static int tegra_dc_probe(struct nvhost_device *ndev,
}
mutex_lock(&dc->lock);
- if (dc->pdata->flags & TEGRA_DC_FLAG_ENABLED)
+ if (dc->pdata->flags & TEGRA_DC_FLAG_ENABLED) {
dc->enabled = _tegra_dc_enable(dc);
+ _tegra_dc_set_default_videomode(dc);
+ }
mutex_unlock(&dc->lock);
/* interrupt handler must be registered before tegra_fb_register() */
@@ -2020,8 +2025,10 @@ static int tegra_dc_resume(struct nvhost_device *ndev)
mutex_lock(&dc->lock);
dc->suspended = false;
- if (dc->enabled)
+ if (dc->enabled) {
_tegra_dc_enable(dc);
+ _tegra_dc_set_default_videomode(dc);
+ }
if (dc->out && dc->out->hotplug_init)
dc->out->hotplug_init();