Skip to contentSkip to conversation

drm/i915/gt: change prefix to debugfs functions

PATCH In review Andi Shyti 3 participants 6 messages Feb 10, 2020

Subsystems (2)
lore
Share & tools
lore

Andi Shyti

author
#0 lore raw

PATCH 1/1 drm/i915/gt: change prefix to debugfs functions

"We don't own the debugfs 'namespace' prefix." (Jani Nikula [*])

I agree, change the functions name from "debugfs_*" to "intel_gt_*" prefix.

[*] https://patchwork.freedesktop.org/patch/352553/#comment_651183

---
 drivers/gpu/drm/i915/gt/debugfs_engines.c |  4 ++--
 drivers/gpu/drm/i915/gt/debugfs_engines.h |  2 +-
 drivers/gpu/drm/i915/gt/debugfs_gt.c      | 14 +++++++-------
 drivers/gpu/drm/i915/gt/debugfs_gt.h      | 10 +++++-----
 drivers/gpu/drm/i915/gt/debugfs_gt_pm.c   |  4 ++--
 drivers/gpu/drm/i915/gt/debugfs_gt_pm.h   |  2 +-
 drivers/gpu/drm/i915/gt/intel_gt.c        |  2 +-
 7 files changed, 19 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/gt/debugfs_engines.c +2 -2
index 6a5e9ab20b94..2d4ab974ab67 100644
@@ -26,11 +26,11 @@ static int engines_show(struct seq_file *m, void *data)
 }
 DEFINE_GT_DEBUGFS_ATTRIBUTE(engines);
 
-void debugfs_engines_register(struct intel_gt *gt, struct dentry *root)
+void engines_register_debugfs(struct intel_gt *gt, struct dentry *root)
 {
 	static const struct debugfs_gt_file files[] = {
 		{ "engines", &engines_fops },
 	};
 
-	debugfs_gt_register_files(gt, root, files, ARRAY_SIZE(files));
+	intel_gt_debugfs_register_files(gt, root, files, ARRAY_SIZE(files));
 }
drivers/gpu/drm/i915/gt/debugfs_engines.h +1 -1
index f69257eaa1cc..942876f6e837 100644
@@ -9,6 +9,6 @@
 struct intel_gt;
 struct dentry;
 
-void debugfs_engines_register(struct intel_gt *gt, struct dentry *root);
+void engines_register_debugfs(struct intel_gt *gt, struct dentry *root);
 
 #endif /* DEBUGFS_ENGINES_H */
drivers/gpu/drm/i915/gt/debugfs_gt.c +7 -7
index 75255aaacaed..e7f2f1bf9f62 100644
@@ -11,7 +11,7 @@
 #include "debugfs_gt_pm.h"
 #include "i915_drv.h"
 
-void debugfs_gt_register(struct intel_gt *gt)
+void intel_gt_debugfs_register(struct intel_gt *gt)
 {
 	struct dentry *root;
 
@@ -22,14 +22,14 @@ void debugfs_gt_register(struct intel_gt *gt)
 	if (IS_ERR(root))
 		return;
 
-	debugfs_engines_register(gt, root);
-	debugfs_gt_pm_register(gt, root);
+	engines_register_debugfs(gt, root);
+	intel_gt_pm_register_debugfs(gt, root);
 }
 
-void debugfs_gt_register_files(struct intel_gt *gt,
-			       struct dentry *root,
-			       const struct debugfs_gt_file *files,
-			       unsigned long count)
+void intel_gt_debugfs_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))
drivers/gpu/drm/i915/gt/debugfs_gt.h +5 -5
index 4ea0f06cda8f..d2aab5701c59 100644
@@ -23,7 +23,7 @@ static const struct file_operations __name ## _fops = {			\
 	.release = single_release,					\
 }
 
