drm/amdgpu/fence: use the no_scheduler flag
Subsystems (2)
PATCH 1/1 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).
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +4 -4
@@ -469,9 +469,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,if (!ring->fence_drv.fences)return -ENOMEM ; -/* No need to setup the GPU scheduler for KIQ and MES ring */ -if (ring->funcs->type !=AMDGPU_RING_TYPE_KIQ && - ring->funcs->type !=AMDGPU_RING_TYPE_MES ) { +/* No need to setup the GPU scheduler for rings that don't need it */ +if (!ring->no_scheduler) {switch (ring->funcs->type) {case AMDGPU_RING_TYPE_GFX : timeout = adev->gfx_timeout;
@@ -543,7 +542,8 @@ void amdgpu_fence_driver_fini(struct amdgpu_device *adev)if (ring->fence_drv.irq_src)amdgpu_irq_put (adev, ring->fence_drv.irq_src, ring->fence_drv.irq_type); -drm_sched_fini (&ring->sched); +if (!ring->no_scheduler) +drm_sched_fini (&ring->sched);del_timer_sync (&ring->fence_drv.fallback_timer);for (j =0 ; j <= ring->fence_drv.num_fences_mask; ++j)dma_fence_put (ring->fence_drv.fences[j]);
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 02.06.20 um 20:53 schrieb Alex Deucher:
Quoted 4 lines
Rather than checking the ring type manually. We already set this for MES and KIQ (and a few other special cases).
Signed-off-by Alex Deucher <[email protected]>
Reviewed-by Christian König <[email protected]>
Quoted 21 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +2
-3@@ -469,9 +469,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,if (!ring->fence_drv.fences)return -ENOMEM ; -/* No need to setup the GPU scheduler for KIQ and MES ring */ -if (ring->funcs->type !=AMDGPU_RING_TYPE_KIQ && - ring->funcs->type !=AMDGPU_RING_TYPE_MES ) { +/* No need to setup the GPU scheduler for rings that don't need it */ +if (!ring->no_scheduler) {switch (ring->funcs->type) {case AMDGPU_RING_TYPE_GFX : timeout = adev->gfx_timeout;
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c void amdgpu_fence_driver_fini(struct amdgpu_device *adev) · line 549
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +2
-1@@ -543,7 +542,8 @@ void amdgpu_fence_driver_fini(struct amdgpu_device *adev)if (ring->fence_drv.irq_src)amdgpu_irq_put (adev, ring->fence_drv.irq_src, ring->fence_drv.irq_type); -drm_sched_fini (&ring->sched); +if (!ring->no_scheduler) +drm_sched_fini (&ring->sched);del_timer_sync (&ring->fence_drv.fallback_timer);for (j =0 ; j <= ring->fence_drv.num_fences_mask; ++j)dma_fence_put (ring->fence_drv.fences[j]);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx