1 // SPDX-License-Identifier: MIT 2 /* 3 * Copyright © 2020 Intel Corporation 4 */ 5 6 #include <linux/debugfs.h> 7 #include <drm/drm_print.h> 8 9 #include "gt/debugfs_gt.h" 10 #include "intel_guc_debugfs.h" 11 #include "intel_huc_debugfs.h" 12 #include "intel_uc.h" 13 #include "intel_uc_debugfs.h" 14 15 #ifdef notyet 16 17 static int uc_usage_show(struct seq_file *m, void *data) 18 { 19 struct intel_uc *uc = m->private; 20 struct drm_printer p = drm_seq_file_printer(m); 21 22 drm_printf(&p, "[guc] supported:%s wanted:%s used:%s\n", 23 yesno(intel_uc_supports_guc(uc)), 24 yesno(intel_uc_wants_guc(uc)), 25 yesno(intel_uc_uses_guc(uc))); 26 drm_printf(&p, "[huc] supported:%s wanted:%s used:%s\n", 27 yesno(intel_uc_supports_huc(uc)), 28 yesno(intel_uc_wants_huc(uc)), 29 yesno(intel_uc_uses_huc(uc))); 30 drm_printf(&p, "[submission] supported:%s wanted:%s used:%s\n", 31 yesno(intel_uc_supports_guc_submission(uc)), 32 yesno(intel_uc_wants_guc_submission(uc)), 33 yesno(intel_uc_uses_guc_submission(uc))); 34 35 return 0; 36 } 37 DEFINE_GT_DEBUGFS_ATTRIBUTE(uc_usage); 38 39 #endif 40 41 void intel_uc_debugfs_register(struct intel_uc *uc, struct dentry *gt_root) 42 { 43 STUB(); 44 #ifdef notyet 45 static const struct debugfs_gt_file files[] = { 46 { "usage", &uc_usage_fops, NULL }, 47 }; 48 struct dentry *root; 49 50 if (!gt_root) 51 return; 52 53 /* GuC and HuC go always in pair, no need to check both */ 54 if (!intel_uc_supports_guc(uc)) 55 return; 56 57 root = debugfs_create_dir("uc", gt_root); 58 if (IS_ERR(root)) 59 return; 60 61 intel_gt_debugfs_register_files(root, files, ARRAY_SIZE(files), uc); 62 63 intel_guc_debugfs_register(&uc->guc, root); 64 intel_huc_debugfs_register(&uc->huc, root); 65 #endif 66 } 67