Re: [PATCH] media: renesas: vsp1: Propagate runtime PM resume errors

Jacopo Mondi <[email protected]>
Newsgroups org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-media
Message-ID <aoRCyM9VJfLIeCWF@zed>
Hi Linmao Li

On Thu, Jul 16, 2026 at 11:41:13AM +0800, Linmao Li wrote:
> vsp1_pm_runtime_resume() can fail while deasserting reset, initializing
> the device, or enabling the FCP. However, vsp1_pm_resume() ignores the
> return value from pm_runtime_force_resume() and restarts video pipelines
> even if the device failed to resume. This can access hardware that is
> still unavailable while reporting a successful system resume.
>
> Propagate the error and skip the pipeline restart when the device could
> not be resumed.
>
> Fixes: 1e6af546ee66 ("[media] v4l: vsp1: Implement runtime PM support")
> Signed-off-by: Linmao Li <[email protected]>

Reviewed-by: Jacopo Mondi <[email protected]>

> ---
>  drivers/media/platform/renesas/vsp1/vsp1_drv.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drv.c b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> index 627b5046fa80..2a9f9f114575 100644
> --- a/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> +++ b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> @@ -641,8 +641,11 @@ static int vsp1_pm_suspend(struct device *dev)
>  static int vsp1_pm_resume(struct device *dev)
>  {
>  	struct vsp1_device *vsp1 = dev_get_drvdata(dev);
> +	int ret;
>
> -	pm_runtime_force_resume(vsp1->dev);
> +	ret = pm_runtime_force_resume(vsp1->dev);
> +	if (ret)
> +		return ret;
>
>  	/*
>  	 * When used as part of a display pipeline, the VSP is stopped and
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.