drm/amdgpu: fix timeout calculation

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
tirimbino
Christian König 10 years ago committed by Alex Deucher
parent dbedff05d1
commit 0f11770417
  1. 2
      drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c

@ -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…
Cancel
Save