X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Fetnaviv%2Fdrm%2Fetnaviv_priv.h;h=93bd2d90985e1746eb5f744c4cb400f414b78477;hp=8ceb6c3c4313b310fe50b3128f0c1bb01715ec4f;hb=022327f7535a7d27f965af7c318005a56b44ab85;hpb=a92a483ff7feee1a903fd1f4caab9c2a035882b8 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