Prechádzať zdrojové kódy

disp: msm: sde: disable hw_fence for cmd/vid mode switch

This change disables hw_fences when a mode switch
from video to command mode or command to video mode
is ongoing.

Change-Id: I6f99226b59b381c6d2ff34a85753f8608080f546
Signed-off-by: Christina Oliveira <[email protected]>
Christina Oliveira 3 rokov pred
rodič
commit
5f554a52b9
1 zmenil súbory, kde vykonal 6 pridanie a 1 odobranie
  1. 6 1
      msm/sde/sde_crtc.c

+ 6 - 1
msm/sde/sde_crtc.c

@@ -3715,8 +3715,13 @@ static int _sde_crtc_fences_wait_list(struct drm_crtc *crtc, bool use_hw_fences,
 	u32 num_hw_fences = 0;
 	ktime_t kt_end, kt_wait;
 	uint32_t wait_ms = 1;
+	struct msm_display_mode *msm_mode;
+	bool mode_switch;
 	int i, rc = 0;
 
+	msm_mode = sde_crtc_get_msm_mode(crtc->state);
+	mode_switch = msm_is_mode_seamless_poms(msm_mode);
+
 	/* use monotonic timer to limit total fence wait time */
 	kt_end = ktime_add_ns(ktime_get(),
 		to_sde_crtc_state(crtc->state)->input_fence_timeout_ns);
@@ -3724,7 +3729,7 @@ static int _sde_crtc_fences_wait_list(struct drm_crtc *crtc, bool use_hw_fences,
 	drm_atomic_crtc_for_each_plane(plane, crtc) {
 
 		/* check if input-fences are hw fences and if they are, add them to the list */
-		if (use_hw_fences) {
+		if (use_hw_fences && !mode_switch) {
 
 			dma_hw_fences[num_hw_fences] = _sde_plane_get_input_hw_fence(plane);