]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdgpu: generate doorbell index for userqueue
authorShashank Sharma <shashank.sharma@amd.com>
Thu, 9 May 2024 12:17:13 +0000 (14:17 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Apr 2025 20:48:15 +0000 (16:48 -0400)
commitf09c1e6077abd1bc2ddd2b97e1135215801ca7f9
tree7cf059319069cecd15937c26d2711edb001143df
parent5fb2f7fc21a3668e5794cc0d153641b9719713e1
drm/amdgpu: generate doorbell index for userqueue

The userspace sends us the doorbell object and the relative doobell
index in the object to be used for the usermode queue, but the FW
expects the absolute doorbell index on the PCI BAR in the MQD. This
patch adds a function to convert this relative doorbell index to
absolute doorbell index.

V5:  Fix the db object reference leak (Christian)
V6:  Pin the doorbell bo in userqueue_create() function, and unpin it
     in userqueue destoy (Christian)
V7:  Added missing kfree for queue in error cases
     Added Alex's R-B
V8:  Rebase
V9:  Changed the function names from gfx_v11* to mes_v11*
V10: Rebase
V11: Rebase

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c
drivers/gpu/drm/amd/amdgpu/mes_v11_0_userqueue.c
drivers/gpu/drm/amd/include/amdgpu_userqueue.h