Skip to content

Commit f88c0c8

Browse files
Abhinav Kumarlumag
authored andcommitted
drm/msm/dpu: plug-in the cdm related bits to writeback setup
To setup and enable CDM block for the writeback pipeline, lets add the pieces together to set the active bits and the flush bits for the CDM block. changes in v2: - passed the cdm idx to update_pending_flush_cdm() (have retained the R-b as its a minor change) Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/571831/ Link: https://lore.kernel.org/r/20231212205254.12422-13-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
1 parent a780a82 commit f88c0c8

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ static void dpu_encoder_phys_wb_setup_ctl(struct dpu_encoder_phys *phys_enc)
214214
{
215215
struct dpu_hw_wb *hw_wb;
216216
struct dpu_hw_ctl *ctl;
217+
struct dpu_hw_cdm *hw_cdm;
217218

218219
if (!phys_enc) {
219220
DPU_ERROR("invalid encoder\n");
@@ -222,6 +223,7 @@ static void dpu_encoder_phys_wb_setup_ctl(struct dpu_encoder_phys *phys_enc)
222223

223224
hw_wb = phys_enc->hw_wb;
224225
ctl = phys_enc->hw_ctl;
226+
hw_cdm = phys_enc->hw_cdm;
225227

226228
if (test_bit(DPU_CTL_ACTIVE_CFG, &ctl->caps->features) &&
227229
(phys_enc->hw_ctl &&
@@ -238,6 +240,9 @@ static void dpu_encoder_phys_wb_setup_ctl(struct dpu_encoder_phys *phys_enc)
238240
if (mode_3d && hw_pp && hw_pp->merge_3d)
239241
intf_cfg.merge_3d = hw_pp->merge_3d->idx;
240242

243+
if (hw_cdm)
244+
intf_cfg.cdm = hw_cdm->idx;
245+
241246
if (phys_enc->hw_pp->merge_3d && phys_enc->hw_pp->merge_3d->ops.setup_3d_mode)
242247
phys_enc->hw_pp->merge_3d->ops.setup_3d_mode(phys_enc->hw_pp->merge_3d,
243248
mode_3d);
@@ -411,6 +416,7 @@ static void _dpu_encoder_phys_wb_update_flush(struct dpu_encoder_phys *phys_enc)
411416
struct dpu_hw_wb *hw_wb;
412417
struct dpu_hw_ctl *hw_ctl;
413418
struct dpu_hw_pingpong *hw_pp;
419+
struct dpu_hw_cdm *hw_cdm;
414420
u32 pending_flush = 0;
415421

416422
if (!phys_enc)
@@ -419,6 +425,7 @@ static void _dpu_encoder_phys_wb_update_flush(struct dpu_encoder_phys *phys_enc)
419425
hw_wb = phys_enc->hw_wb;
420426
hw_pp = phys_enc->hw_pp;
421427
hw_ctl = phys_enc->hw_ctl;
428+
hw_cdm = phys_enc->hw_cdm;
422429

423430
DPU_DEBUG("[wb:%d]\n", hw_wb->idx - WB_0);
424431

@@ -434,6 +441,9 @@ static void _dpu_encoder_phys_wb_update_flush(struct dpu_encoder_phys *phys_enc)
434441
hw_ctl->ops.update_pending_flush_merge_3d(hw_ctl,
435442
hw_pp->merge_3d->idx);
436443

444+
if (hw_cdm && hw_ctl->ops.update_pending_flush_cdm)
445+
hw_ctl->ops.update_pending_flush_cdm(hw_ctl, hw_cdm->idx);
446+
437447
if (hw_ctl->ops.get_pending_flush)
438448
pending_flush = hw_ctl->ops.get_pending_flush(hw_ctl);
439449

0 commit comments

Comments
 (0)