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

@@ -641,6 +641,26 @@ static inline enum sde_3d_blend_mode sde_encoder_helper_get_3d_blend_mode(
return BLEND_3D_NONE;
}
/**
* sde_encoder_phys_is_cwb_disabling - Check if CWB encoder attached to this
* CRTC and it is in SDE_ENC_DISABLING state.
* @phys_enc: Pointer to physical encoder structure
* @crtc: drm crtc
* @Return: true if cwb encoder is in disabling state
*/
static inline bool sde_encoder_phys_is_cwb_disabling(
struct sde_encoder_phys *phys, struct drm_crtc *crtc)
{
struct sde_encoder_phys_wb *wb_enc;
if (!phys || !phys->in_clone_mode ||
phys->enable_state != SDE_ENC_DISABLING)
return false;
wb_enc = container_of(phys, struct sde_encoder_phys_wb, base);
return (wb_enc->crtc == crtc) ? true : false;
}
/**
* sde_encoder_helper_split_config - split display configuration helper function
* This helper function may be used by physical encoders to configure