drm/i915: Filter out glitches on HPD lines during hotplug detection
authorImre Deak <imre.deak@intel.com>
Thu, 4 Jan 2024 08:30:07 +0000 (10:30 +0200)
committerImre Deak <imre.deak@intel.com>
Mon, 8 Jan 2024 16:57:21 +0000 (18:57 +0200)
commit2e4b90fbe75536c978218bb3eb1d04f8988e13cd
tree69cc82d683abf6292dc96c8fbd8daca17cc72e78
parent9210e94a5a3bf7fc84b3d94dd5d2099ca434931b
drm/i915: Filter out glitches on HPD lines during hotplug detection

Glitches deasserting the connector HPD line can lead to incorrectly
detecting a disconnect event (a glitch asserting the line will only
cause a redundant connect->disconnect transition). The source of such a
glitch can be noise on the line or a 0.5ms-1ms MST IRQ_HPD pulse. TypeC
ports in the DP-alt or TBT-alt mode filter out these glitches inernally,
but for others the driver has to do this. Make it so by polling the HPD
line on these connectors for 4 ms.

Link: https://patchwork.freedesktop.org/patch/msgid/20240104083008.2715733-12-imre.deak@intel.com
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_tc.c
drivers/gpu/drm/i915/display/intel_tc.h