Skip to content

Commit 88733a0

Browse files
Nikolay Kuratovlumag
authored andcommitted
drm/msm/dpu: Add missing NULL pointer check for pingpong interface
It is checked almost always in dpu_encoder_phys_wb_setup_ctl(), but in a single place the check is missing. Also use convenient locals instead of phys_enc->* where available. Cc: stable@vger.kernel.org Fixes: d7d0e73 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback") Signed-off-by: Nikolay Kuratov <kniv@yandex-team.ru> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/693860/ Link: https://lore.kernel.org/r/20251211093630.171014-1-kniv@yandex-team.ru Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
1 parent da9168d commit 88733a0

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,12 @@ static void dpu_encoder_phys_wb_setup_ctl(struct dpu_encoder_phys *phys_enc)
247247
if (hw_cdm)
248248
intf_cfg.cdm = hw_cdm->idx;
249249

250-
if (phys_enc->hw_pp->merge_3d && phys_enc->hw_pp->merge_3d->ops.setup_3d_mode)
251-
phys_enc->hw_pp->merge_3d->ops.setup_3d_mode(phys_enc->hw_pp->merge_3d,
252-
mode_3d);
250+
if (hw_pp && hw_pp->merge_3d && hw_pp->merge_3d->ops.setup_3d_mode)
251+
hw_pp->merge_3d->ops.setup_3d_mode(hw_pp->merge_3d, mode_3d);
253252

254253
/* setup which pp blk will connect to this wb */
255-
if (hw_pp && phys_enc->hw_wb->ops.bind_pingpong_blk)
256-
phys_enc->hw_wb->ops.bind_pingpong_blk(phys_enc->hw_wb,
257-
phys_enc->hw_pp->idx);
254+
if (hw_pp && hw_wb->ops.bind_pingpong_blk)
255+
hw_wb->ops.bind_pingpong_blk(hw_wb, hw_pp->idx);
258256

259257
phys_enc->hw_ctl->ops.setup_intf_cfg(phys_enc->hw_ctl, &intf_cfg);
260258
} else if (phys_enc->hw_ctl && phys_enc->hw_ctl->ops.setup_intf_cfg) {

0 commit comments

Comments
 (0)