The core takes care of handling the send_event vs. close() issues, we
can remove that driver code.

Cc: Rob Clark <robdcl...@gmail.com>
Cc: linux-arm-...@vger.kernel.org
Cc: freedr...@lists.freedesktop.org
Signed-off-by: Daniel Vetter <daniel.vet...@intel.com>
---
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 12 +++---------
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 12 +++---------
 2 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c 
b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
index 1c29618f4ddb..f29194a74a19 100644
--- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
+++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
@@ -114,15 +114,9 @@ static void complete_flip(struct drm_crtc *crtc, struct 
drm_file *file)
        spin_lock_irqsave(&dev->event_lock, flags);
        event = mdp4_crtc->event;
        if (event) {
-               /* if regular vblank case (!file) or if cancel-flip from
-                * preclose on file that requested flip, then send the
-                * event:
-                */
-               if (!file || (event->base.file_priv == file)) {
-                       mdp4_crtc->event = NULL;
-                       DBG("%s: send event: %p", mdp4_crtc->name, event);
-                       drm_crtc_send_vblank_event(crtc, event);
-               }
+               mdp4_crtc->event = NULL;
+               DBG("%s: send event: %p", mdp4_crtc->name, event);
+               drm_crtc_send_vblank_event(crtc, event);
        }
        spin_unlock_irqrestore(&dev->event_lock, flags);
 }
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c 
b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
index d0c8b38b96ce..87a19e0c0e67 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
@@ -138,15 +138,9 @@ static void complete_flip(struct drm_crtc *crtc, struct 
drm_file *file)
        spin_lock_irqsave(&dev->event_lock, flags);
        event = mdp5_crtc->event;
        if (event) {
-               /* if regular vblank case (!file) or if cancel-flip from
-                * preclose on file that requested flip, then send the
-                * event:
-                */
-               if (!file || (event->base.file_priv == file)) {
-                       mdp5_crtc->event = NULL;
-                       DBG("%s: send event: %p", crtc->name, event);
-                       drm_crtc_send_vblank_event(crtc, event);
-               }
+               mdp5_crtc->event = NULL;
+               DBG("%s: send event: %p", crtc->name, event);
+               drm_crtc_send_vblank_event(crtc, event);
        }
        spin_unlock_irqrestore(&dev->event_lock, flags);
 
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to