forked from Minki/linux
drm/amdgpu: fix timeout calculation
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
dbedff05d1
commit
0f11770417
@ -352,7 +352,7 @@ unsigned long amdgpu_gem_timeout(uint64_t timeout_ns)
|
||||
if (((int64_t)timeout_ns) < 0)
|
||||
return MAX_SCHEDULE_TIMEOUT;
|
||||
|
||||
timeout = ktime_sub_ns(ktime_get(), timeout_ns);
|
||||
timeout = ktime_sub(ns_to_ktime(timeout_ns), ktime_get());
|
||||
if (ktime_to_ns(timeout) < 0)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user