diff options
author | Sunil Khatri <sunil.khatri@amd.com> | 2025-07-08 15:45:51 +0530 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2025-07-09 10:14:19 +0200 |
commit | 8f9abaff41de5b5f977b6d0372073563241cb5df (patch) | |
tree | 85530f44d7956a1fe2d0b66817a268466c4af718 /drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | |
parent | 5d95cbf21a4a550f2a2050c947083de2587cf46d (diff) |
drm/amdgpu: fix MQD debugfs undefined symbol when DEBUG_FS=n
Fix undefined reference to amdgpu_mqd_info_fops during
debugfs_create_file if DEBUG_FS=n
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Link: https://lore.kernel.org/r/20250708101551.68033-1-sunil.khatri@amd.com
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c index 115d53bc9a8d..b1b80efc7993 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c @@ -319,8 +319,9 @@ amdgpu_userq_destroy(struct drm_file *filp, int queue_id) } amdgpu_bo_unref(&queue->db_obj.obj); +#if defined(CONFIG_DEBUG_FS) debugfs_remove_recursive(queue->debugfs_queue); - +#endif r = amdgpu_userq_unmap_helper(uq_mgr, queue); amdgpu_userq_cleanup(uq_mgr, queue, queue_id); mutex_unlock(&uq_mgr->userq_mutex); @@ -523,9 +524,11 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args) if (!queue_name) return -ENOMEM; +#if defined(CONFIG_DEBUG_FS) /* Queue dentry per client to hold MQD information */ queue->debugfs_queue = debugfs_create_dir(queue_name, filp->debugfs_client); debugfs_create_file("mqd_info", 0444, queue->debugfs_queue, queue, &amdgpu_mqd_info_fops); +#endif kfree(queue_name); args->out.queue_id = qid; |