On 4/22/2025 2:07 PM, Christian König wrote:
Am 17.04.25 um 18:10 schrieb Sunil Khatri:
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>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursu...@igalia.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);
It would be cleaner to give that as parameter to amdgpu_userq_mgr_init() I
think.
Apart from that Reviewed-by: Christian König <christian.koe...@amd.com>
Thanks Chrisitian, i have that in mind already and will make the change
when pushing to asdn after drm patch [first in the series merged and
pulled back in asdn]
Regards
Sunil Khatri
Regards,
Christian.
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 b2da513b3d02..29c1360d8c8c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
@@ -79,6 +79,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 {