Browse Source

disp: msm: sde: perform only soft reset during timeout scenarios

During wait for commit done failure cases in the current
code in video mode and command mode(posted start), global
atomic state for current crtc state will be assigned NULL
during state swap which will lead to crash while using
drm_atomic_crtc_state_for_each_plane API. Also in such
timeout cases, border color staging and kickoff being
done without any vblank wait might lead to inconsistent
state because of configuration overriding from the next
commit. Since the timeout is observed at the end of commit
cycle, only soft reset should be done here and remaining
in the next commit cycle.

Change-Id: I0d42dc27035f4f79394aeec347d797c99ed76e5f
Signed-off-by: Yashwanth <[email protected]>
Yashwanth 4 years ago
parent
commit
4f8792dfc6
1 changed files with 5 additions and 2 deletions
  1. 5 2
      msm/sde/sde_crtc.c

+ 5 - 2
msm/sde/sde_crtc.c

@@ -3891,8 +3891,11 @@ int sde_crtc_reset_hw(struct drm_crtc *crtc, struct drm_crtc_state *old_state,
 		}
 		}
 	}
 	}
 
 
-	/* Early out if simple ctl reset succeeded */
-	if (i == sde_crtc->num_ctls)
+	/*
+	 * Early out if simple ctl reset succeeded or reset is
+	 * being performed after timeout
+	 */
+	if (i == sde_crtc->num_ctls || crtc->state == old_state)
 		return 0;
 		return 0;
 
 
 	SDE_DEBUG("crtc%d: issuing hard reset\n", DRMID(crtc));
 	SDE_DEBUG("crtc%d: issuing hard reset\n", DRMID(crtc));