]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: dc: Fix ddc enable and disable
authorAly Hirani <ahirani@nvidia.com>
Tue, 10 Mar 2015 06:13:11 +0000 (23:13 -0700)
committerMitch Luban <mluban@nvidia.com>
Fri, 20 Mar 2015 01:28:42 +0000 (18:28 -0700)
For hdmi2.0, tegra_hdmi_ddc_enable() and tegra_hdmi_ddc_disable()
functions need to be called before we can access the DDC (which itself
is refcounted).

However, seems like there is a bug in tegra_hdmi_edid_eld_setup(). If
the call to read the EDID fails (for example, bad EDID checksum), it
doesn't actually call the ddc_disable() in the error path. This meant
that any subsequent hot plug failed with actual i2c transaction failures
and even if we were plugged into a TV with a good EDID, we would
actually fail trying to read the EDID.

But, the code in tegra_hdmi_edid_eld_setup() blindly assumes that i2c
transactions will be happening and it calls the _enable and _disable
(rather than the possible virtual_edid read which might be picked up from
device tree). Instead of fixing this in the error path, this change
completely removes the enable and disable. They are already done as part
of the tegra_hdmi_ddc_i2c_xfer, so don't need to be re-done here.

Bug 1608233

Change-Id: I983604bacb253143899d32e1f41cf6fbd1a423f9
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/715627
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
(cherry picked from commit 5bbe68152ad7408e30d612a0719dc179303f3a7d)
Reviewed-on: http://git-master/r/718352
GVS: Gerrit_Virtual_Submit
Reviewed-by: Min-wuk Lee <mlee@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
drivers/video/tegra/dc/hdmi2.0.c

index 696dcbb79ef6499b9020848f8a3e11a6023422c2..192ce953288b6b44935e1d13342ff53ffba6b85f 100644 (file)
@@ -646,8 +646,6 @@ static int tegra_hdmi_edid_eld_setup(struct tegra_hdmi *hdmi)
 
        tegra_dc_unpowergate_locked(hdmi->dc);
 
-       _tegra_hdmi_ddc_enable(hdmi);
-
        err = tegra_hdmi_edid_read(hdmi);
        if (err < 0)
                goto fail;
@@ -656,8 +654,6 @@ static int tegra_hdmi_edid_eld_setup(struct tegra_hdmi *hdmi)
        if (err < 0)
                goto fail;
 
-       _tegra_hdmi_ddc_disable(hdmi);
-
        tegra_dc_powergate_locked(hdmi->dc);
 
        tegra_hdmi_edid_config(hdmi);