]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/vmwgfx: use monotonic event timestamps
authorArnd Bergmann <arnd@arndb.de>
Fri, 21 Jun 2019 00:26:41 +0000 (20:26 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 2 Jul 2019 12:18:49 +0000 (14:18 +0200)
commit3f7756dc4aa2fa3b732fa5e1025b0852c156bc26
tree4ab084b02886948462576a09d08d544721b81e6e
parentf7f5b5ea9d30337b354e6c1b95cfd4acdd7d4b3a
drm/vmwgfx: use monotonic event timestamps

BugLink: https://launchpad.net/bugs/1832138
DRM_VMW_EVENT_FENCE_SIGNALED (struct drm_vmw_event_fence) and
DRM_EVENT_VBLANK (struct drm_event_vblank) pass timestamps in 32-bit
seconds/microseconds format.

As of commit c61eef726a78 ("drm: add support for monotonic vblank
timestamps"), other DRM drivers use monotonic times for drm_event_vblank,
but vmwgfx still uses CLOCK_REALTIME for both events, which suffers from
the y2038/y2106 overflow as well as time jumps.

For consistency, this changes vmwgfx to use ktime_get_ts64 as well,
which solves those problems and avoids the deprecated do_gettimeofday()
function.

This should be transparent to to user space, as long as it doesn't
compare the time against the result of gettimeofday().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
(cherry picked from commit 37efe80ce85f76b3b30d7b4ea40550e6a5a5b71a)
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>
Signed-off-by: Daniel van Vugt <daniel.van.vugt@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c