Skip to content

Commit 14adddc

Browse files
sremmind
authored andcommitted
drm/bridge: dw-hdmi-qp: Fix spurious IRQ on resume
After resume from suspend to RAM, the following splash is generated if the HDMI driver is probed (independent of a connected cable): [ 1194.484052] irq 80: nobody cared (try booting with the "irqpoll" option) [ 1194.484074] CPU: 0 UID: 0 PID: 627 Comm: rtcwake Not tainted 6.17.0-rc7-g96f1a11414b3 #1 PREEMPT [ 1194.484082] Hardware name: Rockchip RK3576 EVB V10 Board (DT) [ 1194.484085] Call trace: [ 1194.484087] ... (stripped) [ 1194.484283] handlers: [ 1194.484285] [<00000000bc363dcb>] dw_hdmi_qp_main_hardirq [dw_hdmi_qp] [ 1194.484302] Disabling IRQ #80 Apparently the HDMI IP is losing part of its state while the system is suspended and generates spurious interrupts during resume. The bug has not yet been noticed, as system suspend does not yet work properly on upstream kernel with either the Rockchip RK3588 or RK3576 platform. Fixes: 128a9bf ("drm/rockchip: Add basic RK3588 HDMI output support") Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid.link/20251014-rockchip-hdmi-suspend-fix-v1-1-983fcbf44839@collabora.com
1 parent d5bdf88 commit 14adddc

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ struct dw_hdmi_qp {
163163

164164
unsigned long ref_clk_rate;
165165
struct regmap *regm;
166+
int main_irq;
166167

167168
unsigned long tmds_char_rate;
168169
};
@@ -1271,6 +1272,7 @@ struct dw_hdmi_qp *dw_hdmi_qp_bind(struct platform_device *pdev,
12711272

12721273
dw_hdmi_qp_init_hw(hdmi);
12731274

1275+
hdmi->main_irq = plat_data->main_irq;
12741276
ret = devm_request_threaded_irq(dev, plat_data->main_irq,
12751277
dw_hdmi_qp_main_hardirq, NULL,
12761278
IRQF_SHARED, dev_name(dev), hdmi);
@@ -1331,9 +1333,16 @@ struct dw_hdmi_qp *dw_hdmi_qp_bind(struct platform_device *pdev,
13311333
}
13321334
EXPORT_SYMBOL_GPL(dw_hdmi_qp_bind);
13331335

1336+
void dw_hdmi_qp_suspend(struct device *dev, struct dw_hdmi_qp *hdmi)
1337+
{
1338+
disable_irq(hdmi->main_irq);
1339+
}
1340+
EXPORT_SYMBOL_GPL(dw_hdmi_qp_suspend);
1341+
13341342
void dw_hdmi_qp_resume(struct device *dev, struct dw_hdmi_qp *hdmi)
13351343
{
13361344
dw_hdmi_qp_init_hw(hdmi);
1345+
enable_irq(hdmi->main_irq);
13371346
}
13381347
EXPORT_SYMBOL_GPL(dw_hdmi_qp_resume);
13391348

drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,15 @@ static void dw_hdmi_qp_rockchip_remove(struct platform_device *pdev)
640640
component_del(&pdev->dev, &dw_hdmi_qp_rockchip_ops);
641641
}
642642

643+
static int __maybe_unused dw_hdmi_qp_rockchip_suspend(struct device *dev)
644+
{
645+
struct rockchip_hdmi_qp *hdmi = dev_get_drvdata(dev);
646+
647+
dw_hdmi_qp_suspend(dev, hdmi->hdmi);
648+
649+
return 0;
650+
}
651+
643652
static int __maybe_unused dw_hdmi_qp_rockchip_resume(struct device *dev)
644653
{
645654
struct rockchip_hdmi_qp *hdmi = dev_get_drvdata(dev);
@@ -655,7 +664,8 @@ static int __maybe_unused dw_hdmi_qp_rockchip_resume(struct device *dev)
655664
}
656665

657666
static const struct dev_pm_ops dw_hdmi_qp_rockchip_pm = {
658-
SET_SYSTEM_SLEEP_PM_OPS(NULL, dw_hdmi_qp_rockchip_resume)
667+
SET_SYSTEM_SLEEP_PM_OPS(dw_hdmi_qp_rockchip_suspend,
668+
dw_hdmi_qp_rockchip_resume)
659669
};
660670

661671
struct platform_driver dw_hdmi_qp_rockchip_pltfm_driver = {

include/drm/bridge/dw_hdmi_qp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ struct dw_hdmi_qp_plat_data {
3434
struct dw_hdmi_qp *dw_hdmi_qp_bind(struct platform_device *pdev,
3535
struct drm_encoder *encoder,
3636
const struct dw_hdmi_qp_plat_data *plat_data);
37+
void dw_hdmi_qp_suspend(struct device *dev, struct dw_hdmi_qp *hdmi);
3738
void dw_hdmi_qp_resume(struct device *dev, struct dw_hdmi_qp *hdmi);
3839
#endif /* __DW_HDMI_QP__ */

0 commit comments

Comments
 (0)