mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: renesas: vsp1: Propagate runtime PM resume errors
@ 2026-07-16  3:41 Linmao Li
  2026-08-18 11:32 ` Jacopo Mondi
  0 siblings, 1 reply; 2+ messages in thread
From: Linmao Li @ 2026-07-16  3:41 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham
  Cc: Mauro Carvalho Chehab, linux-media, linux-renesas-soc,
	linux-kernel, Linmao Li

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 <lilinmao@kylinos.cn>
---
 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

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

* Re: [PATCH] media: renesas: vsp1: Propagate runtime PM resume errors
  2026-07-16  3:41 [PATCH] media: renesas: vsp1: Propagate runtime PM resume errors Linmao Li
@ 2026-08-18 11:32 ` Jacopo Mondi
  0 siblings, 0 replies; 2+ messages in thread
From: Jacopo Mondi @ 2026-08-18 11:32 UTC (permalink / raw)
  To: Linmao Li
  Cc: Laurent Pinchart, Kieran Bingham, Mauro Carvalho Chehab,
	linux-media, linux-renesas-soc, linux-kernel

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 <lilinmao@kylinos.cn>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

> ---
>  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
>

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

end of thread, other threads:[~2026-08-18 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-16  3:41 [PATCH] media: renesas: vsp1: Propagate runtime PM resume errors Linmao Li
2026-08-18 11:32 ` Jacopo Mondi

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®