Bug 99031 - unplug event never reach user space - hpd unplug race vs edid probe
Summary: unplug event never reach user space - hpd unplug race vs edid probe
Status: CLOSED INVALID
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-08 18:26 UTC by Alban Browaeys
Modified: 2017-07-20 22:29 UTC (History)
1 user (show)

See Also:
i915 platform: HSW
i915 features: display/Other


Attachments

Description Alban Browaeys 2016-12-08 18:26:46 UTC
Lenovo Thinkpad Yoga S1
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)

kernels:
4.9-rc8
>= 4.8.5
drm-intel nightly

Mostly unplug event are acked but disconnect is not set : this as sometimes I do not unplug the external hdmi cable fast enough and from logs edid is successfully grabbed even though I am removing the cable.
If I unplug fast all is fine.
mind sometimes the logs show mulitple hotplug events at once on unplug and then disconnect triggers (in fact I get "connect" on first event and disconnect on later ones).
But unplugging slowly reproduce this.

This is https://bugs.freedesktop.org/show_bug.cgi?id=82593 .
The patch there never went in , context https://patchwork.freedesktop.org/patch/51634/ 
I did not reopen as the report is quite old.



also reported in https://bugzilla.kernel.org/show_bug.cgi and closed as it was submitted against user space stack.

logs at drm debug 0x46


" slow unplug   4.8.11 debian
[  917.257947] [drm:intel_get_hpd_pins] hotplug event received, stat 0x00400000, dig 0x10101210, pins 0x00000040
[  917.257951] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 6 - cnt: 0
[  917.257992] [drm:i915_hotplug_work_func] running encoder hotplug functions
[  917.257996] [drm:i915_hotplug_work_func] Connector HDMI-A-2 (pin 6) received hotplug event.
[  917.258000] [drm:intel_hdmi_detect] [CONNECTOR:52:HDMI-A-2]
[  917.272759] [drm:drm_mode_addfb2] [FB:56]
[  917.283321] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1)
[  917.283323] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK on first message, retry
[  917.283510] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1)
[  917.283513] [drm:drm_detect_monitor_audio] Monitor has basic audio support
"

" damn fast unplug   4.8.11 debian
[ 1320.111504] [drm:intel_get_hpd_pins] hotplug event received, stat 0x00400000, dig 0x10101210, pins 0x00000040
[ 1320.111508] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 6 - cnt: 0
[ 1320.111547] [drm:i915_hotplug_work_func] running encoder hotplug functions
[ 1320.111553] [drm:i915_hotplug_work_func] Connector HDMI-A-2 (pin 6) received hotplug event.
[ 1320.111561] [drm:intel_hdmi_detect] [CONNECTOR:52:HDMI-A-2]
[ 1320.116255] [drm:intel_get_hpd_pins] hotplug event received, stat 0x00400000, dig 0x10101210, pins 0x00000040
[ 1320.116258] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 6 - cnt: 1
[ 1320.118337] [drm:intel_get_hpd_pins] hotplug event received, stat 0x00400000, dig 0x10101210, pins 0x00000040
[ 1320.118339] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 6 - cnt: 2
[ 1320.124280] [drm:drm_edid_block_valid [drm]] *ERROR* EDID checksum is invalid, remainder is 242
[ 1320.124284] Raw EDID:
[ 1320.124287]  	00 ff ff ff ff ff ff 00 41 0c 00 00 01 01 01 01
[ 1320.124289]  	08 17 01 03 80 40 24 78 0a f9 ab a2 55 4a 9a 25
[ 1320.124290]  	0f 47 4a 21 08 00 81 80 07 ff ff ff ff ff ff ff
[ 1320.124293]  	ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[ 1320.124294]  	ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[ 1320.124296]  	ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[ 1320.124298]  	ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[ 1320.124299]  	ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[ 1320.124454] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0050 w(1)
[ 1320.124455] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK on first message, retry
[ 1320.124609] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0050 w(1)
[ 1320.124610] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter i915 gmbus dpc
[ 1320.124766] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1)
[ 1320.124766] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK on first message, retry
[ 1320.124943] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1)
[ 1320.124947] [drm:intel_hpd_irq_event] [CONNECTOR:52:HDMI-A-2] status updated from connected to disconnected
"

" fast enough unplug  4.8.11 debian
1448.425756] [drm:drm_mode_addfb2] [FB:53]
[ 1448.452749] [drm:intel_get_hpd_pins] hotplug event received, stat 0x00400000, dig 0x10101210, pins 0x00000040
[ 1448.452753] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 6 - cnt: 0
[ 1448.452761] [drm:i915_hotplug_work_func] running encoder hotplug functions
[ 1448.452765] [drm:i915_hotplug_work_func] Connector HDMI-A-2 (pin 6) received hotplug event.
[ 1448.452767] [drm:intel_hdmi_detect] [CONNECTOR:52:HDMI-A-2]
[ 1448.458952] [drm:drm_mode_addfb2] [FB:56]
[ 1448.478020] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1)
[ 1448.478022] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK on first message, retry
[ 1448.478223] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1)
[ 1448.478229] [drm:drm_detect_monitor_audio] Monitor has basic audio support
"
Comment 1 Jari Tahvanainen 2017-03-29 09:06:38 UTC
We seem to have neglected the bug a bit, apologies.

Alban, please re-test with latest kernel (taken from drm-tip) and mark as REOPENED if you can reproduce (and attach kernel log and card0/error info if applicable, see https://01.org/linuxgraphics/documentation/how-report-bugs) and RESOLVED/* if you cannot reproduce.
Comment 2 Ricardo 2017-07-20 22:29:44 UTC
based on the lack of activity this bug will be closed... please if the problem is reproducible with latest configuration open a new bug including logs.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.