diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2025-04-12 19:59:38 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2025-04-22 15:51:45 +0300 |
commit | e67b95f0cd5e8dd57a9df5d5d15da6ba7847808a (patch) | |
tree | fc2508f74b1f3ce0f042195cd4ef877915dee733 /drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | |
parent | ba324ffb25999e14b8488d085ae9916d6f4a6bcf (diff) | |
download | linux-e67b95f0cd5e8dd57a9df5d5d15da6ba7847808a.tar.xz |
drm/amdgpu: switch from queue_active to queue state
Track the state of the queue rather than simple active vs
not. This is needed for other states (hung, preempted, etc.).
While we are at it, move the state tracking into the user
queue front end code.
Reviewed-by: Prike Liang <Prike.Liang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/mes_userqueue.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c index b3157df8ae10..4c01c3a03095 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c @@ -120,9 +120,6 @@ static int mes_userq_map(struct amdgpu_userq_mgr *uq_mgr, struct mes_add_queue_input queue_input; int r; - if (queue->queue_active) - return 0; - memset(&queue_input, 0x0, sizeof(struct mes_add_queue_input)); queue_input.process_va_start = 0; @@ -155,7 +152,6 @@ static int mes_userq_map(struct amdgpu_userq_mgr *uq_mgr, return r; } - queue->queue_active = true; DRM_DEBUG_DRIVER("Queue (doorbell:%d) mapped successfully\n", userq_props->doorbell_index); return 0; } @@ -168,9 +164,6 @@ static int mes_userq_unmap(struct amdgpu_userq_mgr *uq_mgr, struct amdgpu_userq_obj *ctx = &queue->fw_obj; int r; - if (!queue->queue_active) - return 0; - memset(&queue_input, 0x0, sizeof(struct mes_remove_queue_input)); queue_input.doorbell_offset = queue->doorbell_index; queue_input.gang_context_addr = ctx->gpu_addr + AMDGPU_USERQ_PROC_CTX_SZ; @@ -180,7 +173,6 @@ static int mes_userq_unmap(struct amdgpu_userq_mgr *uq_mgr, amdgpu_mes_unlock(&adev->mes); if (r) DRM_ERROR("Failed to unmap queue in HW, err (%d)\n", r); - queue->queue_active = false; return r; } |