[PATCH DNM RFC 16/16] pmdomain: qcom: rpmhpd: Stop forwarding MMCX pstate to CX
From: Konrad Dybcio
Date: Wed Oct 14 2026 - 08:31:53 EST
From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
MMCX needs CX to be on, but it does not need CX's performance state to
follow its own. The GenPD parent link currently forwards that state, so
raising MMCX can also raise CX when no CX consumer needs the higher level.
Keep the parent relationship for power ordering, but suppress its
performance-state propagation. Apply the same policy to MMCX_AO and
CX_AO, leaving other RPMhPD parent relationships unchanged.
Assisted-by: LLM
Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
---
Because of the current PM topologies depending on this behavior, this
may not be merged without filling out clock DVFS data for all platforms
first. Additionally, the MX coupling is more nuanced before SM8450.
---
drivers/pmdomain/qcom/rpmhpd.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c
index fa8fed5bd3e5..4d9463b4d5df 100644
--- a/drivers/pmdomain/qcom/rpmhpd.c
+++ b/drivers/pmdomain/qcom/rpmhpd.c
@@ -37,6 +37,7 @@
* @level_count: Number of levels supported by the power domain. max
* being 16 (0 - 15)
* @enabled: true if the power domain is enabled
+ * @parent_flags: configuration flags for the GenPD parent relationship
* @res_name: Resource name used for cmd-db lookup
* @addr: Resource address as looped up using resource name from
* cmd-db
@@ -54,6 +55,7 @@ struct rpmhpd {
u32 level[RPMH_ARC_MAX_LEVELS];
size_t level_count;
bool enabled;
+ unsigned int parent_flags;
const char *res_name;
u32 addr;
bool state_synced;
@@ -154,6 +156,7 @@ static struct rpmhpd mmcx_w_cx_parent = {
.pd = { .name = "mmcx", },
.peer = &mmcx_ao_w_cx_parent,
.parent = &cx.pd,
+ .parent_flags = GENPD_SUBDOMAIN_NO_PERF_STATE_PROPAGATION,
.res_name = "mmcx.lvl",
};
@@ -162,6 +165,7 @@ static struct rpmhpd mmcx_ao_w_cx_parent = {
.active_only = true,
.peer = &mmcx_w_cx_parent,
.parent = &cx_ao.pd,
+ .parent_flags = GENPD_SUBDOMAIN_NO_PERF_STATE_PROPAGATION,
.res_name = "mmcx.lvl",
};
@@ -1223,9 +1227,13 @@ static int rpmhpd_probe(struct platform_device *pdev)
for (i = 0; i < num_pds; i++) {
if (!rpmhpds[i])
continue;
- if (rpmhpds[i]->parent)
- pm_genpd_add_subdomain(rpmhpds[i]->parent,
- &rpmhpds[i]->pd);
+ if (rpmhpds[i]->parent) {
+ ret = pm_genpd_add_subdomain_with_flags(rpmhpds[i]->parent,
+ &rpmhpds[i]->pd,
+ rpmhpds[i]->parent_flags);
+ if (ret)
+ return ret;
+ }
}
return of_genpd_add_provider_onecell(pdev->dev.of_node, data);
--
2.56.0