winsys/amdgpu: add a high priority gfx queue

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
This commit is contained in:
Marek Olšák 2025-05-13 16:15:16 -04:00 committed by Marge Bot
parent 59e93b02e0
commit 6785e42511
3 changed files with 7 additions and 1 deletions

View file

@ -281,6 +281,7 @@ static struct radeon_winsys_ctx *amdgpu_ctx_create(struct radeon_winsys *rws,
ctx->aws = amdgpu_winsys(rws);
ctx->reference.count = 1;
ctx->allow_context_lost = allow_context_lost;
ctx->priority = priority;
dev = ctx->aws->dev;
@ -938,7 +939,10 @@ amdgpu_cs_create(struct radeon_cmdbuf *rcs,
} else {
switch (ip_type) {
case AMD_IP_GFX:
acs->queue_index = AMDGPU_QUEUE_GFX;
if (ctx->priority >= RADEON_CTX_PRIORITY_HIGH)
acs->queue_index = AMDGPU_QUEUE_GFX_HIGH_PRIO;
else
acs->queue_index = AMDGPU_QUEUE_GFX;
break;
case AMD_IP_COMPUTE:
acs->queue_index = AMDGPU_QUEUE_COMPUTE;

View file

@ -38,6 +38,7 @@ struct amdgpu_ctx {
/* Lost context status due to ioctl and allocation failures. */
enum pipe_reset_status sw_status;
enum radeon_ctx_priority priority;
};
struct amdgpu_cs_buffer {

View file

@ -119,6 +119,7 @@ struct amdgpu_screen_winsys {
/* Queues using the fence ring. */
enum amdgpu_queue_index {
AMDGPU_QUEUE_GFX,
AMDGPU_QUEUE_GFX_HIGH_PRIO,
AMDGPU_QUEUE_COMPUTE,
AMDGPU_QUEUE_SDMA,
AMDGPU_MAX_QUEUES,