Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
Admin message
Our infrastructure migration is complete. Please remember to update your SSH remote to point to ssh.gitlab.freedesktop.org; SSH to the old hostname will time out. You should not see any problems apart from that. Please let us know if you do have any other issues.
you don't get the HPD interrupts over DP via USB-C at all, even when manually unplugging and plugging a display - nothing in the dmesg, nothing through udev
you can poll for them by doing atomic modeset - the hotplug event only arrives after a "shot in the dark" modeset, this can be either done by the test or the fbcon (if it is bound)
[1224242.161575] i915 0000:00:02.0: [drm:verify_connector_state [i915]] [CONNECTOR:323:DP-5][1224242.161661] i915 0000:00:02.0: [drm:verify_single_dpll_state.isra.150 [i915]] DPLL 0[1224242.161743] i915 0000:00:02.0: [drm:verify_single_dpll_state.isra.150 [i915]] DPLL 1[1224242.161816] i915 0000:00:02.0: [drm:verify_single_dpll_state.isra.150 [i915]] TBT PLL[1224242.161934] i915 0000:00:02.0: [drm:verify_single_dpll_state.isra.150 [i915]] TC PLL 1[1224242.162010] i915 0000:00:02.0: [drm:verify_single_dpll_state.isra.150 [i915]] TC PLL 2[1224242.162088] i915 0000:00:02.0: [drm:verify_single_dpll_state.isra.150 [i915]] TC PLL 3[1224242.162241] i915 0000:00:02.0: [drm:verify_single_dpll_state.isra.150 [i915]] TC PLL 4[1224242.162531] i915 0000:00:02.0: [drm:verify_single_dpll_state.isra.150 [i915]] TC PLL 5[1224242.162715] i915 0000:00:02.0: [drm:verify_single_dpll_state.isra.150 [i915]] TC PLL 6[1224242.164803] [drm:icl_tc_phy_connect [i915]] Port G/TC#4: PHY not ready[1224242.164873] i915 0000:00:02.0: [drm:__intel_tc_port_lock [i915]] Port G/TC#4: TC port mode reset (dp-alt -> tbt-alt)[1224242.182280] i915 0000:00:02.0: [drm:intel_power_well_disable [i915]] disabling power well 3[1224242.182400] i915 0000:00:02.0: [drm:intel_power_well_disable [i915]] disabling power well 2[1224242.182510] i915 0000:00:02.0: [drm:intel_atomic_commit_tail [i915]] [CRTC:152:pipe B][1224242.185025] Console: switching to colour frame buffer device 480x135[1224242.191777] i915 0000:00:02.0: [drm:gen8_de_irq_handler [i915]] hotplug event received, stat 0x00080000, dig 0x0000a888, pins 0x00000400, long 0x00000400[1224242.191914] [drm:intel_hpd_irq_handler [i915]] digital hpd on [ENCODER:322:DDI G] - long[1224242.192030] [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 10 - cnt: 10[1224242.192192] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on [ENCODER:322:DDI G] - long
My guess that the verify_connector_state() that is being called on the atomic_commit path does something that discovers the device is actually there and only then we get the interrupt.
@adrinael has a gut feeling that it may be related to: drm:__intel_tc_port_lock [i915]] Port G/TC#4: TC port mode reset (dp-alt -> tbt-alt)
It's easy to reproduce with:
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.cindex 5c4a1892..ba2d3d1f 100644--- a/tests/kms_chamelium.c+++ b/tests/kms_chamelium.c@@ -518,26 +518,13 @@ prepare_output(data_t *data, struct chamelium_port *port, enum test_edid edid) set_edid(data, port, edid); chamelium_plug(data->chamelium, port);- wait_for_connector(data, port, DRM_MODE_CONNECTED); igt_display_reset(display); output = igt_output_from_connector(display, connector); /* Refresh pipe to update connected status */- igt_output_set_pipe(output, PIPE_NONE);-- for_each_pipe(display, pipe) {- if (!igt_pipe_connector_valid(pipe, output))- continue;-- found = true;- break;- }-- igt_assert_f(found, "No pipe found for output %s\n", igt_output_name(output));-- igt_output_set_pipe(output, pipe);+ igt_output_set_pipe(output, PIPE_B); drmModeFreeConnector(connector);
Without the patch dp-crc-single subtest fails on waiting for the connector to go up, with the patch applied the modeset goes through and we get the late interrupt.
first execution of the test is with the forced modeset and it succeeds
second one that ends in failure is the one that times out on waiting for the interrupt and then after the test exit you can see fbcon kicking in with its own modest which leads to the interrupt discovery
Thanks, it's a known issue, which we haven't unfortunately addressed earlier (Simon has left):
The following sequence is unsupported on TypeC ports, due to a suboptimal TypeC firmware implementation:
Enable a mode
Unplug (interrupt will occur, but we keep the mode enabled).
Replug while the previous mode is still enabled. Interrupt will not happen until the mode gets disabled.
I have the kernel patches to work around this firmware limit, but at one point we decided that it's not an important enough use case: user space normally will always do a modeset disabling in response to an unplug event (at point 2. above), so the problem will not happen for these regular users.
IGT does the above sequence nevertheless, so imo such tests would need to be skipped on TypeC ports and in tests we want to run on TypeC ports too we would need to do a proper mode set disable in response to an unplug event.
Thanks for clarification! I find this a bit surprising.
This is the case even when the previous mode is not utilizing the given connector? So here we are counting here on any modeset after unplug, otherwise no hotplug events?
If this is a known behavior that we commit to it should be easy enough to work around in IGT.