Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: fix timeout calculation

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Christian König and committed by
Alex Deucher
0f117704 dbedff05

+1 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
··· 352 352 if (((int64_t)timeout_ns) < 0) 353 353 return MAX_SCHEDULE_TIMEOUT; 354 354 355 - timeout = ktime_sub_ns(ktime_get(), timeout_ns); 355 + timeout = ktime_sub(ns_to_ktime(timeout_ns), ktime_get()); 356 356 if (ktime_to_ns(timeout) < 0) 357 357 return 0; 358 358