[Freedreno] [bug report] drm/msm/dpu: drop separate dpu_core_perf_tune overrides

Dan Carpenter dan.carpenter at linaro.org
Fri Aug 4 05:37:54 UTC 2023


Hello Dmitry Baryshkov,

The patch 6a4bc73915af: "drm/msm/dpu: drop separate
dpu_core_perf_tune overrides" from Jul 30, 2023 (linux-next), leads
to the following Smatch static checker warning:

	drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:295 _dpu_core_perf_get_core_clk_rate()
	error: uninitialized symbol 'clk_rate'.

drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
    280 static u64 _dpu_core_perf_get_core_clk_rate(struct dpu_kms *kms)
    281 {
    282         u64 clk_rate;
    283         struct drm_crtc *crtc;
    284         struct dpu_crtc_state *dpu_cstate;
    285 
    286         if (kms->perf.perf_tune.mode == DPU_PERF_MODE_FIXED)
    287                 return kms->perf.fix_core_clk_rate;
    288 
    289         if (kms->perf.perf_tune.mode == DPU_PERF_MODE_MINIMUM)
    290                 return kms->perf.max_core_clk_rate;
    291 
    292         drm_for_each_crtc(crtc, kms->dev) {
    293                 if (crtc->enabled) {
    294                         dpu_cstate = to_dpu_crtc_state(crtc->state);
--> 295                         clk_rate = max(dpu_cstate->new_perf.core_clk_rate,
    296                                                         clk_rate);
                                                                ^^^^^^^^
Never initialized

    297                 }
    298         }
    299 
    300         return clk_rate;
    301 }

regards,
dan carpenter


More information about the Freedreno mailing list