All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sebastian Reichel" <sebastian.reichel@collabora.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v9 16/22] drm/rockchip: dw_dp: Add runtime PM support
Date: Mon, 03 Aug 2026 18:58:32 +0000	[thread overview]
Message-ID: <20260803185833.325D51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260803-synopsys-dw-dp-improvements-v9-16-2e6e46135312@collabora.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

New issues:
- [Medium] Asynchronous autosuspend on driver removal is cancelled by devres-managed pm_runtime_disable(), leaving the hardware powered on and clocks enabled.

Pre-existing issues:
- [High] Missing system sleep PM operations prevents hardware reinitialization on system resume and leaks power during sleep for non-USB-C displays.
--

--- Patch [16]: [PATCH v9 16/22] drm/rockchip: dw_dp: Add runtime PM support ---
commit 92f08187a6106df5f97a5c7538b516c59d21ea4a
Author: Sebastian Reichel <sebastian.reichel@collabora.com>

drm/rockchip: dw_dp: Add runtime PM support
    
Add support for runtime PM to the Rockchip RK3576/3588 Synopsys
DesignWare DisplayPort driver.

> --- a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c

[ ... ]

> @@ -249,6 +255,24 @@ static void dw_dp_rockchip_remove(struct platform_device *pdev)
>  	component_del(&pdev->dev, &dw_dp_rockchip_component_ops);
>  }

[Severity: Medium]
Will this leave the hardware powered on and clocks enabled after driver unload?

When component_del() is called, the unbind path eventually calls dw_dp_unbind()
which asynchronously drops the PM reference using pm_runtime_put_autosuspend().

After dw_dp_rockchip_remove() returns, the devres cleanup sequence runs and
calls pm_runtime_disable() (registered via devm_pm_runtime_enable() during
probe). Because pm_runtime_disable() unconditionally cancels pending
autosuspend timers and async works, does this cancel the suspend operation
before it can execute and leave the device permanently in the RPM_ACTIVE state?

Would it be safer to ensure a synchronous suspend happens during the remove
path to prevent this leak?

> +
> +static int dw_dp_rockchip_runtime_suspend(struct device *dev)
> +{
> +	struct rockchip_dw_dp *dp = dev_get_drvdata(dev);
> +
> +	return dw_dp_runtime_suspend(dp->base);
> +}
> +
> +static int dw_dp_rockchip_runtime_resume(struct device *dev)
> +{
> +	struct rockchip_dw_dp *dp = dev_get_drvdata(dev);
> +
> +	return dw_dp_runtime_resume(dp->base);
> +}
> +
> +static const struct dev_pm_ops dw_dp_pm_ops = {
> +	RUNTIME_PM_OPS(dw_dp_rockchip_runtime_suspend, dw_dp_rockchip_runtime_resume, NULL)
> +};

[Severity: High]
This isn't a bug introduced by this patch, but could the lack of system sleep
callbacks in dw_dp_pm_ops prevent hardware reinitialization on system resume?

For non-USB-C displays, the driver holds a runtime PM reference indefinitely
to maintain active hotplug detection. During system suspend (S3), the DRM core
disables the display pipeline which drops one reference, but the usage count
remains at 1, so the device is not runtime suspended.

Since dw_dp_pm_ops lacks system sleep callbacks (like pm_runtime_force_suspend
and pm_runtime_force_resume), does the PM core fail to synchronously suspend
the device?

If the system forcefully cuts power during S3, the hardware state is lost.
Upon system resume, the runtime PM framework still considers the device
RPM_ACTIVE, so a subsequent pm_runtime_get_sync() during pipeline enable
might not trigger dw_dp_runtime_resume(). Does this leave the hardware
uninitialized and result in a blank display?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260803-synopsys-dw-dp-improvements-v9-0-2e6e46135312@collabora.com?part=16

  reply	other threads:[~2026-08-03 18:58 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 18:05 [PATCH v9 00/22] Synopsys DisplayPort Controller improvements for Rockchip platforms Sebastian Reichel
2026-08-03 18:05 ` Sebastian Reichel
2026-08-03 18:05 ` [PATCH v9 01/22] drm/bridge: synopsys: dw-dp: Register DP AUX on bridge attach Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:35   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 02/22] drm/bridge: synopsys: dw-dp: Fix incorrect resource lifetimes in bind callback Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:27   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 03/22] drm/bridge: synopsys: dw-dp: Fix error handling in dw_dp_link_enable() Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:25   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 04/22] drm/bridge: synopsys: dw-dp: Cancel pending HPD work Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:35   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 05/22] drm/bridge: synopsys: dw-dp: Document missing reset line deassert Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:05 ` [PATCH v9 06/22] drm/bridge: synopsys: dw-dp: Add missing mutex cleanups on module removal Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:27   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 07/22] drm/bridge: synopsys: dw-dp: Fix AUX transfer timeout race condition Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:05 ` [PATCH v9 08/22] drm/bridge: synopsys: dw-dp: Fix support for short I2C reads Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:05 ` [PATCH v9 09/22] drm/bridge: synopsys: dw-dp: Free output_fmts when none are valid Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:35   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 10/22] drm/bridge: synopsys: dw-dp: Support MEDIA_BUS_FMT_FIXED Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:43   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 11/22] drm/bridge: synopsys: dw-dp: Add follow-up bridge support Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:05 ` [PATCH v9 12/22] drm/bridge: Add out-of-band HPD notify handler Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:05 ` [PATCH v9 13/22] drm/bridge: synopsys: dw-dp: Support software triggered OOB HPD Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:05 ` [PATCH v9 14/22] drm/rockchip: dw_dp: Implement out-of-band HPD handling Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:46   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 15/22] drm/bridge: synopsys: dw-dp: Add Runtime PM support Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:55   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 16/22] drm/rockchip: dw_dp: Add runtime " Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:58   ` sashiko-bot [this message]
2026-08-03 18:05 ` [PATCH v9 17/22] drm/bridge: synopsys: dw-dp: Protect sdp_reg_bank from concurrent access Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:05 ` [PATCH v9 18/22] drm/bridge: synopsys: dw-dp: Drop useless reservation of first slot Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 19:02   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 19/22] drm/bridge: synopsys: dw-dp: Clear only enabled SDPs on atomic disable Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:05 ` [PATCH v9 20/22] drm/bridge: synopsys: dw-dp: Use regmap_set_bits in dw_dp_send_sdp Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 18:05 ` [PATCH v9 21/22] dt-bindings: display: rockchip: dw-dp: Fix sound DAI cells Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 19:06   ` sashiko-bot
2026-08-03 18:05 ` [PATCH v9 22/22] drm/bridge: synopsys: dw-dp: Add audio support Sebastian Reichel
2026-08-03 18:05   ` Sebastian Reichel
2026-08-03 19:11   ` sashiko-bot
2026-08-04 13:56 ` [PATCH v9 00/22] Synopsys DisplayPort Controller improvements for Rockchip platforms Igor Paunovic
2026-08-04 13:56   ` Igor Paunovic
2026-08-06  0:53   ` Sebastian Reichel
2026-08-06  0:53     ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260803185833.325D51F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sebastian.reichel@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.