disp: msm: sde: cache cwb enc mask to use during seamless transitions

The cwb_enc_mask is set by the wb phys encoder during the validate
phase and this is in-turn used during the commit phase. During
seamless transition cases like poms with cwb, the encoders are
disabled and then enabled back after the validate phase. The cwb
flags are reset during this time leading to issues. Cache the flag
and reapply it during the modeset to avoid this case.

Change-Id: I5df1be18a5e30bb1107dc0f2e87d771a735f1ab6
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
This commit is contained in:
Veera Sundaram Sankaran
2022-10-11 14:48:08 -07:00
committed by Gerrit - the friendly Code Review server
부모 7fcbec0c8d
커밋 09b2c937c2
2개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제

파일 보기

@@ -929,6 +929,7 @@ void sde_encoder_set_clone_mode(struct drm_encoder *drm_enc,
}
}
sde_crtc_state->cached_cwb_enc_mask = sde_crtc_state->cwb_enc_mask;
sde_crtc_state->cwb_enc_mask = 0;
}
@@ -2604,6 +2605,8 @@ static void sde_encoder_virt_mode_set(struct drm_encoder *drm_enc,
struct sde_encoder_virt *sde_enc;
struct sde_kms *sde_kms;
struct drm_connector *conn;
struct drm_crtc_state *crtc_state;
struct sde_crtc_state *sde_crtc_state;
struct sde_connector_state *c_state;
struct msm_display_mode *msm_mode;
struct sde_crtc *sde_crtc;
@@ -2668,6 +2671,16 @@ static void sde_encoder_virt_mode_set(struct drm_encoder *drm_enc,
if (ret)
return;
crtc_state = sde_crtc->base.state;
sde_crtc_state = to_sde_crtc_state(crtc_state);
if ((sde_enc->disp_info.intf_type == DRM_MODE_CONNECTOR_VIRTUAL) &&
((sde_crtc_state->cached_cwb_enc_mask & drm_encoder_mask(drm_enc)))) {
SDE_EVT32(DRMID(drm_enc), sde_crtc_state->cwb_enc_mask,
sde_crtc_state->cached_cwb_enc_mask);
sde_crtc_state->cwb_enc_mask = sde_crtc_state->cached_cwb_enc_mask;
sde_encoder_set_clone_mode(drm_enc, crtc_state);
}
/* reserve dynamic resources now, indicating non test-only */
ret = sde_rm_reserve(&sde_kms->rm, drm_enc, drm_enc->crtc->state, conn->state, false);
if (ret) {