[PATCH] drm/amdgpu: fix scheduler timeout calc

Cui, Flora Flora.Cui at amd.com
Mon Jun 24 08:50:29 UTC 2019


scheduler timeout is in jiffies

Change-Id: I26708c163db943ff8d930dd81bcab4b4b9d84eb2
Signed-off-by: Flora Cui <flora.cui at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index cbcaa7c..2edaa6c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -481,6 +481,9 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
 			break;
 		}
 
+		if (timeout != MAX_SCHEDULE_TIMEOUT)
+			timeout = msecs_to_jiffies(timeout);
+
 		r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,
 				   num_hw_submission, amdgpu_job_hang_limit,
 				   timeout, ring->name);
-- 
2.7.4



More information about the amd-gfx mailing list