Skip to contentSkip to conversation

clk: qcom: dispcc-sm7150: Fix dispcc_mdss_pclk0_clk_src

PATCH New Sasha Levin 1 participant 1 message Dec 12, 2025

Subsystems (2)
lore
Share & tools
lore

Sasha Levin

author maintainer
#0 lore raw

PATCH 1/1 clk: qcom: dispcc-sm7150: Fix dispcc_mdss_pclk0_clk_src

From: Jens Reidel <[email protected]>

[ Upstream commit e3c13e0caa8ceb7dec1a7c4fcfd9dbef56a69fbe ]

Set CLK_OPS_PARENT_ENABLE to ensure the parent gets prepared and enabled when switching to it, fixing an "rcg didn't update its configuration" warning.

---

LLM Generated explanations, may be completely bogus:

### 3. Technical Understanding

The CLK_OPS_PARENT_ENABLE flag (BIT(12) in clk-provider.h) ensures that "parents need enable during gate/ungate, set rate and re-parent." Without this flag, when the pixel clock source tries to switch to a new parent clock, the parent might not be enabled, causing the RCG (Root Clock Generator) to fail to update its configuration.

This is a well-known pattern in Qualcomm clock drivers - pixel clocks dynamically switch parents during display panel initialization, and the parent must be running for the configuration switch to complete.

### 4. Scope and Risk Assessment
- **Lines changed**: 1 line (adding a single flag)
- **Files touched**: 1 file
- **Complexity**: Very low
- **Risk**: Very low - this is an established pattern used across many Qualcomm dispcc/gcc drivers

### 5. User Impact
- Affects SM7150-based devices (mobile phones)
- The warning indicates clock configuration issues that could affect display initialization
- Limited scope - only SM7150 platform users

### 6. Stable Tree Applicability
- Driver was added in **v6.11** (commit 3829c412197e1)
- Only applicable to v6.11.y, v6.12.y, and newer stable trees
- NOT applicable to LTS kernels: 6.6.y, 6.1.y, 5.15.y (driver doesn't exist)

### 7. Key Observations

**Against backporting:**
1. **No "Cc: [email protected]" tag** - The maintainers did not request stable backport
2. **No "Fixes:" tag** - Doesn't reference the original commit where the bug was introduced
3. **Very new driver** - SM7150 dispcc was added in v6.11, limiting stable applicability
4. **Not a critical issue** - A warning message, not a crash, panic, or data corruption
5. **Mobile SoC** - Users running stable kernels rarely use cutting-edge mobile phone support

**For backporting:**
1. Valid bug fix with proven pattern
2. Extremely small and low-risk change
3. Has proper review from Qualcomm clock maintainers

 drivers/clk/qcom/dispcc-sm7150.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/dispcc-sm7150.c +1 -1
index bdfff246ed3fe..ddc7230b8aea7 100644
@@ -356,7 +356,7 @@ static struct clk_rcg2 dispcc_mdss_pclk0_clk_src = {
 		.name = "dispcc_mdss_pclk0_clk_src",
 		.parent_data = dispcc_parent_data_4,
 		.num_parents = ARRAY_SIZE(dispcc_parent_data_4),
-		.flags = CLK_SET_RATE_PARENT,
+		.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
 		.ops = &clk_pixel_ops,
 	},
 };
Signature · 1 line
2.51.0