The MES has special handling to track unmap failures for KFD processes when they occur during queue removal. This is because the driver is expected to call remove_queue again after a reset.
Normally, unmap failures aren't remembered during queue removal as cleanup is performed. However, for KFD processes we need to maintain this state. This change sets the is_kfd_process flag to 1 when creating user queues to ensure proper handling of unmap failures during queue removal scenarios. Suggested-by: Chau Kyle-haiChau <kyle-hai.c...@amd.com> Signed-off-by: Jesse Zhang <jesse.zh...@amd.com> --- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c index d6f50b13e2ba..64aa749c58c5 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c @@ -143,7 +143,7 @@ static int mes_userq_map(struct amdgpu_userq_mgr *uq_mgr, queue_input.doorbell_offset = userq_props->doorbell_index; queue_input.page_table_base_addr = amdgpu_gmc_pd_addr(queue->vm->root.bo); queue_input.wptr_mc_addr = queue->wptr_obj.gpu_addr; - + queue_input.is_kfd_process = 1; amdgpu_mes_lock(&adev->mes); r = adev->mes.funcs->add_hw_queue(&adev->mes, &queue_input); amdgpu_mes_unlock(&adev->mes); -- 2.49.0