Re: [Intel-gfx] [Intel-gfx 5/6] drm/i915/guc: Rename GuC log relay debugfs descriptively

2022-12-05 Thread Teres Alexis, Alan Previn
> 
Alan:snip
> 

> >  void intel_guc_log_debugfs_register(struct intel_guc_log *log,
> > @@ -204,7 +204,7 @@ void intel_guc_log_debugfs_register(struct 
> > intel_guc_log *log,
> > { "guc_log_dump", _log_dump_fops, NULL },
> > { "guc_load_err_log_dump", _load_err_log_dump_fops, NULL },
> > { "guc_log_level", _log_level_fops, NULL },
> > -   { "guc_log_relay", _log_relay_fops, NULL },
> > +   { "guc_log_relay_ctl", _log_relay_ctl_fops, NULL },
> 
> Even though debugfs, any issue with changing the file name from the uapi
> point of view? Any scripts etc. which will need to be updated?
> 
> 
Alan: Actually, relay logging tool in the IGT would need to change but upstream 
version of that tool has been broken for
a long while now nothing new can break on top of above change. I didnt see any 
other comments on this patch - let me
know if missed something else - as i will attempt to post this again tonight.



Re: [Intel-gfx] [Intel-gfx 5/6] drm/i915/guc: Rename GuC log relay debugfs descriptively

2022-07-19 Thread Dixit, Ashutosh
On Mon, 09 May 2022 14:01:50 -0700, Alan Previn wrote:
>
> @@ -190,11 +190,11 @@ static int guc_log_relay_release(struct inode *inode, 
> struct file *file)
>   return 0;
>  }
>
> -static const struct file_operations guc_log_relay_fops = {
> +static const struct file_operations guc_log_relay_ctl_fops = {
>   .owner = THIS_MODULE,
> - .open = guc_log_relay_open,
> - .write = guc_log_relay_write,
> - .release = guc_log_relay_release,
> + .open = guc_log_relay_ctl_open,
> + .write = guc_log_relay_ctl_write,
> + .release = guc_log_relay_ctl_release,
>  };
>
>  void intel_guc_log_debugfs_register(struct intel_guc_log *log,
> @@ -204,7 +204,7 @@ void intel_guc_log_debugfs_register(struct intel_guc_log 
> *log,
>   { "guc_log_dump", _log_dump_fops, NULL },
>   { "guc_load_err_log_dump", _load_err_log_dump_fops, NULL },
>   { "guc_log_level", _log_level_fops, NULL },
> - { "guc_log_relay", _log_relay_fops, NULL },
> + { "guc_log_relay_ctl", _log_relay_ctl_fops, NULL },

Even though debugfs, any issue with changing the file name from the uapi
point of view? Any scripts etc. which will need to be updated?

>   { "guc_log_relay_buf_size", _log_relay_buf_size_fops, NULL 
> },
>   { "guc_log_relay_subbuf_count", 
> _log_relay_subbuf_count_fops, NULL },
>   };


[Intel-gfx] [Intel-gfx 5/6] drm/i915/guc: Rename GuC log relay debugfs descriptively

2022-05-09 Thread Alan Previn
GuC log relay debugfs name for the control handle vs the actual relay
channel are vague. Fix them so it's obvious from the name.

Signed-off-by: Alan Previn 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_log.c|  2 +-
 .../drm/i915/gt/uc/intel_guc_log_debugfs.c| 22 +--
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
index 35709202b09c..793a06a16874 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
@@ -419,7 +419,7 @@ static int guc_log_relay_create(struct intel_guc_log *log)
 */
n_subbufs = intel_guc_log_relay_subbuf_count(log);
 
-   guc_log_relay_chan = relay_open("guc_log",
+   guc_log_relay_chan = relay_open("guc_log_relay_chan",
dev_priv->drm.primary->debugfs_root,
subbuf_size, n_subbufs,
_callbacks, dev_priv);
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c
index 983afc89b17e..6c5e900c4906 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c
@@ -141,7 +141,7 @@ DEFINE_SIMPLE_ATTRIBUTE(guc_log_relay_subbuf_count_fops,
guc_log_relay_subbuf_count_get, NULL,
"%lld\n");
 
-static int guc_log_relay_open(struct inode *inode, struct file *file)
+static int guc_log_relay_ctl_open(struct inode *inode, struct file *file)
 {
struct intel_guc_log *log = inode->i_private;
 
@@ -157,10 +157,10 @@ static int guc_log_relay_open(struct inode *inode, struct 
file *file)
 }
 
 static ssize_t
-guc_log_relay_write(struct file *filp,
-   const char __user *ubuf,
-   size_t cnt,
-   loff_t *ppos)
+guc_log_relay_ctl_write(struct file *filp,
+   const char __user *ubuf,
+   size_t cnt,
+   loff_t *ppos)
 {
struct intel_guc_log *log = filp->private_data;
int val;
@@ -182,7 +182,7 @@ guc_log_relay_write(struct file *filp,
return ret ?: cnt;
 }
 
-static int guc_log_relay_release(struct inode *inode, struct file *file)
+static int guc_log_relay_ctl_release(struct inode *inode, struct file *file)
 {
struct intel_guc_log *log = inode->i_private;
 
@@ -190,11 +190,11 @@ static int guc_log_relay_release(struct inode *inode, 
struct file *file)
return 0;
 }
 
-static const struct file_operations guc_log_relay_fops = {
+static const struct file_operations guc_log_relay_ctl_fops = {
.owner = THIS_MODULE,
-   .open = guc_log_relay_open,
-   .write = guc_log_relay_write,
-   .release = guc_log_relay_release,
+   .open = guc_log_relay_ctl_open,
+   .write = guc_log_relay_ctl_write,
+   .release = guc_log_relay_ctl_release,
 };
 
 void intel_guc_log_debugfs_register(struct intel_guc_log *log,
@@ -204,7 +204,7 @@ void intel_guc_log_debugfs_register(struct intel_guc_log 
*log,
{ "guc_log_dump", _log_dump_fops, NULL },
{ "guc_load_err_log_dump", _load_err_log_dump_fops, NULL },
{ "guc_log_level", _log_level_fops, NULL },
-   { "guc_log_relay", _log_relay_fops, NULL },
+   { "guc_log_relay_ctl", _log_relay_ctl_fops, NULL },
{ "guc_log_relay_buf_size", _log_relay_buf_size_fops, NULL 
},
{ "guc_log_relay_subbuf_count", 
_log_relay_subbuf_count_fops, NULL },
};
-- 
2.25.1