Commit 730c2eb9 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/fence: use the no_scheduler flag

Rather than checking the ring type manually.  We already set
this for MES and KIQ (and a few other special cases).
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent eb0b5d6f
...@@ -469,9 +469,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, ...@@ -469,9 +469,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
if (!ring->fence_drv.fences) if (!ring->fence_drv.fences)
return -ENOMEM; return -ENOMEM;
/* No need to setup the GPU scheduler for KIQ and MES ring */ /* No need to setup the GPU scheduler for rings that don't need it */
if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ && if (!ring->no_scheduler) {
ring->funcs->type != AMDGPU_RING_TYPE_MES) {
switch (ring->funcs->type) { switch (ring->funcs->type) {
case AMDGPU_RING_TYPE_GFX: case AMDGPU_RING_TYPE_GFX:
timeout = adev->gfx_timeout; timeout = adev->gfx_timeout;
...@@ -543,6 +542,7 @@ void amdgpu_fence_driver_fini(struct amdgpu_device *adev) ...@@ -543,6 +542,7 @@ void amdgpu_fence_driver_fini(struct amdgpu_device *adev)
if (ring->fence_drv.irq_src) if (ring->fence_drv.irq_src)
amdgpu_irq_put(adev, ring->fence_drv.irq_src, amdgpu_irq_put(adev, ring->fence_drv.irq_src,
ring->fence_drv.irq_type); ring->fence_drv.irq_type);
if (!ring->no_scheduler)
drm_sched_fini(&ring->sched); drm_sched_fini(&ring->sched);
del_timer_sync(&ring->fence_drv.fallback_timer); del_timer_sync(&ring->fence_drv.fallback_timer);
for (j = 0; j <= ring->fence_drv.num_fences_mask; ++j) for (j = 0; j <= ring->fence_drv.num_fences_mask; ++j)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment