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

@@ -466,6 +466,7 @@ enum sde_crtc_dirty_flags {
* @property_values: Current crtc property values
* @input_fence_timeout_ns : Cached input fence timeout, in ns
* @num_dim_layers: Number of dim layers
* @cwb_enc_mask : encoder mask populated during atomic_check if CWB is enabled
* @dim_layer: Dim layer configs
* @num_ds: Number of destination scalers to be configured
* @num_ds_enabled: Number of destination scalers enabled
@@ -501,6 +502,7 @@ struct sde_crtc_state {
DECLARE_BITMAP(dirty, SDE_CRTC_DIRTY_MAX);
uint64_t input_fence_timeout_ns;
uint32_t num_dim_layers;
uint32_t cwb_enc_mask;
struct sde_hw_dim_layer dim_layer[SDE_MAX_DIM_LAYERS];
uint32_t num_ds;
uint32_t num_ds_enabled;
@@ -880,6 +882,22 @@ static inline bool sde_crtc_atomic_check_has_modeset(
return (crtc_state && drm_atomic_crtc_needs_modeset(crtc_state));
}
static inline bool sde_crtc_state_in_clone_mode(struct drm_encoder *encoder,
struct drm_crtc_state *state)
{
struct sde_crtc_state *cstate;
if (!state || !encoder)
return false;
cstate = to_sde_crtc_state(state);
if (sde_encoder_in_clone_mode(encoder) ||
(cstate->cwb_enc_mask & drm_encoder_mask(encoder)))
return true;
return false;
}
/**
* sde_crtc_get_secure_transition - determines the operations to be
* performed before transitioning to secure state