aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2019-07-25 15:41:36 +0200
committerThierry Reding <treding@nvidia.com>2019-10-28 11:18:56 +0100
commit68a2ebb54da4dfa2cc3a2239d2e2dfeec2c5e522 (patch)
tree46fbfd65777007470344cf5ba20fc5fbe10c2d87
parentdrm/tegra: sor: Unify eDP and DP support (diff)
downloadlinux-dev-68a2ebb54da4dfa2cc3a2239d2e2dfeec2c5e522.tar.xz
linux-dev-68a2ebb54da4dfa2cc3a2239d2e2dfeec2c5e522.zip
drm/tegra: sor: Avoid timeouts on unplug events
When the SOR is disabled in DP mode as part of an unplug event, do not attempt to power the DP link down. Powering down the link requires the DPAUX to transmit AUX messages which only works if there's a connected sink. Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/drm/tegra/sor.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 63831c37ad35..b81e6d39aa32 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -2663,9 +2663,16 @@ static void tegra_sor_dp_disable(struct drm_encoder *encoder)
if (output->panel)
drm_panel_disable(output->panel);
- err = drm_dp_link_power_down(sor->aux, &sor->link);
- if (err < 0)
- dev_err(sor->dev, "failed to power down link: %d\n", err);
+ /*
+ * Do not attempt to power down a DP link if we're not connected since
+ * the AUX transactions would just be timing out.
+ */
+ if (output->connector.status != connector_status_disconnected) {
+ err = drm_dp_link_power_down(sor->aux, &sor->link);
+ if (err < 0)
+ dev_err(sor->dev, "failed to power down link: %d\n",
+ err);
+ }
err = tegra_sor_detach(sor);
if (err < 0)