]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: iris: scale MMCX power domain on SM8250
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Mon, 9 Feb 2026 01:32:17 +0000 (03:32 +0200)
committerBryan O'Donoghue <bod@kernel.org>
Sun, 10 May 2026 10:16:55 +0000 (11:16 +0100)
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>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
drivers/media/platform/qcom/iris/iris_platform_gen1.c
drivers/media/platform/qcom/iris/iris_probe.c

index df8e6bf9430ed2a070e092edae9ef998d092cb5e..aa71f7f53ee344d809d424f025f39410d4080bfc 100644 (file)
@@ -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"        },
index 492f85f518ebaba7648e368b0680535740e3d541..511c8b56cf5da5fedab3311d814a68c44f2ce700 100644 (file)
@@ -65,6 +65,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;