drm/kms/radeon: Use high precision timestamps for pageflip completion events.
authorMario Kleiner <mario.kleiner@tuebingen.mpg.de>
Sun, 21 Nov 2010 15:59:03 +0000 (10:59 -0500)
committerDave Airlie <airlied@redhat.com>
Mon, 22 Nov 2010 01:51:34 +0000 (11:51 +1000)
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_display.c

index f6493f444faa2dbc326cd503e2a64701696f5b36..15f24f2ee04d670714c590605abc40d5f86201d1 100644 (file)
@@ -259,8 +259,7 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id)
        /* wakeup userspace */
        if (work->event) {
                e = work->event;
-               do_gettimeofday(&now);
-               e->event.sequence = drm_vblank_count(rdev->ddev, radeon_crtc->crtc_id);
+               e->event.sequence = drm_vblank_count_and_time(rdev->ddev, crtc_id, &now);
                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);