Skip to content

Commit 34202be

Browse files
committed
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. Reported-by: Dan Carpenter <[email protected]> Fixes: 6a4bc73 ("drm/msm/dpu: drop separate dpu_core_perf_tune overrides") Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/551321/ Link: https://lore.kernel.org/r/[email protected]
1 parent b0fe701 commit 34202be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ static u64 _dpu_core_perf_get_core_clk_rate(struct dpu_kms *kms)
289289
if (kms->perf.perf_tune.mode == DPU_PERF_MODE_MINIMUM)
290290
return kms->perf.max_core_clk_rate;
291291

292+
clk_rate = 0;
292293
drm_for_each_crtc(crtc, kms->dev) {
293294
if (crtc->enabled) {
294295
dpu_cstate = to_dpu_crtc_state(crtc->state);

0 commit comments

Comments
 (0)