summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>2026-10-05 03:38:15 +0300
committerHeiko Stuebner <heiko@sntech.de>2026-10-12 18:02:00 +0200
commit91f92a7487c4efef52b13bc864f5c16858791ba4 (patch)
tree6656f09195879d5ca361dd64e445a66dcb639086 /include/linux/debugobjects.h
parentb0d607d0c35b206b3ec0497dedbd0fa48f108144 (diff)
drm/rockchip: dw_hdmi_qp: Control the HPD IRQ line via the bridge HPD ops
The HPD interrupt must not be delivered before the DRM connector is fully set up, and it should be quiesced while the display pipeline is suspended. On top of that, the threaded handler re-arms HPD unconditionally after the hotplug debounce, which must not override an explicit disable requested by the DRM core. Request the HPD IRQ in bind() with IRQF_NO_AUTOEN so it stays disabled until the core arms it, and drive enable_irq()/disable_irq() from the phy ops invoked by the bridge through its hpd_{enable,disable}() callbacks. This ensures the line is only armed after the connector is ready. disable_irq() additionally waits for the threaded handler to finish, so its GRF re-arm can no longer race with and override a core-requested disable. Masking the line is not enough on its own, though: the threaded handler merely queues hpd_work with a 150 ms debounce, so an event taken shortly before the disable would still probe the connector and read the EDID long after the core considers HPD quiesced. Since disable_irq() has drained the threaded handler, which is the only site arming the work, it can no longer be requeued and dropping it is race-free. Use the non-syncing cancel_delayed_work() for that: waiting on a running callback would pull mode_config.mutex, taken by the work through drm_connector_helper_hpd_irq_event(), under the hpd_state_mutex held by drm_bridge_hpd_disable(). That inverts the order of the connector probe path, which holds mode_config.mutex while reaching hpd_state_mutex via drm_kms_helper_poll_enable(). A callback already in progress is drained by the system-sleep and unbind paths instead. Note that IRQF_NO_AUTOEN is incompatible with IRQF_SHARED; the latter is dropped as this IRQ has no other users. Tested-by: Diederik de Haas <diederik@cknow-tech.com> # NanoPC-T6 LTS, Rock 5B Tested-by: Robin Räber <robin.raebi@gmail.com> Tested-by: Igor Paunovic <royalnet026@gmail.com> # RK3588 Orange Pi 5 Plus, dual HDMI Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid.link/20261005-dw-hdmi-qp-scramb-v12-14-195157ba0b40@collabora.com
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions