drm/nouveau: use drm_send_vblank_event() helper
authorRob Clark <rob@ti.com>
Mon, 8 Oct 2012 19:50:41 +0000 (19:50 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 21 May 2013 23:13:40 +0000 (09:13 +1000)
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/nouveau/nouveau_display.c

index 7bf22d4..f17dc2a 100644 (file)
@@ -638,17 +638,8 @@ nouveau_finish_page_flip(struct nouveau_channel *chan,
        }
 
        s = list_first_entry(&fctx->flip, struct nouveau_page_flip_state, head);
-       if (s->event) {
-               struct drm_pending_vblank_event *e = s->event;
-               struct timeval now;
-
-               do_gettimeofday(&now);
-               e->event.sequence = 0;
-               e->event.tv_sec = now.tv_sec;
-               e->event.tv_usec = now.tv_usec;
-               list_add_tail(&e->base.link, &e->base.file_priv->event_list);
-               wake_up_interruptible(&e->base.file_priv->event_wait);
-       }
+       if (s->event)
+               drm_send_vblank_event(dev, -1, s->event);
 
        list_del(&s->head);
        if (ps)