projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c15b4a
)
amdgpu: Make amdgpu_cs_calculate_timeout() return something sensible on error
author
Tom St Denis
<tom.stdenis@amd.com>
Tue, 17 Nov 2015 15:58:36 +0000
(10:58 -0500)
committer
Alex Deucher
<alexander.deucher@amd.com>
Sat, 21 Nov 2015 00:21:48 +0000
(19:21 -0500)
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
amdgpu/amdgpu_cs.c
patch
|
blob
|
history
diff --git
a/amdgpu/amdgpu_cs.c
b/amdgpu/amdgpu_cs.c
index
aa594c4
..
6747158
100644
(file)
--- a/
amdgpu/amdgpu_cs.c
+++ b/
amdgpu/amdgpu_cs.c
@@
-291,8
+291,10
@@
drm_private uint64_t amdgpu_cs_calculate_timeout(uint64_t timeout)
struct timespec current;
uint64_t current_ns;
r = clock_gettime(CLOCK_MONOTONIC, ¤t);
- if (r)
- return r;
+ if (r) {
+ fprintf(stderr, "clock_gettime() returned error (%d)!", errno);
+ return AMDGPU_TIMEOUT_INFINITE;
+ }
current_ns = ((uint64_t)current.tv_sec) * 1000000000ull;
current_ns += current.tv_nsec;