KIQ is used for interaction between driver and CP, and not exposed to outside client, as such it doesn't need to be handled by GPU scheduler. Signed-off-by: Monk Liu <Monk.Liu at amd.com> Signed-off-by: Xiangliang Yu <Xiangliang.Yu at amd.com> Signed-off-by: Trigger Huang <trigger.huang at amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 77b34ec..c2a2d19 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -382,6 +382,10 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, if (!ring->fence_drv.fences) return -ENOMEM; + /* Doesn't need gpu scheduler */ + if (!num_hw_submission) + return 0; + timeout = msecs_to_jiffies(amdgpu_lockup_timeout); if (timeout == 0) { /* diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index 4c99282..a254c38 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -168,6 +168,7 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring, unsigned irq_type) { int r; + int entry_num = amdgpu_sched_hw_submission; if (ring->adev == NULL) { if (adev->num_rings >= AMDGPU_MAX_RINGS) @@ -176,8 +177,9 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring, ring->adev = adev; ring->idx = adev->num_rings++; adev->rings[ring->idx] = ring; - r = amdgpu_fence_driver_init_ring(ring, - amdgpu_sched_hw_submission); + if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ) + entry_num = 0; + r = amdgpu_fence_driver_init_ring(ring, entry_num); if (r) return r; } -- 2.7.4