mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Linmao Li <lilinmao@kylinos.cn>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	 Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	 linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: renesas: vsp1: Propagate runtime PM resume errors
Date: Tue, 18 Aug 2026 13:32:59 +0200	[thread overview]
Message-ID: <aoRCyM9VJfLIeCWF@zed> (raw)
In-Reply-To: <20260716034113.81187-1-lilinmao@kylinos.cn>

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
>

      reply	other threads:[~2026-08-18 11:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  3:41 Linmao Li
2026-08-18 11:32 ` Jacopo Mondi [this message]

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=aoRCyM9VJfLIeCWF@zed \
    --to=jacopo.mondi@ideasonboard.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lilinmao@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /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 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®