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
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/124001
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Tested-by: Jon Mayo <jmayo@nvidia.com>

drivers/video/tegra/dc/dc.c

index da7f291..c33858a 100644 (file)
@@ -1814,8 +1814,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);
 
@@ -1965,8 +1965,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)