disp: msm: sde: modify in_clone_mode after wb_reset is done

Add changes to modify the phys_enc->in_clone_mode variable
post wb_reset_state since this is a shared variable used
during atomic_check and atomic_commit. In current issue case,
wb_atomic_check has set in_clone_mode to true in commit N,
and in commit N-1 CWB is being disabled and re-sets the
in_clone_mode variable to false causing pp_done timeouts in
primary in commit N.

Change-Id: I8159bbdb5622a351d76bdc4dba75d48df20f4365
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Dieser Commit ist enthalten in:
Jayaprakash Madisetty
2021-04-15 15:18:02 +05:30
committet von Samantha Tran
Ursprung 7d0890d337
Commit 436efb403c
6 geänderte Dateien mit 70 neuen und 9 gelöschten Zeilen

Datei anzeigen

@@ -849,6 +849,36 @@ bool sde_encoder_is_cwb_disabling(struct drm_encoder *drm_enc,
return false;
}
void sde_encoder_set_clone_mode(struct drm_encoder *drm_enc,
struct drm_crtc_state *crtc_state)
{
struct sde_encoder_virt *sde_enc;
struct sde_crtc_state *sde_crtc_state;
int i = 0;
if (!drm_enc || !crtc_state) {
SDE_DEBUG("invalid params\n");
return;
}
sde_enc = to_sde_encoder_virt(drm_enc);
sde_crtc_state = to_sde_crtc_state(crtc_state);
if ((sde_enc->disp_info.intf_type != DRM_MODE_CONNECTOR_VIRTUAL) ||
(!(sde_crtc_state->cwb_enc_mask & drm_encoder_mask(drm_enc))))
return;
for (i = 0; i < sde_enc->num_phys_encs; i++) {
struct sde_encoder_phys *phys = sde_enc->phys_encs[i];
if (phys) {
phys->in_clone_mode = true;
SDE_DEBUG("enc:%d phys state:%d\n", DRMID(drm_enc), phys->enable_state);
}
}
sde_crtc_state->cwb_enc_mask = 0;
}
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)