xref: /linux/drivers/gpu/drm/xe/xe_uc_debugfs.c (revision 6c7353836a91b1479e6b81791cdc163fb04b4834)
1 // SPDX-License-Identifier: MIT
2 /*
3  * Copyright © 2022 Intel Corporation
4  */
5 
6 #include <drm/drm_debugfs.h>
7 
8 #include "xe_gt.h"
9 #include "xe_guc_debugfs.h"
10 #include "xe_huc_debugfs.h"
11 #include "xe_macros.h"
12 #include "xe_uc_debugfs.h"
13 
14 void xe_uc_debugfs_register(struct xe_uc *uc, struct dentry *parent)
15 {
16 	struct dentry *root;
17 
18 	root = debugfs_create_dir("uc", parent);
19 	if (IS_ERR(root)) {
20 		XE_WARN_ON("Create UC directory failed");
21 		return;
22 	}
23 
24 	xe_guc_debugfs_register(&uc->guc, root);
25 	xe_huc_debugfs_register(&uc->huc, root);
26 }
27