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.

Signed-off-by: Sunil Khatri <sunil.kha...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index 295e7186e156..ff71b2b48804 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -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);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
index ec040c2fd6c9..698de2b28377 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
@@ -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 {
-- 
2.34.1

Reply via email to