From: Lucas De Marchi Date: Sat, 18 Sep 2021 02:57:52 +0000 (-0700) Subject: drm/i915: rename debugfs_engines files X-Git-Tag: baikal/mips/sdk6.1~7173^2~8^2~63 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=0c6a7a4b5fb720cb5a16cd6ec2bef79398c5d552;p=kernel.git drm/i915: rename debugfs_engines files We shouldn't be using debugfs_ namespace for this functionality. Rename debugfs_engines.[ch] to intel_gt_engines_debugfs.[ch] and then make functions, defines and structs follow suit. Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210918025754.1254705-2-lucas.demarchi@intel.com --- diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 7eab4edae2b67..3c68909d9066d 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -78,7 +78,6 @@ i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o # "Graphics Technology" (aka we talk to the gpu) gt-y += \ - gt/debugfs_engines.o \ gt/debugfs_gt_pm.o \ gt/gen2_engine_cs.o \ gt/gen6_engine_cs.o \ @@ -100,6 +99,7 @@ gt-y += \ gt/intel_gt_buffer_pool.o \ gt/intel_gt_clock_utils.o \ gt/intel_gt_debugfs.o \ + gt/intel_gt_engines_debugfs.o \ gt/intel_gt_irq.o \ gt/intel_gt_pm.o \ gt/intel_gt_pm_irq.o \ diff --git a/drivers/gpu/drm/i915/gt/debugfs_engines.c b/drivers/gpu/drm/i915/gt/debugfs_engines.c deleted file mode 100644 index 2980dac5b1718..0000000000000 --- a/drivers/gpu/drm/i915/gt/debugfs_engines.c +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: MIT - -/* - * Copyright © 2019 Intel Corporation - */ - -#include - -#include "debugfs_engines.h" -#include "i915_drv.h" /* for_each_engine! */ -#include "intel_engine.h" -#include "intel_gt_debugfs.h" - -static int engines_show(struct seq_file *m, void *data) -{ - struct intel_gt *gt = m->private; - struct intel_engine_cs *engine; - enum intel_engine_id id; - struct drm_printer p; - - p = drm_seq_file_printer(m); - for_each_engine(engine, gt, id) - intel_engine_dump(engine, &p, "%s\n", engine->name); - - return 0; -} -DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(engines); - -void debugfs_engines_register(struct intel_gt *gt, struct dentry *root) -{ - static const struct intel_gt_debugfs_file files[] = { - { "engines", &engines_fops }, - }; - - intel_gt_debugfs_register_files(root, files, ARRAY_SIZE(files), gt); -} diff --git a/drivers/gpu/drm/i915/gt/debugfs_engines.h b/drivers/gpu/drm/i915/gt/debugfs_engines.h deleted file mode 100644 index f69257eaa1cc5..0000000000000 --- a/drivers/gpu/drm/i915/gt/debugfs_engines.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: MIT */ -/* - * Copyright © 2019 Intel Corporation - */ - -#ifndef DEBUGFS_ENGINES_H -#define DEBUGFS_ENGINES_H - -struct intel_gt; -struct dentry; - -void debugfs_engines_register(struct intel_gt *gt, struct dentry *root); - -#endif /* DEBUGFS_ENGINES_H */ diff --git a/drivers/gpu/drm/i915/gt/intel_gt_debugfs.c b/drivers/gpu/drm/i915/gt/intel_gt_debugfs.c index b196480082653..3c77c2965e194 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_debugfs.c +++ b/drivers/gpu/drm/i915/gt/intel_gt_debugfs.c @@ -5,10 +5,10 @@ #include -#include "debugfs_engines.h" #include "debugfs_gt_pm.h" #include "i915_drv.h" #include "intel_gt_debugfs.h" +#include "intel_gt_engines_debugfs.h" #include "intel_sseu_debugfs.h" #include "uc/intel_uc_debugfs.h" @@ -23,7 +23,7 @@ void intel_gt_debugfs_register(struct intel_gt *gt) if (IS_ERR(root)) return; - debugfs_engines_register(gt, root); + intel_gt_engines_debugfs_register(gt, root); debugfs_gt_pm_register(gt, root); intel_sseu_debugfs_register(gt, root); diff --git a/drivers/gpu/drm/i915/gt/intel_gt_engines_debugfs.c b/drivers/gpu/drm/i915/gt/intel_gt_engines_debugfs.c new file mode 100644 index 0000000000000..8f9b874fdc9c8 --- /dev/null +++ b/drivers/gpu/drm/i915/gt/intel_gt_engines_debugfs.c @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT + +/* + * Copyright © 2019 Intel Corporation + */ + +#include + +#include "i915_drv.h" /* for_each_engine! */ +#include "intel_engine.h" +#include "intel_gt_debugfs.h" +#include "intel_gt_engines_debugfs.h" + +static int engines_show(struct seq_file *m, void *data) +{ + struct intel_gt *gt = m->private; + struct intel_engine_cs *engine; + enum intel_engine_id id; + struct drm_printer p; + + p = drm_seq_file_printer(m); + for_each_engine(engine, gt, id) + intel_engine_dump(engine, &p, "%s\n", engine->name); + + return 0; +} +DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(engines); + +void intel_gt_engines_debugfs_register(struct intel_gt *gt, struct dentry *root) +{ + static const struct intel_gt_debugfs_file files[] = { + { "engines", &engines_fops }, + }; + + intel_gt_debugfs_register_files(root, files, ARRAY_SIZE(files), gt); +} diff --git a/drivers/gpu/drm/i915/gt/intel_gt_engines_debugfs.h b/drivers/gpu/drm/i915/gt/intel_gt_engines_debugfs.h new file mode 100644 index 0000000000000..dda113452da9d --- /dev/null +++ b/drivers/gpu/drm/i915/gt/intel_gt_engines_debugfs.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef INTEL_GT_ENGINES_DEBUGFS_H +#define INTEL_GT_ENGINES_DEBUGFS_H + +struct intel_gt; +struct dentry; + +void intel_gt_engines_debugfs_register(struct intel_gt *gt, struct dentry *root); + +#endif /* INTEL_GT_ENGINES_DEBUGFS_H */