diff options
| author | Shashank Sharma <[email protected]> | 2023-07-14 14:22:38 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-08-07 21:14:07 +0000 |
| commit | e3cbb1f404b65211218002df00aead255dfb1c04 (patch) | |
| tree | fa7742f72d2a0f2d71fbebdf50256ab7f30ea546 /drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c | |
| parent | drm/amdgpu: remove unused functions and variables (diff) | |
| download | kernel-e3cbb1f404b65211218002df00aead255dfb1c04.tar.gz kernel-e3cbb1f404b65211218002df00aead255dfb1c04.zip | |
drm/amdgpu: use doorbell mgr for MES kernel doorbells
This patch:
- Removes the existing doorbell management code, and its variables
from the doorbell_init function, it will be done in doorbell
manager now.
- uses the doorbell page created for MES kernel level needs (doorbells
for MES self tests)
- current MES code was allocating MES doorbells in MES process context,
but those were getting written using kernel doorbell calls. This patch
instead allocates a MES kernel doorbell for this (in add_hw_queue).
V2: Create an extra page of doorbells for MES during kernel doorbell
creation (Alex)
V4: Move MES doorbell size and page offset objects in this patch from
patch 6.
Cc: Alex Deucher <[email protected]>
Cc: Christian Koenig <[email protected]>
Reviewed-by: Christian Koenig <[email protected]>
Signed-off-by: Shashank Sharma <[email protected]>
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c index 423f2fd405af..da4be0bbb446 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c @@ -145,6 +145,10 @@ int amdgpu_doorbell_create_kernel_doorbells(struct amdgpu_device *adev) /* Reserve first num_kernel_doorbells (page-aligned) for kernel ops */ size = ALIGN(adev->doorbell.num_kernel_doorbells * sizeof(u32), PAGE_SIZE); + /* Allocate an extra page for MES kernel usages (ring test) */ + adev->mes.db_start_dw_offset = size / sizeof(u32); + size += PAGE_SIZE; + r = amdgpu_bo_create_kernel(adev, size, PAGE_SIZE, |
