Re: [Intel-gfx] [PATCH] drm/i915/gt: change prefix to debugfs functions

2020-02-10 Thread Chris Wilson
Quoting Andi Shyti (2020-02-10 13:58:08)
> Hi Chris,
> 
> > > "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.

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.

> 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/gt: change prefix to debugfs functions

2020-02-10 Thread Andi Shyti
Hi Chris,

> > "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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/gt: change prefix to debugfs functions

2020-02-10 Thread Chris Wilson
Quoting Andi Shyti (2020-02-10 13:40:39)
> "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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/gt: change prefix to debugfs functions

2020-02-10 Thread Chris Wilson
Quoting Andi Shyti (2020-02-10 13:40:39)
> "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
> 
> Signed-off-by: Andi Shyti 
> Cc: Jani Nikula 
> ---
>  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(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/debugfs_engines.c 
> b/drivers/gpu/drm/i915/gt/debugfs_engines.c
> index 6a5e9ab20b94..2d4ab974ab67 100644
> --- a/drivers/gpu/drm/i915/gt/debugfs_engines.c
> +++ b/drivers/gpu/drm/i915/gt/debugfs_engines.c
> @@ -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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915/gt: change prefix to debugfs functions

2020-02-10 Thread Andi Shyti
"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

Signed-off-by: Andi Shyti 
Cc: Jani Nikula 
---
 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(-)

diff --git a/drivers/gpu/drm/i915/gt/debugfs_engines.c 
b/drivers/gpu/drm/i915/gt/debugfs_engines.c
index 6a5e9ab20b94..2d4ab974ab67 100644
--- a/drivers/gpu/drm/i915/gt/debugfs_engines.c
+++ b/drivers/gpu/drm/i915/gt/debugfs_engines.c
@@ -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", _fops },
};
 
-   debugfs_gt_register_files(gt, root, files, ARRAY_SIZE(files));
+   intel_gt_debugfs_register_files(gt, root, files, ARRAY_SIZE(files));
 }
diff --git a/drivers/gpu/drm/i915/gt/debugfs_engines.h 
b/drivers/gpu/drm/i915/gt/debugfs_engines.h
index f69257eaa1cc..942876f6e837 100644
--- a/drivers/gpu/drm/i915/gt/debugfs_engines.h
+++ b/drivers/gpu/drm/i915/gt/debugfs_engines.h
@@ -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 */
diff --git a/drivers/gpu/drm/i915/gt/debugfs_gt.c 
b/drivers/gpu/drm/i915/gt/debugfs_gt.c
index 75255aaacaed..e7f2f1bf9f62 100644
--- a/drivers/gpu/drm/i915/gt/debugfs_gt.c
+++ b/drivers/gpu/drm/i915/gt/debugfs_gt.c
@@ -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))
diff --git a/drivers/gpu/drm/i915/gt/debugfs_gt.h 
b/drivers/gpu/drm/i915/gt/debugfs_gt.h
index 4ea0f06cda8f..d2aab5701c59 100644
--- a/drivers/gpu/drm/i915/gt/debugfs_gt.h
+++ b/drivers/gpu/drm/i915/gt/debugfs_gt.h
@@ -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 */
diff --git a/drivers/gpu/drm/i915/gt/debugfs_gt_pm.c 
b/drivers/gpu/drm/i915/gt/debugfs_gt_pm.c
index 059c9e5c002e..03b4d06daaee 100644
--- a/drivers/gpu/drm/i915/gt/debugfs_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/debugfs_gt_pm.c
@@ -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", _fops, NULL },
@@ -597,5 +597,5 @@ void