Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vishnu Reddy" <busanna.reddy@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
	media-ci@linuxtv.org
Subject: Re: [PATCH v12 4/9] media: iris: Add power sequence for glymur
Date: Wed, 25 Nov 2026 03:38:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-232475@kernel.org> (raw)
In-Reply-To: <20261125-glymur-v12-4-5c34dfd73fc2@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] media: iris: unchecked LPI poll timeout in
  iris_vpu36_power_off_vcodec()
--

commit 998f4f5571d3cd5ed169b9dcdfec4f6181739b16
Author: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>

media: iris: Add power sequence for glymur

This commit adds the VPU v3.6 power-on, power-off, and hardware-mode
operations for the dual-vcodec Glymur platform.

> diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/platform/qcom/iris/iris_vpu3x.c
> index e1822b0ba4baf..4c591538ed82c 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c
> +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c

[ ... ]

> @@ -221,6 +221,119 @@ static void iris_vpu35_power_off_hw(struct iris_core *core)
>  	iris_vpu33_power_off_hardware(core);
>  }
>  
> +static void iris_vpu36_power_off_vcodec(struct iris_core *core, u32 core_id)
> +{

[ ... ]

> +	do {
> +		writel(power_down_prep[core_id], core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL);
> +		usleep_range(15, 20);
> +		value = readl(core->reg_base + AON_WRAPPER_MVP_NOC_LPI_STATUS);
> +
> +		handshake_done = value & lpi_status_done[core_id];
> +		handshake_busy = value & (lpi_status_deny[core_id] | lpi_status_active[core_id]);
> +
> +		if (handshake_done || !handshake_busy)
> +			break;
> +
> +		writel(0, core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL);
> +		usleep_range(15, 20);
> +	} while (++count < 1000);
> +
> +	readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_NOC_LPI_STATUS,
> +			   value, value & lpi_status_done[core_id], 200, 2000);
> +	writel(0, core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL);
> +
> +	writel(bridge_sw_reset[core_id] | bridge_hw_reset[core_id],
> +	       core->reg_base + CPU_CS_AHB_BRIDGE_SYNC_RESET);

[Severity: Medium]
Should iris_vpu36_power_off_vcodec() check the return value of
readl_poll_timeout() on AON_WRAPPER_MVP_NOC_LPI_STATUS and jump to
disable_power on timeout, matching the DMA_NOC_IDLE poll earlier in this
function and iris_vpu33_power_off_hardware()?

If the NoC LPI handshake times out without asserting
lpi_status_done[core_id], ignoring the error clears
AON_WRAPPER_MVP_NOC_LPI_CONTROL and asserts CPU_CS_AHB_BRIDGE_SYNC_RESET
while the NoC handshake is still incomplete, which can hang the bus.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125-glymur-v12-0-5c34dfd73fc2@oss.qualcomm.com?part=4

  reply	other threads:[~2026-11-25  3:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  3:24 [PATCH v12 0/9] media: iris: Add support for glymur platform Vishnu Reddy
2026-11-25  3:24 ` [PATCH v12 1/9] dt-bindings: media: qcom,glymur-iris: Add glymur video codec Vishnu Reddy
2026-11-25  3:24 ` [PATCH v12 2/9] media: iris: Enable Secure PAS support with IOMMU managed by Linux Vishnu Reddy
2026-11-25  3:24 ` [PATCH v12 3/9] media: iris: Replace enum-indexed clock and power domain tables with per-block structures Vishnu Reddy
2026-11-25  3:24 ` [PATCH v12 4/9] media: iris: Add power sequence for glymur Vishnu Reddy
2026-11-25  3:38   ` sashiko-bot [this message]
2026-11-25  3:24 ` [PATCH v12 5/9] media: iris: Handle CPU_CS_SCIACMDARG3 register write via program bootup registers hook Vishnu Reddy
2026-11-25  3:24 ` [PATCH v12 6/9] media: iris: Add support to select core for dual core platforms Vishnu Reddy
2026-11-25  3:47   ` sashiko-bot
2026-11-25  3:24 ` [PATCH v12 7/9] media: iris: Add platform data for glymur Vishnu Reddy
2026-11-25  3:24 ` [PATCH v12 8/9] arm64: dts: qcom: glymur: Add iris video node Vishnu Reddy
2026-11-25  3:24 ` [PATCH v12 9/9] arm64: dts: qcom: glymur-crd: Enable iris video codec node Vishnu Reddy

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=sashiko-outbox-232475@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=busanna.reddy@oss.qualcomm.com \
    --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 \
    /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