projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
etnaviv: drm: Don't miscalculate timeout
[mesa.git]
/
src
/
etnaviv
/
drm
/
etnaviv_priv.h
diff --git
a/src/etnaviv/drm/etnaviv_priv.h
b/src/etnaviv/drm/etnaviv_priv.h
index 2ab0e473ea919cfeb978c00edc43b5c8acc370be..8ceb6c3c4313b310fe50b3128f0c1bb01715ec4f 100644
(file)
--- a/
src/etnaviv/drm/etnaviv_priv.h
+++ b/
src/etnaviv/drm/etnaviv_priv.h
@@
-204,10
+204,9
@@
struct etna_perfmon_signal
static inline void get_abs_timeout(struct drm_etnaviv_timespec *tv, uint64_t ns)
{
struct timespec t;
static inline void get_abs_timeout(struct drm_etnaviv_timespec *tv, uint64_t ns)
{
struct timespec t;
- uint32_t s = ns / 1000000000;
clock_gettime(CLOCK_MONOTONIC, &t);
clock_gettime(CLOCK_MONOTONIC, &t);
- tv->tv_sec = t.tv_sec +
s
;
- tv->tv_nsec = t.tv_nsec + ns
- (s * 1000000000)
;
+ tv->tv_sec = t.tv_sec +
ns / 1000000000
;
+ tv->tv_nsec = t.tv_nsec + ns
% 1000000000
;
}
#if HAVE_VALGRIND
}
#if HAVE_VALGRIND