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

Dmitry Baryshkov dmitry.baryshkov at linaro.org
Fri Aug 4 09:34:38 UTC 2023


Hi Dan,

On Fri, 4 Aug 2023 at 08:37, Dan Carpenter <dan.carpenter at linaro.org> wrote:
>
> 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'.

Thank you for your report, I will initialise it to 0.

>
> 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



-- 
With best wishes
Dmitry


More information about the Freedreno mailing list