-void debugfs_gt_register(struct intel_gt *gt);
+void intel_gt_debugfs_register(struct intel_gt *gt);
 
 struct debugfs_gt_file {
 	const char *name;
@@ -31,9 +31,9 @@ struct debugfs_gt_file {
 	bool (*eval)(const struct intel_gt *gt);
 };
 
-void debugfs_gt_register_files(struct intel_gt *gt,
-			       struct dentry *root,
-			       const struct debugfs_gt_file *files,
-			       unsigned long count);
+void intel_gt_debugfs_register_files(struct intel_gt *gt,
+				     struct dentry *root,
+				     const struct debugfs_gt_file *files,
+				     unsigned long count);
 
 #endif /* DEBUGFS_GT_H */
drivers/gpu/drm/i915/gt/debugfs_gt_pm.c +2 -2
index 059c9e5c002e..03b4d06daaee 100644
@@ -587,7 +587,7 @@ static bool rps_eval(const struct intel_gt *gt)
 
 DEFINE_GT_DEBUGFS_ATTRIBUTE(rps_boost);
 
-void debugfs_gt_pm_register(struct intel_gt *gt, struct dentry *root)
+void intel_gt_pm_register_debugfs(struct intel_gt *gt, struct dentry *root)
 {
 	static const struct debugfs_gt_file files[] = {
 		{ "drpc", &drpc_fops, NULL },
@@ -597,5 +597,5 @@ void debugfs_gt_pm_register(struct intel_gt *gt, struct dentry *root)
 		{ "rps_boost", &rps_boost_fops, rps_eval },
 	};
 
-	debugfs_gt_register_files(gt, root, files, ARRAY_SIZE(files));
+	intel_gt_debugfs_register_files(gt, root, files, ARRAY_SIZE(files));
 }
drivers/gpu/drm/i915/gt/debugfs_gt_pm.h +1 -1
index 4cf5f5c9da7d..45827f451e83 100644
@@ -9,6 +9,6 @@
 struct intel_gt;
 struct dentry;
 
-void debugfs_gt_pm_register(struct intel_gt *gt, struct dentry *root);
+void intel_gt_pm_register_debugfs(struct intel_gt *gt, struct dentry *root);
 
 #endif /* DEBUGFS_GT_PM_H */
drivers/gpu/drm/i915/gt/intel_gt.c +1 -1
index f1f1b306e0af..f84874f6e72b 100644
@@ -320,7 +320,7 @@ void intel_gt_driver_register(struct intel_gt *gt)
 {
 	intel_rps_driver_register(&gt->rps);
 
-	debugfs_gt_register(gt);
+	intel_gt_debugfs_register(gt);
 }
 
 static int intel_gt_init_scratch(struct intel_gt *gt, unsigned int size)
Signature · 6 lines
2.25.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

Quoting Andi Shyti (2020-02-10 13:40:39)

Quoted 24 lines

"We don't own the debugfs 'namespace' prefix." (Jani Nikula [*])

I agree, change the functions name from "debugfs_*" to "intel_gt_*" prefix.

[*] https://patchwork.freedesktop.org/patch/352553/#comment_651183

---
 drivers/gpu/drm/i915/gt/debugfs_engines.c |  4 ++--
 drivers/gpu/drm/i915/gt/debugfs_engines.h |  2 +-
 drivers/gpu/drm/i915/gt/debugfs_gt.c      | 14 +++++++-------
 drivers/gpu/drm/i915/gt/debugfs_gt.h      | 10 +++++-----
 drivers/gpu/drm/i915/gt/debugfs_gt_pm.c   |  4 ++--
 drivers/gpu/drm/i915/gt/debugfs_gt_pm.h   |  2 +-
 drivers/gpu/drm/i915/gt/intel_gt.c        |  2 +-
 7 files changed, 19 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/gt/debugfs_engines.c +0 -0
index 6a5e9ab20b94..2d4ab974ab67 100644

drivers/gpu/drm/i915/gt/debugfs_engines.c static int engines_show(struct seq_file *m, void *data) · line 29

Quoted 5 lines
drivers/gpu/drm/i915/gt/debugfs_engines.c +1 -1
@@ -26,11 +26,11 @@ static int engines_show(struct seq_file *m, void *data)
 }
 DEFINE_GT_DEBUGFS_ATTRIBUTE(engines);
 
-void debugfs_engines_register(struct intel_gt *gt, struct dentry *root)
+void engines_register_debugfs(struct intel_gt *gt, struct dentry *root)

