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

Reviewed-on: http://git-master/r/124001
(cherry picked from commit 50fa5e50b74a0534d7524fb6d7dcaa65b2e6e74c)

Change-Id: Id9ad95e114a27c1667f0286443534a23b7fa64d4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/128533
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

drivers/video/tegra/dc/dc.c

index 4621b7c..434a8b9 100644 (file)
@@ -1875,8 +1875,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);
 
@@ -2026,8 +2026,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)