Hi,
On Thu, Nov 19, 2026 at 09:49:21AM +0100, Marek Szyprowski wrote:
> The pipe (FIMD -> DP video) clock on Exynos is switched from the
> analogix_dp runtime PM callbacks via plat_data->power_on()/power_off(),
> which require the encoder to be still attached to a CRTC. The driver
> relies on pm_runtime_put_sync() in analogix_dp_bridge_disable() to run
> the runtime suspend callback immediately, while the encoder->crtc link
> is still valid.
This is a bit concerning, as this is somewhat of a misunderstanding of
how runtime PM works. (But then, I guess it's not really surprising that
people misunderstand runtime PM -- it's highly confusing.)
Runtime PM cannot guarantee that something powers off, at least while
runtime PM is enabled. It provides hints, but those can be overridden.
A primary reason: /sys/.../<this_device>/power/control can be set to
'on', which means the device will always be prevented from
runtime-suspending. So I assume that if you 'echo on >
.../power/control', you'll still see the same bug.
(It's possible that 'power/control' is the only way things break. I've
wondered at times whether we should allow for drivers to opt out, and
block this interface.)
> The device uses autosuspend, so whether put_sync() suspends the device
> right away depends on the last_busy timestamp. Since commit f2b556e3dad6
> ("PM: runtime: Update last_busy before calling rpm_suspend() in
> rpm_idle()") last_busy is refreshed in rpm_idle(), so
> pm_runtime_put_sync() now only schedules an autosuspend 100ms later.
I don't think commit f2b556e3dad6 is the only reason you'll get this
behavior. There's also:
55b2b8af704f ("PM: runtime: Update last_busy in rpm_resume() for active
devices")
56f487c78015 ("PM / Runtime: Update last_busy in rpm_resume")
Those are all reasons that last_busy may get refreshed without explicit
calls in your driver.
> During system suspend this means that the device is runtime suspended
> only by pm_runtime_force_suspend(), when encoder->crtc is already NULL,
> so the FIMD DP clock is never disabled and its cached state gets out of
> sync with the hardware after FIMD loses power. On resume the clock is
> not re-enabled and enabling the bridge fails on Exynos5250 Snow:
I didn't spend enough time on all of this to see if it makes any sense
(or if, for instance, it's just LLM garbage), but it seems suspect that
you have to reason about runtime PM state so much in order to get
correct system PM behavior. They should be pretty much orthogonal,
functionally.
> exynos-dp 145b0000.dp-controller: Timeout of slave video streamclk ok
> exynos-dp 145b0000.dp-controller: unable to config video
> [drm:analogix_dp_bridge_atomic_enable [analogix_dp]] *ERROR* dp commit
> error, ret = -110
> exynos-dp 145b0000.dp-controller: failed to set bridge, retry: 0
> ...
> exynos-dp 145b0000.dp-controller: too many times retry set bridge, give it
> up
>
> Use pm_runtime_put_sync_suspend() in the bridge disable path and in the
> analogix_dp_set_bridge() error path, so the hardware is powered down
> immediately when the display is turned off, regardless of the
> autosuspend delay used for the AUX channel transfers.
>
> Fixes: f28dd5075675 ("drm/bridge: analogix_dp: Enable autosuspend")
> Signed-off-by: Marek Szyprowski <[email protected]>
> ---
> This patch has been developed with LLM assistance and have been tested
> on the real Exynos5250-based Snow Chromebook device.
>
> Best regards
> Marek Szyprowski, PhD
> Samsung R&D Institute Poland
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 8bb4c48aa3b4..022acb962b7c 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -1021,7 +1021,7 @@ static int analogix_dp_set_bridge(struct
> analogix_dp_device *dp)
> return 0;
>
> out_dp_init:
> - pm_runtime_put_sync(dp->dev);
> + pm_runtime_put_sync_suspend(dp->dev);
>
> return ret;
> }
> @@ -1163,7 +1163,7 @@ static void analogix_dp_bridge_disable(struct
> drm_bridge *bridge)
>
> analogix_dp_set_analog_power_down(dp, POWER_ALL, 1);
>
> - pm_runtime_put_sync(dp->dev);
> + pm_runtime_put_sync_suspend(dp->dev);
These may be valid changes to make (they are the correct way to
purposely skip autosuspend delays), but I'm not sure about all the
justification, and whether they imply there are larger bugs in here that
you're papering over.
Brian
>
> dp->fast_train_enable = false;
> dp->psr_supported = false;
> --
> 2.43.0
>