From 4f81cc2973603f0eb8b7acef2e87a4b02a7d2c75 Mon Sep 17 00:00:00 2001 From: mcc45tr Date: Sun, 13 Sep 2026 05:47:01 +0300 Subject: [PATCH] clk: qcom: restore firmware-owned Nabu DSI branches The 7.2.4-8 HIL run showed that all six bonded-DSI byte and pixel branches remain physically on during disable_unused. Trying to gate them produced six clk_branch_toggle warnings on every boot, and one boot stopped logging at 11.75 seconds before the desktop appeared. Restore CLK_IGNORE_UNUSED for these firmware-owned scanout branches. Normal DSI runtime reference counting still manages them after the DRM driver takes ownership. Signed-off-by: mcc45tr --- drivers/clk/qcom/dispcc-sm8250.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/clk/qcom/dispcc-sm8250.c b/drivers/clk/qcom/dispcc-sm8250.c index fdc07323f..587b2714d 100644 --- a/drivers/clk/qcom/dispcc-sm8250.c +++ b/drivers/clk/qcom/dispcc-sm8250.c @@ -710,6 +710,12 @@ static struct clk_branch disp_cc_mdss_ahb_clk = { }, }; +/* + * Firmware may leave the bonded dual-DSI scanout active until the DRM driver + * takes ownership. These branches cannot report halted during the generic + * disable-unused pass on Nabu, so keep them out of that pass and let the DSI + * driver's normal runtime reference counting manage them after takeover. + */ static struct clk_branch disp_cc_mdss_byte0_clk = { .halt_reg = 0x2028, .halt_check = BRANCH_HALT, @@ -722,7 +728,7 @@ static struct clk_branch disp_cc_mdss_byte0_clk = { &disp_cc_mdss_byte0_clk_src.clkr.hw, }, .num_parents = 1, - .flags = CLK_SET_RATE_PARENT, + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, .ops = &clk_branch2_ops, }, }, @@ -740,7 +746,7 @@ static struct clk_branch disp_cc_mdss_byte0_intf_clk = { &disp_cc_mdss_byte0_div_clk_src.clkr.hw, }, .num_parents = 1, - .flags = CLK_SET_RATE_PARENT, + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, .ops = &clk_branch2_ops, }, }, @@ -758,7 +764,7 @@ static struct clk_branch disp_cc_mdss_byte1_clk = { &disp_cc_mdss_byte1_clk_src.clkr.hw, }, .num_parents = 1, - .flags = CLK_SET_RATE_PARENT, + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, .ops = &clk_branch2_ops, }, }, @@ -776,7 +782,7 @@ static struct clk_branch disp_cc_mdss_byte1_intf_clk = { &disp_cc_mdss_byte1_div_clk_src.clkr.hw, }, .num_parents = 1, - .flags = CLK_SET_RATE_PARENT, + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, .ops = &clk_branch2_ops, }, }, @@ -1046,7 +1052,7 @@ static struct clk_branch disp_cc_mdss_pclk0_clk = { &disp_cc_mdss_pclk0_clk_src.clkr.hw, }, .num_parents = 1, - .flags = CLK_SET_RATE_PARENT, + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, .ops = &clk_branch2_ops, }, }, @@ -1064,7 +1070,7 @@ static struct clk_branch disp_cc_mdss_pclk1_clk = { &disp_cc_mdss_pclk1_clk_src.clkr.hw, }, .num_parents = 1, - .flags = CLK_SET_RATE_PARENT, + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, .ops = &clk_branch2_ops, }, }, -- 2.55.0