From 022327f7535a7d27f965af7c318005a56b44ab85 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= Date: Thu, 23 Jan 2020 09:17:07 +0100 Subject: [PATCH] etnaviv: drm: Use NSEC_PER_SEC MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Guido Günther Reviewed-by: Jonathan Marek Reviewed-by: Christian Gmeiner Part-of: --- src/etnaviv/drm/etnaviv_priv.h | 5 +++-- 1 file 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 -- 2.30.2