Align with KFD and don't set queue priorities for kernel
queues.  This can result in starvation of lower priority
queues.

v2: fix GC 8 and 9

Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c    | 2 --
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c    | 2 --
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c  | 2 --
 4 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index 83750ab4e81b5..ccfbb6fc5f440 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -780,10 +780,8 @@ static void amdgpu_ring_to_mqd_prop(struct amdgpu_ring 
*ring,
        prop->hqd_active = ring->funcs->type == AMDGPU_RING_TYPE_KIQ;
 
        prop->allow_tunneling = is_high_prio_compute;
-       if (is_high_prio_compute || is_high_prio_gfx) {
+       if (is_high_prio_compute || is_high_prio_gfx)
                prop->hqd_pipe_priority = AMDGPU_GFX_PIPE_PRIO_HIGH;
-               prop->hqd_queue_priority = AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM;
-       }
 }
 
 int amdgpu_ring_init_mqd(struct amdgpu_ring *ring)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 49999bdb13499..b29dde9297b20 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -4390,8 +4390,6 @@ static void gfx_v8_0_mqd_set_priority(struct amdgpu_ring 
*ring, struct vi_mqd *m
        if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) {
                if (amdgpu_gfx_is_high_priority_compute_queue(adev, ring)) {
                        mqd->cp_hqd_pipe_priority = AMDGPU_GFX_PIPE_PRIO_HIGH;
-                       mqd->cp_hqd_queue_priority =
-                               AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM;
                }
        }
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index aaf75c82b1bf5..150040625c440 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3540,8 +3540,6 @@ static void gfx_v9_0_mqd_set_priority(struct amdgpu_ring 
*ring, struct v9_mqd *m
        if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) {
                if (amdgpu_gfx_is_high_priority_compute_queue(adev, ring)) {
                        mqd->cp_hqd_pipe_priority = AMDGPU_GFX_PIPE_PRIO_HIGH;
-                       mqd->cp_hqd_queue_priority =
-                               AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM;
                }
        }
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
index e843793112638..cec64a8f21ebd 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
@@ -1817,8 +1817,6 @@ static void gfx_v9_4_3_mqd_set_priority(struct 
amdgpu_ring *ring, struct v9_mqd
        if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) {
                if (amdgpu_gfx_is_high_priority_compute_queue(adev, ring)) {
                        mqd->cp_hqd_pipe_priority = AMDGPU_GFX_PIPE_PRIO_HIGH;
-                       mqd->cp_hqd_queue_priority =
-                               AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM;
                }
        }
 }
-- 
2.53.0

Reply via email to