From 6cdd1f1fe026d2c852aafddb26914d0b98017aa8 Mon Sep 17 00:00:00 2001 From: Veera Sundaram Sankaran Date: Mon, 21 Oct 2019 13:24:38 -0700 Subject: [PATCH] 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: Veera Sundaram Sankaran --- msm/sde/sde_encoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_encoder.c b/msm/sde/sde_encoder.c index a1c9182ff8..19096d994c 100644 --- a/msm/sde/sde_encoder.c +++ b/msm/sde/sde_encoder.c @@ -2581,8 +2581,8 @@ static int _sde_encoder_rc_idle(struct drm_encoder *drm_enc, SDE_EVT32(DRMID(drm_enc), sw_event, sde_enc->rc_state, SDE_EVTLOG_ERROR); goto end; - } else if (sde_crtc_frame_pending(sde_enc->crtc) > 1) { - SDE_ERROR_ENC(sde_enc, "skip idle entry"); + } 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), SDE_EVTLOG_ERROR);