From a14aea9aac4385bc878d29d5f96f14720900ff7b Mon Sep 17 00:00:00 2001 From: Yashwanth Date: Tue, 19 Apr 2022 14:26:24 +0530 Subject: [PATCH] disp: msm: sde: detach dsc/vdc encoder blocks properly during modeswitch In the current code if there is a switch from DSC to non-DSC mode, all the DSC blocks attached to the sde_encoder are not cleaned up properly. Due to this, during virt disable these DSC blocks are disabled and flushed resulting in underruns on other ctl paths which might be using them. This change properly cleans up all the dsc/vdc attached to the sde encoder to avoid such issues. Change-Id: Ie644701cbda6b4d056bc7ef30300be96096c5214 Signed-off-by: Yashwanth Signed-off-by: Narendra Muppalla --- msm/sde/sde_encoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_encoder.c b/msm/sde/sde_encoder.c index a7f8e79ed6..e3fa43232b 100644 --- a/msm/sde/sde_encoder.c +++ b/msm/sde/sde_encoder.c @@ -2491,7 +2491,7 @@ static void _sde_encoder_virt_populate_hw_res(struct drm_encoder *drm_enc) for (i = 0; i < MAX_CHANNELS_PER_ENC; i++) { sde_enc->hw_dsc[i] = NULL; if (!sde_rm_get_hw(&sde_kms->rm, &dsc_iter)) - break; + continue; sde_enc->hw_dsc[i] = to_sde_hw_dsc(dsc_iter.hw); } @@ -2499,7 +2499,7 @@ static void _sde_encoder_virt_populate_hw_res(struct drm_encoder *drm_enc) for (i = 0; i < MAX_CHANNELS_PER_ENC; i++) { sde_enc->hw_vdc[i] = NULL; if (!sde_rm_get_hw(&sde_kms->rm, &vdc_iter)) - break; + continue; sde_enc->hw_vdc[i] = to_sde_hw_vdc(vdc_iter.hw); }