diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 008e1984b7e3..97449e06a242 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |||
@@ -410,6 +410,7 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring, | |||
410 | int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, | 410 | int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, |
411 | unsigned num_hw_submission) | 411 | unsigned num_hw_submission) |
412 | { | 412 | { |
413 | long timeout; | ||
413 | int r; | 414 | int r; |
414 | 415 | ||
415 | /* Check that num_hw_submission is a power of two */ | 416 | /* Check that num_hw_submission is a power of two */ |
@@ -433,9 +434,16 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, | |||
433 | 434 | ||
434 | /* No need to setup the GPU scheduler for KIQ ring */ | 435 | /* No need to setup the GPU scheduler for KIQ ring */ |
435 | if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) { | 436 | if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) { |
437 | /* for non-sriov case, no timeout enforce on compute ring */ | ||
438 | if ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) | ||
439 | && !amdgpu_sriov_vf(ring->adev)) | ||
440 | timeout = MAX_SCHEDULE_TIMEOUT; | ||
441 | else | ||
442 | timeout = msecs_to_jiffies(amdgpu_lockup_timeout); | ||
443 | |||
436 | r = drm_sched_init(&ring->sched, &amdgpu_sched_ops, | 444 | r = drm_sched_init(&ring->sched, &amdgpu_sched_ops, |
437 | num_hw_submission, amdgpu_job_hang_limit, | 445 | num_hw_submission, amdgpu_job_hang_limit, |
438 | msecs_to_jiffies(amdgpu_lockup_timeout), ring->name); | 446 | timeout, ring->name); |
439 | if (r) { | 447 | if (r) { |
440 | DRM_ERROR("Failed to create scheduler on ring %s.\n", | 448 | DRM_ERROR("Failed to create scheduler on ring %s.\n", |
441 | ring->name); | 449 | ring->name); |