@@ -1375,6 +1375,9 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
if (cr_tries > 5) {
DRM_ERROR("failed to train DP, aborting\n");
+ DRM_DEBUG_KMS("DPCD is %02hX%02hX%02hX%02hX\n",
+ intel_dp->dpcd[0], intel_dp->dpcd[1],
+ intel_dp->dpcd[2], intel_dp->dpcd[3]);
intel_dp_link_down(intel_dp);
break;
}
@@ -1427,6 +1430,10 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
++tries;
}
+ DRM_DEBUG_KMS("Training worked. DPCD=%02hX%02hX%02hX%02hX\n",
+ intel_dp->dpcd[0], intel_dp->dpcd[1],
+ intel_dp->dpcd[2], intel_dp->dpcd[3]);
+
if (HAS_PCH_CPT(dev) && !is_edp(intel_dp))
reg = DP | DP_LINK_TRAIN_OFF_CPT;
else
@@ -1530,15 +1537,24 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
return;
}
+ DRM_DEBUG_KMS("DPCD was %02hX%02hX%02hX%02hX\n",
+ intel_dp->dpcd[0], intel_dp->dpcd[1],
+ intel_dp->dpcd[2], intel_dp->dpcd[3]);
+
/* Try to read receiver status if the link appears to be up */
ret = intel_dp_aux_native_read(intel_dp,
0x000, intel_dp->dpcd,
sizeof (intel_dp->dpcd));
if (ret != sizeof(intel_dp->dpcd)) {
+ DRM_DEBUG_KMS("Failed to read DPCD\n");
intel_dp_link_down(intel_dp);
return;
}
+ DRM_DEBUG_KMS("DPCD is now %02hX%02hX%02hX%02hX\n",
+ intel_dp->dpcd[0], intel_dp->dpcd[1],
+ intel_dp->dpcd[2], intel_dp->dpcd[3]);
+
if (!intel_channel_eq_ok(intel_dp)) {
intel_dp_start_link_train(intel_dp);
intel_dp_complete_link_train(intel_dp);
@@ -1559,19 +1575,29 @@ ironlake_dp_detect(struct intel_dp *intel_dp)
return status;
}
+ DRM_DEBUG_KMS("DPCD was %02hX%02hX%02hX%02hX\n",
+ intel_dp->dpcd[0], intel_dp->dpcd[1],
+ intel_dp->dpcd[2], intel_dp->dpcd[3]);
+
status = connector_status_disconnected;
for (i = 0; i < 3; i++) {
ret = intel_dp_aux_native_read(intel_dp,
0x000, intel_dp->dpcd,
sizeof (intel_dp->dpcd));
+ DRM_DEBUG_KMS("Try %d: ret=%d DPCD=%02hX%02hX%02hX%02hX\n",
+ i,
+ ret,
+ intel_dp->dpcd[0], intel_dp->dpcd[1],
+ intel_dp->dpcd[2], intel_dp->dpcd[3]);
if (ret == sizeof(intel_dp->dpcd) &&
intel_dp->dpcd[DP_DPCD_REV] != 0) {
+ DRM_DEBUG_KMS("Happy now!");
status = connector_status_connected;
break;
}
msleep(1);
}
- DRM_DEBUG_KMS("DPCD: %hx%hx%hx%hx\n", intel_dp->dpcd[0],
+ DRM_DEBUG_KMS("No link. DPCD: %02hx%02hx%02hx%02hx\n", intel_dp->dpcd[0],
intel_dp->dpcd[1], intel_dp->dpcd[2], intel_dp->dpcd[3]);
return status;
}