* [PATCH 0/8] media: qcom: iris/venus: fix power domain handling on SM8250
@ 2026-01-31 17:33 Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 1/8] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain Dmitry Baryshkov
` (7 more replies)
0 siblings, 8 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31 17:33 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).
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Dmitry Baryshkov (8):
dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain
pmdomain: de-constify fields struct dev_pm_domain_attach_data
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: sort out Iris power domains
arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table
.../bindings/clock/qcom,sm8250-videocc.yaml | 80 ++++++++++++++++++++++
.../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 ++-
include/linux/pm_domain.h | 4 +-
10 files changed, 135 insertions(+), 46 deletions(-)
---
base-commit: 44ef70faf71468e0ae4bdb782a6d43f0614b8ffa
change-id: 20260131-iris-venus-fix-sm8250-f938e29e7497
Best regards,
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/8] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain
2026-01-31 17:33 [PATCH 0/8] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
@ 2026-01-31 17:33 ` Dmitry Baryshkov
2026-01-31 18:34 ` Rob Herring (Arm)
2026-01-31 17:33 ` [PATCH 2/8] pmdomain: de-constify fields struct dev_pm_domain_attach_data Dmitry Baryshkov
` (6 subsequent siblings)
7 siblings, 1 reply; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31 17:33 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")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
.../bindings/clock/qcom,sm8250-videocc.yaml | 80 ++++++++++++++++++++++
.../devicetree/bindings/clock/qcom,videocc.yaml | 20 ------
2 files changed, 80 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..94264c309c65
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8250-videocc.yaml
@@ -0,0 +1,80 @@
+# 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 = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "bi_tcxo";
+ #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] 10+ messages in thread
* [PATCH 2/8] pmdomain: de-constify fields struct dev_pm_domain_attach_data
2026-01-31 17:33 [PATCH 0/8] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 1/8] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain Dmitry Baryshkov
@ 2026-01-31 17:33 ` Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 3/8] media: dt-bindings: qcom,sm8250-venus: sort out power domains Dmitry Baryshkov
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31 17:33 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
It doesn't really make sense to keep u32 fields to be marked as const.
Having the const fields prevents their modification in the driver.
Instead the whole struct can be defined as const (if it is constant).
Fixes: 161e16a5e50a ("PM: domains: Add helper functions to attach/detach multiple PM domains")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
include/linux/pm_domain.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index f6f6d494f728..b299dc0128d6 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -49,8 +49,8 @@
struct dev_pm_domain_attach_data {
const char * const *pd_names;
- const u32 num_pd_names;
- const u32 pd_flags;
+ u32 num_pd_names;
+ u32 pd_flags;
};
struct dev_pm_domain_list {
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/8] media: dt-bindings: qcom,sm8250-venus: sort out power domains
2026-01-31 17:33 [PATCH 0/8] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 1/8] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 2/8] pmdomain: de-constify fields struct dev_pm_domain_attach_data Dmitry Baryshkov
@ 2026-01-31 17:33 ` Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 4/8] media: iris: scale MMCX power domain on SM8250 Dmitry Baryshkov
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31 17:33 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
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.
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] 10+ messages in thread
* [PATCH 4/8] media: iris: scale MMCX power domain on SM8250
2026-01-31 17:33 [PATCH 0/8] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
` (2 preceding siblings ...)
2026-01-31 17:33 ` [PATCH 3/8] media: dt-bindings: qcom,sm8250-venus: sort out power domains Dmitry Baryshkov
@ 2026-01-31 17:33 ` Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 5/8] media: venus: " Dmitry Baryshkov
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31 17:33 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 it powered on by the MX domain. Extend the driver to support
scaling both power domains, while keeping compatibitility with the
existing DTs, which define only the MX domain.
Fixes: 79865252acb6 ("media: iris: enable video driver probe of SM8250 SoC")
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] 10+ messages in thread
* [PATCH 5/8] media: venus: scale MMCX power domain on SM8250
2026-01-31 17:33 [PATCH 0/8] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
` (3 preceding siblings ...)
2026-01-31 17:33 ` [PATCH 4/8] media: iris: scale MMCX power domain on SM8250 Dmitry Baryshkov
@ 2026-01-31 17:33 ` Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 6/8] arm64: dts: qcom: sm8250: add MX power domain to the video CC Dmitry Baryshkov
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31 17:33 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 it powered on by the MX domain. Extend the driver to support
scaling both power domains, while keeping compatibitility with the
existing DTs, which define only the MX domain.
Fixes: 0aeabfa29a9c ("media: venus: core: add sm8250 DT compatible and resource data")
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] 10+ messages in thread
* [PATCH 6/8] arm64: dts: qcom: sm8250: add MX power domain to the video CC
2026-01-31 17:33 [PATCH 0/8] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
` (4 preceding siblings ...)
2026-01-31 17:33 ` [PATCH 5/8] media: venus: " Dmitry Baryshkov
@ 2026-01-31 17:33 ` Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 7/8] arm64: dts: qcom: sort out Iris power domains Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 8/8] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table Dmitry Baryshkov
7 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31 17:33 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. Update the videocc
device node to include the MX power domain.
Fixes: 5b9ec225d4ed ("arm64: dts: qcom: sm8250: Add videocc DT node")
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] 10+ messages in thread
* [PATCH 7/8] arm64: dts: qcom: sort out Iris power domains
2026-01-31 17:33 [PATCH 0/8] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
` (5 preceding siblings ...)
2026-01-31 17:33 ` [PATCH 6/8] arm64: dts: qcom: sm8250: add MX power domain to the video CC Dmitry Baryshkov
@ 2026-01-31 17:33 ` Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 8/8] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table Dmitry Baryshkov
7 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31 17:33 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")
Suggested-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..531470506809 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_low_svs>,
+ <&rpmhpd_opp_low_svs>;
};
opp-1014000000 {
opp-hz = /bits/ 64 <1014000000>;
- required-opps = <&rpmhpd_opp_svs>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_svs>;
};
opp-1098000000 {
opp-hz = /bits/ 64 <1098000000>;
- required-opps = <&rpmhpd_opp_svs_l1>;
+ required-opps = <&rpmhpd_opp_svs>,
+ <&rpmhpd_opp_svs_l1>;
};
opp-1332000000 {
opp-hz = /bits/ 64 <1332000000>;
- required-opps = <&rpmhpd_opp_nom>;
+ required-opps = <&rpmhpd_opp_svs>,
+ <&rpmhpd_opp_nom>;
};
};
};
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 8/8] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table
2026-01-31 17:33 [PATCH 0/8] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
` (6 preceding siblings ...)
2026-01-31 17:33 ` [PATCH 7/8] arm64: dts: qcom: sort out Iris power domains Dmitry Baryshkov
@ 2026-01-31 17:33 ` Dmitry Baryshkov
7 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-01-31 17:33 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")
Suggested-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 531470506809..21a186e199a5 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_low_svs>,
<&rpmhpd_opp_low_svs>;
};
- opp-1014000000 {
- opp-hz = /bits/ 64 <1014000000>;
+ opp-338000000 {
+ opp-hz = /bits/ 64 <338000000>;
required-opps = <&rpmhpd_opp_low_svs>,
<&rpmhpd_opp_svs>;
};
- opp-1098000000 {
- opp-hz = /bits/ 64 <1098000000>;
+ opp-366000000 {
+ opp-hz = /bits/ 64 <366000000>;
required-opps = <&rpmhpd_opp_svs>,
<&rpmhpd_opp_svs_l1>;
};
- opp-1332000000 {
- opp-hz = /bits/ 64 <1332000000>;
+ opp-444000000 {
+ opp-hz = /bits/ 64 <444000000>;
required-opps = <&rpmhpd_opp_svs>,
<&rpmhpd_opp_nom>;
};
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/8] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain
2026-01-31 17:33 ` [PATCH 1/8] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain Dmitry Baryshkov
@ 2026-01-31 18:34 ` Rob Herring (Arm)
0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring (Arm) @ 2026-01-31 18:34 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Ulf Hansson, Vikash Garodia, Mauro Carvalho Chehab,
Bjorn Andersson, linux-media, devicetree, linux-kernel,
Rafael J. Wysocki, Taniya Das, Konrad Dybcio, Dikshita Agarwal,
Jonathan Marek, Stanimir Varbanov, Bryan O'Donoghue,
Krzysztof Kozlowski, Hans Verkuil, Stefan Schmidt, linux-arm-msm,
linux-clk, Bryan O'Donoghue, Mauro Carvalho Chehab, linux-pm,
Dikshita Agarwal, Michael Turquette, Conor Dooley, Stephen Boyd,
Abhinav Kumar
On Sat, 31 Jan 2026 19:33:43 +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.
>
> Fixes: dafb992a95e1 ("dt-bindings: clock: add SM8250 QCOM video clock bindings")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> .../bindings/clock/qcom,sm8250-videocc.yaml | 80 ++++++++++++++++++++++
> .../devicetree/bindings/clock/qcom,videocc.yaml | 20 ------
> 2 files changed, 80 insertions(+), 20 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/qcom,sm8250-videocc.example.dtb: clock-controller@ab00000 (qcom,sm8250-videocc): clock-names:0: 'iface' was expected
from schema $id: http://devicetree.org/schemas/clock/qcom,sm8250-videocc.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/qcom,sm8250-videocc.example.dtb: clock-controller@ab00000 (qcom,sm8250-videocc): clock-names: ['bi_tcxo'] is too short
from schema $id: http://devicetree.org/schemas/clock/qcom,sm8250-videocc.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/qcom,sm8250-videocc.example.dtb: clock-controller@ab00000 (qcom,sm8250-videocc): clocks: [[4294967295, 0]] is too short
from schema $id: http://devicetree.org/schemas/clock/qcom,sm8250-videocc.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260131-iris-venus-fix-sm8250-v1-1-b635ee66284c@oss.qualcomm.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-01-31 18:34 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-31 17:33 [PATCH 0/8] media: qcom: iris/venus: fix power domain handling on SM8250 Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 1/8] dt-bindings: clock: qcom,sm8250-videocc: account for the MX domain Dmitry Baryshkov
2026-01-31 18:34 ` Rob Herring (Arm)
2026-01-31 17:33 ` [PATCH 2/8] pmdomain: de-constify fields struct dev_pm_domain_attach_data Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 3/8] media: dt-bindings: qcom,sm8250-venus: sort out power domains Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 4/8] media: iris: scale MMCX power domain on SM8250 Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 5/8] media: venus: " Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 6/8] arm64: dts: qcom: sm8250: add MX power domain to the video CC Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 7/8] arm64: dts: qcom: sort out Iris power domains Dmitry Baryshkov
2026-01-31 17:33 ` [PATCH 8/8] arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table Dmitry Baryshkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox