diff mbox

[Intel-gfx] drm/i915: Hold struct_mutex during hotplug processing

Message ID CAObL_7EqL+1rhP=9go0EnCrVwWoZqgpVw0ZmLYa99vvFBJTmGQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Lutomirski July 26, 2011, 2:52 a.m. UTC
On Mon, Jul 25, 2011 at 1:37 PM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Mon, 25 Jul 2011 10:10:29 -0700
> Keith Packard <keithp@keithp.com> wrote:
>
>> Hotplug detection is a mode setting operation and must hold the
>> struct_mutex or risk colliding with other mode setting operations.
>>
>> In particular, the display port hotplug function attempts to re-train
>> the link if the monitor is supposed to be running when plugged back
>> in. If that happens while mode setting is underway, the link will get
>> scrambled, leaving it in an inconsistent state.
>>
>> Signed-off-by: Keith Packard <keithp@keithp.com>
>> ---
>>  drivers/gpu/drm/i915/i915_irq.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
>> index 3b03f85..5fe8f28 100644
>> --- a/drivers/gpu/drm/i915/i915_irq.c
>> +++ b/drivers/gpu/drm/i915/i915_irq.c
>> @@ -306,12 +306,15 @@ static void i915_hotplug_work_func(struct work_struct *work)
>>       struct drm_mode_config *mode_config = &dev->mode_config;
>>       struct intel_encoder *encoder;
>>
>> +     mutex_lock(&dev_priv->dev->struct_mutex);
>>       DRM_DEBUG_KMS("running encoder hotplug functions\n");
>>
>>       list_for_each_entry(encoder, &mode_config->encoder_list, base.head)
>>               if (encoder->hot_plug)
>>                       encoder->hot_plug(encoder);
>>
>> +     mutex_unlock(&dev_priv->dev->struct_mutex);
>> +
>>       /* Just fire off a uevent and let userspace tell us what to do */
>>       drm_helper_hpd_irq_event(dev);
>>  }
>
> yay, sounds like this will fix Andrew's problem and probably lots of
> other random DP related failures.

Doesn't help :(

When I do 'xset dpms force off', one of two things happens.  Either
the display comes back all by itself or it never comes back until I
power cycle it.

If the display is generating a hotplug event after the dpms code drops
the link, then with "drm/i915/dp: remove DPMS mode tracking from DP"
applied the driver will try to bring the display back up.  Maybe my
display can't handle coming back up that quickly after being told to
go to sleep, or maybe there's another bug.

Is the original patch supposed to bring the display up if the user
unplugs it and re-plugs it?  If so, why?  And shouldn't a dpms off
command at least stick until a hotplug event reports that the display
isn't there?

--Andy
[  209.146016] xset dpms force off
[  214.014555] [drm:drm_mode_addfb], [FB:48]
[  214.162664] [drm:drm_mode_addfb], [FB:40]
[  214.485742] [drm:drm_mode_addfb], [FB:48]
[  214.652646] [drm:drm_mode_addfb], [FB:40]
[  214.934948] [drm:drm_mode_addfb], [FB:48]
[  215.119459] [drm:drm_mode_addfb], [FB:40]
[  215.378005] [drm:drm_mode_addfb], [FB:48]
[  215.581211] [drm:drm_mode_addfb], [FB:40]
[  217.541498] [drm:drm_mode_addfb], [FB:48]
[  217.579117] [drm:drm_mode_addfb], [FB:40]
[  217.588287] [drm:drm_mode_addfb], [FB:48]
[  217.604938] [drm:drm_mode_addfb], [FB:40]
[  217.638301] [drm:drm_mode_addfb], [FB:48]
[  217.654970] [drm:drm_mode_addfb], [FB:40]
[  217.671641] [drm:drm_mode_addfb], [FB:48]
[  217.728388] [drm:drm_mode_addfb], [FB:40]
[  218.007141] [drm:drm_mode_addfb], [FB:48]
[  218.030397] btrfs: free space inode generation (0) did not match free space cache generation (132273)
[  218.030402] btrfs: failed to load free space cache for block group 18282971136
[  218.275505] [drm:drm_mode_addfb], [FB:40]
[  218.353250] [drm:drm_mode_addfb], [FB:48]
[  218.378388] [drm:drm_mode_addfb], [FB:40]
[  218.405154] [drm:drm_mode_addfb], [FB:48]
[  218.422545] [drm:drm_mode_addfb], [FB:40]
[  218.455165] [drm:drm_mode_addfb], [FB:48]
[  218.471794] [drm:drm_mode_addfb], [FB:40]
[  218.490260] [drm:drm_mode_addfb], [FB:48]
[  218.521845] [drm:drm_mode_addfb], [FB:40]
[  218.538515] [drm:drm_mode_addfb], [FB:48]
[  218.556996] [drm:drm_mode_addfb], [FB:40]
[  218.600422] [drm:drm_mode_addfb], [FB:48]
[  218.806993] [drm:drm_mode_addfb], [FB:40]
[  225.711943] [drm:intel_dp_dpms], start dpms -> 3
[  225.712160] [drm:intel_dp_link_down], 
[  225.729245] [drm:intel_dp_dpms], finish dpms -> 3
[  227.242038] [drm:i915_hotplug_work_func], running encoder hotplug functions
[  227.242043] [drm:intel_dp_hot_plug], about to check status
[  227.242046] [drm:intel_dp_hot_plug], done checking status
[  227.242049] [drm:intel_dp_hot_plug], about to check status
[  227.242474] [drm:intel_dp_check_link_status], eq okay
[  227.294320] [drm:intel_wait_for_vblank], vblank wait timed out
[  227.295270] [drm:intel_dp_check_link_status], start_link_train done
[  227.296520] [drm:intel_dp_check_link_status], complete_link_train done
[  227.296523] [drm:intel_dp_hot_plug], done checking status
[  227.296525] [drm:intel_dp_hot_plug], about to check status
[  227.296527] [drm:intel_dp_hot_plug], done checking status
[  227.296539] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40000, result 0
[  227.296543] [drm:intel_crt_detect], CRT not detected via hotplug
[  227.296547] [drm:output_poll_execute], [CONNECTOR:5:VGA-1] status updated from 2 to 2
[  227.308959] [drm:output_poll_execute], [CONNECTOR:8:HDMI-A-1] status updated from 2 to 2
[  227.309476] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  227.311820] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  227.313820] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  227.315302] [drm:ironlake_dp_detect], DPCD: 0000
[  227.315308] [drm:output_poll_execute], [CONNECTOR:11:DP-1] status updated from 2 to 2
[  227.327723] [drm:output_poll_execute], [CONNECTOR:14:HDMI-A-2] status updated from 2 to 2
[  227.340129] [drm:output_poll_execute], [CONNECTOR:16:HDMI-A-3] status updated from 2 to 2
[  227.340343] [drm:ironlake_dp_detect], DPCD: 11a841
[  227.341393] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  227.368970] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  227.396544] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  227.396548] [drm:drm_detect_monitor_audio], Monitor has basic audio support
[  227.396551] [drm:output_poll_execute], [CONNECTOR:17:DP-2] status updated from 1 to 1
[  227.397067] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  227.398764] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  227.400763] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  227.402249] [drm:ironlake_dp_detect], DPCD: 0000
[  227.402255] [drm:output_poll_execute], [CONNECTOR:19:DP-3] status updated from 2 to 2
[  233.549279] [drm:ironlake_crtc_dpms], crtc 0/0 dpms on
[  233.549286] [drm:intel_dp_dpms], start dpms -> 0
[  233.549500] [drm:intel_dp_dpms], finish dpms -> 0
[  234.690684] [drm:intel_crtc_cursor_set], 
[  234.690688] [drm:intel_crtc_cursor_set], cursor off
[  245.452566] display came back on its own and made noise.  trying again.
[  246.884278] [drm:intel_crtc_cursor_set], 
[  246.906823] [drm:drm_mode_addfb], [FB:48]
[  246.953632] [drm:intel_crtc_cursor_set], 
[  246.953638] [drm:intel_crtc_cursor_set], cursor off
[  247.044279] [drm:drm_mode_addfb], [FB:40]
[  248.976247] [drm:intel_crtc_cursor_set], 
[  250.440201] [drm:intel_dp_dpms], start dpms -> 3
[  250.440417] [drm:intel_dp_link_down], 
[  250.457923] [drm:intel_dp_dpms], finish dpms -> 3
[  250.457929] [drm:ironlake_crtc_dpms], crtc 0/0 dpms off
[  250.509877] [drm:intel_wait_for_vblank], vblank wait timed out
[  250.530282] [drm:sandybridge_update_wm], FIFO watermarks For pipe A - plane 13, cursor: 6
[  250.530289] [drm:ironlake_check_srwm], watermark 1: display plane 25, fbc lines 3, cursor 6
[  250.530293] [drm:ironlake_check_srwm], watermark 2: display plane 33, fbc lines 3, cursor 6
[  250.530298] [drm:ironlake_check_srwm], watermark 3: display plane 169, fbc lines 4, cursor 10
[  250.530302] [drm:intel_update_fbc], 
[  251.965079] [drm:i915_hotplug_work_func], running encoder hotplug functions
[  251.965084] [drm:intel_dp_hot_plug], about to check status
[  251.965087] [drm:intel_dp_hot_plug], done checking status
[  251.965089] [drm:intel_dp_hot_plug], about to check status
[  251.965513] [drm:intel_dp_check_link_status], eq okay
[  252.017001] [drm:intel_wait_for_vblank], vblank wait timed out
[  252.019417] [drm:intel_dp_check_link_status], start_link_train done
[  252.071968] [drm:intel_wait_for_vblank], vblank wait timed out
[  252.126947] [drm:intel_wait_for_vblank], vblank wait timed out
[  252.181904] [drm:intel_wait_for_vblank], vblank wait timed out
[  252.236873] [drm:intel_wait_for_vblank], vblank wait timed out
[  252.291844] [drm:intel_wait_for_vblank], vblank wait timed out
[  252.346809] [drm:intel_wait_for_vblank], vblank wait timed out
[  252.349226] [drm:intel_dp_complete_link_train] *ERROR* failed to train DP, aborting
[  252.349231] [drm:intel_dp_link_down], 
[  252.367024] [drm:intel_dp_check_link_status], complete_link_train done
[  252.367029] [drm:intel_dp_hot_plug], done checking status
[  252.367032] [drm:intel_dp_hot_plug], about to check status
[  252.367034] [drm:intel_dp_hot_plug], done checking status
[  252.367048] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40000, result 0
[  252.367053] [drm:intel_crt_detect], CRT not detected via hotplug
[  252.367058] [drm:output_poll_execute], [CONNECTOR:5:VGA-1] status updated from 2 to 2
[  252.379563] [drm:output_poll_execute], [CONNECTOR:8:HDMI-A-1] status updated from 2 to 2
[  252.380081] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  252.382294] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  252.384296] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  252.385781] [drm:ironlake_dp_detect], DPCD: 0000
[  252.385787] [drm:output_poll_execute], [CONNECTOR:11:DP-1] status updated from 2 to 2
[  252.398254] [drm:output_poll_execute], [CONNECTOR:14:HDMI-A-2] status updated from 2 to 2
[  252.410702] [drm:output_poll_execute], [CONNECTOR:16:HDMI-A-3] status updated from 2 to 2
[  252.410917] [drm:ironlake_dp_detect], DPCD: 11a841
[  252.411969] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  252.439573] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  252.467183] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  252.467187] [drm:drm_detect_monitor_audio], Monitor has basic audio support
[  252.467191] [drm:output_poll_execute], [CONNECTOR:17:DP-2] status updated from 1 to 1
[  252.467708] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  252.469241] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  252.471242] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  252.472731] [drm:ironlake_dp_detect], DPCD: 0000
[  252.472737] [drm:output_poll_execute], [CONNECTOR:19:DP-3] status updated from 2 to 2
[  260.423504] [drm:ironlake_crtc_dpms], crtc 0/0 dpms on
[  260.423510] [drm:sandybridge_update_wm], FIFO watermarks For pipe A - plane 13, cursor: 6
[  260.423514] [drm:ironlake_check_srwm], watermark 1: display plane 25, fbc lines 3, cursor 6
[  260.423519] [drm:ironlake_check_srwm], watermark 2: display plane 33, fbc lines 3, cursor 6
[  260.423523] [drm:ironlake_check_srwm], watermark 3: display plane 169, fbc lines 4, cursor 10
[  260.475106] [drm:intel_wait_for_vblank], vblank wait timed out
[  260.527076] [drm:intel_wait_for_vblank], vblank wait timed out
[  260.527890] [drm:gen6_fdi_link_train], FDI_RX_IIR 0x100
[  260.527894] [drm:gen6_fdi_link_train], FDI train 1 done.
[  260.528564] [drm:gen6_fdi_link_train], FDI_RX_IIR 0x600
[  260.528568] [drm:gen6_fdi_link_train], FDI train 2 done.
[  260.528570] [drm:gen6_fdi_link_train], FDI train done.
[  260.529839] [drm:intel_update_fbc], 
[  260.529846] [drm:intel_dp_dpms], start dpms -> 0
[  260.530060] [drm:intel_dp_dpms], finish dpms -> 0
[  280.100978] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.101391] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.101415] hub 3-1.1:1.0: cannot reset port 1 (err = -71)
[  280.101872] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.101894] hub 3-1.1:1.0: cannot reset port 1 (err = -71)
[  280.102375] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.102391] hub 3-1.1:1.0: cannot reset port 1 (err = -71)
[  280.102891] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.102917] hub 3-1.1:1.0: cannot reset port 1 (err = -71)
[  280.103373] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.103391] hub 3-1.1:1.0: cannot reset port 1 (err = -71)
[  280.103394] hub 3-1.1:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
[  280.103873] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.103893] hub 3-1.1:1.0: cannot disable port 1 (err = -71)
[  280.104356] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.104372] hub 3-1.1:1.0: cannot reset port 1 (err = -71)
[  280.104872] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.104891] hub 3-1.1:1.0: cannot reset port 1 (err = -71)
[  280.105358] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.105373] hub 3-1.1:1.0: cannot reset port 1 (err = -71)
[  280.105502] usb 3-1: USB disconnect, device number 2
[  280.105504] usb 3-1.1: USB disconnect, device number 3
[  280.105507] usb 3-1.1.1: USB disconnect, device number 4
[  280.105870] xhci_hcd 0000:02:00.0: WARN: transfer error on endpoint
[  280.105890] hub 3-1.1:1.0: cannot reset port 1 (err = -71)
[  280.105894] hub 3-1.1:1.0: cannot reset port 1 (err = -19)
[  280.105897] hub 3-1.1:1.0: cannot disable port 1 (err = -19)
[  280.105901] hub 3-1.1:1.0: cannot disable port 1 (err = -19)
[  280.996451] [drm:i915_hotplug_work_func], running encoder hotplug functions
[  280.996457] [drm:intel_dp_hot_plug], about to check status
[  280.996459] [drm:intel_dp_hot_plug], done checking status
[  280.996462] [drm:intel_dp_hot_plug], about to check status
[  280.996978] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5013003e
[  280.998628] [drm:intel_dp_check_link_status], eq okay
[  281.050190] [drm:intel_wait_for_vblank], vblank wait timed out
[  281.051140] [drm:intel_dp_check_link_status], start_link_train done
[  281.052389] [drm:intel_dp_check_link_status], complete_link_train done
[  281.052392] [drm:intel_dp_hot_plug], done checking status
[  281.052395] [drm:intel_dp_hot_plug], about to check status
[  281.052397] [drm:intel_dp_hot_plug], done checking status
[  281.052409] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40000, result 0
[  281.052414] [drm:intel_crt_detect], CRT not detected via hotplug
[  281.052417] [drm:output_poll_execute], [CONNECTOR:5:VGA-1] status updated from 2 to 2
[  281.064820] [drm:output_poll_execute], [CONNECTOR:8:HDMI-A-1] status updated from 2 to 2
[  281.065337] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  281.067688] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  281.069688] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  281.071169] [drm:ironlake_dp_detect], DPCD: 0000
[  281.071175] [drm:output_poll_execute], [CONNECTOR:11:DP-1] status updated from 2 to 2
[  281.083592] [drm:output_poll_execute], [CONNECTOR:14:HDMI-A-2] status updated from 2 to 2
[  281.095999] [drm:output_poll_execute], [CONNECTOR:16:HDMI-A-3] status updated from 2 to 2
[  281.096214] [drm:ironlake_dp_detect], DPCD: 11a841
[  281.097265] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  281.124844] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  281.152425] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  281.152429] [drm:drm_detect_monitor_audio], Monitor has basic audio support
[  281.152432] [drm:output_poll_execute], [CONNECTOR:17:DP-2] status updated from 1 to 1
[  281.152949] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  281.154632] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  281.156635] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  281.158118] [drm:ironlake_dp_detect], DPCD: 0000
[  281.158124] [drm:output_poll_execute], [CONNECTOR:19:DP-3] status updated from 2 to 2
[  281.447987] usb 3-1: new high speed USB device number 5 using xhci_hcd
[  281.460447] usb 3-1: New USB device found, idVendor=0424, idProduct=2514
[  281.460452] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  281.464721] hub 3-1:1.0: USB hub found
[  281.464892] xhci_hcd 0000:02:00.0: WARN: short transfer on control ep
[  281.465031] hub 3-1:1.0: 3 ports detected
[  281.741020] usb 3-1.1: new high speed USB device number 6 using xhci_hcd
[  281.753266] usb 3-1.1: New USB device found, idVendor=0424, idProduct=2640
[  281.753271] usb 3-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  281.753933] hub 3-1.1:1.0: USB hub found
[  281.754089] xhci_hcd 0000:02:00.0: WARN: short transfer on control ep
[  281.754226] hub 3-1.1:1.0: 3 ports detected
[  282.029841] usb 3-1.1.1: new high speed USB device number 7 using xhci_hcd
[  282.052811] xhci_hcd 0000:02:00.0: WARN: short transfer on control ep
[  282.058310] xhci_hcd 0000:02:00.0: WARN: short transfer on control ep
[  282.062803] xhci_hcd 0000:02:00.0: WARN: short transfer on control ep
[  282.066427] xhci_hcd 0000:02:00.0: WARN: short transfer on control ep
[  282.066786] usb 3-1.1.1: New USB device found, idVendor=0424, idProduct=4063
[  282.066790] usb 3-1.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  282.066793] usb 3-1.1.1: Product: Ultra Fast Media Reader
[  282.066795] usb 3-1.1.1: Manufacturer: Generic
[  282.066797] usb 3-1.1.1: SerialNumber: 000000264001
[  282.067756] scsi9 : usb-storage 3-1.1.1:1.0
[  282.143739] mtp-probe[2660]: bus: 3, device: 7 was not an MTP device
[  283.072796] scsi 9:0:0:0: Direct-Access     Generic  Ultra HS-SD/MMC  1.91 PQ: 0 ANSI: 0
[  283.076322] sd 9:0:0:0: Attached scsi generic sg3 type 0
[  283.085085] sd 9:0:0:0: [sdc] Attached SCSI removable disk
[  283.841290] [drm:i915_hotplug_work_func], running encoder hotplug functions
[  283.841296] [drm:intel_dp_hot_plug], about to check status
[  283.841298] [drm:intel_dp_hot_plug], done checking status
[  283.841301] [drm:intel_dp_hot_plug], about to check status
[  283.841725] [drm:intel_dp_check_link_status], eq not okay
[  283.841728] [drm:intel_dp_hot_plug], done checking status
[  283.841730] [drm:intel_dp_hot_plug], about to check status
[  283.841733] [drm:intel_dp_hot_plug], done checking status
[  283.841760] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40000, result 0
[  283.841764] [drm:intel_crt_detect], CRT not detected via hotplug
[  283.841768] [drm:output_poll_execute], [CONNECTOR:5:VGA-1] status updated from 2 to 2
[  283.854171] [drm:output_poll_execute], [CONNECTOR:8:HDMI-A-1] status updated from 2 to 2
[  283.854687] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  283.857067] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  283.859067] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  283.860554] [drm:ironlake_dp_detect], DPCD: 0000
[  283.860560] [drm:output_poll_execute], [CONNECTOR:11:DP-1] status updated from 2 to 2
[  283.872922] [drm:output_poll_execute], [CONNECTOR:14:HDMI-A-2] status updated from 2 to 2
[  283.885271] [drm:output_poll_execute], [CONNECTOR:16:HDMI-A-3] status updated from 2 to 2
[  283.885483] [drm:ironlake_dp_detect], DPCD: 11a841
[  283.886530] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  283.914083] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  283.941635] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  283.941636] [drm:drm_detect_monitor_audio], Monitor has basic audio support
[  283.941638] [drm:output_poll_execute], [CONNECTOR:17:DP-2] status updated from 1 to 1
[  283.942152] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  283.944017] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  283.946018] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e
[  283.947505] [drm:ironlake_dp_detect], DPCD: 0000
[  283.947511] [drm:output_poll_execute], [CONNECTOR:19:DP-3] status updated from 2 to 2
[  290.913994] [drm:intel_crtc_cursor_set], 
[  290.913998] [drm:intel_crtc_cursor_set], cursor off
[  309.750888] this time it made noise and went to sleep.  it failed to come back on its own and needed a power cycle
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e2aced6..550b329 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1020,6 +1020,8 @@  intel_dp_dpms(struct drm_encoder *encoder, int mode)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	uint32_t dp_reg = I915_READ(intel_dp->output_reg);
 
