Skip to content

Commit 8f9abaf

Browse files
amd-sukhatriChristianKoenigAMD
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Christian König <[email protected]> Signed-off-by: Christian König <[email protected]>
1 parent 5d95cbf commit 8f9abaf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,9 @@ amdgpu_userq_destroy(struct drm_file *filp, int queue_id)
319319
}
320320
amdgpu_bo_unref(&queue->db_obj.obj);
321321

322+
#if defined(CONFIG_DEBUG_FS)
322323
debugfs_remove_recursive(queue->debugfs_queue);
323-
324+
#endif
324325
r = amdgpu_userq_unmap_helper(uq_mgr, queue);
325326
amdgpu_userq_cleanup(uq_mgr, queue, queue_id);
326327
mutex_unlock(&uq_mgr->userq_mutex);
@@ -523,9 +524,11 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)
523524
if (!queue_name)
524525
return -ENOMEM;
525526

527+
#if defined(CONFIG_DEBUG_FS)
526528
/* Queue dentry per client to hold MQD information */
527529
queue->debugfs_queue = debugfs_create_dir(queue_name, filp->debugfs_client);
528530
debugfs_create_file("mqd_info", 0444, queue->debugfs_queue, queue, &amdgpu_mqd_info_fops);
531+
#endif
529532
kfree(queue_name);
530533

531534
args->out.queue_id = qid;

0 commit comments

Comments
 (0)