* [PATCH v3 0/7] media: qcom: iris/venus: fix power domain handling on SM8250
@ 2026-02-04 0:59 Dmitry Baryshkov
2026-02-04 0:59 ` [PATCH v3 1/7] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain Dmitry Baryshkov
` (6 more replies)
0 siblings, 7 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-04 0:59 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab, Konrad Dybcio
As pointed out by Konrad during the review of SM8350 / SC8280XP
patchset, Iris aka Venus description has several flows. It doesn't scale
MMCX, the frequencies in the OPP table are wrong, etc.
Let's correct the Iris/Venus enablement for SM8250 (unfortunately also
stopping it from being overclocked).
The videocc patches (DT, DTS) can be applied during -rc, the rest of the
patches should go for the next -rc1.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Changes in v3:
- Dropped applied patch
- Fixed typos in the commit messages (Dikshita, Konrad)
- Corrected MX OPP levels (Dikshita)
- Switched Konrad from Suggested-by to Reported-by (Konrad)
- Link to v2: https://lore.kernel.org/r/20260201-iris-venus-fix-sm8250-v2-0-6f40d2605c89@oss.qualcomm.com
Changes in v2:
- Fixed example in the new sm8250-videocc schema
- Link to v1: https://lore.kernel.org/r/20260131-iris-venus-fix-sm8250-v1-0-b635ee66284c@oss.qualcomm.com
---
Dmitry Baryshkov (7):
dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain
media: dt-bindings: qcom,sm8250-venus: sort out power domains
media: iris: scale MMCX power domain on SM8250
media: venus: scale MMCX power domain on SM8250
arm64: dts: qcom: sm8250: add MX power domain to the video CC
arm64: dts: qcom: sm8250: sort out Iris power domains
arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table
.../bindings/clock/qcom,sm8250-videocc.yaml | 85 ++++++++++++++++++++++
.../devicetree/bindings/clock/qcom,videocc.yaml | 20 -----
.../bindings/media/qcom,sm8250-venus.yaml | 10 +--
arch/arm64/boot/dts/qcom/sm8250.dtsi | 42 +++++++----
.../media/platform/qcom/iris/iris_platform_gen1.c | 2 +-
drivers/media/platform/qcom/iris/iris_probe.c | 7 ++
drivers/media/platform/qcom/venus/core.c | 7 +-
drivers/media/platform/qcom/venus/core.h | 1 +
drivers/media/platform/qcom/venus/pm_helpers.c | 8 +-
9 files changed, 138 insertions(+), 44 deletions(-)
---
base-commit: 5c009020744fe129e4728e71c44a6c7816c9105e
change-id: 20260131-iris-venus-fix-sm8250-f938e29e7497
Best regards,
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 1/7] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain
2026-02-04 0:59 [PATCH v3 0/7] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
@ 2026-02-04 0:59 ` Dmitry Baryshkov
2026-02-05 11:31 ` Krzysztof Kozlowski
2026-02-04 0:59 ` [PATCH v3 2/7] media: dt-bindings: qcom,sm8250-venus: sort out power domains Dmitry Baryshkov
` (5 subsequent siblings)
6 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-04 0:59 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab
To configure the video PLLs and enable the video GDSCs on SM8250,
platform, the MX rail must be ON along with MMCX. Split the bindings
file in order to provide separate file utilizing MMCX and MX power
domains.
Fixes: dafb992a95e1 ("dt-bindings: clock: add SM8250 QCOM video clock bindings")
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
.../bindings/clock/qcom,sm8250-videocc.yaml | 85 ++++++++++++++++++++++
.../devicetree/bindings/clock/qcom,videocc.yaml | 20 -----
2 files changed, 85 insertions(+), 20 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8250-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8250-videocc.yaml
new file mode 100644
index 000000000000..341d3cbb7cbb
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8250-videocc.yaml
@@ -0,0 +1,85 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,sm8250-videocc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Video Clock & Reset Controller
+
+maintainers:
+ - Taniya Das <quic_tdas@quicinc.com>
+
+description: |
+ Qualcomm video clock control module provides the clocks, resets and power
+ domains on Qualcomm SoCs.
+
+ See also::
+ include/dt-bindings/clock/qcom,videocc-sm8250.h
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - qcom,sm8250-videocc
+
+ clocks:
+ items:
+ - description: AHB
+ - description: Board XO source
+ - description: Board active XO source
+
+ clock-names:
+ items:
+ - const: iface
+ - const: bi_tcxo
+ - const: bi_tcxo_ao
+
+ power-domains:
+ items:
+ - description:
+ A phandle and PM domain specifier for the MMCX power domain.
+ - description:
+ A phandle and PM domain specifier for the MX power domain.
+
+ required-opps:
+ items:
+ - description:
+ A phandle to an OPP node describing required MMCX performance point.
+ - description:
+ A phandle to an OPP node describing required MX performance point.
+
+required:
+ - compatible
+ - clocks
+ - clock-names
+ - '#power-domain-cells'
+ - power-domains
+ - required-opps
+
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,rpmh.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
+ clock-controller@ab00000 {
+ compatible = "qcom,sm8250-videocc";
+ reg = <0x0ab00000 0x10000>;
+ clocks = <&gcc_gcc_video_ahb_clk>,
+ <&rpmhcc RPMH_CXO_CLK>,
+ <&rpmhcc RPMH_CXO_CLK_A>;
+ clock-names = "iface",
+ "bi_tcxo",
+ "bi_tcxo_ao";
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>,
+ <&rpmhpd RPMHPD_MX>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
+ };
+...
diff --git a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
index f4ff9acef9d5..8676c7e22b4c 100644
--- a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml
@@ -19,7 +19,6 @@ description: |
include/dt-bindings/clock/qcom,videocc-sc7280.h
include/dt-bindings/clock/qcom,videocc-sdm845.h
include/dt-bindings/clock/qcom,videocc-sm8150.h
- include/dt-bindings/clock/qcom,videocc-sm8250.h
properties:
compatible:
@@ -30,7 +29,6 @@ properties:
- qcom,sdm845-videocc
- qcom,sm6350-videocc
- qcom,sm8150-videocc
- - qcom,sm8250-videocc
- items:
- const: qcom,sc8180x-videocc
- const: qcom,sm8150-videocc
@@ -128,24 +126,6 @@ allOf:
- const: iface
- const: bi_tcxo
- - if:
- properties:
- compatible:
- enum:
- - qcom,sm8250-videocc
- then:
- properties:
- clocks:
- items:
- - description: AHB
- - description: Board XO source
- - description: Board active XO source
- clock-names:
- items:
- - const: iface
- - const: bi_tcxo
- - const: bi_tcxo_ao
-
unevaluatedProperties: false
examples:
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 2/7] media: dt-bindings: qcom,sm8250-venus: sort out power domains
2026-02-04 0:59 [PATCH v3 0/7] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
2026-02-04 0:59 ` [PATCH v3 1/7] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain Dmitry Baryshkov
@ 2026-02-04 0:59 ` Dmitry Baryshkov
2026-02-05 11:32 ` Krzysztof Kozlowski
2026-02-04 0:59 ` [PATCH v3 3/7] media: iris: scale MMCX power domain on SM8250 Dmitry Baryshkov
` (4 subsequent siblings)
6 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-04 0:59 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab, Konrad Dybcio
First of all, on SM8250 Iris (ex-Venus) core needs to scale clocks which
are powered by the MMCX domain. Add MMCX domain to the list of the power
domain to be used on this platform.
While we are at it, drop minItems from both power-domains and
power-domains-names, it doesn't make sense from the hardware point of
view. There are always 2 GDSCs and two power rails wired to the video
clock controller and Venus. Disallow passing just two.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Acked-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml
index da54493220c9..04cbacc251d7 100644
--- a/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml
@@ -21,15 +21,14 @@ properties:
const: qcom,sm8250-venus
power-domains:
- minItems: 2
- maxItems: 3
+ maxItems: 4
power-domain-names:
- minItems: 2
items:
- const: venus
- const: vcodec0
- const: mx
+ - const: mmcx
clocks:
maxItems: 3
@@ -114,8 +113,9 @@ examples:
interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&videocc MVS0C_GDSC>,
<&videocc MVS0_GDSC>,
- <&rpmhpd RPMHPD_MX>;
- power-domain-names = "venus", "vcodec0", "mx";
+ <&rpmhpd RPMHPD_MX>,
+ <&rpmhpd RPMHPD_MMCX>;
+ power-domain-names = "venus", "vcodec0", "mx", "mmcx";
clocks = <&gcc GCC_VIDEO_AXI0_CLK>,
<&videocc VIDEO_CC_MVS0C_CLK>,
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 3/7] media: iris: scale MMCX power domain on SM8250
2026-02-04 0:59 [PATCH v3 0/7] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
2026-02-04 0:59 ` [PATCH v3 1/7] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain Dmitry Baryshkov
2026-02-04 0:59 ` [PATCH v3 2/7] media: dt-bindings: qcom,sm8250-venus: sort out power domains Dmitry Baryshkov
@ 2026-02-04 0:59 ` Dmitry Baryshkov
2026-02-05 10:39 ` Dikshita Agarwal
2026-02-04 0:59 ` [PATCH v3 4/7] media: venus: " Dmitry Baryshkov
` (3 subsequent siblings)
6 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-04 0:59 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab
On SM8250 most of the video clocks are powered by the MMCX domain, while
the PLL is powered on by the MX domain. Extend the driver to support
scaling both power domains, while keeping compatibility with the
existing DTs, which define only the MX domain.
Fixes: 79865252acb6 ("media: iris: enable video driver probe of SM8250 SoC")
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_platform_gen1.c | 2 +-
drivers/media/platform/qcom/iris/iris_probe.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen1.c b/drivers/media/platform/qcom/iris/iris_platform_gen1.c
index df8e6bf9430e..aa71f7f53ee3 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_gen1.c
+++ b/drivers/media/platform/qcom/iris/iris_platform_gen1.c
@@ -281,7 +281,7 @@ static const struct bw_info sm8250_bw_table_dec[] = {
static const char * const sm8250_pmdomain_table[] = { "venus", "vcodec0" };
-static const char * const sm8250_opp_pd_table[] = { "mx" };
+static const char * const sm8250_opp_pd_table[] = { "mx", "mmcx" };
static const struct platform_clk_data sm8250_clk_table[] = {
{IRIS_AXI_CLK, "iface" },
diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
index 7b612ad37e4f..74ec81e3d622 100644
--- a/drivers/media/platform/qcom/iris/iris_probe.c
+++ b/drivers/media/platform/qcom/iris/iris_probe.c
@@ -64,6 +64,13 @@ static int iris_init_power_domains(struct iris_core *core)
return ret;
ret = devm_pm_domain_attach_list(core->dev, &iris_opp_pd_data, &core->opp_pmdomain_tbl);
+ /* backwards compatibility for incomplete ABI SM8250 */
+ if (ret == -ENODEV &&
+ of_device_is_compatible(core->dev->of_node, "qcom,sm8250-venus")) {
+ iris_opp_pd_data.num_pd_names--;
+ ret = devm_pm_domain_attach_list(core->dev, &iris_opp_pd_data,
+ &core->opp_pmdomain_tbl);
+ }
if (ret < 0)
return ret;
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 4/7] media: venus: scale MMCX power domain on SM8250
2026-02-04 0:59 [PATCH v3 0/7] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
` (2 preceding siblings ...)
2026-02-04 0:59 ` [PATCH v3 3/7] media: iris: scale MMCX power domain on SM8250 Dmitry Baryshkov
@ 2026-02-04 0:59 ` Dmitry Baryshkov
2026-02-05 6:14 ` Dikshita Agarwal
2026-02-04 0:59 ` [PATCH v3 5/7] arm64: dts: qcom: sm8250: add MX power domain to the video CC Dmitry Baryshkov
` (2 subsequent siblings)
6 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-04 0:59 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab
On SM8250 most of the video clocks are powered by the MMCX domain, while
the PLL is powered on by the MX domain. Extend the driver to support
scaling both power domains, while keeping compatibility with the
existing DTs, which define only the MX domain.
Fixes: 0aeabfa29a9c ("media: venus: core: add sm8250 DT compatible and resource data")
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/media/platform/qcom/venus/core.c | 7 ++++++-
drivers/media/platform/qcom/venus/core.h | 1 +
drivers/media/platform/qcom/venus/pm_helpers.c | 8 +++++++-
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 646dae3407b4..cad2df84ce60 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -882,6 +882,7 @@ static const struct venus_resources sdm845_res_v2 = {
.vcodec_pmdomains = (const char *[]) { "venus", "vcodec0", "vcodec1" },
.vcodec_pmdomains_num = 3,
.opp_pmdomain = (const char *[]) { "cx" },
+ .opp_pmdomain_num = 1,
.vcodec_num = 2,
.max_load = 3110400, /* 4096x2160@90 */
.hfi_version = HFI_VERSION_4XX,
@@ -933,6 +934,7 @@ static const struct venus_resources sc7180_res = {
.vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" },
.vcodec_pmdomains_num = 2,
.opp_pmdomain = (const char *[]) { "cx" },
+ .opp_pmdomain_num = 1,
.vcodec_num = 1,
.hfi_version = HFI_VERSION_4XX,
.vpu_version = VPU_VERSION_AR50,
@@ -992,7 +994,8 @@ static const struct venus_resources sm8250_res = {
.vcodec_clks_num = 1,
.vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" },
.vcodec_pmdomains_num = 2,
- .opp_pmdomain = (const char *[]) { "mx" },
+ .opp_pmdomain = (const char *[]) { "mx", "mmcx" },
+ .opp_pmdomain_num = 2,
.vcodec_num = 1,
.max_load = 7833600,
.hfi_version = HFI_VERSION_6XX,
@@ -1054,6 +1057,7 @@ static const struct venus_resources sc7280_res = {
.vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" },
.vcodec_pmdomains_num = 2,
.opp_pmdomain = (const char *[]) { "cx" },
+ .opp_pmdomain_num = 1,
.vcodec_num = 1,
.hfi_version = HFI_VERSION_6XX,
.vpu_version = VPU_VERSION_IRIS2_1,
@@ -1102,6 +1106,7 @@ static const struct venus_resources qcm2290_res = {
.vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" },
.vcodec_pmdomains_num = 2,
.opp_pmdomain = (const char *[]) { "cx" },
+ .opp_pmdomain_num = 1,
.vcodec_num = 1,
.hfi_version = HFI_VERSION_4XX,
.vpu_version = VPU_VERSION_AR50_LITE,
diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
index c7acacaa53b8..62ab747291b8 100644
--- a/drivers/media/platform/qcom/venus/core.h
+++ b/drivers/media/platform/qcom/venus/core.h
@@ -85,6 +85,7 @@ struct venus_resources {
const char **vcodec_pmdomains;
unsigned int vcodec_pmdomains_num;
const char **opp_pmdomain;
+ unsigned int opp_pmdomain_num;
unsigned int vcodec_num;
const char * const resets[VIDC_RESETS_NUM_MAX];
unsigned int resets_num;
diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
index f0269524ac70..14a4e8311a64 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.c
+++ b/drivers/media/platform/qcom/venus/pm_helpers.c
@@ -887,7 +887,7 @@ static int vcodec_domains_get(struct venus_core *core)
};
struct dev_pm_domain_attach_data opp_pd_data = {
.pd_names = res->opp_pmdomain,
- .num_pd_names = 1,
+ .num_pd_names = res->opp_pmdomain_num,
.pd_flags = PD_FLAG_DEV_LINK_ON | PD_FLAG_REQUIRED_OPP,
};
@@ -904,6 +904,12 @@ static int vcodec_domains_get(struct venus_core *core)
/* Attach the power domain for setting performance state */
ret = devm_pm_domain_attach_list(dev, &opp_pd_data, &core->opp_pmdomain);
+ /* backwards compatibility for incomplete ABI SM8250 */
+ if (ret == -ENODEV &&
+ of_device_is_compatible(dev->of_node, "qcom,sm8250-venus")) {
+ opp_pd_data.num_pd_names--;
+ ret = devm_pm_domain_attach_list(dev, &opp_pd_data, &core->opp_pmdomain);
+ }
if (ret < 0)
return ret;
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 5/7] arm64: dts: qcom: sm8250: add MX power domain to the video CC
2026-02-04 0:59 [PATCH v3 0/7] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
` (3 preceding siblings ...)
2026-02-04 0:59 ` [PATCH v3 4/7] media: venus: " Dmitry Baryshkov
@ 2026-02-04 0:59 ` Dmitry Baryshkov
2026-02-04 0:59 ` [PATCH v3 6/7] arm64: dts: qcom: sm8250: sort out Iris power domains Dmitry Baryshkov
2026-02-04 0:59 ` [PATCH v3 7/7] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table Dmitry Baryshkov
6 siblings, 0 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-04 0:59 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab, Konrad Dybcio
To configure the video PLLs and enable the video GDSCs on SM8250,
platform, the MX rail must be ON along with MMCX. Update the videocc
device node to include the MX power domain.
Fixes: 5b9ec225d4ed ("arm64: dts: qcom: sm8250: Add videocc DT node")
Reported-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index c7dffa440074..980d6e894b9d 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4374,8 +4374,10 @@ videocc: clock-controller@abf0000 {
clocks = <&gcc GCC_VIDEO_AHB_CLK>,
<&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>;
- power-domains = <&rpmhpd RPMHPD_MMCX>;
- required-opps = <&rpmhpd_opp_low_svs>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>,
+ <&rpmhpd RPMHPD_MX>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
clock-names = "iface", "bi_tcxo", "bi_tcxo_ao";
#clock-cells = <1>;
#reset-cells = <1>;
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 6/7] arm64: dts: qcom: sm8250: sort out Iris power domains
2026-02-04 0:59 [PATCH v3 0/7] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
` (4 preceding siblings ...)
2026-02-04 0:59 ` [PATCH v3 5/7] arm64: dts: qcom: sm8250: add MX power domain to the video CC Dmitry Baryshkov
@ 2026-02-04 0:59 ` Dmitry Baryshkov
2026-02-05 6:58 ` Dikshita Agarwal
2026-02-04 0:59 ` [PATCH v3 7/7] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table Dmitry Baryshkov
6 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-04 0:59 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab, Konrad Dybcio
On SM8250 Iris core requires two power rails to function, MX (for PLLs)
and MMCX (for everything else). The commit fa245b3f06cd ("arm64: dts:
qcom: sm8250: Add venus DT node") added only MX power rail, but,
strangely enough, using MMCX voltage levels.
Add MMCX domain together with the (more correct) MX OPP levels.
Fixes: fa245b3f06cd ("arm64: dts: qcom: sm8250: Add venus DT node")
Reported-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8250.dtsi | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 980d6e894b9d..d8be5c1add1b 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4321,8 +4321,12 @@ venus: video-codec@aa00000 {
interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&videocc MVS0C_GDSC>,
<&videocc MVS0_GDSC>,
- <&rpmhpd RPMHPD_MX>;
- power-domain-names = "venus", "vcodec0", "mx";
+ <&rpmhpd RPMHPD_MX>,
+ <&rpmhpd RPMHPD_MMCX>;
+ power-domain-names = "venus",
+ "vcodec0",
+ "mx",
+ "mmcx";
operating-points-v2 = <&venus_opp_table>;
clocks = <&gcc GCC_VIDEO_AXI0_CLK>,
@@ -4348,22 +4352,26 @@ venus_opp_table: opp-table {
opp-720000000 {
opp-hz = /bits/ 64 <720000000>;
- required-opps = <&rpmhpd_opp_low_svs>;
+ required-opps = <&rpmhpd_opp_svs>,
+ <&rpmhpd_opp_low_svs>;
};
opp-1014000000 {
opp-hz = /bits/ 64 <1014000000>;
- required-opps = <&rpmhpd_opp_svs>;
+ required-opps = <&rpmhpd_opp_svs>,
+ <&rpmhpd_opp_svs>;
};
opp-1098000000 {
opp-hz = /bits/ 64 <1098000000>;
- required-opps = <&rpmhpd_opp_svs_l1>;
+ required-opps = <&rpmhpd_opp_svs_l1>,
+ <&rpmhpd_opp_svs_l1>;
};
opp-1332000000 {
opp-hz = /bits/ 64 <1332000000>;
- required-opps = <&rpmhpd_opp_nom>;
+ required-opps = <&rpmhpd_opp_svs_l1>,
+ <&rpmhpd_opp_nom>;
};
};
};
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 7/7] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table
2026-02-04 0:59 [PATCH v3 0/7] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
` (5 preceding siblings ...)
2026-02-04 0:59 ` [PATCH v3 6/7] arm64: dts: qcom: sm8250: sort out Iris power domains Dmitry Baryshkov
@ 2026-02-04 0:59 ` Dmitry Baryshkov
2026-02-05 6:59 ` Dikshita Agarwal
6 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-04 0:59 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab, Konrad Dybcio
The OPP table for the Iris core is wrong, it copies the VDD table from
the downstream kernel, but that table is written for the
video_cc_mvs0_clk_src, while the upstream uses video_cc_mvs0_clk for OPP
rate setting (which is clk_src divided by 3). Specify correct
frequencies in the OPP table.
Fixes: fa245b3f06cd ("arm64: dts: qcom: sm8250: Add venus DT node")
Reported-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8250.dtsi | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index d8be5c1add1b..7d11f1a28546 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4350,26 +4350,26 @@ venus: video-codec@aa00000 {
venus_opp_table: opp-table {
compatible = "operating-points-v2";
- opp-720000000 {
- opp-hz = /bits/ 64 <720000000>;
+ opp-240000000 {
+ opp-hz = /bits/ 64 <240000000>;
required-opps = <&rpmhpd_opp_svs>,
<&rpmhpd_opp_low_svs>;
};
- opp-1014000000 {
- opp-hz = /bits/ 64 <1014000000>;
+ opp-338000000 {
+ opp-hz = /bits/ 64 <338000000>;
required-opps = <&rpmhpd_opp_svs>,
<&rpmhpd_opp_svs>;
};
- opp-1098000000 {
- opp-hz = /bits/ 64 <1098000000>;
+ opp-366000000 {
+ opp-hz = /bits/ 64 <366000000>;
required-opps = <&rpmhpd_opp_svs_l1>,
<&rpmhpd_opp_svs_l1>;
};
- opp-1332000000 {
- opp-hz = /bits/ 64 <1332000000>;
+ opp-444000000 {
+ opp-hz = /bits/ 64 <444000000>;
required-opps = <&rpmhpd_opp_svs_l1>,
<&rpmhpd_opp_nom>;
};
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v3 4/7] media: venus: scale MMCX power domain on SM8250
2026-02-04 0:59 ` [PATCH v3 4/7] media: venus: " Dmitry Baryshkov
@ 2026-02-05 6:14 ` Dikshita Agarwal
0 siblings, 0 replies; 19+ messages in thread
From: Dikshita Agarwal @ 2026-02-05 6:14 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Taniya Das, Jonathan Marek, Ulf Hansson, Rafael J. Wysocki,
Bryan O'Donoghue, Vikash Garodia, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab
On 2/4/2026 6:29 AM, Dmitry Baryshkov wrote:
> On SM8250 most of the video clocks are powered by the MMCX domain, while
> the PLL is powered on by the MX domain. Extend the driver to support
> scaling both power domains, while keeping compatibility with the
> existing DTs, which define only the MX domain.
>
> Fixes: 0aeabfa29a9c ("media: venus: core: add sm8250 DT compatible and resource data")
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/venus/core.c | 7 ++++++-
> drivers/media/platform/qcom/venus/core.h | 1 +
> drivers/media/platform/qcom/venus/pm_helpers.c | 8 +++++++-
> 3 files changed, 14 insertions(+), 2 deletions(-)
>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Thanks,
Dikshita
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 6/7] arm64: dts: qcom: sm8250: sort out Iris power domains
2026-02-04 0:59 ` [PATCH v3 6/7] arm64: dts: qcom: sm8250: sort out Iris power domains Dmitry Baryshkov
@ 2026-02-05 6:58 ` Dikshita Agarwal
0 siblings, 0 replies; 19+ messages in thread
From: Dikshita Agarwal @ 2026-02-05 6:58 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Taniya Das, Jonathan Marek, Ulf Hansson, Rafael J. Wysocki,
Bryan O'Donoghue, Vikash Garodia, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab, Konrad Dybcio
On 2/4/2026 6:29 AM, Dmitry Baryshkov wrote:
> On SM8250 Iris core requires two power rails to function, MX (for PLLs)
> and MMCX (for everything else). The commit fa245b3f06cd ("arm64: dts:
> qcom: sm8250: Add venus DT node") added only MX power rail, but,
> strangely enough, using MMCX voltage levels.
>
> Add MMCX domain together with the (more correct) MX OPP levels.
>
> Fixes: fa245b3f06cd ("arm64: dts: qcom: sm8250: Add venus DT node")
> Reported-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/sm8250.dtsi | 20 ++++++++++++++------
> 1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index 980d6e894b9d..d8be5c1add1b 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -4321,8 +4321,12 @@ venus: video-codec@aa00000 {
> interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
> power-domains = <&videocc MVS0C_GDSC>,
> <&videocc MVS0_GDSC>,
> - <&rpmhpd RPMHPD_MX>;
> - power-domain-names = "venus", "vcodec0", "mx";
> + <&rpmhpd RPMHPD_MX>,
> + <&rpmhpd RPMHPD_MMCX>;
> + power-domain-names = "venus",
> + "vcodec0",
> + "mx",
> + "mmcx";
> operating-points-v2 = <&venus_opp_table>;
>
> clocks = <&gcc GCC_VIDEO_AXI0_CLK>,
> @@ -4348,22 +4352,26 @@ venus_opp_table: opp-table {
>
> opp-720000000 {
> opp-hz = /bits/ 64 <720000000>;
> - required-opps = <&rpmhpd_opp_low_svs>;
> + required-opps = <&rpmhpd_opp_svs>,
> + <&rpmhpd_opp_low_svs>;
> };
>
> opp-1014000000 {
> opp-hz = /bits/ 64 <1014000000>;
> - required-opps = <&rpmhpd_opp_svs>;
> + required-opps = <&rpmhpd_opp_svs>,
> + <&rpmhpd_opp_svs>;
> };
>
> opp-1098000000 {
> opp-hz = /bits/ 64 <1098000000>;
> - required-opps = <&rpmhpd_opp_svs_l1>;
> + required-opps = <&rpmhpd_opp_svs_l1>,
> + <&rpmhpd_opp_svs_l1>;
> };
>
> opp-1332000000 {
> opp-hz = /bits/ 64 <1332000000>;
> - required-opps = <&rpmhpd_opp_nom>;
> + required-opps = <&rpmhpd_opp_svs_l1>,
> + <&rpmhpd_opp_nom>;
> };
> };
> };
>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Thanks,
Dikshita
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 7/7] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table
2026-02-04 0:59 ` [PATCH v3 7/7] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table Dmitry Baryshkov
@ 2026-02-05 6:59 ` Dikshita Agarwal
0 siblings, 0 replies; 19+ messages in thread
From: Dikshita Agarwal @ 2026-02-05 6:59 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Taniya Das, Jonathan Marek, Ulf Hansson, Rafael J. Wysocki,
Bryan O'Donoghue, Vikash Garodia, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab, Konrad Dybcio
On 2/4/2026 6:29 AM, Dmitry Baryshkov wrote:
> The OPP table for the Iris core is wrong, it copies the VDD table from
> the downstream kernel, but that table is written for the
> video_cc_mvs0_clk_src, while the upstream uses video_cc_mvs0_clk for OPP
> rate setting (which is clk_src divided by 3). Specify correct
> frequencies in the OPP table.
>
> Fixes: fa245b3f06cd ("arm64: dts: qcom: sm8250: Add venus DT node")
> Reported-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/sm8250.dtsi | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index d8be5c1add1b..7d11f1a28546 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -4350,26 +4350,26 @@ venus: video-codec@aa00000 {
> venus_opp_table: opp-table {
> compatible = "operating-points-v2";
>
> - opp-720000000 {
> - opp-hz = /bits/ 64 <720000000>;
> + opp-240000000 {
> + opp-hz = /bits/ 64 <240000000>;
> required-opps = <&rpmhpd_opp_svs>,
> <&rpmhpd_opp_low_svs>;
> };
>
> - opp-1014000000 {
> - opp-hz = /bits/ 64 <1014000000>;
> + opp-338000000 {
> + opp-hz = /bits/ 64 <338000000>;
> required-opps = <&rpmhpd_opp_svs>,
> <&rpmhpd_opp_svs>;
> };
>
> - opp-1098000000 {
> - opp-hz = /bits/ 64 <1098000000>;
> + opp-366000000 {
> + opp-hz = /bits/ 64 <366000000>;
> required-opps = <&rpmhpd_opp_svs_l1>,
> <&rpmhpd_opp_svs_l1>;
> };
>
> - opp-1332000000 {
> - opp-hz = /bits/ 64 <1332000000>;
> + opp-444000000 {
> + opp-hz = /bits/ 64 <444000000>;
> required-opps = <&rpmhpd_opp_svs_l1>,
> <&rpmhpd_opp_nom>;
> };
>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Thanks,
Dikshita
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 3/7] media: iris: scale MMCX power domain on SM8250
2026-02-04 0:59 ` [PATCH v3 3/7] media: iris: scale MMCX power domain on SM8250 Dmitry Baryshkov
@ 2026-02-05 10:39 ` Dikshita Agarwal
2026-02-05 10:55 ` Dmitry Baryshkov
0 siblings, 1 reply; 19+ messages in thread
From: Dikshita Agarwal @ 2026-02-05 10:39 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Taniya Das, Jonathan Marek, Ulf Hansson, Rafael J. Wysocki,
Bryan O'Donoghue, Vikash Garodia, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab
On 2/4/2026 6:29 AM, Dmitry Baryshkov wrote:
> On SM8250 most of the video clocks are powered by the MMCX domain, while
> the PLL is powered on by the MX domain. Extend the driver to support
> scaling both power domains, while keeping compatibility with the
> existing DTs, which define only the MX domain.
>
> Fixes: 79865252acb6 ("media: iris: enable video driver probe of SM8250 SoC")
> Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/iris/iris_platform_gen1.c | 2 +-
> drivers/media/platform/qcom/iris/iris_probe.c | 7 +++++++
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen1.c b/drivers/media/platform/qcom/iris/iris_platform_gen1.c
> index df8e6bf9430e..aa71f7f53ee3 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_gen1.c
> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen1.c
> @@ -281,7 +281,7 @@ static const struct bw_info sm8250_bw_table_dec[] = {
>
> static const char * const sm8250_pmdomain_table[] = { "venus", "vcodec0" };
>
> -static const char * const sm8250_opp_pd_table[] = { "mx" };
> +static const char * const sm8250_opp_pd_table[] = { "mx", "mmcx" };
>
> static const struct platform_clk_data sm8250_clk_table[] = {
> {IRIS_AXI_CLK, "iface" },
> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
> index 7b612ad37e4f..74ec81e3d622 100644
> --- a/drivers/media/platform/qcom/iris/iris_probe.c
> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
> @@ -64,6 +64,13 @@ static int iris_init_power_domains(struct iris_core *core)
> return ret;
>
> ret = devm_pm_domain_attach_list(core->dev, &iris_opp_pd_data, &core->opp_pmdomain_tbl);
> + /* backwards compatibility for incomplete ABI SM8250 */
> + if (ret == -ENODEV &&
> + of_device_is_compatible(core->dev->of_node, "qcom,sm8250-venus")) {
A query here, is it okay to have compatible based checks in driver?
I don't have the links but I remember receiving negative feedback on having
such compatible based checks.
Thanks,
Dikshita
> + iris_opp_pd_data.num_pd_names--;
> + ret = devm_pm_domain_attach_list(core->dev, &iris_opp_pd_data,
> + &core->opp_pmdomain_tbl);
> + }
> if (ret < 0)
> return ret;
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 3/7] media: iris: scale MMCX power domain on SM8250
2026-02-05 10:39 ` Dikshita Agarwal
@ 2026-02-05 10:55 ` Dmitry Baryshkov
0 siblings, 0 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-05 10:55 UTC (permalink / raw)
To: Dikshita Agarwal
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Mauro Carvalho Chehab, Stanimir Varbanov,
Abhinav Kumar, Hans Verkuil, Stefan Schmidt, Konrad Dybcio,
Bryan O'Donoghue, Dikshita Agarwal, linux-arm-msm, linux-clk,
devicetree, linux-kernel, linux-pm, linux-media,
Mauro Carvalho Chehab
On Thu, Feb 05, 2026 at 04:09:35PM +0530, Dikshita Agarwal wrote:
>
>
> On 2/4/2026 6:29 AM, Dmitry Baryshkov wrote:
> > On SM8250 most of the video clocks are powered by the MMCX domain, while
> > the PLL is powered on by the MX domain. Extend the driver to support
> > scaling both power domains, while keeping compatibility with the
> > existing DTs, which define only the MX domain.
> >
> > Fixes: 79865252acb6 ("media: iris: enable video driver probe of SM8250 SoC")
> > Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > drivers/media/platform/qcom/iris/iris_platform_gen1.c | 2 +-
> > drivers/media/platform/qcom/iris/iris_probe.c | 7 +++++++
> > 2 files changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen1.c b/drivers/media/platform/qcom/iris/iris_platform_gen1.c
> > index df8e6bf9430e..aa71f7f53ee3 100644
> > --- a/drivers/media/platform/qcom/iris/iris_platform_gen1.c
> > +++ b/drivers/media/platform/qcom/iris/iris_platform_gen1.c
> > @@ -281,7 +281,7 @@ static const struct bw_info sm8250_bw_table_dec[] = {
> >
> > static const char * const sm8250_pmdomain_table[] = { "venus", "vcodec0" };
> >
> > -static const char * const sm8250_opp_pd_table[] = { "mx" };
> > +static const char * const sm8250_opp_pd_table[] = { "mx", "mmcx" };
> >
> > static const struct platform_clk_data sm8250_clk_table[] = {
> > {IRIS_AXI_CLK, "iface" },
> > diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
> > index 7b612ad37e4f..74ec81e3d622 100644
> > --- a/drivers/media/platform/qcom/iris/iris_probe.c
> > +++ b/drivers/media/platform/qcom/iris/iris_probe.c
> > @@ -64,6 +64,13 @@ static int iris_init_power_domains(struct iris_core *core)
> > return ret;
> >
> > ret = devm_pm_domain_attach_list(core->dev, &iris_opp_pd_data, &core->opp_pmdomain_tbl);
> > + /* backwards compatibility for incomplete ABI SM8250 */
> > + if (ret == -ENODEV &&
> > + of_device_is_compatible(core->dev->of_node, "qcom,sm8250-venus")) {
>
> A query here, is it okay to have compatible based checks in driver?
>
> I don't have the links but I remember receiving negative feedback on having
> such compatible based checks.
In general, it's better to use platform data. In this case we have a
case of keeping comatibility for exacrly one platform. Adding that to
platform data would be meaningless for all other platforms.
>
> Thanks,
> Dikshita
> > + iris_opp_pd_data.num_pd_names--;
> > + ret = devm_pm_domain_attach_list(core->dev, &iris_opp_pd_data,
> > + &core->opp_pmdomain_tbl);
> > + }
> > if (ret < 0)
> > return ret;
> >
> >
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 1/7] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain
2026-02-04 0:59 ` [PATCH v3 1/7] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain Dmitry Baryshkov
@ 2026-02-05 11:31 ` Krzysztof Kozlowski
2026-02-05 12:03 ` Konrad Dybcio
2026-02-05 12:48 ` Dmitry Baryshkov
0 siblings, 2 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-05 11:31 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal,
linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab
On Wed, Feb 04, 2026 at 02:59:49AM +0200, Dmitry Baryshkov wrote:
> To configure the video PLLs and enable the video GDSCs on SM8250,
> platform, the MX rail must be ON along with MMCX. Split the bindings
> file in order to provide separate file utilizing MMCX and MX power
> domains.
...
> +
> +description: |
> + Qualcomm video clock control module provides the clocks, resets and power
> + domains on Qualcomm SoCs.
> +
> + See also::
Only one ':', please. It was a mistake to introduce ::
> + clock-names:
> + items:
> + - const: iface
> + - const: bi_tcxo
> + - const: bi_tcxo_ao
> +
> + power-domains:
> + items:
> + - description:
> + A phandle and PM domain specifier for the MMCX power domain.
> + - description:
> + A phandle and PM domain specifier for the MX power domain.
This is an ABI break, so please say in the commit what was not working
or why this ABI break is really justified. Currently you just give a
hint that it is needed for PLL configuration, but honestly - why would
we care to configure PLL if everything was working correct before?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 2/7] media: dt-bindings: qcom,sm8250-venus: sort out power domains
2026-02-04 0:59 ` [PATCH v3 2/7] media: dt-bindings: qcom,sm8250-venus: sort out power domains Dmitry Baryshkov
@ 2026-02-05 11:32 ` Krzysztof Kozlowski
2026-02-05 12:49 ` Dmitry Baryshkov
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-05 11:32 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal,
linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab, Konrad Dybcio
On Wed, Feb 04, 2026 at 02:59:50AM +0200, Dmitry Baryshkov wrote:
> First of all, on SM8250 Iris (ex-Venus) core needs to scale clocks which
> are powered by the MMCX domain. Add MMCX domain to the list of the power
> domain to be used on this platform.
>
> While we are at it, drop minItems from both power-domains and
> power-domains-names, it doesn't make sense from the hardware point of
> view. There are always 2 GDSCs and two power rails wired to the video
> clock controller and Venus. Disallow passing just two.
the min-items were also serving to preserve ABI which you now broke.
Same comments as previous patch apply.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 1/7] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain
2026-02-05 11:31 ` Krzysztof Kozlowski
@ 2026-02-05 12:03 ` Konrad Dybcio
2026-02-05 12:48 ` Dmitry Baryshkov
1 sibling, 0 replies; 19+ messages in thread
From: Konrad Dybcio @ 2026-02-05 12:03 UTC (permalink / raw)
To: Krzysztof Kozlowski, Dmitry Baryshkov
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal,
linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab
On 2/5/26 12:31 PM, Krzysztof Kozlowski wrote:
> On Wed, Feb 04, 2026 at 02:59:49AM +0200, Dmitry Baryshkov wrote:
>> To configure the video PLLs and enable the video GDSCs on SM8250,
>> platform, the MX rail must be ON along with MMCX. Split the bindings
>> file in order to provide separate file utilizing MMCX and MX power
>> domains.
>
> ...
>
>> +
>> +description: |
>> + Qualcomm video clock control module provides the clocks, resets and power
>> + domains on Qualcomm SoCs.
>> +
>> + See also::
>
> Only one ':', please. It was a mistake to introduce ::
>
>> + clock-names:
>> + items:
>> + - const: iface
>> + - const: bi_tcxo
>> + - const: bi_tcxo_ao
>> +
>> + power-domains:
>> + items:
>> + - description:
>> + A phandle and PM domain specifier for the MMCX power domain.
>> + - description:
>> + A phandle and PM domain specifier for the MX power domain.
>
> This is an ABI break, so please say in the commit what was not working
> or why this ABI break is really justified. Currently you just give a
> hint that it is needed for PLL configuration, but honestly - why would
> we care to configure PLL if everything was working correct before?
I fully expect it to kaboom if you turn off the display (which also holds
a high vote on MMCX)
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 1/7] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain
2026-02-05 11:31 ` Krzysztof Kozlowski
2026-02-05 12:03 ` Konrad Dybcio
@ 2026-02-05 12:48 ` Dmitry Baryshkov
2026-02-08 9:45 ` Krzysztof Kozlowski
1 sibling, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-05 12:48 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal,
linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab
On Thu, Feb 05, 2026 at 12:31:54PM +0100, Krzysztof Kozlowski wrote:
> On Wed, Feb 04, 2026 at 02:59:49AM +0200, Dmitry Baryshkov wrote:
> > To configure the video PLLs and enable the video GDSCs on SM8250,
> > platform, the MX rail must be ON along with MMCX. Split the bindings
> > file in order to provide separate file utilizing MMCX and MX power
> > domains.
>
> ...
>
> > +
> > +description: |
> > + Qualcomm video clock control module provides the clocks, resets and power
> > + domains on Qualcomm SoCs.
> > +
> > + See also::
>
> Only one ':', please. It was a mistake to introduce ::
Ack.
>
> > + clock-names:
> > + items:
> > + - const: iface
> > + - const: bi_tcxo
> > + - const: bi_tcxo_ao
> > +
> > + power-domains:
> > + items:
> > + - description:
> > + A phandle and PM domain specifier for the MMCX power domain.
> > + - description:
> > + A phandle and PM domain specifier for the MX power domain.
>
> This is an ABI break, so please say in the commit what was not working
> or why this ABI break is really justified. Currently you just give a
> hint that it is needed for PLL configuration, but honestly - why would
> we care to configure PLL if everything was working correct before?
I must admit, I c&p'ed the commit message from [1] which was ack'ed by
Rob and accepted into the kernel. What is the difference?
[1] https://lore.kernel.org/all/20250530-videocc-pll-multi-pd-voting-v5-1-02303b3a582d@quicinc.com/
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 2/7] media: dt-bindings: qcom,sm8250-venus: sort out power domains
2026-02-05 11:32 ` Krzysztof Kozlowski
@ 2026-02-05 12:49 ` Dmitry Baryshkov
0 siblings, 0 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2026-02-05 12:49 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal,
linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab, Konrad Dybcio
On Thu, Feb 05, 2026 at 12:32:56PM +0100, Krzysztof Kozlowski wrote:
> On Wed, Feb 04, 2026 at 02:59:50AM +0200, Dmitry Baryshkov wrote:
> > First of all, on SM8250 Iris (ex-Venus) core needs to scale clocks which
> > are powered by the MMCX domain. Add MMCX domain to the list of the power
> > domain to be used on this platform.
> >
> > While we are at it, drop minItems from both power-domains and
> > power-domains-names, it doesn't make sense from the hardware point of
> > view. There are always 2 GDSCs and two power rails wired to the video
> > clock controller and Venus. Disallow passing just two.
>
> the min-items were also serving to preserve ABI which you now broke.
> Same comments as previous patch apply.
Old ABI wasn't supported by either of the drivers, so there is little
point in preserving it. It has been broken ages ago.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3 1/7] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain
2026-02-05 12:48 ` Dmitry Baryshkov
@ 2026-02-08 9:45 ` Krzysztof Kozlowski
0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-08 9:45 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das, Jonathan Marek,
Ulf Hansson, Rafael J. Wysocki, Bryan O'Donoghue,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab,
Stanimir Varbanov, Abhinav Kumar, Hans Verkuil, Stefan Schmidt,
Konrad Dybcio, Bryan O'Donoghue, Dikshita Agarwal,
linux-arm-msm, linux-clk, devicetree, linux-kernel, linux-pm,
linux-media, Mauro Carvalho Chehab
On 05/02/2026 13:48, Dmitry Baryshkov wrote:
>>
>>> + clock-names:
>>> + items:
>>> + - const: iface
>>> + - const: bi_tcxo
>>> + - const: bi_tcxo_ao
>>> +
>>> + power-domains:
>>> + items:
>>> + - description:
>>> + A phandle and PM domain specifier for the MMCX power domain.
>>> + - description:
>>> + A phandle and PM domain specifier for the MX power domain.
>>
>> This is an ABI break, so please say in the commit what was not working
>> or why this ABI break is really justified. Currently you just give a
>> hint that it is needed for PLL configuration, but honestly - why would
>> we care to configure PLL if everything was working correct before?
>
> I must admit, I c&p'ed the commit message from [1] which was ack'ed by
> Rob and accepted into the kernel. What is the difference?
No difference. To me both are insufficiently explained as fixes, but
other maintainer might have different opinion. I don't mind that.
>
> [1] https://lore.kernel.org/all/20250530-videocc-pll-multi-pd-voting-v5-1-02303b3a582d@quicinc.com/
>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2026-02-08 9:45 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 0:59 [PATCH v3 0/7] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
2026-02-04 0:59 ` [PATCH v3 1/7] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain Dmitry Baryshkov
2026-02-05 11:31 ` Krzysztof Kozlowski
2026-02-05 12:03 ` Konrad Dybcio
2026-02-05 12:48 ` Dmitry Baryshkov
2026-02-08 9:45 ` Krzysztof Kozlowski
2026-02-04 0:59 ` [PATCH v3 2/7] media: dt-bindings: qcom,sm8250-venus: sort out power domains Dmitry Baryshkov
2026-02-05 11:32 ` Krzysztof Kozlowski
2026-02-05 12:49 ` Dmitry Baryshkov
2026-02-04 0:59 ` [PATCH v3 3/7] media: iris: scale MMCX power domain on SM8250 Dmitry Baryshkov
2026-02-05 10:39 ` Dikshita Agarwal
2026-02-05 10:55 ` Dmitry Baryshkov
2026-02-04 0:59 ` [PATCH v3 4/7] media: venus: " Dmitry Baryshkov
2026-02-05 6:14 ` Dikshita Agarwal
2026-02-04 0:59 ` [PATCH v3 5/7] arm64: dts: qcom: sm8250: add MX power domain to the video CC Dmitry Baryshkov
2026-02-04 0:59 ` [PATCH v3 6/7] arm64: dts: qcom: sm8250: sort out Iris power domains Dmitry Baryshkov
2026-02-05 6:58 ` Dikshita Agarwal
2026-02-04 0:59 ` [PATCH v3 7/7] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table Dmitry Baryshkov
2026-02-05 6:59 ` Dikshita Agarwal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox