From: sashiko-bot@kernel.org
To: "Wangao Wang" <wangao.wang@oss.qualcomm.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v8 2/5] media: iris: Add hardware power on/off ops for X1P42100
Date: Fri, 29 May 2026 08:19:40 +0000 [thread overview]
Message-ID: <20260529081941.046651F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260529-enable_iris_on_purwa-v8-2-b1b9670459ab@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Incorrect teardown ordering in `iris_vpu_power_off_hw()` disables power domains before hardware clocks.
--
commit 99a4b6ceed030f2e0c99e6828095cd2e45157242
Author: Wangao Wang <wangao.wang@oss.qualcomm.com>
media: iris: Add hardware power on/off ops for X1P42100
This commit wires an extra BSE clock into the power on/off sequence for
the Iris block on the X1P42100 platform. The BSE clock drives the Bin
Stream Engine and is required to be enabled separately from the core clock.
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/media/platform/qcom/iris/iris_vpu_common.c
> index c6cfc1d9fd9ec..a3238bf118eb9 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c
> +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c
> @@ -224,6 +224,7 @@ void iris_vpu_power_off_hw(struct iris_core *core)
> {
> dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN], false);
> iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN]);
> + iris_disable_unprepare_clock(core, IRIS_BSE_HW_CLK);
[Severity: High]
This isn't a bug introduced by this patch, but does this function disable
power domains before disabling the hardware clocks?
In iris_vpu_power_on_hw(), the sequence first enables the power domain,
then enables the clocks, and finally sets the hwmode. The error path of
iris_vpu_power_on_hw() correctly follows a last-in, first-out (LIFO) order
and disables the clocks before disabling the power domain.
However, iris_vpu_power_off_hw() calls iris_disable_power_domains() before
disabling the clocks. On ARM/Qualcomm platforms, turning off a power domain
(such as a GDSC) while its associated clocks are still running can prevent
the domain from fully collapsing, lead to bus hangs, or trigger
asynchronous external aborts (SErrors) when the clock controller
subsequently attempts to access unpowered registers.
By inserting the new IRIS_BSE_HW_CLK here, this patch perpetuates the
unsafe sequence. Should the teardown in iris_vpu_power_off_hw() be updated
to strictly mirror the reverse order used in the error path of
iris_vpu_power_on_hw()?
> iris_disable_unprepare_clock(core, IRIS_HW_AHB_CLK);
> iris_disable_unprepare_clock(core, IRIS_HW_CLK);
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260529-enable_iris_on_purwa-v8-0-b1b9670459ab@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-05-29 8:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <keD2FYytnyM7Tuz-kCdnzVBtv7rq_24Kr2dEKBfOpBjqQnmRFqksX-dY7IE8TlIB4ke44GBSYStsHtoa0x4DJQ==@protonmail.internalid>
2026-05-29 7:34 ` [PATCH v8 0/5] media: iris: add support for purwa platform Wangao Wang
2026-05-29 7:34 ` [PATCH v8 1/5] dt-bindings: media: qcom,sm8550-iris: Add X1P42100 compatible Wangao Wang
2026-05-29 8:01 ` sashiko-bot
2026-05-29 7:34 ` [PATCH v8 2/5] media: iris: Add hardware power on/off ops for X1P42100 Wangao Wang
2026-05-29 8:19 ` sashiko-bot [this message]
2026-05-29 7:35 ` [PATCH v8 3/5] media: iris: Add platform data " Wangao Wang
2026-05-29 7:35 ` [PATCH v8 4/5] arm64: dts: qcom: purwa: Override Iris clocks and operating points Wangao Wang
2026-05-29 8:55 ` sashiko-bot
2026-05-29 7:35 ` [PATCH v8 5/5] arm64: dts: qcom: purwa-iot-som: enable video Wangao Wang
2026-05-29 8:46 ` [PATCH v8 0/5] media: iris: add support for purwa platform Jie Gan
2026-05-29 9:13 ` Bryan O'Donoghue
2026-05-29 9:15 ` Bryan O'Donoghue
2026-05-29 9:45 ` Wangao Wang
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=20260529081941.046651F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wangao.wang@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