+	DRM_DEBUG_KMS("start dpms -> %d\n", mode);
+
 	if (mode != DRM_MODE_DPMS_ON) {
 		if (is_edp(intel_dp))
 			ironlake_edp_backlight_off(dev);
@@ -1044,6 +1046,8 @@  intel_dp_dpms(struct drm_encoder *encoder, int mode)
 		if (is_edp(intel_dp))
 			ironlake_edp_backlight_on(dev);
 	}
+
+	DRM_DEBUG_KMS("finish dpms -> %d\n", mode);
 }
 
 /*
@@ -1577,6 +1581,7 @@  intel_dp_check_link_status(struct intel_dp *intel_dp)
 
 	if (!intel_dp_get_link_status(intel_dp)) {
 		intel_dp_link_down(intel_dp);
+		DRM_DEBUG_KMS("link is down");
 		return;
 	}
 
@@ -1586,12 +1591,18 @@  intel_dp_check_link_status(struct intel_dp *intel_dp)
 				       sizeof (intel_dp->dpcd));
 	if (ret != sizeof(intel_dp->dpcd)) {
 		intel_dp_link_down(intel_dp);
+		DRM_DEBUG_KMS("failed to read DPCD");
 		return;
 	}
 
 	if (!intel_channel_eq_ok(intel_dp)) {
+		DRM_DEBUG_KMS("eq okay");
 		intel_dp_start_link_train(intel_dp);
+		DRM_DEBUG_KMS("start_link_train done");
 		intel_dp_complete_link_train(intel_dp);
+		DRM_DEBUG_KMS("complete_link_train done");
+	} else {
+		DRM_DEBUG_KMS("eq not okay");
 	}
 }
 
@@ -1855,7 +1866,10 @@  intel_dp_hot_plug(struct intel_encoder *intel_encoder)
 {
 	struct intel_dp *intel_dp = container_of(intel_encoder, struct intel_dp, base);
 
+	DRM_DEBUG_KMS("about to check status");
 	intel_dp_check_link_status(intel_dp);
+	DRM_DEBUG_KMS("done checking status");
+
 }
 
 /* Return which DP Port should be selected for Transcoder DP control */