On Mon, Jul 25, 2011 at 12:08 PM, Keith Packard <kei...@keithp.com> wrote: > On Mon, 25 Jul 2011 11:23:17 -0400, Andrew Lutomirski <l...@mit.edu> wrote: > >> A debugging patch and its output are attached. > > I didn't get any attachment. > >> If I had to guess, though, it's a race: a hotplug event happens during >> the intel_dp_dpms callback, confusing the code that's trying to train >> the link. > > Interesting possibility. Please re-send the attachments and I'll take a > look.
Done. I'm pretty sure the debugging patch is barking up the wrong tree. If you like, I can do a different one to instrument intel_dp_dpms and hotplug later on. > > -- > keith.pack...@intel.com >
[ 437.718439] [drm:intel_dp_link_down], [ 439.250105] [drm:i915_hotplug_work_func], running encoder hotplug functions [ 439.250322] [drm:intel_dp_check_link_status], DPCD was 110A8401 [ 439.250536] [drm:intel_dp_check_link_status], DPCD is now 110A8401 [ 439.301732] [drm:intel_wait_for_vblank], vblank wait timed out [ 439.303716] [drm:intel_dp_complete_link_train], Training worked. DPCD=110A8401 [ 439.303942] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40000, result 0 [ 439.303946] [drm:intel_crt_detect], CRT not detected via hotplug [ 439.303950] [drm:output_poll_execute], [CONNECTOR:5:VGA-1] status updated from 2 to 2 [ 439.316359] [drm:output_poll_execute], [CONNECTOR:8:HDMI-A-1] status updated from 2 to 2 [ 439.316363] [drm:ironlake_dp_detect], DPCD was 00000000 [ 439.316878] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 439.316882] [drm:ironlake_dp_detect], Try 0: ret=-110 DPCD=00000000 [ 439.319216] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 439.319219] [drm:ironlake_dp_detect], Try 1: ret=-110 DPCD=00000000 [ 439.321217] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 439.321222] [drm:ironlake_dp_detect], Try 2: ret=-110 DPCD=00000000 [ 439.322704] [drm:ironlake_dp_detect], No link. DPCD: 00000000 [ 439.322711] [drm:output_poll_execute], [CONNECTOR:11:DP-1] status updated from 2 to 2 [ 439.335104] [drm:output_poll_execute], [CONNECTOR:14:HDMI-A-2] status updated from 2 to 2 [ 439.347505] [drm:output_poll_execute], [CONNECTOR:16:HDMI-A-3] status updated from 2 to 2 [ 439.347509] [drm:ironlake_dp_detect], DPCD was 110A8401 [ 439.347724] [drm:ironlake_dp_detect], Try 0: ret=4 DPCD=110A8401 [ 439.347730] [drm:ironlake_dp_detect], Happy now! [ 439.347732] [drm:ironlake_dp_detect], No link. DPCD: 110a8401 [ 439.348687] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 439.376262] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 439.403831] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 439.403835] [drm:drm_detect_monitor_audio], Monitor has basic audio support [ 439.403838] [drm:output_poll_execute], [CONNECTOR:17:DP-2] status updated from 1 to 1 [ 439.403842] [drm:ironlake_dp_detect], DPCD was 00000000 [ 439.404357] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 439.404360] [drm:ironlake_dp_detect], Try 0: ret=-110 DPCD=00000000 [ 439.406164] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 439.406165] [drm:ironlake_dp_detect], Try 1: ret=-110 DPCD=00000000 [ 439.408167] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 439.408169] [drm:ironlake_dp_detect], Try 2: ret=-110 DPCD=00000000 [ 439.409663] [drm:ironlake_dp_detect], No link. DPCD: 00000000 [ 439.409671] [drm:output_poll_execute], [CONNECTOR:19:DP-3] status updated from 2 to 2 [ 442.956501] [drm:ironlake_crtc_dpms], crtc 0/0 dpms on [ 443.120115] [drm:intel_dp_link_down], [ 443.137460] [drm:ironlake_crtc_dpms], crtc 0/0 dpms off [ 443.189440] [drm:intel_wait_for_vblank], vblank wait timed out [ 443.211838] [drm:sandybridge_update_wm], FIFO watermarks For pipe A - plane 13, cursor: 6 [ 443.211845] [drm:ironlake_check_srwm], watermark 1: display plane 25, fbc lines 3, cursor 6 [ 443.211849] [drm:ironlake_check_srwm], watermark 2: display plane 33, fbc lines 3, cursor 6 [ 443.211854] [drm:ironlake_check_srwm], watermark 3: display plane 169, fbc lines 4, cursor 10 [ 443.211858] [drm:intel_update_fbc], [ 444.644607] [drm:i915_hotplug_work_func], running encoder hotplug functions [ 444.644823] [drm:intel_dp_check_link_status], DPCD was 110A8401 [ 444.645037] [drm:intel_dp_check_link_status], DPCD is now 110A8401 [ 444.696526] [drm:intel_wait_for_vblank], vblank wait timed out [ 444.751506] [drm:intel_wait_for_vblank], vblank wait timed out [ 444.806485] [drm:intel_wait_for_vblank], vblank wait timed out [ 444.861428] [drm:intel_wait_for_vblank], vblank wait timed out [ 444.916419] [drm:intel_wait_for_vblank], vblank wait timed out [ 444.971376] [drm:intel_wait_for_vblank], vblank wait timed out [ 445.026356] [drm:intel_wait_for_vblank], vblank wait timed out [ 445.028771] [drm:intel_dp_complete_link_train] *ERROR* failed to train DP, aborting [ 445.028775] [drm:intel_dp_complete_link_train], DPCD is 110A8401 [ 445.028780] [drm:intel_dp_link_down], [ 445.046329] [drm:intel_dp_complete_link_train], Training worked. DPCD=110A8401 [ 445.046552] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40000, result 0 [ 445.046556] [drm:intel_crt_detect], CRT not detected via hotplug [ 445.046560] [drm:output_poll_execute], [CONNECTOR:5:VGA-1] status updated from 2 to 2 [ 445.059011] [drm:output_poll_execute], [CONNECTOR:8:HDMI-A-1] status updated from 2 to 2 [ 445.059015] [drm:ironlake_dp_detect], DPCD was 00000000 [ 445.059531] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 445.059535] [drm:ironlake_dp_detect], Try 0: ret=-110 DPCD=00000000 [ 445.061820] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 445.061821] [drm:ironlake_dp_detect], Try 1: ret=-110 DPCD=00000000 [ 445.063822] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 445.063824] [drm:ironlake_dp_detect], Try 2: ret=-110 DPCD=00000000 [ 445.065312] [drm:ironlake_dp_detect], No link. DPCD: 00000000 [ 445.065318] [drm:output_poll_execute], [CONNECTOR:11:DP-1] status updated from 2 to 2 [ 445.077692] [drm:output_poll_execute], [CONNECTOR:14:HDMI-A-2] status updated from 2 to 2 [ 445.090041] [drm:output_poll_execute], [CONNECTOR:16:HDMI-A-3] status updated from 2 to 2 [ 445.090043] [drm:ironlake_dp_detect], DPCD was 110A8401 [ 445.090254] [drm:ironlake_dp_detect], Try 0: ret=4 DPCD=110A8401 [ 445.090256] [drm:ironlake_dp_detect], Happy now! [ 445.090257] [drm:ironlake_dp_detect], No link. DPCD: 110a8401 [ 445.091304] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 445.118864] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 445.146423] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 445.146424] [drm:drm_detect_monitor_audio], Monitor has basic audio support [ 445.146426] [drm:output_poll_execute], [CONNECTOR:17:DP-2] status updated from 1 to 1 [ 445.146428] [drm:ironlake_dp_detect], DPCD was 00000000 [ 445.146941] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 445.146942] [drm:ironlake_dp_detect], Try 0: ret=-110 DPCD=00000000 [ 445.148769] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 445.148770] [drm:ironlake_dp_detect], Try 1: ret=-110 DPCD=00000000 [ 445.150771] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 445.150773] [drm:ironlake_dp_detect], Try 2: ret=-110 DPCD=00000000 [ 445.152259] [drm:ironlake_dp_detect], No link. DPCD: 00000000 [ 445.152265] [drm:output_poll_execute], [CONNECTOR:19:DP-3] status updated from 2 to 2 [ 453.112596] [drm:ironlake_crtc_dpms], crtc 0/0 dpms on [ 453.112602] [drm:sandybridge_update_wm], FIFO watermarks For pipe A - plane 13, cursor: 6 [ 453.112607] [drm:ironlake_check_srwm], watermark 1: display plane 25, fbc lines 3, cursor 6 [ 453.112611] [drm:ironlake_check_srwm], watermark 2: display plane 33, fbc lines 3, cursor 6 [ 453.112616] [drm:ironlake_check_srwm], watermark 3: display plane 169, fbc lines 4, cursor 10 [ 453.164539] [drm:intel_wait_for_vblank], vblank wait timed out [ 453.216511] [drm:intel_wait_for_vblank], vblank wait timed out [ 453.217324] [drm:gen6_fdi_link_train], FDI_RX_IIR 0x100 [ 453.217329] [drm:gen6_fdi_link_train], FDI train 1 done. [ 453.217989] [drm:gen6_fdi_link_train], FDI_RX_IIR 0x600 [ 453.217994] [drm:gen6_fdi_link_train], FDI train 2 done. [ 453.217996] [drm:gen6_fdi_link_train], FDI train done. [ 453.219256] [drm:intel_update_fbc], [ 468.967065] usb 3-1: USB disconnect, device number 2 [ 468.967069] usb 3-1.1: USB disconnect, device number 3 [ 468.967072] usb 3-1.1.1: USB disconnect, device number 4 [ 470.871840] [drm:i915_hotplug_work_func], running encoder hotplug functions [ 470.872364] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5013003e [ 470.874264] [drm:intel_dp_check_link_status], DPCD was 110A8401 [ 470.874479] [drm:intel_dp_check_link_status], DPCD is now 110A8401 [ 470.926022] [drm:intel_wait_for_vblank], vblank wait timed out [ 470.928002] [drm:intel_dp_complete_link_train], Training worked. DPCD=110A8401 [ 470.928233] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40000, result 0 [ 470.928238] [drm:intel_crt_detect], CRT not detected via hotplug [ 470.928241] [drm:output_poll_execute], [CONNECTOR:5:VGA-1] status updated from 2 to 2 [ 470.940644] [drm:output_poll_execute], [CONNECTOR:8:HDMI-A-1] status updated from 2 to 2 [ 470.940648] [drm:ironlake_dp_detect], DPCD was 00000000 [ 470.941164] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 470.941168] [drm:ironlake_dp_detect], Try 0: ret=-110 DPCD=00000000 [ 470.943524] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 470.943528] [drm:ironlake_dp_detect], Try 1: ret=-110 DPCD=00000000 [ 470.945523] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 470.945526] [drm:ironlake_dp_detect], Try 2: ret=-110 DPCD=00000000 [ 470.947009] [drm:ironlake_dp_detect], No link. DPCD: 00000000 [ 470.947013] [drm:output_poll_execute], [CONNECTOR:11:DP-1] status updated from 2 to 2 [ 470.959413] [drm:output_poll_execute], [CONNECTOR:14:HDMI-A-2] status updated from 2 to 2 [ 470.971802] [drm:output_poll_execute], [CONNECTOR:16:HDMI-A-3] status updated from 2 to 2 [ 470.971806] [drm:ironlake_dp_detect], DPCD was 110A8401 [ 470.972020] [drm:ironlake_dp_detect], Try 0: ret=4 DPCD=110A8401 [ 470.972026] [drm:ironlake_dp_detect], Happy now! [ 470.972029] [drm:ironlake_dp_detect], No link. DPCD: 110a8401 [ 470.973080] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 471.000644] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 471.028210] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 471.028214] [drm:drm_detect_monitor_audio], Monitor has basic audio support [ 471.028218] [drm:output_poll_execute], [CONNECTOR:17:DP-2] status updated from 1 to 1 [ 471.028222] [drm:ironlake_dp_detect], DPCD was 00000000 [ 471.028736] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 471.028739] [drm:ironlake_dp_detect], Try 0: ret=-110 DPCD=00000000 [ 471.030473] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 471.030476] [drm:ironlake_dp_detect], Try 1: ret=-110 DPCD=00000000 [ 471.032471] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 471.032474] [drm:ironlake_dp_detect], Try 2: ret=-110 DPCD=00000000 [ 471.033958] [drm:ironlake_dp_detect], No link. DPCD: 00000000 [ 471.033962] [drm:output_poll_execute], [CONNECTOR:19:DP-3] status updated from 2 to 2 [ 473.703741] [drm:i915_hotplug_work_func], running encoder hotplug functions [ 473.703958] [drm:intel_dp_check_link_status], DPCD was 110A8401 [ 473.704172] [drm:intel_dp_check_link_status], DPCD is now 110A8401 [ 473.704183] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40000, result 0 [ 473.704187] [drm:intel_crt_detect], CRT not detected via hotplug [ 473.704190] [drm:output_poll_execute], [CONNECTOR:5:VGA-1] status updated from 2 to 2 [ 473.716606] [drm:output_poll_execute], [CONNECTOR:8:HDMI-A-1] status updated from 2 to 2 [ 473.716611] [drm:ironlake_dp_detect], DPCD was 00000000 [ 473.717126] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 473.717129] [drm:ironlake_dp_detect], Try 0: ret=-110 DPCD=00000000 [ 473.718885] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 473.718889] [drm:ironlake_dp_detect], Try 1: ret=-110 DPCD=00000000 [ 473.720887] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 473.720892] [drm:ironlake_dp_detect], Try 2: ret=-110 DPCD=00000000 [ 473.722377] [drm:ironlake_dp_detect], No link. DPCD: 00000000 [ 473.722383] [drm:output_poll_execute], [CONNECTOR:11:DP-1] status updated from 2 to 2 [ 473.734786] [drm:output_poll_execute], [CONNECTOR:14:HDMI-A-2] status updated from 2 to 2 [ 473.747175] [drm:output_poll_execute], [CONNECTOR:16:HDMI-A-3] status updated from 2 to 2 [ 473.747179] [drm:ironlake_dp_detect], DPCD was 110A8401 [ 473.747394] [drm:ironlake_dp_detect], Try 0: ret=4 DPCD=110A8401 [ 473.747399] [drm:ironlake_dp_detect], Happy now! [ 473.747402] [drm:ironlake_dp_detect], No link. DPCD: 110a8401 [ 473.748458] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 473.776037] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 473.803604] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2 [ 473.803608] [drm:drm_detect_monitor_audio], Monitor has basic audio support [ 473.803611] [drm:output_poll_execute], [CONNECTOR:17:DP-2] status updated from 1 to 1 [ 473.803615] [drm:ironlake_dp_detect], DPCD was 00000000 [ 473.804130] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 473.804133] [drm:ironlake_dp_detect], Try 0: ret=-110 DPCD=00000000 [ 473.805832] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 473.805833] [drm:ironlake_dp_detect], Try 1: ret=-110 DPCD=00000000 [ 473.807836] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e [ 473.807838] [drm:ironlake_dp_detect], Try 2: ret=-110 DPCD=00000000 [ 473.809327] [drm:ironlake_dp_detect], No link. DPCD: 00000000 [ 473.809333] [drm:output_poll_execute], [CONNECTOR:19:DP-3] status updated from 2 to 2
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 5f97c17..501b94d 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -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; }
_______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx