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 1c29618f4ddbacaab8029b6fcec5cb5bfdd285a9..f29194a74a19d980ce5f2f8015d5c817aff9285d 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 d0c8b38b96ce53a54d3c9af6c68794f21deb7d29..87a19e0c0e67c2439c0f233afc848e81a7d55f83 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);