diff mbox series

[RFC,7/7] drm/i915: Do not call drm_crtc_arm_vblank_event in async flips

Message ID 20200306113927.16904-8-karthik.b.s@intel.com (mailing list archive)
State New, archived
Headers show
Series Asynchronous flip implementation for i915 | expand

Commit Message

Karthik B S March 6, 2020, 11:39 a.m. UTC
Since the flip done event will be sent in the flip_done_handler,
no need to add the event to the list and delay it for later.

Signed-off-by: Karthik B S <karthik.b.s@intel.com>
---
 drivers/gpu/drm/i915/display/intel_sprite.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
index deda351719db..95193a521aa9 100644
--- a/drivers/gpu/drm/i915/display/intel_sprite.c
+++ b/drivers/gpu/drm/i915/display/intel_sprite.c
@@ -209,12 +209,14 @@  void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
 		drm_WARN_ON(&dev_priv->drm,
 			    drm_crtc_vblank_get(&crtc->base) != 0);
 
-		spin_lock(&crtc->base.dev->event_lock);
-		drm_crtc_arm_vblank_event(&crtc->base,
-				          new_crtc_state->uapi.event);
-		spin_unlock(&crtc->base.dev->event_lock);
+		if (!new_crtc_state->uapi.async_flip) {
+			spin_lock(&crtc->base.dev->event_lock);
+			drm_crtc_arm_vblank_event(&crtc->base,
+						  new_crtc_state->uapi.event);
+			spin_unlock(&crtc->base.dev->event_lock);
 
-		new_crtc_state->uapi.event = NULL;
+			new_crtc_state->uapi.event = NULL;
+		}
 	}
 
 	local_irq_enable();