Skip to contentSkip to conversation

drm/msm/dpu: initialise clk_rate to 0 in _dpu_core_perf_get_core_clk_rate

PATCH Applied Dmitry Baryshkov 2 participants 3 messages Aug 4, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm/dpu: initialise clk_rate to 0 in _dpu_core_perf_get_core_clk_rate

When removing the core perf tune overrides, I also occasionaly removed the initialisation of the clk_rate variable. Initialise it to 0 to let max() correctly calculate the maximum of requested clock rates.

Fixes 6a4bc73915af ("drm/msm/dpu: drop separate dpu_core_perf_tune overrides")
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c +1 -0
index 0b54a659a940..e843e5f3b3dd 100644
@@ -289,6 +289,7 @@ static u64 _dpu_core_perf_get_core_clk_rate(struct dpu_kms *kms)
 	if (kms->perf.perf_tune.mode == DPU_PERF_MODE_MINIMUM)
 		return kms->perf.max_core_clk_rate;
 
+	clk_rate = 0;
 	drm_for_each_crtc(crtc, kms->dev) {
 		if (crtc->enabled) {
 			dpu_cstate = to_dpu_crtc_state(crtc->state);
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Dmitry Baryshkov

When removing the core perf tune overrides, I also occasionaly removed the initialisation of the clk_rate variable. Initialise it to 0 to let max() correctly calculate the maximum of requested clock rates.

Fixes 6a4bc73915af ("drm/msm/dpu: drop separate dpu_core_perf_tune overrides")
---
  drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 1 +
  1 file changed, 1 insertion(+)
author Applied
#2 lore raw
In reply to Dmitry Baryshkov
Quoted 5 lines · Dmitry Baryshkov

When removing the core perf tune overrides, I also occasionaly removed the initialisation of the clk_rate variable. Initialise it to 0 to let max() correctly calculate the maximum of requested clock rates.

Applied, thanks!

[1/1] drm/msm/dpu: initialise clk_rate to 0 in _dpu_core_perf_get_core_clk_rate

      https://gitlab.freedesktop.org/lumag/msm/-/commit/34202be95237

Best regards,

Signature · 1 line
Dmitry Baryshkov <[email protected]>