mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 19:34:14 +07:00
9dd4b06544
The GT system is becoming more and more a stand-alone system in i915 and it's fair to assign it its own debugfs directory. rc6, rps and llc debugfs files are gt related, move them into the gt debugfs directory. Signed-off-by: Andi Shyti <andi.shyti@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20191222144046.1674865-3-chris@chris-wilson.co.uk
43 lines
834 B
C
43 lines
834 B
C
// SPDX-License-Identifier: MIT
|
|
|
|
/*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#include <linux/debugfs.h>
|
|
|
|
#include "debugfs_engines.h"
|
|
#include "debugfs_gt.h"
|
|
#include "debugfs_gt_pm.h"
|
|
#include "i915_drv.h"
|
|
|
|
void debugfs_gt_register(struct intel_gt *gt)
|
|
{
|
|
struct dentry *root;
|
|
|
|
if (!gt->i915->drm.primary->debugfs_root)
|
|
return;
|
|
|
|
root = debugfs_create_dir("gt", gt->i915->drm.primary->debugfs_root);
|
|
if (IS_ERR(root))
|
|
return;
|
|
|
|
debugfs_engines_register(gt, root);
|
|
debugfs_gt_pm_register(gt, root);
|
|
}
|
|
|
|
void debugfs_gt_register_files(struct intel_gt *gt,
|
|
struct dentry *root,
|
|
const struct debugfs_gt_file *files,
|
|
unsigned long count)
|
|
{
|
|
while (count--) {
|
|
if (!files->eval || files->eval(gt))
|
|
debugfs_create_file(files->name,
|
|
0444, root, gt,
|
|
files->fops);
|
|
|
|
files++;
|
|
}
|
|
}
|