0aa56916b26efdc0222fe7e7da198abfac296d25
[openwrt/staging/ansuel.git] /
1 From 8d40b03821362d445a03dc23475fc4dff3ba88a7 Mon Sep 17 00:00:00 2001
2 From: Dom Cobley <popcornmix@gmail.com>
3 Date: Tue, 23 Apr 2024 17:30:56 +0100
4 Subject: [PATCH 1049/1085] vc4/hdmi: Ignore hotplug interrupt with
5 force_hotplug
6
7 The intention of the vc4.force_hotplug setting is to
8 ignore hotplug completely.
9
10 It can be used when a display toggles hotplug when
11 switching AV inputs, going into standby or changing a
12 KVM switch, and some side effect of that is unwanted.
13
14 It turns out while vc4.force_hotplug currently makes
15 hotplug always read as asserted, that isn't enough to
16 stop drm doing lots of stuff, including re-reading
17 the edid.
18
19 An example of what drm does with a hotplug deasert/assert
20 and vc4.force_hotplug=1 currently is:
21
22 https://paste.debian.net/hidden/dc07434b/
23
24 That is unwanted. Lets ignore the hotplug interrupt
25 completely so drm is blissfully unaware of the hotplug change.
26
27 Signed-off-by: Dom Cobley <popcornmix@gmail.com>
28 ---
29 drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
33 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
34 @@ -2917,7 +2917,7 @@ static irqreturn_t vc4_hdmi_hpd_irq_thre
35 struct drm_connector *connector = &vc4_hdmi->connector;
36 struct drm_device *dev = connector->dev;
37
38 - if (dev && dev->registered)
39 + if (dev && dev->registered && !force_hotplug)
40 drm_connector_helper_hpd_irq_event(connector);
41
42 return IRQ_HANDLED;