Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 1/2] drm/xe: add a new debugfs file - mmio
@ 2024-01-31 19:59 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
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Koby Elbaz @ 2024-01-31 19:59 UTC (permalink / raw)
  To: michal.winiarski; +Cc: intel-xe

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 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, &gt_reset_failure);
 #endif
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-02-19 12:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v6 1/2] " Summers, Stuart
2024-02-06 17:16   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox