disp: msm: sde: delay cwb done wait for last frame

Commit Ifa100424733 ("disp: msm: sde: delay
encoder disable for clone mode") delays the CWB
encoder disable but it is also skipping the CWB
disable flush. That can cause the underrun on dp
display if it uses the same 3d_merge HW block. This
change reverts the portion of original code and
only delays the last cwb frame done wait. It still
keep the last CWB frame done wait as it is if crtc
is also moving to inactive state.

Change-Id: I3461188a35197f2925899ceea7ef705adf00a398
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Dhaval Patel
2020-09-29 11:21:07 -07:00
parent 90c3cec488
commit 8d6fea832e
6 changed files with 105 additions and 77 deletions

View File

@@ -756,6 +756,29 @@ bool sde_encoder_in_clone_mode(struct drm_encoder *drm_enc)
return false;
}
bool sde_encoder_is_cwb_disabling(struct drm_encoder *drm_enc,
struct drm_crtc *crtc)
{
struct sde_encoder_virt *sde_enc;
int i;
if (!drm_enc)
return false;
sde_enc = to_sde_encoder_virt(drm_enc);
if (sde_enc->disp_info.intf_type != DRM_MODE_CONNECTOR_VIRTUAL)
return false;
for (i = 0; i < sde_enc->num_phys_encs; i++) {
struct sde_encoder_phys *phys = sde_enc->phys_encs[i];
if (sde_encoder_phys_is_cwb_disabling(phys, crtc))
return true;
}
return false;
}
static int _sde_encoder_atomic_check_phys_enc(struct sde_encoder_virt *sde_enc,
struct drm_crtc_state *crtc_state,
struct drm_connector_state *conn_state)