* [PATCH] drm/amd/display: Increase the HDMI HPD disconnect filter time
@ 2026-10-08 7:31 2564278112
2026-10-08 7:38 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: 2564278112 @ 2026-10-08 7:31 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, David Airlie, Simona Vetter, amd-gfx
Cc: Dmytro Laktyushkin, Roman Li, Wenjing Liu, Tom Chung,
Dillon Varone, Alex Hung, Lu Yao, dri-devel, linux-kernel,
Wang Jiang
From: Wang Jiang <jiangwang@kylinos.cn>
The HPD filter programmed for the DVI/HDMI link types uses 100ms for a
disconnect, which is shorter than the HPD low period that some sinks
generate while they reconfigure, for example when the video mode changes
or when the audio infoframe is updated. Such a sink is then reported as
unplugged and plugged back in, so the connector is torn down and
re-probed for nothing.
Raise the disconnect filter to 800ms for the DVI/HDMI link types,
including HDMI FRL. The delay is written to DC_HPD_TOGGLE_FILT_CNTL in
10ms units inside an 8-bit field, so 800ms is encoded as 80, and the
filter runs in hardware, so there is no CPU cost. The connect filter is
left at 500ms. A genuine unplug keeps HPD low, so the only cost is that
the event is reported up to 800ms later.
The DP branch above already tunes its filter values empirically to hide
a bouncing HPD, and link_factory.c notes that a badly programmed GPIO
makes HPD not "rise or drain fast enough, leading to bounces".
Signed-off-by: Wang Jiang <jiangwang@kylinos.cn>
---
drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c
index cfb5ef0523a7..2b38ddaaaa4b 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c
@@ -82,8 +82,12 @@ bool program_hpd_filter(const struct dc_link *link)
case SIGNAL_TYPE_HDMI_TYPE_A:
case SIGNAL_TYPE_HDMI_FRL:
/* Program hpd filter */
+ /* Some HDMI/DVI sinks drive HPD low for a few hundred ms while
+ * they reconfigure; 100ms is not enough to hide that bounce,
+ * which is then reported as a fake unplug/plug pair.
+ */
delay_on_connect_in_ms = 500;
- delay_on_disconnect_in_ms = 100;
+ delay_on_disconnect_in_ms = 800;
break;
case SIGNAL_TYPE_DISPLAY_PORT:
case SIGNAL_TYPE_DISPLAY_PORT_MST:
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/display: Increase the HDMI HPD disconnect filter time
2026-10-08 7:31 [PATCH] drm/amd/display: Increase the HDMI HPD disconnect filter time 2564278112
@ 2026-10-08 7:38 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-10-08 7:38 UTC (permalink / raw)
To: 2564278112; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/amd/display: HDMI HPD disconnect filter masks valid KVM pulses
--
commit 56a856b6f885a6969be27edf739c5c17d243d79b
Author: Wang Jiang <jiangwang@kylinos.cn>
drm/amd/display: Increase the HDMI HPD disconnect filter time
This commit raises the DVI and HDMI HPD disconnect filter time from 100ms to
800ms to hide bouncing hotplug signals when sinks reconfigure.
> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c
> @@ -82,8 +82,12 @@ bool program_hpd_filter(const struct dc_link *link)
> case SIGNAL_TYPE_HDMI_TYPE_A:
> case SIGNAL_TYPE_HDMI_FRL:
> /* Program hpd filter */
> + /* Some HDMI/DVI sinks drive HPD low for a few hundred ms while
> + * they reconfigure; 100ms is not enough to hide that bounce,
> + * which is then reported as a fake unplug/plug pair.
> + */
> delay_on_connect_in_ms = 500;
> - delay_on_disconnect_in_ms = 100;
> + delay_on_disconnect_in_ms = 800;
[Severity: Medium]
Will this 800ms filter in program_hpd_filter() mask legitimate hotplug pulses
from KVM switches or AV receivers?
Standard HPD low pulses used by these devices to indicate a configuration
change are typically between 100ms and 500ms. Because this filter is programmed
in hardware, an 800ms threshold completely hides these valid pulses from the
CPU, meaning the HPD interrupt never fires.
Could this cause the driver to miss valid hotplug events when users switch
inputs, resulting in blank screens or incorrect video modes because EDID and
HDCP are not renegotiated?
> break;
> case SIGNAL_TYPE_DISPLAY_PORT:
> case SIGNAL_TYPE_DISPLAY_PORT_MST:
--
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_B4299278015532212E7D2E624FA23C09C90A@qq.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-08 7:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-08 7:31 [PATCH] drm/amd/display: Increase the HDMI HPD disconnect filter time 2564278112
2026-10-08 7:38 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox