drm/msm: Simplify vblank event delivery
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 8 Mar 2017 14:12:54 +0000 (15:12 +0100)
committerRob Clark <robdclark@gmail.com>
Sat, 8 Apr 2017 10:59:32 +0000 (06:59 -0400)
The core takes care of handling the send_event vs. close() issues, we
can remove that driver code.

Cc: Rob Clark <robdclark@gmail.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c

index 1c29618..f29194a 100644 (file)
@@ -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);
 }
index d0c8b38..87a19e0 100644 (file)
@@ -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);