Re: [PATCH v9 31/61] drm/rockchip: dw_hdmi_qp: Control the HPD IRQ line via the bridge HPD ops
[email protected] Thu, 23 Jul 2026 01:59:09 +0000
| Newsgroups | dev.linux.lists.linux-sunxi,org.freedesktop.lists.dri-devel |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: Pre-existing issues: - [High] Delayed HPD work is not cancelled when HPD is disabled, risking execution while the display pipeline is suspended or disabled. -- --- Patch [31]: [PATCH v9 31/61] drm/rockchip: dw_hdmi_qp: Control the HPD IRQ line via the bridge HPD ops --- commit 1832550496f2064373166520bd5d2d00accd260b Author: Cristian Ciocaltea <[email protected]> drm/rockchip: dw_hdmi_qp: Control the HPD IRQ line via the bridge HPD ops This commit changes the HPD interrupt handling to request it with IRQF_NO_AUTOEN and enables/disables it dynamically through the bridge hpd_{enable,disable}() callbacks. > diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c > index cdddbbb8b80b2..534a2c8da2a0a 100644 > --- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c > +++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c [ ... ] > @@ -308,12 +309,14 @@ static void dw_hdmi_qp_rk3588_enable_hpd(struct dw_hdmi_qp *dw_hdmi, void *data) > struct rockchip_hdmi_qp *hdmi = (struct rockchip_hdmi_qp *)data; > > dw_hdmi_qp_rk3588_unmask_hpd(hdmi); > + enable_irq(hdmi->hpd_irq); > } > > static void dw_hdmi_qp_rk3588_disable_hpd(struct dw_hdmi_qp *dw_hdmi, void *data) > { > struct rockchip_hdmi_qp *hdmi = (struct rockchip_hdmi_qp *)data; > > + disable_irq(hdmi->hpd_irq); [Severity: High] This isn't a bug introduced by this patch, but does this leave the scheduled delayed work running? When the DRM core disables HPD during suspend, disable_irq() waits for the threaded interrupt handler to finish, but the scheduled hdmi->hpd_work is not cancelled. If an HPD interrupt occurs right before suspend, the delayed work might execute 150ms later while the display pipeline is suspended or disabled. Could this access hardware registers (like GRF) after clocks or power domains have been disabled, and cause a system hang? Would it be safer to add cancel_delayed_work_sync(&hdmi->hpd_work) here in the disable callbacks, or in dw_hdmi_qp_rockchip_suspend()? > dw_hdmi_qp_rk3588_mask_hpd(hdmi); > } [ ... ] > static void dw_hdmi_qp_rk3576_disable_hpd(struct dw_hdmi_qp *dw_hdmi, void *data) > { > struct rockchip_hdmi_qp *hdmi = (struct rockchip_hdmi_qp *)data; > > + disable_irq(hdmi->hpd_irq); [Severity: High] This isn't a bug introduced by this patch, but this has the same issue with uncancelled delayed work as the rk3588 variant above. > dw_hdmi_qp_rk3576_mask_hpd(hdmi); > } > -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=31