From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Stephan Gerhold <stephan.gerhold@linaro.org>
Cc: Vikash Garodia <quic_vgarodia@quicinc.com>,
Dikshita Agarwal <quic_dikshita@quicinc.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Hans Verkuil <hverkuil@kernel.org>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: venus: firmware: Use correct reset sequence for IRIS2
Date: Thu, 21 Aug 2025 09:01:21 +0100 [thread overview]
Message-ID: <8f337afc-32aa-47cc-afb5-7d5785d3e377@linaro.org> (raw)
In-Reply-To: <20250820-venus-iris2-no-tz-v1-1-9ebcc343195a@linaro.org>
On 20/08/2025 16:16, Stephan Gerhold wrote:
> When starting venus with the "no_tz" code path, IRIS2 needs the same
> boot/reset sequence as IRIS2_1. This is because most of the registers were
> moved to the "wrapper_tz_base", which is already defined for both IRIS2 and
> IRIS2_1 inside core.c. Add IRIS2 to the checks inside firmware.c as well to
> make sure that it uses the correct reset sequence.
>
> Both IRIS and IRIS2_1 are HFI v6 variants, so the correct sequence was used
> before commit c38610f8981e ("media: venus: firmware: Sanitize
> per-VPU-version").
>
> Fixes: c38610f8981e ("media: venus: firmware: Sanitize per-VPU-version")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> drivers/media/platform/qcom/venus/firmware.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
> index 66a18830e66dac2acbe11751a8c250876e20d795..4e2636b0536693a86dc51503d01dc2bca40b532a 100644
> --- a/drivers/media/platform/qcom/venus/firmware.c
> +++ b/drivers/media/platform/qcom/venus/firmware.c
> @@ -30,7 +30,7 @@ static void venus_reset_cpu(struct venus_core *core)
> u32 fw_size = core->fw.mapped_mem_size;
> void __iomem *wrapper_base;
>
> - if (IS_IRIS2_1(core))
> + if (IS_IRIS2(core) || IS_IRIS2_1(core))
> wrapper_base = core->wrapper_tz_base;
> else
> wrapper_base = core->wrapper_base;
> @@ -42,7 +42,7 @@ static void venus_reset_cpu(struct venus_core *core)
> writel(fw_size, wrapper_base + WRAPPER_NONPIX_START_ADDR);
> writel(fw_size, wrapper_base + WRAPPER_NONPIX_END_ADDR);
>
> - if (IS_IRIS2_1(core)) {
> + if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
> /* Bring XTSS out of reset */
> writel(0, wrapper_base + WRAPPER_TZ_XTSS_SW_RESET);
> } else {
> @@ -68,7 +68,7 @@ int venus_set_hw_state(struct venus_core *core, bool resume)
> if (resume) {
> venus_reset_cpu(core);
> } else {
> - if (IS_IRIS2_1(core))
> + if (IS_IRIS2(core) || IS_IRIS2_1(core))
> writel(WRAPPER_XTSS_SW_RESET_BIT,
> core->wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
> else
> @@ -181,7 +181,7 @@ static int venus_shutdown_no_tz(struct venus_core *core)
> void __iomem *wrapper_base = core->wrapper_base;
> void __iomem *wrapper_tz_base = core->wrapper_tz_base;
>
> - if (IS_IRIS2_1(core)) {
> + if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
> /* Assert the reset to XTSS */
> reg = readl(wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
> reg |= WRAPPER_XTSS_SW_RESET_BIT;
>
> ---
> base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
> change-id: 20250815-venus-iris2-no-tz-f9b52f33c4d0
>
> Best regards,
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
next prev parent reply other threads:[~2025-08-21 8:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 15:16 Stephan Gerhold
2025-08-20 17:20 ` Dmitry Baryshkov
2025-08-21 8:01 ` Bryan O'Donoghue [this message]
2025-08-21 9:48 ` Dikshita Agarwal
2025-08-21 12:04 ` 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=8f337afc-32aa-47cc-afb5-7d5785d3e377@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=hverkuil@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=quic_dikshita@quicinc.com \
--cc=quic_vgarodia@quicinc.com \
--cc=stephan.gerhold@linaro.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®