diff options
author | Rob Clark <rob@ti.com> | 2012-03-11 22:11:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-13 18:44:44 -0400 |
commit | 7411f9cfe67f5dd54333d2fe7e2a677c42666f99 (patch) | |
tree | 9466f72dd5d487c5d16d444fe30a9c82467fc269 /drivers/staging | |
parent | 72d0c3363e88d1816b0fef3687ff58e6553a7889 (diff) |
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.c | 10 |
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) | |||
134 | 134 | ||
135 | /* wakeup userspace */ | 135 | /* wakeup userspace */ |
136 | if (event) { | 136 | if (event) { |
137 | do_gettimeofday(&now); | ||
138 | |||
137 | spin_lock_irqsave(&dev->event_lock, flags); | 139 | spin_lock_irqsave(&dev->event_lock, flags); |
140 | /* TODO: we can't yet use the vblank time accounting, | ||
141 | * because omapdss lower layer is the one that knows | ||
142 | * the irq # and registers the handler, which more or | ||
143 | * less defeats how drm_irq works.. for now just fake | ||
144 | * the sequence number and use gettimeofday.. | ||
145 | * | ||
138 | event->event.sequence = drm_vblank_count_and_time( | 146 | event->event.sequence = drm_vblank_count_and_time( |
139 | dev, omap_crtc->id, &now); | 147 | dev, omap_crtc->id, &now); |
148 | */ | ||
149 | event->event.sequence = sequence++; | ||
140 | event->event.tv_sec = now.tv_sec; | 150 | event->event.tv_sec = now.tv_sec; |
141 | event->event.tv_usec = now.tv_usec; | 151 | event->event.tv_usec = now.tv_usec; |
142 | list_add_tail(&event->base.link, | 152 | list_add_tail(&event->base.link, |