drm/amdgpu: fix timeout calculation
authorChristian König <christian.koenig@amd.com>
Wed, 8 Jul 2015 14:58:48 +0000 (16:58 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Jul 2015 15:40:11 +0000 (11:40 -0400)
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c

index 975edb1000a202e3dcd2b7cbe2cc2c8916aa855f..ae43b58c9733a1962cbd6dae4ce42fb8c52fa81a 100644 (file)
@@ -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;