From: Stuart Summers <stuart.summers@intel.com>
Cc: intel-xe@lists.freedesktop.org, rodrigo.vivi@intel.com,
matthew.d.roper@intel.com, gustavo.sousa@intel.com,
Stuart Summers <stuart.summers@intel.com>
Subject: [PATCH 8/8] drm/xe: Add a new debug focused configfs group
Date: Mon, 30 Nov 2026 23:24:46 +0000 [thread overview]
Message-ID: <20261130232438.584409-18-stuart.summers@intel.com> (raw)
In-Reply-To: <20261130232438.584409-10-stuart.summers@intel.com>
Add the skeleton code for a new debug specific configfs group.
Just add the structure for now. Actual debug content will be
added in a subsequent patch.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
drivers/gpu/drm/xe/Makefile | 1 +
drivers/gpu/drm/xe/xe_configfs.c | 5 +++++
drivers/gpu/drm/xe/xe_configfs_debug.c | 14 ++++++++++++++
drivers/gpu/drm/xe/xe_configfs_debug.h | 13 +++++++++++++
drivers/gpu/drm/xe/xe_configfs_types.h | 3 +++
5 files changed, 36 insertions(+)
create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug.c
create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug.h
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index 31955c9277b2..acd32476356c 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -167,6 +167,7 @@ xe-$(CONFIG_HWMON) += xe_hwmon.o
xe-$(CONFIG_PERF_EVENTS) += xe_pmu.o
xe-$(CONFIG_CONFIGFS_FS) += xe_configfs.o
+xe-$(CONFIG_DRM_XE_DEBUG) += xe_configfs_debug.o
xe-$(CONFIG_UEFI_CPER) += xe_cper.o \
xe_trace_cper.o
diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index 8f919ab3cf7f..14de6abc3e24 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -14,6 +14,7 @@
#include "instructions/xe_mi_commands.h"
#include "xe_configfs.h"
+#include "xe_configfs_debug.h"
#include "xe_defaults.h"
#include "xe_gt_types.h"
#include "xe_module.h"
@@ -1465,6 +1466,10 @@ static struct config_group *xe_config_make_device_group(struct config_group *gro
config_group_init_type_name(&dev->sriov, "sriov", &xe_config_sriov_type);
configfs_add_default_group(&dev->sriov, &dev->group);
}
+#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
+ config_group_init_type_name(&dev->debug, "debug", &xe_configfs_debug_type);
+ configfs_add_default_group(&dev->debug, &dev->group);
+#endif
mutex_init(&dev->lock);
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.c b/drivers/gpu/drm/xe/xe_configfs_debug.c
new file mode 100644
index 000000000000..45617282cec5
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.c
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+#include <linux/configfs.h>
+#include <linux/module.h>
+
+#include "xe_configfs_debug.h"
+#include "xe_configfs_types.h"
+
+const struct config_item_type xe_configfs_debug_type = {
+ .ct_owner = THIS_MODULE,
+};
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.h b/drivers/gpu/drm/xe/xe_configfs_debug.h
new file mode 100644
index 000000000000..5f938450aed2
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+#ifndef _XE_CONFIGFS_DEBUG_H_
+#define _XE_CONFIGFS_DEBUG_H_
+
+#if IS_ENABLED(CONFIG_DRM_XE_DEBUG) && IS_ENABLED(CONFIG_CONFIGFS_FS)
+struct config_item_type;
+extern const struct config_item_type xe_configfs_debug_type;
+#endif
+
+#endif /* _XE_CONFIGFS_DEBUG_H_ */
diff --git a/drivers/gpu/drm/xe/xe_configfs_types.h b/drivers/gpu/drm/xe/xe_configfs_types.h
index 5a4785c1f4f8..ca2c94abd27d 100644
--- a/drivers/gpu/drm/xe/xe_configfs_types.h
+++ b/drivers/gpu/drm/xe/xe_configfs_types.h
@@ -22,6 +22,9 @@ struct wa_bb {
struct xe_config_group_device {
struct config_group group;
struct config_group sriov;
+#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
+ struct config_group debug;
+#endif
/*
* Fields sorted by type (largest first) then name: struct arrays,
--
2.43.0
next prev parent reply other threads:[~2026-11-30 23:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 23:24 [PATCH 0/8] Set up for debug configfs group Stuart Summers
2026-11-30 23:24 ` [PATCH 1/8] drm/xe: Guard configfs attribute reads in getters Stuart Summers
2026-11-30 23:24 ` [PATCH 2/8] drm/xe/configfs: Fix out-of-bounds read in parse_wa_bb_lines() Stuart Summers
2026-11-30 23:24 ` [PATCH 3/8] drm/xe/configfs: Copy wa_bb out under the configfs lock Stuart Summers
2026-11-30 23:24 ` [PATCH 4/8] drm/xe: Invert vram_page_offline configfs attribute Stuart Summers
2026-11-30 23:24 ` [PATCH 5/8] drm/xe: Make survivability_mode configfs attribute a bitmap Stuart Summers
2026-11-30 23:24 ` [PATCH 6/8] drm/xe: Sort xe_config_device fields Stuart Summers
2026-11-30 23:24 ` [PATCH 7/8] drm/xe: Split out configfs data structures Stuart Summers
2026-11-30 23:24 ` Stuart Summers [this message]
2026-11-30 23:46 ` ✗ CI.checkpatch: warning for Set up for debug configfs group (rev3) Patchwork
2026-11-30 23:48 ` ✓ CI.KUnit: success " Patchwork
2026-12-01 0:37 ` ✓ Xe.CI.BAT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-11-30 22:56 [PATCH 0/8] Set up for debug configfs group Stuart Summers
2026-11-30 22:57 ` [PATCH 8/8] drm/xe: Add a new debug focused " Stuart Summers
2026-11-30 23:08 ` sashiko-bot
2026-11-30 23:16 ` Summers, Stuart
2026-11-12 21:35 [PATCH 0/8] Set up for debug " Stuart Summers
2026-11-12 21:35 ` [PATCH 8/8] drm/xe: Add a new debug focused " Stuart Summers
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=20261130232438.584409-18-stuart.summers@intel.com \
--to=stuart.summers@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@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