diff options
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_fence.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c index 6c5c75cf5e6c..9ed544f8958f 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | |||
@@ -901,11 +901,12 @@ static void vmw_event_fence_action_seq_passed(struct vmw_fence_action *action) | |||
901 | spin_lock_irq(&dev->event_lock); | 901 | spin_lock_irq(&dev->event_lock); |
902 | 902 | ||
903 | if (likely(eaction->tv_sec != NULL)) { | 903 | if (likely(eaction->tv_sec != NULL)) { |
904 | struct timeval tv; | 904 | struct timespec64 ts; |
905 | 905 | ||
906 | do_gettimeofday(&tv); | 906 | ktime_get_ts64(&ts); |
907 | *eaction->tv_sec = tv.tv_sec; | 907 | /* monotonic time, so no y2038 overflow */ |
908 | *eaction->tv_usec = tv.tv_usec; | 908 | *eaction->tv_sec = ts.tv_sec; |
909 | *eaction->tv_usec = ts.tv_nsec / NSEC_PER_USEC; | ||
909 | } | 910 | } |
910 | 911 | ||
911 | drm_send_event_locked(dev, eaction->event); | 912 | drm_send_event_locked(dev, eaction->event); |