From: "Summers, Stuart" <stuart.summers@intel.com>
To: "Winiarski, Michal" <michal.winiarski@intel.com>,
"Elbaz, Koby (Habana)" <kelbaz@habana.ai>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v6 1/2] drm/xe: add a new debugfs file - mmio
Date: Wed, 31 Jan 2024 20:14:09 +0000 [thread overview]
Message-ID: <41d1faeb0cc7e8a0ffe9f3258c22ca3ef566ea34.camel@intel.com> (raw)
In-Reply-To: <20240131195953.852641-1-kelbaz@habana.ai>
On Wed, 2024-01-31 at 21:59 +0200, 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.
Sorry I don't know the history here of v0-v5, but one question, with
igt-gpu-tools/tools/intel_reg we can read and write MMIO registers
without needing to have the driver loaded at all (i.e. straight through
the BARs). Why do we want to also put this capability in the xe debugfs
then?
Thanks,
Stuart
>
> 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 01db5b27bec5..21b2257aa3a8 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> @@ -98,12 +98,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,
> +};
> +
> void xe_debugfs_register(struct xe_device *xe)
> {
> struct ttm_device *bdev = &xe->ttm;
> @@ -142,6 +152,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,
> >_reset_failure);
> #endif
next prev parent reply other threads:[~2024-01-31 20:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 19:59 [PATCH v6 1/2] drm/xe: add a new debugfs file - mmio Koby Elbaz
2024-01-31 19:59 ` [PATCH v6 2/2] drm/xe: restore xe_mmio_ioctl as the ioctl handler of the mmio debugfs file Koby Elbaz
2024-02-05 12:56 ` Ofir Bitton
2024-02-14 22:06 ` Matt Roper
2024-01-31 20:03 ` ✓ CI.Patch_applied: success for series starting with [v6,1/2] drm/xe: add a new debugfs file - mmio Patchwork
2024-01-31 20:03 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-31 20:04 ` ✓ CI.KUnit: success " Patchwork
2024-01-31 20:11 ` ✓ CI.Build: " Patchwork
2024-01-31 20:12 ` ✓ CI.Hooks: " Patchwork
2024-01-31 20:13 ` ✓ CI.checksparse: " Patchwork
2024-01-31 20:14 ` Summers, Stuart [this message]
2024-02-06 17:16 ` [PATCH v6 1/2] " Koby Elbaz
2024-02-14 23:21 ` Ville Syrjälä
2024-02-19 11:59 ` Koby Elbaz
2024-01-31 20:37 ` ✓ CI.BAT: success for series starting with [v6,1/2] " Patchwork
2024-02-14 21:43 ` [PATCH v6 1/2] " Matt Roper
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=41d1faeb0cc7e8a0ffe9f3258c22ca3ef566ea34.camel@intel.com \
--to=stuart.summers@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=kelbaz@habana.ai \
--cc=michal.winiarski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox