disp: msm: sde: avoid CWB in power on commit

This change depends on HAL change which sets CONNECTOR_SET_CRTC
property to null for cwb conn, if cwb is enabled during power off commit.
This causes power off commit crtc_state's active_changed and
connectors_changed set to true, which is causing seamless_crtc
to true during msm_disable_outputs and this leads to invalid crtc
state. This change modifies the seamless_crtc condition and
the msm_crtc_set_mode callback is early returned during such cases
to power off crtc.

Without this change, during power on commit crtc_duplicate_state
is causing cwb to turn on and the release fence is being created with
+2 offset in such case, leading to late release fence signalling and
further GPU fence timeouts.

Change-Id: Ibe87a8c0e8083d619ee6f502b2a946e1e8ef5553
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
This commit is contained in:
Jayaprakash Madisetty 2021-11-20 12:50:17 +05:30
parent 7c9c407fd5
commit 67ef82eb35

View File

@ -55,7 +55,7 @@ static inline bool _msm_seamless_for_crtc(struct drm_device *dev,
if (msm_is_mode_seamless_dms(&crtc_state->adjusted_mode) && !enable)
return true;
if (!crtc_state->mode_changed && crtc_state->connectors_changed) {
if (!crtc_state->mode_changed && crtc_state->connectors_changed && crtc_state->active) {
for_each_old_connector_in_state(state, connector,
conn_state, i) {
if ((conn_state->crtc == crtc_state->crtc) ||
@ -282,6 +282,9 @@ msm_crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
mode = &new_crtc_state->mode;
adjusted_mode = &new_crtc_state->adjusted_mode;
if (!new_crtc_state->active)
continue;
if (!new_crtc_state->mode_changed &&
new_crtc_state->connectors_changed) {
if (_msm_seamless_for_conn(connector,