These changes are a raw update to a vanilla kernel 4.1.10, with the
[kvmfornfv.git] / kernel / drivers / gpu / drm / radeon / radeon_connectors.c
index 94b21ae..5a2cafb 100644 (file)
@@ -95,6 +95,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.