aboutsummaryrefslogtreecommitdiffstats
path: root/src/etnaviv/drm
diff options
context:
space:
mode:
authorGuido Günther <[email protected]>2020-01-23 09:17:07 +0100
committerMarge Bot <[email protected]>2020-05-10 07:32:12 +0000
commit022327f7535a7d27f965af7c318005a56b44ab85 (patch)
tree44b2579ead02b1edd0c7ca615c4077602f380bae /src/etnaviv/drm
parenta92a483ff7feee1a903fd1f4caab9c2a035882b8 (diff)
etnaviv: drm: Use NSEC_PER_SEC
Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3534>
Diffstat (limited to 'src/etnaviv/drm')
-rw-r--r--src/etnaviv/drm/etnaviv_priv.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/etnaviv/drm/etnaviv_priv.h b/src/etnaviv/drm/etnaviv_priv.h
index 8ceb6c3c431..93bd2d90985 100644
--- a/src/etnaviv/drm/etnaviv_priv.h
+++ b/src/etnaviv/drm/etnaviv_priv.h
@@ -42,6 +42,7 @@
#include "util/list.h"
#include "util/macros.h"
+#include "util/timespec.h"
#include "util/u_atomic.h"
#include "util/u_debug.h"
#include "util/vma.h"
@@ -205,8 +206,8 @@ static inline void get_abs_timeout(struct drm_etnaviv_timespec *tv, uint64_t ns)
{
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
- tv->tv_sec = t.tv_sec + ns / 1000000000;
- tv->tv_nsec = t.tv_nsec + ns % 1000000000;
+ tv->tv_sec = t.tv_sec + ns / NSEC_PER_SEC;
+ tv->tv_nsec = t.tv_nsec + ns % NSEC_PER_SEC;
}
#if HAVE_VALGRIND