Re: [PATCH v5 08/10] drm/msm/dpu: clear the DSC blocks left by a previous reservation

From: Konrad Dybcio

Date: Mon Oct 26 2026 - 05:17:51 EST


On 10/24/26 1:25 AM, Dmitry Baryshkov wrote:
> dpu_encoder_virt_atomic_mode_set() fills dpu_enc->hw_dsc[] with the DSC
> blocks of the new reservation, but only the first num_dsc entries. The
> array is never cleared, so an encoder which once drove two DSC blocks
> keeps pointing at the second one after it has been given a topology with
> a single DSC.
>
> dpu_encoder_use_dsc_merge() counts the non-NULL entries of the whole
> array and compares them against the number of interfaces, so the leftover
> pointer makes it report DSC merge for a topology which has none, and
> dpu_encoder_prep_dsc() then programs DSC_MODE_MULTIPLEX into the only DSC
> block that is really used.
>
> Assign NULL when the new reservation has no block for the slot.
>
> Fixes: 58dca9810749 ("drm/msm/disp/dpu1: Add support for DSC in encoder")
> Assisted-by: LLM
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>

Konrad