All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: Daniel Scally <dan.scally@ideasonboard.com>,
	 Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	 linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: mali-c55: fail power-on when safe stop times out
Date: Wed, 30 Sep 2026 17:42:47 +0200	[thread overview]
Message-ID: <ar0t2x3M-4-CNOU0@zed> (raw)
In-Reply-To: <20260830134609.9886-1-pengpeng@iscas.ac.cn>

Hello Pengpeng

On Sun, Aug 30, 2026 at 09:46:09PM +0800, Pengpeng Hou wrote:
> The power-on path requests safe stop to establish a non-streaming state but
> ignores the polling result and publishes runtime resume success.
>
> Power the block back off and propagate a safe-stop timeout.
>
> Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")

I'll add
Cc: stable@vger.kernel.org

> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
>  drivers/media/platform/arm/mali-c55/mali-c55-core.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> index f28e9f4354aca..288fba4831808 100644
> --- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> +++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> @@ -730,8 +730,13 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
>  	/* Set safe stop to ensure we're in a non-streaming state */
>  	mali_c55_write(mali_c55, MALI_C55_REG_INPUT_MODE_REQUEST,
>  		       MALI_C55_INPUT_SAFE_STOP);
> -	readl_poll_timeout(mali_c55->base + MALI_C55_REG_MODE_STATUS,
> -			   val, !val, 10 * USEC_PER_MSEC, 250 * USEC_PER_MSEC);
> +	ret = readl_poll_timeout(mali_c55->base + MALI_C55_REG_MODE_STATUS,
> +				 val, !val, 10 * USEC_PER_MSEC, 250 * USEC_PER_MSEC);
> +	if (ret) {
> +		dev_err(mali_c55->dev, "safe stop timed out\n");
> +		__mali_c55_power_off(mali_c55);
> +		return ret;
> +	}
>
>  	return 0;
>  }
>
> base-commit: 08dbfad3f5040f5bdb6c529da20d6d4e81fefd72
> --
> 2.50.1
>
>

      reply	other threads:[~2026-09-30 15:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 13:46 [PATCH] media: mali-c55: fail power-on when safe stop times out Pengpeng Hou
2026-09-30 15:42 ` 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=ar0t2x3M-4-CNOU0@zed \
    --to=jacopo.mondi@ideasonboard.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=pengpeng@iscas.ac.cn \
    /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.