summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-07-08 16:58:48 +0200
committerAlex Deucher <alexander.deucher@amd.com>2015-07-09 17:40:11 +0200
commit0f11770417d849558c727ed20e1cd07444e15a00 (patch)
treeb9bfb2a515c979b38c5ba2a9ef521ba864fdb5fe /drivers/gpu
parentdrm/radeon: check if BO_VA is set before adding it to the invalidation list (diff)
downloadlinux-0f11770417d849558c727ed20e1cd07444e15a00.tar.xz
linux-0f11770417d849558c727ed20e1cd07444e15a00.zip
drm/amdgpu: fix timeout calculation
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 975edb1000a2..ae43b58c9733 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/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;