aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2012-03-11 21:11:22 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-13 15:44:44 -0700
commit7411f9cfe67f5dd54333d2fe7e2a677c42666f99 (patch)
tree9466f72dd5d487c5d16d444fe30a9c82467fc269 /drivers/staging
parentstaging: drm/omap: send page-flip event after endwin (diff)
downloadlinux-dev-7411f9cfe67f5dd54333d2fe7e2a677c42666f99.tar.xz
linux-dev-7411f9cfe67f5dd54333d2fe7e2a677c42666f99.zip
staging: drm/omap: use current time for page-flip event
Because we don't have vblank hooked up via drm_irq (which is a bit awkward due to separation between omapdss (which knows the irq #) and omapdrm, for now use gettimeofday to have a semi-sane timestamp in the page-flip event. Otherwise apps like weston drm compositor, which use the timestamp in it's animations, get highly confused. Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/omapdrm/omap_crtc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c
index 13e3c7f7d2b9..490a7f15604b 100644
--- a/drivers/staging/omapdrm/omap_crtc.c
+++ b/drivers/staging/omapdrm/omap_crtc.c
@@ -134,9 +134,19 @@ static void vblank_cb(void *arg)
/* wakeup userspace */
if (event) {
+ do_gettimeofday(&now);
+
spin_lock_irqsave(&dev->event_lock, flags);
+ /* TODO: we can't yet use the vblank time accounting,
+ * because omapdss lower layer is the one that knows
+ * the irq # and registers the handler, which more or
+ * less defeats how drm_irq works.. for now just fake
+ * the sequence number and use gettimeofday..
+ *
event->event.sequence = drm_vblank_count_and_time(
dev, omap_crtc->id, &now);
+ */
+ event->event.sequence = sequence++;
event->event.tv_sec = now.tv_sec;
event->event.tv_usec = now.tv_usec;
list_add_tail(&event->base.link,