Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c6d649c authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran Committed by Ray Zhang
Browse files

disp: msm: sde: avoid encoder power-collapse with pending frames



The encoder idle work is scheduled during the frame-done event
to be executed after a timeout. During the execution, the check
for any on-going/pending frames is invalid as it checks for > 1.
Fix it to check for any non-zero frame-pending and avoid
power-collapse.

Change-Id: If7715ee56cc9bfa63787811458f4fc91de540013
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
Signed-off-by: default avatarRay Zhang <rayz@codeaurora.org>
Signed-off-by: default avatarBruce Hoo <bingchua@codeaurora.org>
parent ff76cdcc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2696,7 +2696,7 @@ static int sde_encoder_resource_control(struct drm_encoder *drm_enc,
					SDE_EVTLOG_ERROR);
			mutex_unlock(&sde_enc->rc_lock);
			return 0;
		} else if (sde_crtc_frame_pending(sde_enc->crtc) > 1) {
		} else if (sde_crtc_frame_pending(sde_enc->crtc)) {
			SDE_DEBUG_ENC(sde_enc, "skip idle entry");
			SDE_EVT32(DRMID(drm_enc), sw_event, sde_enc->rc_state,
					sde_crtc_frame_pending(sde_enc->crtc),