Bad. If you are going to do this, intel_gt something. (At a push, intel_engines, but maybe we shouldn't spread that too much as that currently takes i915 to work on the uapi lists.)

But I don't really care, we can cross this bridge if debugfs feature creeps beyond its current cave.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Andi Shyti

Quoting Andi Shyti (2020-02-10 13:40:39)

Quoted 4 lines

"We don't own the debugfs 'namespace' prefix." (Jani Nikula [*])

I agree, change the functions name from "debugfs_*" to "intel_gt_*" prefix.

An alternate way of looking at it is that these are all dependent on CONFIG_DEBUGFS. So are they not the debugfs interface? -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#3 lore raw

Hi Chris,

Quoted 7 lines
Quoted 4 lines

"We don't own the debugfs 'namespace' prefix." (Jani Nikula [*])

I agree, change the functions name from "debugfs_*" to "intel_gt_*" prefix.

An alternate way of looking at it is that these are all dependent on CONFIG_DEBUGFS. So are they not the debugfs interface?

this is a complete matter of taste, I might have a strong opinion if the concept of name prefix was something respected all over i915, but that's not always the case.

If Jani feels like enforcing the idea of the function name prefix, I basically agree with the style.

With "debugfs_*" I understand all those functions that handle the debugfs as framework.

Andi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

Quoting Andi Shyti (2020-02-10 13:58:08)

Quoted 7 lines

Hi Chris,

Quoted 5 lines
Quoted 4 lines

"We don't own the debugfs 'namespace' prefix." (Jani Nikula [*])

I agree, change the functions name from "debugfs_*" to "intel_gt_*" prefix.

Quoted 6 lines
Quoted 2 lines

An alternate way of looking at it is that these are all dependent on CONFIG_DEBUGFS. So are they not the debugfs interface?

this is a complete matter of taste, I might have a strong opinion if the concept of name prefix was something respected all over i915, but that's not always the case.

It's an object prefix; here I'd like to argue that it is the global debugfs/ that is the 'owner' (or root?) for this interface.

Quoted 5 lines

If Jani feels like enforcing the idea of the function name prefix, I basically agree with the style.

With "debugfs_*" I understand all those functions that handle the debugfs as framework.

Exactly.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: change prefix to debugfs functions

In reply to Andi Shyti
== Series Details ==

== Series Details ==

Series: drm/i915/gt: change prefix to debugfs functions
URL : https://patchwork.freedesktop.org/series/73239/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7900 -> Patchwork_16503
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/index.html

Known issues
------------

Here are the changes found in Patchwork_16503 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_blt:
- fi-ivb-3770: [PASS][1] -> [DMESG-FAIL][2] ([i915#725])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7900/fi-ivb-3770/igt@i915_selftest@live_blt.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/fi-ivb-3770/igt@i915_selftest@live_blt.html

* igt@i915_selftest@live_gem_contexts:
- fi-cfl-8700k: [PASS][3] -> [INCOMPLETE][4] ([i915#424])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7900/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html

* igt@kms_chamelium@dp-edid-read:
- fi-cml-u2: [PASS][5] -> [FAIL][6] ([i915#217] / [i915#976])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7900/fi-cml-u2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/fi-cml-u2/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live_execlists:
- fi-icl-y: [DMESG-FAIL][7] ([fdo#108569]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7900/fi-icl-y/igt@i915_selftest@live_execlists.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/fi-icl-y/igt@i915_selftest@live_execlists.html

* igt@i915_selftest@live_gem_contexts:
- fi-cml-s: [DMESG-FAIL][9] ([i915#877]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7900/fi-cml-s/igt@i915_selftest@live_gem_contexts.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/fi-cml-s/igt@i915_selftest@live_gem_contexts.html

* igt@i915_selftest@live_gtt:
- fi-skl-6770hq: [TIMEOUT][11] ([fdo#111732] / [fdo#112271]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7900/fi-skl-6770hq/igt@i915_selftest@live_gtt.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/fi-skl-6770hq/igt@i915_selftest@live_gtt.html
- fi-skl-6600u: [TIMEOUT][13] ([fdo#111732] / [fdo#112271]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7900/fi-skl-6600u/igt@i915_selftest@live_gtt.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/fi-skl-6600u/igt@i915_selftest@live_gtt.html

* igt@kms_chamelium@hdmi-crc-fast:
- fi-kbl-7500u: [FAIL][15] ([fdo#109635] / [i915#217]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7900/fi-kbl-7500u/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/fi-kbl-7500u/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][17] ([fdo#111407]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7900/fi-kbl-7500u/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/fi-kbl-7500u/igt@[email protected]

#### Warnings ####

* igt@gem_close_race@basic-threads:
- fi-hsw-peppy: [INCOMPLETE][19] ([i915#694] / [i915#816]) -> [TIMEOUT][20] ([fdo#112271] / [i915#1084])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7900/fi-hsw-peppy/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/fi-hsw-peppy/igt@[email protected]

[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109635]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111732]: https://bugs.freedesktop.org/show_bug.cgi?id=111732
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#1084]: https://gitlab.freedesktop.org/drm/intel/issues/1084
[i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217
[i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
[i915#816]: https://gitlab.freedesktop.org/drm/intel/issues/816
[i915#877]: https://gitlab.freedesktop.org/drm/intel/issues/877
[i915#976]: https://gitlab.freedesktop.org/drm/intel/issues/976

Participating hosts (51 -> 47)
------------------------------

Additional (3): fi-kbl-7560u fi-byt-n2820 fi-bwr-2160
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-whl-u fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7900 -> Patchwork_16503

CI-20190529: 20190529
CI_DRM_7900: f4ab479a4e3c9e0bc9120f6618b9876bfdece9cc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5432: 6677811be6e9be9000b3217e8862353b3945a4f3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16503: d4b756a98fa10f3d561cbc2ed25080d9883bb59a @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

d4b756a98fa1 drm/i915/gt: change prefix to debugfs functions

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16503/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx