mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i: dw-hdmi: Deinit PHY in bind error path
@ 2026-11-04 18:56 Jernej Skrabec
  2026-11-09 16:53 ` Chen-Yu Tsai
  2026-11-15 15:03 ` Chen-Yu Tsai
  0 siblings, 2 replies; 3+ messages in thread
From: Jernej Skrabec @ 2026-11-04 18:56 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Samuel Holland
  Cc: dri-devel, linux-arm-kernel, linux-sunxi, linux-kernel, Jernej Skrabec

sun8i_hdmi_phy_init() enables the PHY clocks and deasserts the PHY
reset. When dw_hdmi_bind() fails afterwards, the error path doesn't
undo that, so the clocks stay enabled and every further bind attempt
enables them once more.

Call sun8i_hdmi_phy_deinit() in the error path, like unbind does.

Fixes: c64c8e04a12e ("drm/sun4i: dw-hdmi: Fix HDMI PHY clock setup")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
index bd3923ef5a41..983826001f12 100644
--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
@@ -209,6 +209,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,
 
 cleanup_encoder:
 	drm_encoder_cleanup(encoder);
+	sun8i_hdmi_phy_deinit(hdmi->phy);
 err_disable_clk_tmds:
 	clk_disable_unprepare(hdmi->clk_tmds);
 err_assert_ctrl_reset:

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/sun4i: dw-hdmi: Deinit PHY in bind error path
  2026-11-04 18:56 [PATCH] drm/sun4i: dw-hdmi: Deinit PHY in bind error path Jernej Skrabec
@ 2026-11-09 16:53 ` Chen-Yu Tsai
  2026-11-15 15:03 ` Chen-Yu Tsai
  1 sibling, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2026-11-09 16:53 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Samuel Holland, dri-devel,
	linux-arm-kernel, linux-sunxi, linux-kernel

On Thu, Nov 5, 2026 at 3:57 AM Jernej Skrabec <jernej.skrabec@gmail.com> wrote:
>
> sun8i_hdmi_phy_init() enables the PHY clocks and deasserts the PHY
> reset. When dw_hdmi_bind() fails afterwards, the error path doesn't
> undo that, so the clocks stay enabled and every further bind attempt
> enables them once more.
>
> Call sun8i_hdmi_phy_deinit() in the error path, like unbind does.
>
> Fixes: c64c8e04a12e ("drm/sun4i: dw-hdmi: Fix HDMI PHY clock setup")
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Reviewed-by: Chen-Yu Tsai <wens@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/sun4i: dw-hdmi: Deinit PHY in bind error path
  2026-11-04 18:56 [PATCH] drm/sun4i: dw-hdmi: Deinit PHY in bind error path Jernej Skrabec
  2026-11-09 16:53 ` Chen-Yu Tsai
@ 2026-11-15 15:03 ` Chen-Yu Tsai
  1 sibling, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2026-11-15 15:03 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Samuel Holland, Jernej Skrabec
  Cc: dri-devel, linux-arm-kernel, linux-sunxi, linux-kernel

On Wed, 04 Nov 2026 19:56:59 +0100, Jernej Skrabec wrote:
> sun8i_hdmi_phy_init() enables the PHY clocks and deasserts the PHY
> reset. When dw_hdmi_bind() fails afterwards, the error path doesn't
> undo that, so the clocks stay enabled and every further bind attempt
> enables them once more.
> 
> Call sun8i_hdmi_phy_deinit() in the error path, like unbind does.
> 
> [...]

Applied to drm-misc-next in drm-misc, thanks!

[1/1] drm/sun4i: dw-hdmi: Deinit PHY in bind error path
      commit: 39e407b553ec15d4a233b651531ad431ed7542be

Best regards,
-- 
Chen-Yu Tsai <wens@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-15 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 18:56 [PATCH] drm/sun4i: dw-hdmi: Deinit PHY in bind error path Jernej Skrabec
2026-11-09 16:53 ` Chen-Yu Tsai
2026-11-15 15:03 ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®