From: Bryan O'Donoghue <bod@kernel.org>
To: Wangao Wang <wangao.wang@oss.qualcomm.com>,
Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/5] media: iris: Add hardware power on/off ops for X1P42100
Date: Wed, 1 Apr 2026 11:49:57 +0100 [thread overview]
Message-ID: <65946b6d-de58-439c-b3cb-cc4efd33e7ef@kernel.org> (raw)
In-Reply-To: <20260401-enable_iris_on_purwa-v4-2-ca784552a3e9@oss.qualcomm.com>
On 01/04/2026 11:24, Wangao Wang wrote:
> On X1P42100 the Iris block has an extra BSE clock. Wire this clock into
> the power on/off sequence.
>
> The BSE clock is used to drive the Bin Stream Engine, which is a sub-block
> of the video codec hardware responsible for bitstream-level processing. It
> is required to be enabled separately from the core clock to ensure proper
> codec operation.
>
> Signed-off-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/iris/iris_vpu3x.c | 46 ++++++++++++++++++++++
> drivers/media/platform/qcom/iris/iris_vpu_common.h | 1 +
> 2 files changed, 47 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/platform/qcom/iris/iris_vpu3x.c
> index fe4423b951b1e9e31d06dffc69d18071cc985731..e6a62b3ca78efeefa2eed267636789a6b405689f 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c
> +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c
> @@ -71,6 +71,44 @@ static void iris_vpu3_power_off_hardware(struct iris_core *core)
> iris_vpu_power_off_hw(core);
> }
>
> +static int iris_vpu3_purwa_power_on_hw(struct iris_core *core)
> +{
> + int ret;
> +
> + ret = iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN]);
> + if (ret)
> + return ret;
> +
> + ret = iris_prepare_enable_clock(core, IRIS_HW_CLK);
> + if (ret)
> + goto err_disable_power;
> +
> + ret = iris_prepare_enable_clock(core, IRIS_BSE_HW_CLK);
> + if (ret)
> + goto err_disable_hw_clock;
> +
> + ret = dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN], true);
> + if (ret)
> + goto err_disable_bse_hw_clock;
> +
> + return 0;
> +
> +err_disable_bse_hw_clock:
> + iris_disable_unprepare_clock(core, IRIS_BSE_HW_CLK);
> +err_disable_hw_clock:
> + iris_disable_unprepare_clock(core, IRIS_HW_CLK);
> +err_disable_power:
> + iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN]);
> +
> + return ret;
> +}
> +
> +static void iris_vpu3_purwa_power_off_hardware(struct iris_core *core)
> +{
> + iris_vpu3_power_off_hardware(core);
> + iris_disable_unprepare_clock(core, IRIS_BSE_HW_CLK);
> +}
> +
> static void iris_vpu33_power_off_hardware(struct iris_core *core)
> {
> bool handshake_done = false, handshake_busy = false;
> @@ -268,6 +306,14 @@ const struct vpu_ops iris_vpu3_ops = {
> .calc_freq = iris_vpu3x_vpu4x_calculate_frequency,
> };
>
> +const struct vpu_ops iris_vpu3_purwa_ops = {
> + .power_off_hw = iris_vpu3_purwa_power_off_hardware,
> + .power_on_hw = iris_vpu3_purwa_power_on_hw,
> + .power_off_controller = iris_vpu_power_off_controller,
> + .power_on_controller = iris_vpu_power_on_controller,
> + .calc_freq = iris_vpu3x_vpu4x_calculate_frequency,
> +};
> +
> const struct vpu_ops iris_vpu33_ops = {
> .power_off_hw = iris_vpu33_power_off_hardware,
> .power_on_hw = iris_vpu_power_on_hw,
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.h b/drivers/media/platform/qcom/iris/iris_vpu_common.h
> index f6dffc613b822341fb21e12de6b1395202f62cde..88a23cbdc06c5b38b4c8db67718cbd538f0e0721 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.h
> @@ -10,6 +10,7 @@ struct iris_core;
>
> extern const struct vpu_ops iris_vpu2_ops;
> extern const struct vpu_ops iris_vpu3_ops;
> +extern const struct vpu_ops iris_vpu3_purwa_ops;
> extern const struct vpu_ops iris_vpu33_ops;
> extern const struct vpu_ops iris_vpu35_ops;
> extern const struct vpu_ops iris_vpu4x_ops;
>
> --
> 2.43.0
>
Where @ v4 has noone else reviewed this yet or have you forgotten to b4
trailers --update ?
Anyway.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
bod
next prev parent reply other threads:[~2026-04-01 10:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 10:24 [PATCH v4 0/5] media: iris: add support for purwa platform Wangao Wang
2026-04-01 10:24 ` [PATCH v4 1/5] dt-bindings: media: qcom,sm8550-iris: Add X1P42100 compatible Wangao Wang
2026-04-01 10:48 ` Bryan O'Donoghue
2026-04-02 7:05 ` Krzysztof Kozlowski
2026-04-01 10:24 ` [PATCH v4 2/5] media: iris: Add hardware power on/off ops for X1P42100 Wangao Wang
2026-04-01 10:49 ` Bryan O'Donoghue [this message]
2026-04-01 12:37 ` Dikshita Agarwal
2026-04-02 7:08 ` Krzysztof Kozlowski
2026-04-01 10:24 ` [PATCH v4 3/5] media: iris: Add platform data " Wangao Wang
2026-04-01 12:40 ` Dikshita Agarwal
2026-04-01 10:24 ` [PATCH v4 4/5] arm64: dts: qcom: purwa: Override Iris clocks and operating points Wangao Wang
2026-04-01 11:03 ` Dmitry Baryshkov
2026-04-01 12:41 ` Dikshita Agarwal
2026-04-01 10:24 ` [PATCH v4 5/5] arm64: dts: qcom: purwa-iot-som: enable video Wangao Wang
2026-04-01 12:42 ` Dikshita Agarwal
2026-04-02 7:11 ` Krzysztof Kozlowski
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=65946b6d-de58-439c-b3cb-cc4efd33e7ef@kernel.org \
--to=bod@kernel.org \
--cc=abhinav.kumar@linux.dev \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@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=robh@kernel.org \
--cc=vikash.garodia@oss.qualcomm.com \
--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