Skip to contentSkip to conversation

drm/amdgpu/userq: add client id for each userq_mgr

PATCH In review Sunil Khatri 1 participant 1 message May 28, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 drm/amdgpu/userq: add client id for each userq_mgr

Add client id the for each userq_mgr which is created per fd to track which fd is for which client that could be used in debugfs entry to derive information like vm and mqd.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 1 +
 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +1 -0
index 295e7186e156..ff71b2b48804 100644
@@ -765,6 +765,7 @@ int amdgpu_userq_mgr_init(struct amdgpu_userq_mgr *userq_mgr, struct drm_file *f
 	idr_init_base(&userq_mgr->userq_idr, 1);
 	userq_mgr->adev = adev;
 	userq_mgr->file = file_priv;
+	userq_mgr->client_id = file_priv->client_id;
 
 	mutex_lock(&adev->userq_mutex);
 	list_add(&userq_mgr->list, &adev->userq_mgr_list);
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h +1 -0
index ec040c2fd6c9..698de2b28377 100644
@@ -87,6 +87,7 @@ struct amdgpu_userq_mgr {
 	struct delayed_work		resume_work;
 	struct list_head		list;
 	struct drm_file			*file;
+	uint64_t client_id;
 };
 
 struct amdgpu_db_info {
Signature · 1 line
2.34.1