Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vikash Garodia" <vikash.garodia@oss.qualcomm.com>
Cc: media-ci@linuxtv.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 1/6] media: iris: wait for vpu NoC to enter low power during power off
Date: Thu, 01 Oct 2026 15:28:16 +0000	[thread overview]
Message-ID: <20261001152817.275E61F00898@smtp.kernel.org> (raw)
In-Reply-To: <20261001-kaanapali-iris-v4-1-642f9ac5e699@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] media: iris: unhandled timeout on VPU NoC LPI status poll
- [Low] media: iris: magic number used instead of NOC_LPI_STATUS_DONE
--

commit ad8593fbbb8fd303ff77853725986ef7bd6d05a9
Author: Vikash Garodia <vikash.garodia@oss.qualcomm.com>

    media: iris: wait for vpu NoC to enter low power during power off
    
    The recommended hardware sequence requires software to wait for vpu NoC
    to enter in low power mode and then deassert the low power idle (LPI)
    control. Add the missing LPI status poll and move the LPI control
    deassertion after the hardware acks LPI mode. This avoids any pending
    transactions on vpu NoC before shutting it down.

> diff --git a/drivers/media/platform/qcom/iris/iris_vpu4x.c b/drivers/media/platform/qcom/iris/iris_vpu4x.c
> index 02e100a4045fc..32a161c8d534a 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu4x.c
> +++ b/drivers/media/platform/qcom/iris/iris_vpu4x.c
> @@ -316,6 +316,10 @@ static void iris_vpu4x_power_off_hardware(struct iris_core *core)
>  	if (!handshake_done && handshake_busy)
>  		dev_err(core->dev, "LPI handshake timeout\n");
>  
> +	readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_NOC_LPI_STATUS,
> +			   value, value & BIT(0), 200, 2000);

[Severity: Low]
This isn't a bug, but could NOC_LPI_STATUS_DONE be used here instead of the
magic number BIT(0) to remain consistent with the rest of the function?

[Severity: Medium]
Is it intentional to discard the return value of readl_poll_timeout() here?

If the poll times out, the code silently proceeds to deassert LPI control and
reset the NoC, which could lead to hardware stalls from pending transactions.

Additionally, if the preceding do-while loop times out, LPI_CONTROL is left
at 0x0. This appears to guarantee the new poll will unconditionally fail and
wait the full 2000 microseconds. 

Could this return value be assigned to 'ret' and handled similarly to the
other polling loops in this function?

> +	writel(0x0, core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL);
> +
>  	writel(MVP_NOC_RESET_REQ_MASK, core->reg_base + AON_WRAPPER_MVP_NOC_RESET_REQ);
>  	ret = readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_NOC_RESET_ACK,
>  				 value, value & MVP_NOC_RESET_REQ_MASK, 200, 2000);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261001-kaanapali-iris-v4-0-642f9ac5e699@oss.qualcomm.com?part=1

  reply	other threads:[~2026-10-01 15:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 15:17 [PATCH v4 0/6] media: iris: add support for kaanapali platform Vikash Garodia
2026-10-01 15:17 ` [PATCH v4 1/6] media: iris: wait for vpu NoC to enter low power during power off Vikash Garodia
2026-10-01 15:28   ` sashiko-bot [this message]
2026-10-01 15:17 ` [PATCH v4 2/6] media: dt-bindings: qcom-kaanapali-iris: Add kaanapali video codec binding Vikash Garodia
2026-10-01 15:28   ` sashiko-bot
2026-10-03 14:30   ` Krzysztof Kozlowski
2026-10-01 15:17 ` [PATCH v4 3/6] media: iris: add iris4 specific H265 line buffer calculation Vikash Garodia
2026-10-01 15:32   ` sashiko-bot
2026-10-01 15:17 ` [PATCH v4 4/6] media: iris: add platform data for kaanapali Vikash Garodia
2026-10-01 15:17 ` [PATCH v4 5/6] arm64: dts: qcom: kaanapali: add iris video node Vikash Garodia
2026-10-01 15:17 ` [PATCH v4 6/6] arm64: dts: qcom: kaanapali-mtp: enable iris video node on mtp board Vikash Garodia

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=20261001152817.275E61F00898@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=media-ci@linuxtv.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vikash.garodia@oss.qualcomm.com \
    /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