From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD89248CFC for ; Sun, 23 Nov 2025 20:26:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763929586; cv=none; b=csyb4dpQlcdzR3HrEe90ZiIf1L6oA+pbzDi3JIdirhp/DHgJKw4OGMOZjIFthOavlHQe1e9hHGFbkY9X3AjzrlTaHl0rENqBhPyzmM1LfPe31RJV68AJm/PIpsS2oMVFVjJ4IACMpg+SxtiUAfz2qGz/sOCUSfJ0RWkkMxzeNiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763929586; c=relaxed/simple; bh=ssGr724+uHNz6hrDOZikegZem3tmNw9RBnbvqoI/yis=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SXwnFzD+53mZfZOX1MZ8OIZTd5sui3H5IrUn7AIdywT5wF85L/U9RGD1OqcCv/3xc0r11u7uOLHs8TU2XwVeD6ubQ5UCBth2q4WopjkIgtdsU+WPpjGBKPxcwsqJaNSksL5vmK1JcbJxTKCoD3gAGYjhaJqD8avkgyCVYyVQieE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b=0AH0Om+9; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b="0AH0Om+9" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Type:Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To; bh=MnmGG9nEh7frLPdwa/7ggpTE5XrRCmztW7yfcEYjFvs=; b=0AH0Om+9N09YKSuVelLP113NER X+yQvvwN75XVz83o4XlPVZIbbM2rhaex6Wo4dSdUnK0VGDlp3enYiVuGDyNLOjApyNeFK7kG/3+4O jiR9wNg178NTLTngneKcL+L88TRwb65CYNTDmFR7JoRr5ZckUjDuPtYb1c2+DekA9n+hRG2dQMPNA aSgus7BBuJyGGXkfuxe6rMl1EpS6THsxa7J9YD3Q170RTXQM3ug33nOuoQ7VVQVtGo6UkHZRrXwZ5 gSq2nLDvKtvYgKFxJcLwz2uYEa4pjgE1rFZCNa/K0NZuS38IBdGc+JFNNVVBEhNLJqUbhkwEYXhM+ aNJG9uyg==; Received: from i53875bd2.versanet.de ([83.135.91.210] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vNGel-0007bR-BM; Sun, 23 Nov 2025 21:25:59 +0100 From: Heiko =?UTF-8?B?U3TDvGJuZXI=?= To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Sandy Huang , Andy Yan , Sebastian Reichel Cc: Cristian Ciocaltea , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, kernel@collabora.com, Sebastian Reichel , Dmitry Baryshkov Subject: Re: [PATCH] drm/bridge: dw-hdmi-qp: Fix spurious IRQ on resume Date: Sun, 23 Nov 2025 21:25:58 +0100 Message-ID: <5028381.GXAFRqVoOG@diego> In-Reply-To: <20251014-rockchip-hdmi-suspend-fix-v1-1-983fcbf44839@collabora.com> References: <20251014-rockchip-hdmi-suspend-fix-v1-1-983fcbf44839@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Am Dienstag, 14. Oktober 2025, 18:00:57 Mitteleurop=C3=A4ische Normalzeit s= chrieb Sebastian Reichel: > After resume from suspend to RAM, the following splash is generated if > the HDMI driver is probed (independent of a connected cable): >=20 > [ 1194.484052] irq 80: nobody cared (try booting with the "irqpoll" optio= n) > [ 1194.484074] CPU: 0 UID: 0 PID: 627 Comm: rtcwake Not tainted 6.17.0-rc= 7-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 >=20 > 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. >=20 > Fixes: 128a9bf8ace2 ("drm/rockchip: Add basic RK3588 HDMI output support") > Signed-off-by: Sebastian Reichel so, just to say, to me this looks good and also I guess the changes to the main bridge are not looking controversial and most likely the issue should appear in all (future) dw-hdmi-qp variants. So I'll give that a day or two more and then apply it. Heiko > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 9 +++++++++ > drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 12 +++++++++++- > include/drm/bridge/dw_hdmi_qp.h | 1 + > 3 files changed, 21 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/d= rm/bridge/synopsys/dw-hdmi-qp.c > index 39332c57f2c5..c85eb340e5a3 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c > @@ -143,6 +143,7 @@ struct dw_hdmi_qp { > } phy; > =20 > struct regmap *regm; > + int main_irq; > =20 > unsigned long tmds_char_rate; > }; > @@ -1068,6 +1069,7 @@ struct dw_hdmi_qp *dw_hdmi_qp_bind(struct platform_= device *pdev, > =20 > dw_hdmi_qp_init_hw(hdmi); > =20 > + hdmi->main_irq =3D plat_data->main_irq; > ret =3D devm_request_threaded_irq(dev, plat_data->main_irq, > dw_hdmi_qp_main_hardirq, NULL, > IRQF_SHARED, dev_name(dev), hdmi); > @@ -1106,9 +1108,16 @@ struct dw_hdmi_qp *dw_hdmi_qp_bind(struct platform= _device *pdev, > } > EXPORT_SYMBOL_GPL(dw_hdmi_qp_bind); > =20 > +void dw_hdmi_qp_suspend(struct device *dev, struct dw_hdmi_qp *hdmi) > +{ > + disable_irq(hdmi->main_irq); > +} > +EXPORT_SYMBOL_GPL(dw_hdmi_qp_suspend); > + > void dw_hdmi_qp_resume(struct device *dev, struct dw_hdmi_qp *hdmi) > { > dw_hdmi_qp_init_hw(hdmi); > + enable_irq(hdmi->main_irq); > } > EXPORT_SYMBOL_GPL(dw_hdmi_qp_resume); > =20 > diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu= /drm/rockchip/dw_hdmi_qp-rockchip.c > index ed6e8f036f4b..9ac45e7bc987 100644 > --- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c > +++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c > @@ -597,6 +597,15 @@ static void dw_hdmi_qp_rockchip_remove(struct platfo= rm_device *pdev) > component_del(&pdev->dev, &dw_hdmi_qp_rockchip_ops); > } > =20 > +static int __maybe_unused dw_hdmi_qp_rockchip_suspend(struct device *dev) > +{ > + struct rockchip_hdmi_qp *hdmi =3D dev_get_drvdata(dev); > + > + dw_hdmi_qp_suspend(dev, hdmi->hdmi); > + > + return 0; > +} > + > static int __maybe_unused dw_hdmi_qp_rockchip_resume(struct device *dev) > { > struct rockchip_hdmi_qp *hdmi =3D dev_get_drvdata(dev); > @@ -612,7 +621,8 @@ static int __maybe_unused dw_hdmi_qp_rockchip_resume(= struct device *dev) > } > =20 > static const struct dev_pm_ops dw_hdmi_qp_rockchip_pm =3D { > - SET_SYSTEM_SLEEP_PM_OPS(NULL, dw_hdmi_qp_rockchip_resume) > + SET_SYSTEM_SLEEP_PM_OPS(dw_hdmi_qp_rockchip_suspend, > + dw_hdmi_qp_rockchip_resume) > }; > =20 > struct platform_driver dw_hdmi_qp_rockchip_pltfm_driver =3D { > diff --git a/include/drm/bridge/dw_hdmi_qp.h b/include/drm/bridge/dw_hdmi= _qp.h > index e9be6d507ad9..8955450663e5 100644 > --- a/include/drm/bridge/dw_hdmi_qp.h > +++ b/include/drm/bridge/dw_hdmi_qp.h > @@ -28,5 +28,6 @@ struct dw_hdmi_qp_plat_data { > struct dw_hdmi_qp *dw_hdmi_qp_bind(struct platform_device *pdev, > struct drm_encoder *encoder, > const struct dw_hdmi_qp_plat_data *plat_data); > +void dw_hdmi_qp_suspend(struct device *dev, struct dw_hdmi_qp *hdmi); > void dw_hdmi_qp_resume(struct device *dev, struct dw_hdmi_qp *hdmi); > #endif /* __DW_HDMI_QP__ */ >=20 > --- > base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787 > change-id: 20251014-rockchip-hdmi-suspend-fix-e9bd48588453 >=20 > Best regards, >=20