From 9ee92efce94614f40c2ed49fa974b7076e12cb2e Mon Sep 17 00:00:00 2001 From: Akhil Jaiswal Date: Thu, 9 Nov 2023 17:58:11 +0530 Subject: [PATCH] disp: msm: sde: avoid rsvp_nxt allocation for suspend commit During suspend commit, crtc_commit thread is blocked waiting for touch response in drm_panel_notifier_call_chain and rsvp_nxt pointer clear in drm_atomic_state_put is pending (>100ms wait) which was allocated in atomic_check. When resume commit is triggered early, RM poll timeouts are seen due to rsvp_nxt pointer is not cleared and thus causing power on commit failures. This change avoids RM reserve during atomic_check of suspend commit as msm_crtc_set_mode returns early and rsvp_nxt is not used elsewhere in commit path. Change-Id: I6d76ec7cc07f6961b909febd3d9d932b46052c17 Signed-off-by: Akhil Jaiswal --- msm/sde/sde_encoder.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_encoder.c b/msm/sde/sde_encoder.c index d218782c79..86cc8cd1d4 100644 --- a/msm/sde/sde_encoder.c +++ b/msm/sde/sde_encoder.c @@ -1131,10 +1131,11 @@ static int _sde_encoder_atomic_check_reserve(struct drm_encoder *drm_enc, } /* Skip RM allocation for Primary during CWB usecase */ - if (!crtc_state->mode_changed && !crtc_state->active_changed && + if ((!crtc_state->mode_changed && !crtc_state->active_changed && crtc_state->connectors_changed && !msm_is_private_mode_changed(conn_state) && (conn_state->crtc == - conn_state->connector->state->crtc)) + conn_state->connector->state->crtc)) || + (crtc_state->active_changed && !crtc_state->active)) goto skip_reserve; /* Reserve dynamic resources, indicating atomic_check phase */