On 17/04/2025 13:31, Sunil Khatri wrote:
drm_file will be used in usermode queues code to
enable better process information in logging and hence
add drm_file part of the userq_mgr struct.

update the drm_file pointer in userq_mgr for each
amdgpu_driver_open_kms.

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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 3d319687c1c9..3de3071d66ee 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -1436,6 +1436,7 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct 
drm_file *file_priv)
amdgpu_ctx_mgr_init(&fpriv->ctx_mgr, adev); + fpriv->userq_mgr.file = file_priv;
        r = amdgpu_userq_mgr_init(&fpriv->userq_mgr, adev);
        if (r)
                DRM_WARN("Can't setup usermode queues, use legacy workload 
submission only\n");
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
index 0701f33e6740..fe5d1c8afb9b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
@@ -78,6 +78,7 @@ struct amdgpu_userq_mgr {
        struct amdgpu_device            *adev;
        struct delayed_work             resume_work;
        struct list_head                list;
+       struct drm_file                 *file;
  };
struct amdgpu_db_info {

With the promise you will later move the initialisation into amdgpu_userq_mgr_init():

Reviewed-by: Tvrtko Ursulin <tvrtko.ursu...@igalia.com>

Regards,

Tvrtko

Reply via email to