mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/amdgpu: add userq object va track helpers
Add the userq object virtual address list_add() helpers for tracking the userq obj va address usage. Signed-off-by: Prike Liang <Prike.Liang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
1bea57ea75
commit
5cfa33fabf
@@ -298,8 +298,9 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr,
|
||||
goto free_mqd;
|
||||
}
|
||||
|
||||
if (amdgpu_userq_input_va_validate(queue->vm, compute_mqd->eop_va,
|
||||
max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE)))
|
||||
r = amdgpu_userq_input_va_validate(queue, compute_mqd->eop_va,
|
||||
max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE));
|
||||
if (r)
|
||||
goto free_mqd;
|
||||
|
||||
userq_props->eop_gpu_addr = compute_mqd->eop_va;
|
||||
@@ -330,8 +331,9 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr,
|
||||
userq_props->tmz_queue =
|
||||
mqd_user->flags & AMDGPU_USERQ_CREATE_FLAGS_QUEUE_SECURE;
|
||||
|
||||
if (amdgpu_userq_input_va_validate(queue->vm, mqd_gfx_v11->shadow_va,
|
||||
shadow_info.shadow_size))
|
||||
r = amdgpu_userq_input_va_validate(queue, mqd_gfx_v11->shadow_va,
|
||||
shadow_info.shadow_size);
|
||||
if (r)
|
||||
goto free_mqd;
|
||||
|
||||
kfree(mqd_gfx_v11);
|
||||
@@ -350,9 +352,9 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr,
|
||||
r = -ENOMEM;
|
||||
goto free_mqd;
|
||||
}
|
||||
|
||||
if (amdgpu_userq_input_va_validate(queue->vm, mqd_sdma_v11->csa_va,
|
||||
shadow_info.csa_size))
|
||||
r = amdgpu_userq_input_va_validate(queue, mqd_sdma_v11->csa_va,
|
||||
shadow_info.csa_size);
|
||||
if (r)
|
||||
goto free_mqd;
|
||||
|
||||
userq_props->csa_addr = mqd_sdma_v11->csa_va;
|
||||
|
||||
Reference in New Issue
Block a user