summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/include/amdgpu_userqueue.h
diff options
context:
space:
mode:
authorShashank Sharma <shashank.sharma@amd.com>2024-05-09 14:17:13 +0200
committerAlex Deucher <alexander.deucher@amd.com>2025-04-08 16:48:15 -0400
commitf09c1e6077abd1bc2ddd2b97e1135215801ca7f9 (patch)
tree7cf059319069cecd15937c26d2711edb001143df /drivers/gpu/drm/amd/include/amdgpu_userqueue.h
parent5fb2f7fc21a3668e5794cc0d153641b9719713e1 (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/amd/include/amdgpu_userqueue.h')
-rw-r--r--drivers/gpu/drm/amd/include/amdgpu_userqueue.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/include/amdgpu_userqueue.h b/drivers/gpu/drm/amd/include/amdgpu_userqueue.h
index ffe8a3d73756..a653e31350c5 100644
--- a/drivers/gpu/drm/amd/include/amdgpu_userqueue.h
+++ b/drivers/gpu/drm/amd/include/amdgpu_userqueue.h
@@ -44,6 +44,7 @@ struct amdgpu_usermode_queue {
struct amdgpu_userq_mgr *userq_mgr;
struct amdgpu_vm *vm;
struct amdgpu_userq_obj mqd;
+ struct amdgpu_userq_obj db_obj;
struct amdgpu_userq_obj fw_obj;
struct amdgpu_userq_obj wptr_obj;
};