aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Chandler Paul <cpaul@redhat.com>2015-08-21 14:16:12 -0400
committerSasha Levin <sasha.levin@oracle.com>2015-10-27 22:14:31 -0400
commitf298cc4107e677f4622a99837044f587e06b1e77 (patch)
tree22a9a8735fe6c0f3e7f7e5ffd49751df9e8d3e2e
parent7b30a56362585fd98a0fc6fce5573ec45b4e5840 (diff)
drm/amdgpu: Don't link train DisplayPort on HPD until we get the dpcd
[ Upstream commit a887adadb7b9ef9eb4ee48e4ad575aefcfd1db14 ] This is a port of: DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd to amdgpu. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 26baa9c05f6c..15f09068ac00 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -72,6 +72,11 @@ void radeon_connector_hotplug(struct drm_connector *connector)
if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
} else if (radeon_dp_needs_link_train(radeon_connector)) {
+ /* Don't try to start link training before we
+ * have the dpcd */
+ if (!radeon_dp_getdpcd(radeon_connector))
+ return;
+
/* set it to OFF so that drm_helper_connector_dpms()
* won't return immediately since the current state
* is ON at this point.