disp: msm: sde: reset cwb encoder after commit done complete

Postpone virtual encoder reset until commit done complete
on all the encoders of the crtc to ensure cwb encoder
resources are held until it's primary encoder commit with
cwb resources disable is picked by HW.

Change-Id: I820317d13c00b44f6edd69acff83dc3b494b6282
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
This commit is contained in:
Prabhanjan Kandula
2023-07-17 23:57:01 -07:00
父節點 f78456a7fa
當前提交 74796543cf

查看文件

@@ -1662,7 +1662,7 @@ static void sde_kms_wait_for_commit_done(struct msm_kms *kms,
struct drm_crtc *crtc)
{
struct sde_kms *sde_kms;
struct drm_encoder *encoder;
struct drm_encoder *encoder, *cwb_enc = NULL;
struct drm_device *dev;
int ret;
bool cwb_disabling;
@@ -1694,9 +1694,10 @@ static void sde_kms_wait_for_commit_done(struct msm_kms *kms,
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
cwb_disabling = false;
if (encoder->crtc != crtc) {
cwb_disabling = sde_encoder_is_cwb_disabling(encoder,
crtc);
if (!cwb_disabling)
cwb_disabling = sde_encoder_is_cwb_disabling(encoder, crtc);
if (cwb_disabling)
cwb_enc = encoder;
else
continue;
}
@@ -1714,21 +1715,17 @@ static void sde_kms_wait_for_commit_done(struct msm_kms *kms,
SDE_EVT32(DRMID(crtc), DRMID(encoder), cwb_disabling,
ret, SDE_EVTLOG_ERROR);
sde_crtc_request_frame_reset(crtc, encoder);
/* call ensure virt_reset for cwb encoder before exiting the loop */
if (cwb_disabling)
sde_encoder_virt_reset(encoder);
break;
}
sde_encoder_hw_fence_error_handle(encoder);
sde_crtc_complete_flip(crtc, NULL);
if (cwb_disabling)
sde_encoder_virt_reset(encoder);
}
if (cwb_disabling && cwb_enc)
sde_encoder_virt_reset(cwb_enc);
/* avoid system cache update to set rd-noalloc bit when NSE feature is enabled */
if (!test_bit(SDE_FEATURE_SYS_CACHE_NSE, sde_kms->catalog->features))
sde_crtc_static_cache_read_kickoff(crtc);