video: tegra: dc: fix boot issue with HDMI
Deepak Nibade [Thu, 16 Aug 2012 11:58:51 +0000 (16:58 +0530)]
Set default mode for probe and resume to enable initialization of dc.1
Skipping this initialization results in hard system hang.

bug 1030415

Change-Id: Icd8fe08a7803490117ed20caf0185f5cd4fb0d0b
Reviewed-on: http://git-master/r/124001
(cherry picked from commit 50fa5e50b74a0534d7524fb6d7dcaa65b2e6e74c)
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/126782
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Rebase-Id: R7b426c33d965b19ed980a57f95127de7b4dd845a

drivers/video/tegra/dc/dc.c

index 9577e2d..c77bfdb 100644 (file)
@@ -2133,8 +2133,8 @@ static int tegra_dc_probe(struct nvhost_device *ndev,
 
        mutex_lock(&dc->lock);
        if (dc->pdata->flags & TEGRA_DC_FLAG_ENABLED) {
-               dc->enabled = _tegra_dc_enable(dc);
                _tegra_dc_set_default_videomode(dc);
+               dc->enabled = _tegra_dc_enable(dc);
        }
        mutex_unlock(&dc->lock);
 
@@ -2284,8 +2284,8 @@ static int tegra_dc_resume(struct nvhost_device *ndev)
        dc->suspended = false;
 
        if (dc->enabled) {
-               _tegra_dc_enable(dc);
                _tegra_dc_set_default_videomode(dc);
+               _tegra_dc_enable(dc);
        }
 
        if (dc->out && dc->out->hotplug_init)