All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Koby Elbaz <kelbaz@habana.ai>
Cc: <intel-xe@lists.freedesktop.org>, <lucas.demarchi@intel.com>,
	<thomas.hellstrom@linux.intel.com>
Subject: Re: [PATCH v7 1/2] drm/xe: add a new debugfs file - mmio
Date: Thu, 9 May 2024 16:58:48 -0400	[thread overview]
Message-ID: <Zj05CMvDkg8kaEy4@intel.com> (raw)
In-Reply-To: <20240414081105.1199559-1-kelbaz@habana.ai>

On Sun, Apr 14, 2024 at 11:11:04AM +0300, Koby Elbaz wrote:
> Now that the former mmio handlers are fully removed, this
> debugfs file will be used for mmio access (read/write)
> through the debugfs ioctl file operation.
> 
> Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
> ---
>  drivers/gpu/drm/xe/xe_debugfs.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
> index c9b30dbdc14d..ce27516ffac0 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> @@ -111,12 +111,22 @@ static int forcewake_release(struct inode *inode, struct file *file)
>  	return 0;
>  }
>  
> +static long xe_debugfs_mmio_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
> +{
> +	return 0;
> +}
> +
>  static const struct file_operations forcewake_all_fops = {
>  	.owner = THIS_MODULE,
>  	.open = forcewake_open,
>  	.release = forcewake_release,
>  };
>  
> +static const struct file_operations mmio_fops = {
> +	.owner = THIS_MODULE,
> +	.unlocked_ioctl = xe_debugfs_mmio_ioctl,

I was kind of afraid this was not done by other drivers in the debugfs,
but I found out other cases, so I'm fine with it.

But likely this patch should be merged with the second one?

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>

> +};
> +
>  void xe_debugfs_register(struct xe_device *xe)
>  {
>  	struct ttm_device *bdev = &xe->ttm;
> @@ -155,6 +165,8 @@ void xe_debugfs_register(struct xe_device *xe)
>  	for_each_gt(gt, xe, id)
>  		xe_gt_debugfs_register(gt);
>  
> +	debugfs_create_file("mmio", 0644, root, xe, &mmio_fops);
> +
>  #ifdef CONFIG_FAULT_INJECTION
>  	fault_create_debugfs_attr("fail_gt_reset", root, &gt_reset_failure);
>  #endif
> -- 
> 2.34.1
> 

      parent reply	other threads:[~2024-05-09 20:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14  8:11 [PATCH v7 1/2] drm/xe: add a new debugfs file - mmio Koby Elbaz
2024-04-14  8:11 ` [PATCH v7 2/2] drm/xe: restore xe_mmio_ioctl as the ioctl handler of the mmio debugfs file Koby Elbaz
2024-04-14 17:13   ` Ofir Bitton
2024-04-14 10:11 ` [PATCH v7 1/2] drm/xe: add a new debugfs file - mmio Ofir Bitton
2024-04-15 16:24 ` ✓ CI.Patch_applied: success for series starting with [v7,1/2] " Patchwork
2024-04-15 16:25 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-15 16:26 ` ✓ CI.KUnit: success " Patchwork
2024-04-15 16:37 ` ✓ CI.Build: " Patchwork
2024-04-15 16:39 ` ✓ CI.Hooks: " Patchwork
2024-04-15 16:41 ` ✓ CI.checksparse: " Patchwork
2024-04-15 17:07 ` ✓ CI.BAT: " Patchwork
2024-04-16  1:37 ` ✗ CI.FULL: failure " Patchwork
2024-04-16  7:08 ` ✓ CI.Patch_applied: success for series starting with [v7,1/2] drm/xe: add a new debugfs file - mmio (rev2) Patchwork
2024-04-16  7:08 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-16  7:09 ` ✓ CI.KUnit: success " Patchwork
2024-04-16  7:22 ` ✓ CI.Build: " Patchwork
2024-04-16  7:25 ` ✓ CI.Hooks: " Patchwork
2024-04-16  7:26 ` ✓ CI.checksparse: " Patchwork
2024-04-16  7:58 ` ✓ CI.BAT: " Patchwork
2024-04-17  4:34 ` ✗ CI.FULL: failure " Patchwork
2024-05-09 20:58 ` Rodrigo Vivi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zj05CMvDkg8kaEy4@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kelbaz@habana.ai \
    --cc=lucas.demarchi@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.