{
        struct dpu_hw_wb *hw_wb;
        struct dpu_hw_ctl *ctl;
+       struct dpu_hw_cdm *hw_cdm;
 
        if (!phys_enc) {
                DPU_ERROR("invalid encoder\n");
 
        hw_wb = phys_enc->hw_wb;
        ctl = phys_enc->hw_ctl;
+       hw_cdm = phys_enc->hw_cdm;
 
        if (test_bit(DPU_CTL_ACTIVE_CFG, &ctl->caps->features) &&
                (phys_enc->hw_ctl &&
                if (mode_3d && hw_pp && hw_pp->merge_3d)
                        intf_cfg.merge_3d = hw_pp->merge_3d->idx;
 
+               if (hw_cdm)
+                       intf_cfg.cdm = hw_cdm->idx;
+
                if (phys_enc->hw_pp->merge_3d && phys_enc->hw_pp->merge_3d->ops.setup_3d_mode)
                        phys_enc->hw_pp->merge_3d->ops.setup_3d_mode(phys_enc->hw_pp->merge_3d,
                                        mode_3d);
        struct dpu_hw_wb *hw_wb;
        struct dpu_hw_ctl *hw_ctl;
        struct dpu_hw_pingpong *hw_pp;
+       struct dpu_hw_cdm *hw_cdm;
        u32 pending_flush = 0;
 
        if (!phys_enc)
        hw_wb = phys_enc->hw_wb;
        hw_pp = phys_enc->hw_pp;
        hw_ctl = phys_enc->hw_ctl;
+       hw_cdm = phys_enc->hw_cdm;
 
        DPU_DEBUG("[wb:%d]\n", hw_wb->idx - WB_0);
 
                hw_ctl->ops.update_pending_flush_merge_3d(hw_ctl,
                                hw_pp->merge_3d->idx);
 
+       if (hw_cdm && hw_ctl->ops.update_pending_flush_cdm)
+               hw_ctl->ops.update_pending_flush_cdm(hw_ctl, hw_cdm->idx);
+
        if (hw_ctl->ops.get_pending_flush)
                pending_flush = hw_ctl->ops.get_pending_flush(hw_ctl);