[bug report] drm/msm/dpu: Skip trigger flush and start for CWB
Dan Carpenter
dan.carpenter at linaro.org
Fri Mar 7 09:30:48 UTC 2025
Hello Jessica Zhang,
This is a semi-automatic email about new static checker warnings.
Commit 8144d17a81d9 ("drm/msm/dpu: Skip trigger flush and start for
CWB") from Feb 14, 2025, leads to the following Smatch complaint:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1672 _dpu_encoder_trigger_start()
warn: variable dereferenced before check 'phys' (see line 1670)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
1669 {
1670 struct dpu_encoder_virt *dpu_enc = to_dpu_encoder_virt(phys->parent);
^^^^^^^^^^^^
Dereference
1671
1672 if (!phys) {
^^^^^
1673 DPU_ERROR("invalid argument(s)\n");
1674 return;
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1814 _dpu_encoder_kickoff_phys()
error: we previously assumed 'dpu_enc->cur_master' could be null (see line 1807)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
1805
1806 /* for split flush, combine pending flush masks and send to master */
1807 if (pending_flush && dpu_enc->cur_master) {
^^^^^^^^^^^^^^^^^^^
Check for NULL
1808 _dpu_encoder_trigger_flush(
1809 &dpu_enc->base,
1810 dpu_enc->cur_master,
1811 pending_flush);
1812 }
1813
1814 _dpu_encoder_trigger_start(dpu_enc->cur_master);
^^^^^^^^^^^^^^^^^^^
Unchecked dereference. Although, I guess this will go away if we
fix the first warning.
1815
regards,
dan carpenter
More information about the Freedreno
mailing list