From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Bryan O'Donoghue <bod@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/8] media: iris: enable support for SC7280 platform
Date: Wed, 8 Oct 2025 10:26:02 +0200 [thread overview]
Message-ID: <3f1979d4-1438-4c9d-99db-d97a09c5c35b@oss.qualcomm.com> (raw)
In-Reply-To: <20251008-iris-sc7280-v1-8-def050ba5e1f@oss.qualcomm.com>
On 10/8/25 6:33 AM, Dmitry Baryshkov wrote:
> As a part of migrating code from the old Venus driver to the new Iris
> one, add support for the SC7280 platform. It is very similar to SM8250,
> but it (currently) uses no reset controls (there is an optional
> GCC-generated reset, it will be added later) and no AON registers
> region. The Venus driver names this platform "IRIS2_1", so the ops in
Which we've learnt in the past is "IRIS2, 1-pipe"
> the driver are also now called iris_vpu21_ops.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> .../platform/qcom/iris/iris_platform_common.h | 3 +
> .../media/platform/qcom/iris/iris_platform_gen1.c | 66 +++++++++++
> drivers/media/platform/qcom/iris/iris_probe.c | 4 +
> drivers/media/platform/qcom/iris/iris_vpu2.c | 130 +++++++++++++++++++++
> drivers/media/platform/qcom/iris/iris_vpu_common.h | 1 +
> 5 files changed, 204 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> index 104ff38219e30e6d52476d44b54338c55ef2ca7b..36e33eb05a6918de590feca37b41c07a92e9c434 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> @@ -42,6 +42,7 @@ enum pipe_type {
> };
>
> extern const struct iris_platform_data qcs8300_data;
> +extern const struct iris_platform_data sc7280_data;
> extern const struct iris_platform_data sm8250_data;
> extern const struct iris_platform_data sm8550_data;
> extern const struct iris_platform_data sm8650_data;
> @@ -50,7 +51,9 @@ extern const struct iris_platform_data sm8750_data;
> enum platform_clk_type {
> IRIS_AXI_CLK, /* AXI0 in case of platforms with multiple AXI clocks */
> IRIS_CTRL_CLK,
> + IRIS_AHB_CLK,
Interestingly, 8250 also has an AHB clock, but the clock driver keeps it
always-on..
> IRIS_HW_CLK,
> + IRIS_HW_AXI_CLK,
This exists on SC7280 and SM6350, perhaps as a result of the bus topology
> IRIS_AXI1_CLK,
> IRIS_CTRL_FREERUN_CLK,
> IRIS_HW_FREERUN_CLK,
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen1.c b/drivers/media/platform/qcom/iris/iris_platform_gen1.c
> index 2b3b8bd00a6096acaae928318d9231847ec89855..d5288a71a6a8289e5ecf69b6f38231500f2bf8b4 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_gen1.c
> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen1.c
> @@ -364,3 +364,69 @@ const struct iris_platform_data sm8250_data = {
> .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl,
> .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl),
> };
> +
> +static const struct bw_info sc7280_bw_table_dec[] = {
> + { ((3840 * 2160) / 256) * 60, 1896000, },
> + { ((3840 * 2160) / 256) * 30, 968000, },
> + { ((1920 * 1080) / 256) * 60, 618000, },
> + { ((1920 * 1080) / 256) * 30, 318000, },
> +};
> +
> +static const char * const sc7280_opp_pd_table[] = { "cx" };
Wonder why this is different..
Oh, I can bet good money SM8250's Venus isn't fed off of MX alone..
Let's check the sauce..
It was always supposed to be M*MC*X with MX just for the VIDEO_CC
PLLs..
[...]
> +/*
> + * This is the same as iris_vpu_power_off_controller except
> + * AON_WRAPPER_MVP_NOC_LPI_CONTROL / AON_WRAPPER_MVP_NOC_LPI_STATUS programming
> + * and with added IRIS_AHB_CLK handling
> + */
> +static int iris_vpu21_power_off_controller(struct iris_core *core)
This is 1 : 1 the existing sm8250 code except...> +{
> + u32 val = 0;
> + int ret;
> +
> + writel(MSK_SIGNAL_FROM_TENSILICA | MSK_CORE_POWER_ON, core->reg_base + CPU_CS_X2RPMH);
> +
> + writel(REQ_POWER_DOWN_PREP, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CONTROL);
> +
> + ret = readl_poll_timeout(core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_STATUS,
> + val, val & BIT(0), 200, 2000);
> + if (ret)
> + goto disable_power;
> +
> + writel(0x0, core->reg_base + WRAPPER_DEBUG_BRIDGE_LPI_CONTROL);
> +
> + ret = readl_poll_timeout(core->reg_base + WRAPPER_DEBUG_BRIDGE_LPI_STATUS,
> + val, val == 0, 200, 2000);
> + if (ret)
> + goto disable_power;
> +
> + writel(CTL_AXI_CLK_HALT | CTL_CLK_HALT,
> + core->reg_base + WRAPPER_TZ_CTL_AXI_CLOCK_CONFIG);
> + writel(RESET_HIGH, core->reg_base + WRAPPER_TZ_QNS4PDXFIFO_RESET);
> + writel(0x0, core->reg_base + WRAPPER_TZ_QNS4PDXFIFO_RESET);
> + writel(0x0, core->reg_base + WRAPPER_TZ_CTL_AXI_CLOCK_CONFIG);
> +
> +disable_power:
> + iris_disable_unprepare_clock(core, IRIS_AHB_CLK);
..for this line
but this could be added to that one instead, since both clk APIs and the
Iris wrappers around it are happy to consume a null pointer (funnily
enough this one returns !void and is never checked)
similar story for other func additions
Konrad
next prev parent reply other threads:[~2025-10-08 8:26 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 4:32 [PATCH 0/8] media: iris: port support for Qualcomm SC7280 Dmitry Baryshkov
2025-10-08 4:32 ` [PATCH 1/8] media: iris: turn platform caps into constants Dmitry Baryshkov
2025-10-08 8:32 ` Bryan O'Donoghue
2025-10-09 6:08 ` Dikshita Agarwal
2025-10-09 14:45 ` Dmitry Baryshkov
2025-10-08 4:33 ` [PATCH 2/8] media: iris: turn platform data " Dmitry Baryshkov
2025-10-08 8:32 ` Bryan O'Donoghue
2025-10-09 6:09 ` Dikshita Agarwal
2025-10-08 4:33 ` [PATCH 3/8] media: iris: stop copying r/o data Dmitry Baryshkov
2025-10-08 23:48 ` Bryan O'Donoghue
2025-10-09 0:16 ` Dmitry Baryshkov
2025-10-08 4:33 ` [PATCH 4/8] media: iris: stop encoding PIPE value into fw_caps Dmitry Baryshkov
2025-10-08 8:03 ` Konrad Dybcio
2025-10-08 19:10 ` Dmitry Baryshkov
2025-10-08 4:33 ` [PATCH 5/8] media: iris: remove duplicateion between generic gen2 data and qcs8300 Dmitry Baryshkov
2025-10-08 8:07 ` Konrad Dybcio
2025-10-08 19:15 ` Dmitry Baryshkov
2025-10-09 6:10 ` Dikshita Agarwal
2025-10-09 14:46 ` Dmitry Baryshkov
2025-10-08 4:33 ` [PATCH 6/8] media: iris: rename sm8250 platform file to gen1 Dmitry Baryshkov
2025-10-08 8:08 ` Konrad Dybcio
2025-10-09 7:50 ` Dikshita Agarwal
2025-10-08 4:33 ` [PATCH 7/8] media: iris: move common register definitions to the header Dmitry Baryshkov
2025-10-08 23:50 ` Bryan O'Donoghue
2025-10-09 6:10 ` Dikshita Agarwal
2025-10-09 14:48 ` Dmitry Baryshkov
2025-10-14 9:13 ` Vikash Garodia
2025-10-14 9:51 ` Dmitry Baryshkov
2025-10-14 10:10 ` Vikash Garodia
2025-10-08 4:33 ` [PATCH 8/8] media: iris: enable support for SC7280 platform Dmitry Baryshkov
2025-10-08 8:26 ` Konrad Dybcio [this message]
2025-10-08 19:25 ` Dmitry Baryshkov
2025-10-09 9:19 ` Konrad Dybcio
2025-10-09 15:00 ` Dmitry Baryshkov
2025-10-09 15:49 ` Konrad Dybcio
2025-10-09 16:20 ` Dmitry Baryshkov
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=3f1979d4-1438-4c9d-99db-d97a09c5c35b@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--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