]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu: Don't link train DisplayPort on HPD until we get the dpcd
authorStephen Chandler Paul <cpaul@redhat.com>
Fri, 21 Aug 2015 18:16:12 +0000 (14:16 -0400)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 28 Oct 2015 02:14:31 +0000 (22:14 -0400)
[ 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>
drivers/gpu/drm/radeon/radeon_connectors.c

index 26baa9c05f6c49ac40e2a238a6079fa8e0e40920..15f09068ac00e63dc0404f0520c1cd8b55431265 100644 (file)
@@ -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.