* [PATCH 0/9] Add new debug infrastructure for configfs
@ 2026-07-22 21:46 Stuart Summers
2026-07-22 21:46 ` [PATCH 1/9] drm/xe: Sort xe_config_device fields Stuart Summers
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: Stuart Summers @ 2026-07-22 21:46 UTC (permalink / raw)
Cc: intel-xe, rodrigo.vivi, matthew.brost, umesh.nerlige.ramappa,
Michal.Wajdeczko, matthew.d.roper, daniele.ceraolospurio,
shuicheng.lin, Stuart Summers
Add a new configfs debug group. The intent of this structure is
to allow us to separate ABI facing configfs entries from those
which are purely for debug purposes. And it allows us more flexibility
in how we define those parameters used for debug.
Add a new infrastructure to this debug configfs group that lets us
easily define the parameters in a quick list. This is primarily
useful for simple, single-type parameters such as enable/disable
features or simple values passed. For more complex parameters,
we will still need to define these separately.
Pull the GuC target related changes from [1] to fit within
this new structure and add a new definition for guc_log_level
on top of the existing module parameter (to ensure we aren't
impacting existing users of the module parameter).
Note that the debug parameters here are all to be used "at your
own risk". Without having in depth knowledge of how these impact
the software and hardware, there could be unforeseen consequences
of setting them. As such, they are all wrapped in a
CONFIG_DRM_XE_DEBUG configfs option.
In terms of the patches here, I'm sorting the existing parameters
by name/type. I know we have a few other module parameters that
could migrate here, but I didn't want to overload this series
too much, so the focus for now is on the existing configfs entries
and demonstrating the new structures with the GuC log level and
target parameters.
I used GitHub Copilot with Claude pretty extensively through the
process here and attributed as such. Happy to answer any questions
around this. Took a bit of time getting back to this series around
other work, and in that time I was playing around with a few different
models, hence some of the patches are showing multiple of them. I
tried to attribute each as I was implementing the changes.
I also decided to drop John Harrison from the NPK patch. It has
been modified quite a bit from the original, but more importantly
John is no longer with Intel and that email address isn't available
any more. If it makes a difference here, John and I had both separately
implemented this same change at different occasions for debug. The
one I used to start that initial series was cherry-picked from his
latest variant.
v2:
- In this second revision I did confirm that the guc_log_level
module parameter is taking precedence over the configfs parameter
and ensured the other parameters seem to be autogenerating and
working as expected.
- I tried to address all the review feedback from the first
revision, [2].
- I also did another pass on the sorting since there were a few
discrepancies I noticed in the first revision. I kept Gustavo's
R-B on that one, but would like an ack before merging at least
to confirm the patch is sane.
- And finally I moved the getter functions into the X-macro
generators so we can autogenerate more of the similar functions
between the different parameters in that debug param list.
[1]: https://patchwork.freedesktop.org/series/162087/
[2]: https://patchwork.freedesktop.org/series/165879/
Stuart Summers (9):
drm/xe: Sort xe_config_device fields
drm/xe: Split out configfs data structures
drm/xe: Add a new debug focused configfs group
drm/xe: Move debug configfs entries to xe_configfs_debug.c
drm/xe/guc: Add configfs support for guc_log_level
drm/xe/guc: Add support for NPK as a GuC log target
drm/xe: Add infrastructure for debug configfs parameters
drm/xe: Migrate existing debug configfs entries to params
infrastructure
drm/xe: Taint kernel when debug configfs parameters are set
drivers/gpu/drm/xe/Makefile | 2 +
drivers/gpu/drm/xe/abi/guc_log_abi.h | 8 +
drivers/gpu/drm/xe/xe_configfs.c | 1017 +----------------
drivers/gpu/drm/xe/xe_configfs.h | 90 +-
drivers/gpu/drm/xe/xe_configfs_debug.c | 870 ++++++++++++++
drivers/gpu/drm/xe/xe_configfs_debug.h | 48 +
drivers/gpu/drm/xe/xe_configfs_debug_params.c | 151 +++
drivers/gpu/drm/xe/xe_configfs_debug_params.h | 192 ++++
drivers/gpu/drm/xe/xe_configfs_types.h | 59 +
drivers/gpu/drm/xe/xe_defaults.h | 5 +
drivers/gpu/drm/xe/xe_guc.c | 14 +-
drivers/gpu/drm/xe/xe_guc_ads.c | 1 +
drivers/gpu/drm/xe/xe_guc_log.c | 3 +-
drivers/gpu/drm/xe/xe_hw_engine.c | 1 +
drivers/gpu/drm/xe/xe_lrc.c | 1 +
drivers/gpu/drm/xe/xe_pci.c | 1 +
drivers/gpu/drm/xe/xe_psmi.c | 3 +-
drivers/gpu/drm/xe/xe_rtp.c | 3 +-
drivers/gpu/drm/xe/xe_survivability_mode.c | 1 +
19 files changed, 1484 insertions(+), 986 deletions(-)
create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug.c
create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug.h
create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug_params.c
create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug_params.h
create mode 100644 drivers/gpu/drm/xe/xe_configfs_types.h
--
2.43.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/9] drm/xe: Sort xe_config_device fields
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
@ 2026-07-22 21:46 ` Stuart Summers
2026-07-22 21:46 ` [PATCH 2/9] drm/xe: Split out configfs data structures Stuart Summers
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Stuart Summers @ 2026-07-22 21:46 UTC (permalink / raw)
Cc: intel-xe, rodrigo.vivi, matthew.brost, umesh.nerlige.ramappa,
Michal.Wajdeczko, matthew.d.roper, daniele.ceraolospurio,
shuicheng.lin, Stuart Summers, Gustavo Sousa
As we're planning more configfs entries over time, let's add
some sorting rules to make sure this stays clean and easy to
manage. Sorting first by type and then name to ensure the structure
doesn't have any unnecessary padding.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Assisted-by: Copilot:claude-sonnet-4.6,claude-opus-4.7
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
drivers/gpu/drm/xe/xe_configfs.c | 1088 +++++++++++++++---------------
drivers/gpu/drm/xe/xe_configfs.h | 24 +-
2 files changed, 562 insertions(+), 550 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index 052cce962161..b7e76c7c19da 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -58,10 +58,11 @@
* │ └── ...
* :
* └── 0000:03:00.0
- * ├── survivability_mode
- * ├── gt_types_allowed
* ├── engines_allowed
- * └── enable_psmi
+ * ├── gt_types_allowed
+ * ├── enable_multi_queue
+ * ├── enable_psmi
+ * └── survivability_mode
*
* After configuring the attributes as per next section, the device can be
* probed with::
@@ -73,13 +74,82 @@
* Configure Attributes
* ====================
*
- * Survivability mode:
- * -------------------
+
+ * Context restore BB
+ * ------------------
*
- * Enable survivability mode on supported cards. This setting only takes
- * effect when probing the device. Example to enable it::
+ * Allow to execute a batch buffer during any context switches. When the
+ * GPU is restoring the context, it executes additional commands. It's useful
+ * for testing additional workarounds and validating certain HW behaviors: it's
+ * not intended for normal execution and will taint the kernel with TAINT_TEST
+ * when used.
*
- * # echo 1 > /sys/kernel/config/xe/0000:03:00.0/survivability_mode
+ * The syntax allows to pass straight instructions to be executed by the engine
+ * in a batch buffer or set specific registers.
+ *
+ * #. Generic instruction::
+ *
+ * <engine-class> cmd <instr> [[dword0] [dword1] [...]]
+ *
+ * #. Simple register setting::
+ *
+ * <engine-class> reg <address> <value>
+ *
+ * Commands are saved per engine class: all instances of that class will execute
+ * those commands during context switch. The instruction, dword arguments,
+ * addresses and values are in hex format like in the examples below.
+ *
+ * #. Execute a LRI command to write 0xDEADBEEF to register 0x4f10 after the
+ * normal context restore::
+ *
+ * # echo 'rcs cmd 11000001 4F100 DEADBEEF' \
+ * > /sys/kernel/config/xe/0000:03:00.0/ctx_restore_post_bb
+ *
+ * #. Execute a LRI command to write 0xDEADBEEF to register 0x4f10 at the
+ * beginning of the context restore::
+ *
+ * # echo 'rcs cmd 11000001 4F100 DEADBEEF' \
+ * > /sys/kernel/config/xe/0000:03:00.0/ctx_restore_mid_bb
+
+ * #. Load certain values in a couple of registers (it can be used as a simpler
+ * alternative to the `cmd`) action::
+ *
+ * # cat > /sys/kernel/config/xe/0000:03:00.0/ctx_restore_post_bb <<EOF
+ * rcs reg 4F100 DEADBEEF
+ * rcs reg 4F104 FFFFFFFF
+ * EOF
+ *
+ * .. note::
+ *
+ * When using multiple lines, make sure to use a command that is
+ * implemented with a single write syscall, like HEREDOC.
+ *
+ * Currently this is implemented only for post and mid context restore and
+ * these attributes can only be set before binding to the device.
+ *
+ * Allowed engines:
+ * ----------------
+ *
+ * Allow only a set of engine(s) to be available, disabling the other engines
+ * even if they are available in hardware. This is applied after HW fuses are
+ * considered on each tile. Examples:
+ *
+ * Allow only one render and one copy engines, nothing else::
+ *
+ * # echo 'rcs0,bcs0' > /sys/kernel/config/xe/0000:03:00.0/engines_allowed
+ *
+ * Allow only compute engines and first copy engine::
+ *
+ * # echo 'ccs*,bcs0' > /sys/kernel/config/xe/0000:03:00.0/engines_allowed
+ *
+ * Note that the engine names are the per-GT hardware names. On multi-tile
+ * platforms, writing ``rcs0,bcs0`` to this file would allow the first render
+ * and copy engines on each tile.
+ *
+ * The requested configuration may not be supported by the platform and driver
+ * may fail to probe. For example: if at least one copy engine is expected to be
+ * available for migrations, but it's disabled. This is intended for debugging
+ * purposes only.
*
* This attribute can only be set before binding to the device.
*
@@ -121,29 +191,15 @@
*
* # echo '' > /sys/kernel/config/xe/0000:03:00.0/gt_types_allowed
*
- * Allowed engines:
- * ----------------
- *
- * Allow only a set of engine(s) to be available, disabling the other engines
- * even if they are available in hardware. This is applied after HW fuses are
- * considered on each tile. Examples:
- *
- * Allow only one render and one copy engines, nothing else::
- *
- * # echo 'rcs0,bcs0' > /sys/kernel/config/xe/0000:03:00.0/engines_allowed
- *
- * Allow only compute engines and first copy engine::
- *
- * # echo 'ccs*,bcs0' > /sys/kernel/config/xe/0000:03:00.0/engines_allowed
+ * Enable multi-queue
+ * ------------------
*
- * Note that the engine names are the per-GT hardware names. On multi-tile
- * platforms, writing ``rcs0,bcs0`` to this file would allow the first render
- * and copy engines on each tile.
+ * Multi-queue support on the device is enabled by default where the
+ * hardware supports it. Writing 0 force-disables multi-queue support:
+ * multi-queue exec-queue group creation via ioctl is refused, and the
+ * GuC feature is disabled::
*
- * The requested configuration may not be supported by the platform and driver
- * may fail to probe. For example: if at least one copy engine is expected to be
- * available for migrations, but it's disabled. This is intended for debugging
- * purposes only.
+ * # echo 0 > /sys/kernel/config/xe/0000:03:00.0/enable_multi_queue
*
* This attribute can only be set before binding to the device.
*
@@ -159,57 +215,15 @@
*
* This attribute can only be set before binding to the device.
*
- * Context restore BB
- * ------------------
- *
- * Allow to execute a batch buffer during any context switches. When the
- * GPU is restoring the context, it executes additional commands. It's useful
- * for testing additional workarounds and validating certain HW behaviors: it's
- * not intended for normal execution and will taint the kernel with TAINT_TEST
- * when used.
- *
- * The syntax allows to pass straight instructions to be executed by the engine
- * in a batch buffer or set specific registers.
- *
- * #. Generic instruction::
- *
- * <engine-class> cmd <instr> [[dword0] [dword1] [...]]
- *
- * #. Simple register setting::
- *
- * <engine-class> reg <address> <value>
- *
- * Commands are saved per engine class: all instances of that class will execute
- * those commands during context switch. The instruction, dword arguments,
- * addresses and values are in hex format like in the examples below.
- *
- * #. Execute a LRI command to write 0xDEADBEEF to register 0x4f10 after the
- * normal context restore::
- *
- * # echo 'rcs cmd 11000001 4F100 DEADBEEF' \
- * > /sys/kernel/config/xe/0000:03:00.0/ctx_restore_post_bb
- *
- * #. Execute a LRI command to write 0xDEADBEEF to register 0x4f10 at the
- * beginning of the context restore::
- *
- * # echo 'rcs cmd 11000001 4F100 DEADBEEF' \
- * > /sys/kernel/config/xe/0000:03:00.0/ctx_restore_mid_bb
-
- * #. Load certain values in a couple of registers (it can be used as a simpler
- * alternative to the `cmd`) action::
- *
- * # cat > /sys/kernel/config/xe/0000:03:00.0/ctx_restore_post_bb <<EOF
- * rcs reg 4F100 DEADBEEF
- * rcs reg 4F104 FFFFFFFF
- * EOF
+ * Survivability mode:
+ * -------------------
*
- * .. note::
+ * Enable survivability mode on supported cards. This setting only takes
+ * effect when probing the device. Example to enable it::
*
- * When using multiple lines, make sure to use a command that is
- * implemented with a single write syscall, like HEREDOC.
+ * # echo 1 > /sys/kernel/config/xe/0000:03:00.0/survivability_mode
*
- * Currently this is implemented only for post and mid context restore and
- * these attributes can only be set before binding to the device.
+ * This attribute can only be set before binding to the device.
*
* Max SR-IOV Virtual Functions
* ----------------------------
@@ -237,18 +251,6 @@
*
* This setting only takes effect when probing the device.
*
- * Enable multi-queue
- * ------------------
- *
- * Multi-queue support on the device is enabled by default where the
- * hardware supports it. Writing 0 force-disables multi-queue support:
- * multi-queue exec-queue group creation via ioctl is refused, and the
- * GuC feature is disabled::
- *
- * # echo 0 > /sys/kernel/config/xe/0000:03:00.0/enable_multi_queue
- *
- * This attribute can only be set before binding to the device.
- *
* Remove devices
* ==============
*
@@ -267,14 +269,19 @@ struct xe_config_group_device {
struct config_group group;
struct config_group sriov;
+ /*
+ * Fields sorted by type (largest first) then name: struct arrays,
+ * u64, u32/unsigned int, u8, bool, sub-structs last. Within each
+ * type, entries are sorted alphabetically.
+ */
struct xe_config_device {
- u64 gt_types_allowed;
- u64 engines_allowed;
- struct wa_bb ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
struct wa_bb ctx_restore_mid_bb[XE_ENGINE_CLASS_MAX];
- bool survivability_mode;
- bool enable_psmi;
+ struct wa_bb ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
+ u64 engines_allowed;
+ u64 gt_types_allowed;
bool enable_multi_queue;
+ bool enable_psmi;
+ bool survivability_mode;
struct {
unsigned int max_vfs;
bool admin_only_pf;
@@ -290,11 +297,11 @@ struct xe_config_group_device {
};
static const struct xe_config_device device_defaults = {
- .gt_types_allowed = U64_MAX,
.engines_allowed = U64_MAX,
- .survivability_mode = false,
- .enable_psmi = false,
+ .gt_types_allowed = U64_MAX,
.enable_multi_queue = true,
+ .enable_psmi = false,
+ .survivability_mode = false,
.sriov = {
.max_vfs = XE_DEFAULT_MAX_VFS,
.admin_only_pf = XE_DEFAULT_ADMIN_ONLY_PF,
@@ -371,249 +378,58 @@ static bool is_bound(struct xe_config_group_device *dev)
return ret;
}
-static ssize_t survivability_mode_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = to_xe_config_device(item);
-
- return sprintf(page, "%d\n", dev->survivability_mode);
-}
+static struct xe_config_group_device *find_xe_config_group_device(struct pci_dev *pdev);
-static ssize_t survivability_mode_store(struct config_item *item, const char *page, size_t len)
+/**
+ * xe_configfs_get_ctx_restore_mid_bb - get configfs ctx_restore_mid_bb setting
+ * @pdev: pci device
+ * @class: hw engine class
+ * @cs: pointer to the bb to use - only valid during probe
+ *
+ * Return: Number of dwords used in the mid_ctx_restore setting in configfs
+ */
+u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev,
+ enum xe_engine_class class,
+ const u32 **cs)
{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
- bool survivability_mode;
- int ret;
+ struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
+ u32 len;
- ret = kstrtobool(page, &survivability_mode);
- if (ret)
- return ret;
+ if (!dev)
+ return 0;
- guard(mutex)(&dev->lock);
- if (is_bound(dev))
- return -EBUSY;
+ if (cs)
+ *cs = dev->config.ctx_restore_mid_bb[class].cs;
- dev->config.survivability_mode = survivability_mode;
+ len = dev->config.ctx_restore_mid_bb[class].len;
+ config_group_put(&dev->group);
return len;
}
-static ssize_t gt_types_allowed_show(struct config_item *item, char *page)
+/**
+ * xe_configfs_get_ctx_restore_post_bb - get configfs ctx_restore_post_bb setting
+ * @pdev: pci device
+ * @class: hw engine class
+ * @cs: pointer to the bb to use - only valid during probe
+ *
+ * Return: Number of dwords used in the post_ctx_restore setting in configfs
+ */
+u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
+ enum xe_engine_class class,
+ const u32 **cs)
{
- struct xe_config_device *dev = to_xe_config_device(item);
- char *p = page;
+ struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
+ u32 len;
- for (size_t i = 0; i < ARRAY_SIZE(gt_types); i++)
- if (dev->gt_types_allowed & BIT_ULL(gt_types[i].type))
- p += sprintf(p, "%s\n", gt_types[i].name);
+ if (!dev)
+ return 0;
- return p - page;
-}
-
-static ssize_t gt_types_allowed_store(struct config_item *item, const char *page,
- size_t len)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
- char *buf __free(kfree) = kstrdup(page, GFP_KERNEL);
- char *p = buf;
- u64 typemask = 0;
-
- if (!buf)
- return -ENOMEM;
-
- while (p) {
- char *typename = strsep(&p, ",\n");
- bool matched = false;
-
- if (typename[0] == '\0')
- continue;
-
- for (size_t i = 0; i < ARRAY_SIZE(gt_types); i++) {
- if (strcmp(typename, gt_types[i].name) == 0) {
- typemask |= BIT(gt_types[i].type);
- matched = true;
- break;
- }
- }
-
- if (!matched)
- return -EINVAL;
- }
-
- guard(mutex)(&dev->lock);
- if (is_bound(dev))
- return -EBUSY;
-
- dev->config.gt_types_allowed = typemask;
-
- return len;
-}
-
-static ssize_t engines_allowed_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = to_xe_config_device(item);
- char *p = page;
-
- for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
- u64 mask = engine_info[i].mask;
-
- if ((dev->engines_allowed & mask) == mask) {
- p += sprintf(p, "%s*\n", engine_info[i].cls);
- } else if (mask & dev->engines_allowed) {
- u16 bit0 = __ffs64(mask), bit;
-
- mask &= dev->engines_allowed;
-
- for_each_set_bit(bit, (const unsigned long *)&mask, 64)
- p += sprintf(p, "%s%u\n", engine_info[i].cls,
- bit - bit0);
- }
- }
-
- return p - page;
-}
-
-/*
- * Lookup engine_info. If @mask is not NULL, reduce the mask according to the
- * instance in @pattern.
- *
- * Examples of inputs:
- * - lookup_engine_info("rcs0", &mask): return "rcs" entry from @engine_info and
- * mask == BIT_ULL(XE_HW_ENGINE_RCS0)
- * - lookup_engine_info("rcs*", &mask): return "rcs" entry from @engine_info and
- * mask == XE_HW_ENGINE_RCS_MASK
- * - lookup_engine_info("rcs", NULL): return "rcs" entry from @engine_info
- */
-static const struct engine_info *lookup_engine_info(const char *pattern, u64 *mask)
-{
- for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
- u8 instance;
- u16 bit;
-
- if (!str_has_prefix(pattern, engine_info[i].cls))
- continue;
-
- pattern += strlen(engine_info[i].cls);
- if (!mask)
- return *pattern ? NULL : &engine_info[i];
-
- if (!strcmp(pattern, "*")) {
- *mask = engine_info[i].mask;
- return &engine_info[i];
- }
-
- if (kstrtou8(pattern, 10, &instance))
- return NULL;
-
- bit = __ffs64(engine_info[i].mask) + instance;
- if (bit >= fls64(engine_info[i].mask))
- return NULL;
-
- *mask = BIT_ULL(bit);
- return &engine_info[i];
- }
-
- return NULL;
-}
-
-static int parse_engine(const char *s, const char *end_chars, u64 *mask,
- const struct engine_info **pinfo)
-{
- char buf[MAX_ENGINE_CLASS_CHARS + MAX_ENGINE_INSTANCE_CHARS + 1];
- const struct engine_info *info;
- size_t len;
-
- len = strcspn(s, end_chars);
- if (len >= sizeof(buf))
- return -EINVAL;
-
- memcpy(buf, s, len);
- buf[len] = '\0';
-
- info = lookup_engine_info(buf, mask);
- if (!info)
- return -ENOENT;
-
- if (pinfo)
- *pinfo = info;
-
- return len;
-}
-
-static ssize_t engines_allowed_store(struct config_item *item, const char *page,
- size_t len)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
- ssize_t patternlen, p;
- u64 mask, val = 0;
-
- for (p = 0; p < len; p += patternlen + 1) {
- patternlen = parse_engine(page + p, ",\n", &mask, NULL);
- if (patternlen < 0)
- return -EINVAL;
-
- val |= mask;
- }
-
- guard(mutex)(&dev->lock);
- if (is_bound(dev))
- return -EBUSY;
-
- dev->config.engines_allowed = val;
-
- return len;
-}
-
-static ssize_t enable_psmi_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = to_xe_config_device(item);
-
- return sprintf(page, "%d\n", dev->enable_psmi);
-}
-
-static ssize_t enable_psmi_store(struct config_item *item, const char *page, size_t len)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
- bool val;
- int ret;
-
- ret = kstrtobool(page, &val);
- if (ret)
- return ret;
-
- guard(mutex)(&dev->lock);
- if (is_bound(dev))
- return -EBUSY;
-
- dev->config.enable_psmi = val;
-
- return len;
-}
-
-static ssize_t enable_multi_queue_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = to_xe_config_device(item);
-
- return sprintf(page, "%d\n", dev->enable_multi_queue);
-}
-
-static ssize_t enable_multi_queue_store(struct config_item *item, const char *page,
- size_t len)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
- bool val;
- int ret;
-
- ret = kstrtobool(page, &val);
- if (ret)
- return ret;
-
- guard(mutex)(&dev->lock);
- if (is_bound(dev))
- return -EBUSY;
-
- dev->config.enable_multi_queue = val;
-
- return len;
+ *cs = dev->config.ctx_restore_post_bb[class].cs;
+ len = dev->config.ctx_restore_post_bb[class].len;
+ config_group_put(&dev->group);
+
+ return len;
}
static bool wa_bb_read_advance(bool dereference, char **p,
@@ -718,6 +534,9 @@ static ssize_t parse_hex(const char *line, u32 *pval)
return p - line;
}
+static int parse_engine(const char *s, const char *end_chars, u64 *mask,
+ const struct engine_info **pinfo);
+
/*
* Parse lines with the format
*
@@ -796,76 +615,440 @@ static ssize_t wa_bb_store(struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX],
ssize_t count, class;
u32 *tmp;
- /* 1. Count dwords - wa_bb[i].cs is NULL for all classes */
- count = parse_wa_bb_lines(page, tmp_wa_bb);
- if (count < 0)
- return count;
+ /* 1. Count dwords - wa_bb[i].cs is NULL for all classes */
+ count = parse_wa_bb_lines(page, tmp_wa_bb);
+ if (count < 0)
+ return count;
+
+ guard(mutex)(&dev->lock);
+
+ if (is_bound(dev))
+ return -EBUSY;
+
+ /*
+ * 2. Allocate a u32 array and set the pointers to the right positions
+ * according to the length of each class' wa_bb
+ */
+ tmp = krealloc(wa_bb[0].cs, count * sizeof(u32), GFP_KERNEL);
+ if (!tmp)
+ return -ENOMEM;
+
+ if (!count) {
+ memset(wa_bb, 0, sizeof(tmp_wa_bb));
+ return len;
+ }
+
+ for (class = 0, count = 0; class < XE_ENGINE_CLASS_MAX; ++class) {
+ tmp_wa_bb[class].cs = tmp + count;
+ count += tmp_wa_bb[class].len;
+ tmp_wa_bb[class].len = 0;
+ }
+
+ /* 3. Parse wa_bb lines again, this time saving the values */
+ count = parse_wa_bb_lines(page, tmp_wa_bb);
+ if (count < 0)
+ return count;
+
+ memcpy(wa_bb, tmp_wa_bb, sizeof(tmp_wa_bb));
+
+ return len;
+}
+
+static ssize_t ctx_restore_mid_bb_store(struct config_item *item,
+ const char *data, size_t sz)
+{
+ struct xe_config_group_device *dev = to_xe_config_group_device(item);
+
+ return wa_bb_store(dev->config.ctx_restore_mid_bb, dev, data, sz);
+}
+
+static ssize_t ctx_restore_post_bb_store(struct config_item *item,
+ const char *data, size_t sz)
+{
+ struct xe_config_group_device *dev = to_xe_config_group_device(item);
+
+ return wa_bb_store(dev->config.ctx_restore_post_bb, dev, data, sz);
+}
+
+/**
+ * xe_configfs_get_engines_allowed - get engine allowed mask from configfs
+ * @pdev: pci device
+ *
+ * Return: engine mask with allowed engines set in configfs
+ */
+u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
+ u64 engines_allowed;
+
+ if (!dev)
+ return device_defaults.engines_allowed;
+
+ engines_allowed = dev->config.engines_allowed;
+ config_group_put(&dev->group);
+
+ return engines_allowed;
+}
+
+static ssize_t engines_allowed_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = to_xe_config_device(item);
+ char *p = page;
+
+ for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
+ u64 mask = engine_info[i].mask;
+
+ if ((dev->engines_allowed & mask) == mask) {
+ p += sprintf(p, "%s*\n", engine_info[i].cls);
+ } else if (mask & dev->engines_allowed) {
+ u16 bit0 = __ffs64(mask), bit;
+
+ mask &= dev->engines_allowed;
+
+ for_each_set_bit(bit, (const unsigned long *)&mask, 64)
+ p += sprintf(p, "%s%u\n", engine_info[i].cls,
+ bit - bit0);
+ }
+ }
+
+ return p - page;
+}
+
+/*
+ * Lookup engine_info. If @mask is not NULL, reduce the mask according to the
+ * instance in @pattern.
+ *
+ * Examples of inputs:
+ * - lookup_engine_info("rcs0", &mask): return "rcs" entry from @engine_info and
+ * mask == BIT_ULL(XE_HW_ENGINE_RCS0)
+ * - lookup_engine_info("rcs*", &mask): return "rcs" entry from @engine_info and
+ * mask == XE_HW_ENGINE_RCS_MASK
+ * - lookup_engine_info("rcs", NULL): return "rcs" entry from @engine_info
+ */
+static const struct engine_info *lookup_engine_info(const char *pattern, u64 *mask)
+{
+ for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
+ u8 instance;
+ u16 bit;
+
+ if (!str_has_prefix(pattern, engine_info[i].cls))
+ continue;
+
+ pattern += strlen(engine_info[i].cls);
+ if (!mask)
+ return *pattern ? NULL : &engine_info[i];
+
+ if (!strcmp(pattern, "*")) {
+ *mask = engine_info[i].mask;
+ return &engine_info[i];
+ }
+
+ if (kstrtou8(pattern, 10, &instance))
+ return NULL;
+
+ bit = __ffs64(engine_info[i].mask) + instance;
+ if (bit >= fls64(engine_info[i].mask))
+ return NULL;
+
+ *mask = BIT_ULL(bit);
+ return &engine_info[i];
+ }
+
+ return NULL;
+}
+
+static int parse_engine(const char *s, const char *end_chars, u64 *mask,
+ const struct engine_info **pinfo)
+{
+ char buf[MAX_ENGINE_CLASS_CHARS + MAX_ENGINE_INSTANCE_CHARS + 1];
+ const struct engine_info *info;
+ size_t len;
+
+ len = strcspn(s, end_chars);
+ if (len >= sizeof(buf))
+ return -EINVAL;
+
+ memcpy(buf, s, len);
+ buf[len] = '\0';
+
+ info = lookup_engine_info(buf, mask);
+ if (!info)
+ return -ENOENT;
+
+ if (pinfo)
+ *pinfo = info;
+
+ return len;
+}
+
+static ssize_t engines_allowed_store(struct config_item *item, const char *page,
+ size_t len)
+{
+ struct xe_config_group_device *dev = to_xe_config_group_device(item);
+ ssize_t patternlen, p;
+ u64 mask, val = 0;
+
+ for (p = 0; p < len; p += patternlen + 1) {
+ patternlen = parse_engine(page + p, ",\n", &mask, NULL);
+ if (patternlen < 0)
+ return -EINVAL;
+
+ val |= mask;
+ }
+
+ guard(mutex)(&dev->lock);
+ if (is_bound(dev))
+ return -EBUSY;
+
+ dev->config.engines_allowed = val;
+
+ return len;
+}
+
+static u64 get_gt_types_allowed(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
+ u64 mask;
+
+ if (!dev)
+ return device_defaults.gt_types_allowed;
+
+ mask = dev->config.gt_types_allowed;
+ config_group_put(&dev->group);
+
+ return mask;
+}
+
+/**
+ * xe_configfs_primary_gt_allowed - determine whether primary GTs are supported
+ * @pdev: pci device
+ *
+ * Return: True if primary GTs are enabled, false if they have been disabled via
+ * configfs.
+ */
+bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev)
+{
+ return get_gt_types_allowed(pdev) & BIT_ULL(XE_GT_TYPE_MAIN);
+}
+
+/**
+ * xe_configfs_media_gt_allowed - determine whether media GTs are supported
+ * @pdev: pci device
+ *
+ * Return: True if the media GTs are enabled, false if they have been disabled
+ * via configfs.
+ */
+bool xe_configfs_media_gt_allowed(struct pci_dev *pdev)
+{
+ return get_gt_types_allowed(pdev) & BIT_ULL(XE_GT_TYPE_MEDIA);
+}
+
+static ssize_t gt_types_allowed_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = to_xe_config_device(item);
+ char *p = page;
+
+ for (size_t i = 0; i < ARRAY_SIZE(gt_types); i++)
+ if (dev->gt_types_allowed & BIT_ULL(gt_types[i].type))
+ p += sprintf(p, "%s\n", gt_types[i].name);
+
+ return p - page;
+}
+
+static ssize_t gt_types_allowed_store(struct config_item *item, const char *page,
+ size_t len)
+{
+ struct xe_config_group_device *dev = to_xe_config_group_device(item);
+ char *buf __free(kfree) = kstrdup(page, GFP_KERNEL);
+ char *p = buf;
+ u64 typemask = 0;
+
+ if (!buf)
+ return -ENOMEM;
+
+ while (p) {
+ char *typename = strsep(&p, ",\n");
+ bool matched = false;
+
+ if (typename[0] == '\0')
+ continue;
+
+ for (size_t i = 0; i < ARRAY_SIZE(gt_types); i++) {
+ if (strcmp(typename, gt_types[i].name) == 0) {
+ typemask |= BIT(gt_types[i].type);
+ matched = true;
+ break;
+ }
+ }
+
+ if (!matched)
+ return -EINVAL;
+ }
+
+ guard(mutex)(&dev->lock);
+ if (is_bound(dev))
+ return -EBUSY;
+
+ dev->config.gt_types_allowed = typemask;
+
+ return len;
+}
+
+/**
+ * xe_configfs_get_enable_multi_queue - get configfs enable_multi_queue setting
+ * @pdev: pci device
+ *
+ * Return: true if multi-queue is enabled for this device (the default),
+ * false if it has been force-disabled via configfs.
+ */
+bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
+ bool ret;
+
+ if (!dev)
+ return true;
+
+ ret = dev->config.enable_multi_queue;
+ config_group_put(&dev->group);
+
+ return ret;
+}
+
+static ssize_t enable_multi_queue_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = to_xe_config_device(item);
+
+ return sprintf(page, "%d\n", dev->enable_multi_queue);
+}
+
+static ssize_t enable_multi_queue_store(struct config_item *item, const char *page,
+ size_t len)
+{
+ struct xe_config_group_device *dev = to_xe_config_group_device(item);
+ bool val;
+ int ret;
+
+ ret = kstrtobool(page, &val);
+ if (ret)
+ return ret;
+
+ guard(mutex)(&dev->lock);
+ if (is_bound(dev))
+ return -EBUSY;
+
+ dev->config.enable_multi_queue = val;
+
+ return len;
+}
+
+/**
+ * xe_configfs_get_psmi_enabled - get configfs enable_psmi setting
+ * @pdev: pci device
+ *
+ * Return: enable_psmi setting in configfs
+ */
+bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
+ bool ret;
+
+ if (!dev)
+ return false;
+
+ ret = dev->config.enable_psmi;
+ config_group_put(&dev->group);
+
+ return ret;
+}
+
+static ssize_t enable_psmi_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = to_xe_config_device(item);
+
+ return sprintf(page, "%d\n", dev->enable_psmi);
+}
+
+static ssize_t enable_psmi_store(struct config_item *item, const char *page, size_t len)
+{
+ struct xe_config_group_device *dev = to_xe_config_group_device(item);
+ bool val;
+ int ret;
+
+ ret = kstrtobool(page, &val);
+ if (ret)
+ return ret;
guard(mutex)(&dev->lock);
-
if (is_bound(dev))
return -EBUSY;
- /*
- * 2. Allocate a u32 array and set the pointers to the right positions
- * according to the length of each class' wa_bb
- */
- tmp = krealloc(wa_bb[0].cs, count * sizeof(u32), GFP_KERNEL);
- if (!tmp)
- return -ENOMEM;
+ dev->config.enable_psmi = val;
- if (!count) {
- memset(wa_bb, 0, sizeof(tmp_wa_bb));
- return len;
- }
+ return len;
+}
- for (class = 0, count = 0; class < XE_ENGINE_CLASS_MAX; ++class) {
- tmp_wa_bb[class].cs = tmp + count;
- count += tmp_wa_bb[class].len;
- tmp_wa_bb[class].len = 0;
- }
+/**
+ * xe_configfs_get_survivability_mode - get configfs survivability mode attribute
+ * @pdev: pci device
+ *
+ * Return: survivability_mode attribute in configfs
+ */
+bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
+ bool mode;
- /* 3. Parse wa_bb lines again, this time saving the values */
- count = parse_wa_bb_lines(page, tmp_wa_bb);
- if (count < 0)
- return count;
+ if (!dev)
+ return device_defaults.survivability_mode;
- memcpy(wa_bb, tmp_wa_bb, sizeof(tmp_wa_bb));
+ mode = dev->config.survivability_mode;
+ config_group_put(&dev->group);
- return len;
+ return mode;
}
-static ssize_t ctx_restore_mid_bb_store(struct config_item *item,
- const char *data, size_t sz)
+static ssize_t survivability_mode_show(struct config_item *item, char *page)
{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
+ struct xe_config_device *dev = to_xe_config_device(item);
- return wa_bb_store(dev->config.ctx_restore_mid_bb, dev, data, sz);
+ return sprintf(page, "%d\n", dev->survivability_mode);
}
-static ssize_t ctx_restore_post_bb_store(struct config_item *item,
- const char *data, size_t sz)
+static ssize_t survivability_mode_store(struct config_item *item, const char *page, size_t len)
{
struct xe_config_group_device *dev = to_xe_config_group_device(item);
+ bool survivability_mode;
+ int ret;
- return wa_bb_store(dev->config.ctx_restore_post_bb, dev, data, sz);
+ ret = kstrtobool(page, &survivability_mode);
+ if (ret)
+ return ret;
+
+ guard(mutex)(&dev->lock);
+ if (is_bound(dev))
+ return -EBUSY;
+
+ dev->config.survivability_mode = survivability_mode;
+
+ return len;
}
CONFIGFS_ATTR(, ctx_restore_mid_bb);
CONFIGFS_ATTR(, ctx_restore_post_bb);
-CONFIGFS_ATTR(, enable_multi_queue);
-CONFIGFS_ATTR(, enable_psmi);
CONFIGFS_ATTR(, engines_allowed);
CONFIGFS_ATTR(, gt_types_allowed);
+CONFIGFS_ATTR(, enable_multi_queue);
+CONFIGFS_ATTR(, enable_psmi);
CONFIGFS_ATTR(, survivability_mode);
static struct configfs_attribute *xe_config_device_attrs[] = {
&attr_ctx_restore_mid_bb,
&attr_ctx_restore_post_bb,
- &attr_enable_multi_queue,
- &attr_enable_psmi,
&attr_engines_allowed,
&attr_gt_types_allowed,
+ &attr_enable_multi_queue,
+ &attr_enable_psmi,
&attr_survivability_mode,
NULL,
};
@@ -1138,8 +1321,8 @@ static void dump_custom_dev_config(struct pci_dev *pdev,
dev->config.attr_); \
} while (0)
- PRI_CUSTOM_ATTR("%llx", gt_types_allowed);
PRI_CUSTOM_ATTR("%llx", engines_allowed);
+ PRI_CUSTOM_ATTR("%llx", gt_types_allowed);
PRI_CUSTOM_ATTR("%d", enable_multi_queue);
PRI_CUSTOM_ATTR("%d", enable_psmi);
PRI_CUSTOM_ATTR("%d", survivability_mode);
@@ -1171,177 +1354,6 @@ void xe_configfs_check_device(struct pci_dev *pdev)
config_group_put(&dev->group);
}
-/**
- * xe_configfs_get_survivability_mode - get configfs survivability mode attribute
- * @pdev: pci device
- *
- * Return: survivability_mode attribute in configfs
- */
-bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- bool mode;
-
- if (!dev)
- return device_defaults.survivability_mode;
-
- mode = dev->config.survivability_mode;
- config_group_put(&dev->group);
-
- return mode;
-}
-
-static u64 get_gt_types_allowed(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- u64 mask;
-
- if (!dev)
- return device_defaults.gt_types_allowed;
-
- mask = dev->config.gt_types_allowed;
- config_group_put(&dev->group);
-
- return mask;
-}
-
-/**
- * xe_configfs_primary_gt_allowed - determine whether primary GTs are supported
- * @pdev: pci device
- *
- * Return: True if primary GTs are enabled, false if they have been disabled via
- * configfs.
- */
-bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev)
-{
- return get_gt_types_allowed(pdev) & BIT_ULL(XE_GT_TYPE_MAIN);
-}
-
-/**
- * xe_configfs_media_gt_allowed - determine whether media GTs are supported
- * @pdev: pci device
- *
- * Return: True if the media GTs are enabled, false if they have been disabled
- * via configfs.
- */
-bool xe_configfs_media_gt_allowed(struct pci_dev *pdev)
-{
- return get_gt_types_allowed(pdev) & BIT_ULL(XE_GT_TYPE_MEDIA);
-}
-
-/**
- * xe_configfs_get_engines_allowed - get engine allowed mask from configfs
- * @pdev: pci device
- *
- * Return: engine mask with allowed engines set in configfs
- */
-u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- u64 engines_allowed;
-
- if (!dev)
- return device_defaults.engines_allowed;
-
- engines_allowed = dev->config.engines_allowed;
- config_group_put(&dev->group);
-
- return engines_allowed;
-}
-
-/**
- * xe_configfs_get_psmi_enabled - get configfs enable_psmi setting
- * @pdev: pci device
- *
- * Return: enable_psmi setting in configfs
- */
-bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- bool ret;
-
- if (!dev)
- return false;
-
- ret = dev->config.enable_psmi;
- config_group_put(&dev->group);
-
- return ret;
-}
-
-/**
- * xe_configfs_get_enable_multi_queue - get configfs enable_multi_queue setting
- * @pdev: pci device
- *
- * Return: true if multi-queue is enabled for this device (the default),
- * false if it has been force-disabled via configfs.
- */
-bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- bool ret;
-
- if (!dev)
- return true;
-
- ret = dev->config.enable_multi_queue;
- config_group_put(&dev->group);
-
- return ret;
-}
-
-/**
- * xe_configfs_get_ctx_restore_mid_bb - get configfs ctx_restore_mid_bb setting
- * @pdev: pci device
- * @class: hw engine class
- * @cs: pointer to the bb to use - only valid during probe
- *
- * Return: Number of dwords used in the mid_ctx_restore setting in configfs
- */
-u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev,
- enum xe_engine_class class,
- const u32 **cs)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- u32 len;
-
- if (!dev)
- return 0;
-
- if (cs)
- *cs = dev->config.ctx_restore_mid_bb[class].cs;
-
- len = dev->config.ctx_restore_mid_bb[class].len;
- config_group_put(&dev->group);
-
- return len;
-}
-
-/**
- * xe_configfs_get_ctx_restore_post_bb - get configfs ctx_restore_post_bb setting
- * @pdev: pci device
- * @class: hw engine class
- * @cs: pointer to the bb to use - only valid during probe
- *
- * Return: Number of dwords used in the post_ctx_restore setting in configfs
- */
-u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
- enum xe_engine_class class,
- const u32 **cs)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- u32 len;
-
- if (!dev)
- return 0;
-
- *cs = dev->config.ctx_restore_post_bb[class].cs;
- len = dev->config.ctx_restore_post_bb[class].len;
- config_group_put(&dev->group);
-
- return len;
-}
-
#ifdef CONFIG_PCI_IOV
/**
* xe_configfs_admin_only_pf() - Get PF's operational mode.
diff --git a/drivers/gpu/drm/xe/xe_configfs.h b/drivers/gpu/drm/xe/xe_configfs.h
index 4fbbeafba473..bba592fb612c 100644
--- a/drivers/gpu/drm/xe/xe_configfs.h
+++ b/drivers/gpu/drm/xe/xe_configfs.h
@@ -18,18 +18,18 @@ struct pci_dev;
int xe_configfs_init(void);
void xe_configfs_exit(void);
void xe_configfs_check_device(struct pci_dev *pdev);
-bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
-bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev);
-bool xe_configfs_media_gt_allowed(struct pci_dev *pdev);
-u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev);
-bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev);
-bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev);
u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev,
enum xe_engine_class class,
const u32 **cs);
u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
enum xe_engine_class class,
const u32 **cs);
+u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev);
+bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev);
+bool xe_configfs_media_gt_allowed(struct pci_dev *pdev);
+bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev);
+bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev);
+bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
#ifdef CONFIG_PCI_IOV
unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev);
bool xe_configfs_admin_only_pf(struct pci_dev *pdev);
@@ -38,18 +38,18 @@ bool xe_configfs_admin_only_pf(struct pci_dev *pdev);
static inline int xe_configfs_init(void) { return 0; }
static inline void xe_configfs_exit(void) { }
static inline void xe_configfs_check_device(struct pci_dev *pdev) { }
-static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; }
-static inline bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev) { return true; }
-static inline bool xe_configfs_media_gt_allowed(struct pci_dev *pdev) { return true; }
-static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; }
-static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; }
-static inline bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev) { return true; }
static inline u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev,
enum xe_engine_class class,
const u32 **cs) { return 0; }
static inline u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
enum xe_engine_class class,
const u32 **cs) { return 0; }
+static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; }
+static inline bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev) { return true; }
+static inline bool xe_configfs_media_gt_allowed(struct pci_dev *pdev) { return true; }
+static inline bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev) { return true; }
+static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; }
+static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; }
#ifdef CONFIG_PCI_IOV
static inline unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev)
{
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/9] drm/xe: Split out configfs data structures
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
2026-07-22 21:46 ` [PATCH 1/9] drm/xe: Sort xe_config_device fields Stuart Summers
@ 2026-07-22 21:46 ` Stuart Summers
2026-07-22 21:46 ` [PATCH 3/9] drm/xe: Add a new debug focused configfs group Stuart Summers
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Stuart Summers @ 2026-07-22 21:46 UTC (permalink / raw)
Cc: intel-xe, rodrigo.vivi, matthew.brost, umesh.nerlige.ramappa,
Michal.Wajdeczko, matthew.d.roper, daniele.ceraolospurio,
shuicheng.lin, Stuart Summers
Planning on moving debug specific configfs parameters
to their own file in a future patch. In preparation for
that change, move the structures in xe_configfs.c to a
new _types.h file so we can easily access them in the
different configfs files.
Doing that separately here instead of combining with
the patch that adds the debug file for ease of review.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Assisted-by: Copilot:claude-sonnet-4.6,claude-opus-4.7
---
drivers/gpu/drm/xe/xe_configfs.c | 41 --------------------
drivers/gpu/drm/xe/xe_configfs.h | 2 +-
drivers/gpu/drm/xe/xe_configfs_types.h | 53 ++++++++++++++++++++++++++
3 files changed, 54 insertions(+), 42 deletions(-)
create mode 100644 drivers/gpu/drm/xe/xe_configfs_types.h
diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index b7e76c7c19da..f8f9afe82488 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -4,7 +4,6 @@
*/
#include <linux/bitops.h>
-#include <linux/ctype.h>
#include <linux/configfs.h>
#include <linux/cleanup.h>
#include <linux/find.h>
@@ -17,10 +16,7 @@
#include "xe_configfs.h"
#include "xe_defaults.h"
#include "xe_gt_types.h"
-#include "xe_hw_engine_types.h"
#include "xe_module.h"
-#include "xe_pci_types.h"
-#include "xe_sriov_types.h"
/**
* DOC: Xe Configfs
@@ -259,43 +255,6 @@
* # rmdir /sys/kernel/config/xe/0000:03:00.0/
*/
-/* Similar to struct xe_bb, but not tied to HW (yet) */
-struct wa_bb {
- u32 *cs;
- u32 len; /* in dwords */
-};
-
-struct xe_config_group_device {
- struct config_group group;
- struct config_group sriov;
-
- /*
- * Fields sorted by type (largest first) then name: struct arrays,
- * u64, u32/unsigned int, u8, bool, sub-structs last. Within each
- * type, entries are sorted alphabetically.
- */
- struct xe_config_device {
- struct wa_bb ctx_restore_mid_bb[XE_ENGINE_CLASS_MAX];
- struct wa_bb ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
- u64 engines_allowed;
- u64 gt_types_allowed;
- bool enable_multi_queue;
- bool enable_psmi;
- bool survivability_mode;
- struct {
- unsigned int max_vfs;
- bool admin_only_pf;
- } sriov;
- } config;
-
- /* protects attributes */
- struct mutex lock;
- /* matching descriptor */
- const struct xe_device_desc *desc;
- /* tentative SR-IOV mode */
- enum xe_sriov_mode mode;
-};
-
static const struct xe_config_device device_defaults = {
.engines_allowed = U64_MAX,
.gt_types_allowed = U64_MAX,
diff --git a/drivers/gpu/drm/xe/xe_configfs.h b/drivers/gpu/drm/xe/xe_configfs.h
index bba592fb612c..7db2f46291fa 100644
--- a/drivers/gpu/drm/xe/xe_configfs.h
+++ b/drivers/gpu/drm/xe/xe_configfs.h
@@ -8,8 +8,8 @@
#include <linux/limits.h>
#include <linux/types.h>
+#include "xe_configfs_types.h"
#include "xe_defaults.h"
-#include "xe_hw_engine_types.h"
#include "xe_module.h"
struct pci_dev;
diff --git a/drivers/gpu/drm/xe/xe_configfs_types.h b/drivers/gpu/drm/xe/xe_configfs_types.h
new file mode 100644
index 000000000000..3be7d6160b4c
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_configfs_types.h
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+#ifndef _XE_CONFIGFS_TYPES_H_
+#define _XE_CONFIGFS_TYPES_H_
+
+#include <linux/configfs.h>
+#include <linux/mutex.h>
+#include <linux/types.h>
+
+#include "xe_hw_engine_types.h"
+#include "xe_pci_types.h"
+#include "xe_sriov_types.h"
+
+/* Similar to struct xe_bb, but not tied to HW (yet) */
+struct wa_bb {
+ u32 *cs;
+ u32 len; /* in dwords */
+};
+
+struct xe_config_group_device {
+ struct config_group group;
+ struct config_group sriov;
+
+ /*
+ * Fields sorted by type (largest first) then name: struct arrays,
+ * u64, u32/unsigned int, u8, bool, sub-structs last. Within each
+ * type, entries are sorted alphabetically.
+ */
+ struct xe_config_device {
+ struct wa_bb ctx_restore_mid_bb[XE_ENGINE_CLASS_MAX];
+ struct wa_bb ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
+ u64 engines_allowed;
+ u64 gt_types_allowed;
+ bool enable_multi_queue;
+ bool enable_psmi;
+ bool survivability_mode;
+ struct {
+ unsigned int max_vfs;
+ bool admin_only_pf;
+ } sriov;
+ } config;
+
+ /* protects attributes */
+ struct mutex lock;
+ /* matching descriptor */
+ const struct xe_device_desc *desc;
+ /* tentative SR-IOV mode */
+ enum xe_sriov_mode mode;
+};
+
+#endif /* _XE_CONFIGFS_TYPES_H_ */
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/9] drm/xe: Add a new debug focused configfs group
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
2026-07-22 21:46 ` [PATCH 1/9] drm/xe: Sort xe_config_device fields Stuart Summers
2026-07-22 21:46 ` [PATCH 2/9] drm/xe: Split out configfs data structures Stuart Summers
@ 2026-07-22 21:46 ` Stuart Summers
2026-07-22 21:47 ` [PATCH 4/9] drm/xe: Move debug configfs entries to xe_configfs_debug.c Stuart Summers
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Stuart Summers @ 2026-07-22 21:46 UTC (permalink / raw)
Cc: intel-xe, rodrigo.vivi, matthew.brost, umesh.nerlige.ramappa,
Michal.Wajdeczko, matthew.d.roper, daniele.ceraolospurio,
shuicheng.lin, Stuart Summers
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>
Assisted-by: Copilot:claude-sonnet-4.6,claude-opus-4.7
---
drivers/gpu/drm/xe/Makefile | 2 ++
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, 37 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 67ada1d6c2fb..5765751781ae 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -162,6 +162,8 @@ xe-$(CONFIG_HWMON) += xe_hwmon.o
xe-$(CONFIG_PERF_EVENTS) += xe_pmu.o
xe-$(CONFIG_CONFIGFS_FS) += xe_configfs.o
+xe_debug_configfs_obj-$(CONFIG_DRM_XE_DEBUG) := xe_configfs_debug.o
+xe-$(CONFIG_CONFIGFS_FS) += $(xe_debug_configfs_obj-y)
# graphics virtualization (SR-IOV) support
xe-y += \
diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index f8f9afe82488..4b92e3072d56 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"
@@ -1233,6 +1234,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 3be7d6160b4c..e22b9424f719 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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/9] drm/xe: Move debug configfs entries to xe_configfs_debug.c
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
` (2 preceding siblings ...)
2026-07-22 21:46 ` [PATCH 3/9] drm/xe: Add a new debug focused configfs group Stuart Summers
@ 2026-07-22 21:47 ` Stuart Summers
2026-07-22 21:47 ` [PATCH 5/9] drm/xe/guc: Add configfs support for guc_log_level Stuart Summers
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Stuart Summers @ 2026-07-22 21:47 UTC (permalink / raw)
Cc: intel-xe, rodrigo.vivi, matthew.brost, umesh.nerlige.ramappa,
Michal.Wajdeczko, matthew.d.roper, daniele.ceraolospurio,
shuicheng.lin, Stuart Summers
Move the debug specific configfs attributes into the new
xe_configfs_debug.c file under a new debug configfs subdirectory.
Ensure these are wrapped in CONFIG_DRM_XE_DEBUG to allow finer grained
debug changes outside of more ABI specific configfs entries.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Assisted-by: Copilot:claude-sonnet-4.6,claude-sonnet-5
---
drivers/gpu/drm/xe/xe_configfs.c | 982 ++-------------------
drivers/gpu/drm/xe/xe_configfs.h | 88 +-
drivers/gpu/drm/xe/xe_configfs_debug.c | 951 ++++++++++++++++++++
drivers/gpu/drm/xe/xe_configfs_debug.h | 39 +-
drivers/gpu/drm/xe/xe_configfs_types.h | 18 +-
drivers/gpu/drm/xe/xe_guc.c | 1 +
drivers/gpu/drm/xe/xe_guc_ads.c | 1 +
drivers/gpu/drm/xe/xe_hw_engine.c | 1 +
drivers/gpu/drm/xe/xe_lrc.c | 1 +
drivers/gpu/drm/xe/xe_pci.c | 1 +
drivers/gpu/drm/xe/xe_psmi.c | 1 +
drivers/gpu/drm/xe/xe_rtp.c | 1 +
drivers/gpu/drm/xe/xe_survivability_mode.c | 1 +
13 files changed, 1129 insertions(+), 957 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index 4b92e3072d56..111aacce8a84 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -6,17 +6,14 @@
#include <linux/bitops.h>
#include <linux/configfs.h>
#include <linux/cleanup.h>
-#include <linux/find.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/string.h>
-#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"
/**
@@ -50,16 +47,9 @@
*
* /sys/kernel/config/xe/
* ├── 0000:00:02.0
- * │ └── ...
- * ├── 0000:00:02.1
- * │ └── ...
- * :
- * └── 0000:03:00.0
- * ├── engines_allowed
- * ├── gt_types_allowed
- * ├── enable_multi_queue
- * ├── enable_psmi
- * └── survivability_mode
+ * │ └── ...
+ * └── 0000:00:02.1
+ * └── ...
*
* After configuring the attributes as per next section, the device can be
* probed with::
@@ -71,157 +61,6 @@
* Configure Attributes
* ====================
*
-
- * Context restore BB
- * ------------------
- *
- * Allow to execute a batch buffer during any context switches. When the
- * GPU is restoring the context, it executes additional commands. It's useful
- * for testing additional workarounds and validating certain HW behaviors: it's
- * not intended for normal execution and will taint the kernel with TAINT_TEST
- * when used.
- *
- * The syntax allows to pass straight instructions to be executed by the engine
- * in a batch buffer or set specific registers.
- *
- * #. Generic instruction::
- *
- * <engine-class> cmd <instr> [[dword0] [dword1] [...]]
- *
- * #. Simple register setting::
- *
- * <engine-class> reg <address> <value>
- *
- * Commands are saved per engine class: all instances of that class will execute
- * those commands during context switch. The instruction, dword arguments,
- * addresses and values are in hex format like in the examples below.
- *
- * #. Execute a LRI command to write 0xDEADBEEF to register 0x4f10 after the
- * normal context restore::
- *
- * # echo 'rcs cmd 11000001 4F100 DEADBEEF' \
- * > /sys/kernel/config/xe/0000:03:00.0/ctx_restore_post_bb
- *
- * #. Execute a LRI command to write 0xDEADBEEF to register 0x4f10 at the
- * beginning of the context restore::
- *
- * # echo 'rcs cmd 11000001 4F100 DEADBEEF' \
- * > /sys/kernel/config/xe/0000:03:00.0/ctx_restore_mid_bb
-
- * #. Load certain values in a couple of registers (it can be used as a simpler
- * alternative to the `cmd`) action::
- *
- * # cat > /sys/kernel/config/xe/0000:03:00.0/ctx_restore_post_bb <<EOF
- * rcs reg 4F100 DEADBEEF
- * rcs reg 4F104 FFFFFFFF
- * EOF
- *
- * .. note::
- *
- * When using multiple lines, make sure to use a command that is
- * implemented with a single write syscall, like HEREDOC.
- *
- * Currently this is implemented only for post and mid context restore and
- * these attributes can only be set before binding to the device.
- *
- * Allowed engines:
- * ----------------
- *
- * Allow only a set of engine(s) to be available, disabling the other engines
- * even if they are available in hardware. This is applied after HW fuses are
- * considered on each tile. Examples:
- *
- * Allow only one render and one copy engines, nothing else::
- *
- * # echo 'rcs0,bcs0' > /sys/kernel/config/xe/0000:03:00.0/engines_allowed
- *
- * Allow only compute engines and first copy engine::
- *
- * # echo 'ccs*,bcs0' > /sys/kernel/config/xe/0000:03:00.0/engines_allowed
- *
- * Note that the engine names are the per-GT hardware names. On multi-tile
- * platforms, writing ``rcs0,bcs0`` to this file would allow the first render
- * and copy engines on each tile.
- *
- * The requested configuration may not be supported by the platform and driver
- * may fail to probe. For example: if at least one copy engine is expected to be
- * available for migrations, but it's disabled. This is intended for debugging
- * purposes only.
- *
- * This attribute can only be set before binding to the device.
- *
- * Allowed GT types:
- * -----------------
- *
- * Allow only specific types of GTs to be detected and initialized by the
- * driver. Any combination of GT types can be enabled/disabled, although
- * some settings will cause the device to fail to probe.
- *
- * Writes support both comma- and newline-separated input format. Reads
- * will always return one GT type per line. "primary" and "media" are the
- * GT type names supported by this interface.
- *
- * This attribute can only be set before binding to the device.
- *
- * Examples:
- *
- * Allow both primary and media GTs to be initialized and used. This matches
- * the driver's default behavior::
- *
- * # echo 'primary,media' > /sys/kernel/config/xe/0000:03:00.0/gt_types_allowed
- *
- * Allow only the primary GT of each tile to be initialized and used,
- * effectively disabling the media GT if it exists on the platform::
- *
- * # echo 'primary' > /sys/kernel/config/xe/0000:03:00.0/gt_types_allowed
- *
- * Allow only the media GT of each tile to be initialized and used,
- * effectively disabling the primary GT. **This configuration will cause
- * device probe failure on all current platforms, but may be allowed on
- * igpu platforms in the future**::
- *
- * # echo 'media' > /sys/kernel/config/xe/0000:03:00.0/gt_types_allowed
- *
- * Disable all GTs. Only other GPU IP (such as display) is potentially usable.
- * **This configuration will cause device probe failure on all current
- * platforms, but may be allowed on igpu platforms in the future**::
- *
- * # echo '' > /sys/kernel/config/xe/0000:03:00.0/gt_types_allowed
- *
- * Enable multi-queue
- * ------------------
- *
- * Multi-queue support on the device is enabled by default where the
- * hardware supports it. Writing 0 force-disables multi-queue support:
- * multi-queue exec-queue group creation via ioctl is refused, and the
- * GuC feature is disabled::
- *
- * # echo 0 > /sys/kernel/config/xe/0000:03:00.0/enable_multi_queue
- *
- * This attribute can only be set before binding to the device.
- *
- * PSMI
- * ----
- *
- * Enable extra debugging capabilities to trace engine execution. Only useful
- * during early platform enabling and requires additional hardware connected.
- * Once it's enabled, additionals WAs are added and runtime configuration is
- * done via debugfs. Example to enable it::
- *
- * # echo 1 > /sys/kernel/config/xe/0000:03:00.0/enable_psmi
- *
- * This attribute can only be set before binding to the device.
- *
- * Survivability mode:
- * -------------------
- *
- * Enable survivability mode on supported cards. This setting only takes
- * effect when probing the device. Example to enable it::
- *
- * # echo 1 > /sys/kernel/config/xe/0000:03:00.0/survivability_mode
- *
- * This attribute can only be set before binding to the device.
- *
* Max SR-IOV Virtual Functions
* ----------------------------
*
@@ -256,12 +95,16 @@
* # rmdir /sys/kernel/config/xe/0000:03:00.0/
*/
-static const struct xe_config_device device_defaults = {
- .engines_allowed = U64_MAX,
- .gt_types_allowed = U64_MAX,
- .enable_multi_queue = true,
- .enable_psmi = false,
- .survivability_mode = false,
+const struct xe_config_device xe_configfs_device_defaults = {
+#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
+ .debug = {
+ .engines_allowed = U64_MAX,
+ .gt_types_allowed = U64_MAX,
+ .enable_multi_queue = true,
+ .enable_psmi = false,
+ .survivability_mode = false,
+ },
+#endif
.sriov = {
.max_vfs = XE_DEFAULT_MAX_VFS,
.admin_only_pf = XE_DEFAULT_ADMIN_ONLY_PF,
@@ -270,50 +113,22 @@ static const struct xe_config_device device_defaults = {
static void set_device_defaults(struct xe_config_device *config)
{
- *config = device_defaults;
+ *config = xe_configfs_device_defaults;
#ifdef CONFIG_PCI_IOV
config->sriov.max_vfs = xe_modparam.max_vfs;
#endif
}
-struct engine_info {
- const char *cls;
- u64 mask;
- enum xe_engine_class engine_class;
-};
-
-/* Some helpful macros to aid on the sizing of buffer allocation when parsing */
-#define MAX_ENGINE_CLASS_CHARS 5
-#define MAX_ENGINE_INSTANCE_CHARS 2
-
-static const struct engine_info engine_info[] = {
- { .cls = "rcs", .mask = XE_HW_ENGINE_RCS_MASK, .engine_class = XE_ENGINE_CLASS_RENDER },
- { .cls = "bcs", .mask = XE_HW_ENGINE_BCS_MASK, .engine_class = XE_ENGINE_CLASS_COPY },
- { .cls = "vcs", .mask = XE_HW_ENGINE_VCS_MASK, .engine_class = XE_ENGINE_CLASS_VIDEO_DECODE },
- { .cls = "vecs", .mask = XE_HW_ENGINE_VECS_MASK, .engine_class = XE_ENGINE_CLASS_VIDEO_ENHANCE },
- { .cls = "ccs", .mask = XE_HW_ENGINE_CCS_MASK, .engine_class = XE_ENGINE_CLASS_COMPUTE },
- { .cls = "gsccs", .mask = XE_HW_ENGINE_GSCCS_MASK, .engine_class = XE_ENGINE_CLASS_OTHER },
-};
-
-static const struct {
- const char *name;
- enum xe_gt_type type;
-} gt_types[] = {
- { .name = "primary", .type = XE_GT_TYPE_MAIN },
- { .name = "media", .type = XE_GT_TYPE_MEDIA },
-};
-
-static struct xe_config_group_device *to_xe_config_group_device(struct config_item *item)
-{
- return container_of(to_config_group(item), struct xe_config_group_device, group);
-}
-
-static struct xe_config_device *to_xe_config_device(struct config_item *item)
-{
- return &to_xe_config_group_device(item)->config;
-}
-
-static bool is_bound(struct xe_config_group_device *dev)
+/**
+ * xe_configfs_is_bound - check whether the matching pci device is bound
+ * @dev: configfs group device
+ *
+ * Caller must hold @dev->lock.
+ *
+ * Return: true if the matching pci_dev is already bound to a driver,
+ * false otherwise.
+ */
+bool xe_configfs_is_bound(struct xe_config_group_device *dev)
{
unsigned int domain, bus, slot, function;
struct pci_dev *pdev;
@@ -338,689 +153,13 @@ static bool is_bound(struct xe_config_group_device *dev)
return ret;
}
-static struct xe_config_group_device *find_xe_config_group_device(struct pci_dev *pdev);
-
-/**
- * xe_configfs_get_ctx_restore_mid_bb - get configfs ctx_restore_mid_bb setting
- * @pdev: pci device
- * @class: hw engine class
- * @cs: pointer to the bb to use - only valid during probe
- *
- * Return: Number of dwords used in the mid_ctx_restore setting in configfs
- */
-u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev,
- enum xe_engine_class class,
- const u32 **cs)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- u32 len;
-
- if (!dev)
- return 0;
-
- if (cs)
- *cs = dev->config.ctx_restore_mid_bb[class].cs;
-
- len = dev->config.ctx_restore_mid_bb[class].len;
- config_group_put(&dev->group);
-
- return len;
-}
-
-/**
- * xe_configfs_get_ctx_restore_post_bb - get configfs ctx_restore_post_bb setting
- * @pdev: pci device
- * @class: hw engine class
- * @cs: pointer to the bb to use - only valid during probe
- *
- * Return: Number of dwords used in the post_ctx_restore setting in configfs
- */
-u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
- enum xe_engine_class class,
- const u32 **cs)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- u32 len;
-
- if (!dev)
- return 0;
-
- *cs = dev->config.ctx_restore_post_bb[class].cs;
- len = dev->config.ctx_restore_post_bb[class].len;
- config_group_put(&dev->group);
-
- return len;
-}
-
-static bool wa_bb_read_advance(bool dereference, char **p,
- const char *append, size_t len,
- size_t *max_size)
-{
- if (dereference) {
- if (len >= *max_size)
- return false;
- *max_size -= len;
- if (append)
- memcpy(*p, append, len);
- }
-
- *p += len;
-
- return true;
-}
-
-static ssize_t wa_bb_show(struct xe_config_group_device *dev,
- struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX],
- char *data, size_t sz)
-{
- char *p = data;
-
- guard(mutex)(&dev->lock);
-
- for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
- enum xe_engine_class ec = engine_info[i].engine_class;
- size_t len;
-
- if (!wa_bb[ec].len)
- continue;
-
- len = snprintf(p, sz, "%s:", engine_info[i].cls);
- if (!wa_bb_read_advance(data, &p, NULL, len, &sz))
- return -ENOBUFS;
-
- for (size_t j = 0; j < wa_bb[ec].len; j++) {
- len = snprintf(p, sz, " %08x", wa_bb[ec].cs[j]);
- if (!wa_bb_read_advance(data, &p, NULL, len, &sz))
- return -ENOBUFS;
- }
-
- if (!wa_bb_read_advance(data, &p, "\n", 1, &sz))
- return -ENOBUFS;
- }
-
- if (!wa_bb_read_advance(data, &p, "", 1, &sz))
- return -ENOBUFS;
-
- /* Reserve one more to match check for '\0' */
- if (!data)
- p++;
-
- return p - data;
-}
-
-static ssize_t ctx_restore_mid_bb_show(struct config_item *item, char *page)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
-
- return wa_bb_show(dev, dev->config.ctx_restore_mid_bb, page, SZ_4K);
-}
-
-static ssize_t ctx_restore_post_bb_show(struct config_item *item, char *page)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
-
- return wa_bb_show(dev, dev->config.ctx_restore_post_bb, page, SZ_4K);
-}
-
-static void wa_bb_append(struct wa_bb *wa_bb, u32 val)
-{
- if (wa_bb->cs)
- wa_bb->cs[wa_bb->len] = val;
-
- wa_bb->len++;
-}
-
-static ssize_t parse_hex(const char *line, u32 *pval)
-{
- char numstr[12];
- const char *p;
- ssize_t numlen;
-
- p = line + strspn(line, " \t");
- if (!*p || *p == '\n')
- return 0;
-
- numlen = strcspn(p, " \t\n");
- if (!numlen || numlen >= sizeof(numstr) - 1)
- return -EINVAL;
-
- memcpy(numstr, p, numlen);
- numstr[numlen] = '\0';
- p += numlen;
-
- if (kstrtou32(numstr, 16, pval))
- return -EINVAL;
-
- return p - line;
-}
-
-static int parse_engine(const char *s, const char *end_chars, u64 *mask,
- const struct engine_info **pinfo);
-
-/*
- * Parse lines with the format
- *
- * <engine-class> cmd <u32> <u32...>
- * <engine-class> reg <u32_addr> <u32_val>
- *
- * and optionally save them in @wa_bb[i].cs is non-NULL.
- *
- * Return the number of dwords parsed.
- */
-static ssize_t parse_wa_bb_lines(const char *lines,
- struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX])
-{
- ssize_t dwords = 0, ret;
- const char *p;
-
- for (p = lines; *p; p++) {
- const struct engine_info *info = NULL;
- u32 val, val2;
-
- /* Also allow empty lines */
- p += strspn(p, " \t\n");
- if (!*p)
- break;
-
- ret = parse_engine(p, " \t\n", NULL, &info);
- if (ret < 0)
- return ret;
-
- p += ret;
- p += strspn(p, " \t");
-
- if (str_has_prefix(p, "cmd")) {
- for (p += strlen("cmd"); *p;) {
- ret = parse_hex(p, &val);
- if (ret < 0)
- return -EINVAL;
- if (!ret)
- break;
-
- p += ret;
- dwords++;
- wa_bb_append(&wa_bb[info->engine_class], val);
- }
- } else if (str_has_prefix(p, "reg")) {
- p += strlen("reg");
- ret = parse_hex(p, &val);
- if (ret <= 0)
- return -EINVAL;
-
- p += ret;
- ret = parse_hex(p, &val2);
- if (ret <= 0)
- return -EINVAL;
-
- p += ret;
- dwords += 3;
- wa_bb_append(&wa_bb[info->engine_class],
- MI_LOAD_REGISTER_IMM | MI_LRI_NUM_REGS(1));
- wa_bb_append(&wa_bb[info->engine_class], val);
- wa_bb_append(&wa_bb[info->engine_class], val2);
- } else {
- return -EINVAL;
- }
- }
-
- return dwords;
-}
-
-static ssize_t wa_bb_store(struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX],
- struct xe_config_group_device *dev,
- const char *page, size_t len)
-{
- /* tmp_wa_bb must match wa_bb's size */
- struct wa_bb tmp_wa_bb[XE_ENGINE_CLASS_MAX] = { };
- ssize_t count, class;
- u32 *tmp;
-
- /* 1. Count dwords - wa_bb[i].cs is NULL for all classes */
- count = parse_wa_bb_lines(page, tmp_wa_bb);
- if (count < 0)
- return count;
-
- guard(mutex)(&dev->lock);
-
- if (is_bound(dev))
- return -EBUSY;
-
- /*
- * 2. Allocate a u32 array and set the pointers to the right positions
- * according to the length of each class' wa_bb
- */
- tmp = krealloc(wa_bb[0].cs, count * sizeof(u32), GFP_KERNEL);
- if (!tmp)
- return -ENOMEM;
-
- if (!count) {
- memset(wa_bb, 0, sizeof(tmp_wa_bb));
- return len;
- }
-
- for (class = 0, count = 0; class < XE_ENGINE_CLASS_MAX; ++class) {
- tmp_wa_bb[class].cs = tmp + count;
- count += tmp_wa_bb[class].len;
- tmp_wa_bb[class].len = 0;
- }
-
- /* 3. Parse wa_bb lines again, this time saving the values */
- count = parse_wa_bb_lines(page, tmp_wa_bb);
- if (count < 0)
- return count;
-
- memcpy(wa_bb, tmp_wa_bb, sizeof(tmp_wa_bb));
-
- return len;
-}
-
-static ssize_t ctx_restore_mid_bb_store(struct config_item *item,
- const char *data, size_t sz)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
-
- return wa_bb_store(dev->config.ctx_restore_mid_bb, dev, data, sz);
-}
-
-static ssize_t ctx_restore_post_bb_store(struct config_item *item,
- const char *data, size_t sz)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
-
- return wa_bb_store(dev->config.ctx_restore_post_bb, dev, data, sz);
-}
-
-/**
- * xe_configfs_get_engines_allowed - get engine allowed mask from configfs
- * @pdev: pci device
- *
- * Return: engine mask with allowed engines set in configfs
- */
-u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- u64 engines_allowed;
-
- if (!dev)
- return device_defaults.engines_allowed;
-
- engines_allowed = dev->config.engines_allowed;
- config_group_put(&dev->group);
-
- return engines_allowed;
-}
-
-static ssize_t engines_allowed_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = to_xe_config_device(item);
- char *p = page;
-
- for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
- u64 mask = engine_info[i].mask;
-
- if ((dev->engines_allowed & mask) == mask) {
- p += sprintf(p, "%s*\n", engine_info[i].cls);
- } else if (mask & dev->engines_allowed) {
- u16 bit0 = __ffs64(mask), bit;
-
- mask &= dev->engines_allowed;
-
- for_each_set_bit(bit, (const unsigned long *)&mask, 64)
- p += sprintf(p, "%s%u\n", engine_info[i].cls,
- bit - bit0);
- }
- }
-
- return p - page;
-}
-
-/*
- * Lookup engine_info. If @mask is not NULL, reduce the mask according to the
- * instance in @pattern.
- *
- * Examples of inputs:
- * - lookup_engine_info("rcs0", &mask): return "rcs" entry from @engine_info and
- * mask == BIT_ULL(XE_HW_ENGINE_RCS0)
- * - lookup_engine_info("rcs*", &mask): return "rcs" entry from @engine_info and
- * mask == XE_HW_ENGINE_RCS_MASK
- * - lookup_engine_info("rcs", NULL): return "rcs" entry from @engine_info
- */
-static const struct engine_info *lookup_engine_info(const char *pattern, u64 *mask)
-{
- for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
- u8 instance;
- u16 bit;
-
- if (!str_has_prefix(pattern, engine_info[i].cls))
- continue;
-
- pattern += strlen(engine_info[i].cls);
- if (!mask)
- return *pattern ? NULL : &engine_info[i];
-
- if (!strcmp(pattern, "*")) {
- *mask = engine_info[i].mask;
- return &engine_info[i];
- }
-
- if (kstrtou8(pattern, 10, &instance))
- return NULL;
-
- bit = __ffs64(engine_info[i].mask) + instance;
- if (bit >= fls64(engine_info[i].mask))
- return NULL;
-
- *mask = BIT_ULL(bit);
- return &engine_info[i];
- }
-
- return NULL;
-}
-
-static int parse_engine(const char *s, const char *end_chars, u64 *mask,
- const struct engine_info **pinfo)
-{
- char buf[MAX_ENGINE_CLASS_CHARS + MAX_ENGINE_INSTANCE_CHARS + 1];
- const struct engine_info *info;
- size_t len;
-
- len = strcspn(s, end_chars);
- if (len >= sizeof(buf))
- return -EINVAL;
-
- memcpy(buf, s, len);
- buf[len] = '\0';
-
- info = lookup_engine_info(buf, mask);
- if (!info)
- return -ENOENT;
-
- if (pinfo)
- *pinfo = info;
-
- return len;
-}
-
-static ssize_t engines_allowed_store(struct config_item *item, const char *page,
- size_t len)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
- ssize_t patternlen, p;
- u64 mask, val = 0;
-
- for (p = 0; p < len; p += patternlen + 1) {
- patternlen = parse_engine(page + p, ",\n", &mask, NULL);
- if (patternlen < 0)
- return -EINVAL;
-
- val |= mask;
- }
-
- guard(mutex)(&dev->lock);
- if (is_bound(dev))
- return -EBUSY;
-
- dev->config.engines_allowed = val;
-
- return len;
-}
-
-static u64 get_gt_types_allowed(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- u64 mask;
-
- if (!dev)
- return device_defaults.gt_types_allowed;
-
- mask = dev->config.gt_types_allowed;
- config_group_put(&dev->group);
-
- return mask;
-}
-
-/**
- * xe_configfs_primary_gt_allowed - determine whether primary GTs are supported
- * @pdev: pci device
- *
- * Return: True if primary GTs are enabled, false if they have been disabled via
- * configfs.
- */
-bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev)
-{
- return get_gt_types_allowed(pdev) & BIT_ULL(XE_GT_TYPE_MAIN);
-}
-
-/**
- * xe_configfs_media_gt_allowed - determine whether media GTs are supported
- * @pdev: pci device
- *
- * Return: True if the media GTs are enabled, false if they have been disabled
- * via configfs.
- */
-bool xe_configfs_media_gt_allowed(struct pci_dev *pdev)
-{
- return get_gt_types_allowed(pdev) & BIT_ULL(XE_GT_TYPE_MEDIA);
-}
-
-static ssize_t gt_types_allowed_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = to_xe_config_device(item);
- char *p = page;
-
- for (size_t i = 0; i < ARRAY_SIZE(gt_types); i++)
- if (dev->gt_types_allowed & BIT_ULL(gt_types[i].type))
- p += sprintf(p, "%s\n", gt_types[i].name);
-
- return p - page;
-}
-
-static ssize_t gt_types_allowed_store(struct config_item *item, const char *page,
- size_t len)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
- char *buf __free(kfree) = kstrdup(page, GFP_KERNEL);
- char *p = buf;
- u64 typemask = 0;
-
- if (!buf)
- return -ENOMEM;
-
- while (p) {
- char *typename = strsep(&p, ",\n");
- bool matched = false;
-
- if (typename[0] == '\0')
- continue;
-
- for (size_t i = 0; i < ARRAY_SIZE(gt_types); i++) {
- if (strcmp(typename, gt_types[i].name) == 0) {
- typemask |= BIT(gt_types[i].type);
- matched = true;
- break;
- }
- }
-
- if (!matched)
- return -EINVAL;
- }
-
- guard(mutex)(&dev->lock);
- if (is_bound(dev))
- return -EBUSY;
-
- dev->config.gt_types_allowed = typemask;
-
- return len;
-}
-
-/**
- * xe_configfs_get_enable_multi_queue - get configfs enable_multi_queue setting
- * @pdev: pci device
- *
- * Return: true if multi-queue is enabled for this device (the default),
- * false if it has been force-disabled via configfs.
- */
-bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- bool ret;
-
- if (!dev)
- return true;
-
- ret = dev->config.enable_multi_queue;
- config_group_put(&dev->group);
-
- return ret;
-}
-
-static ssize_t enable_multi_queue_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = to_xe_config_device(item);
-
- return sprintf(page, "%d\n", dev->enable_multi_queue);
-}
-
-static ssize_t enable_multi_queue_store(struct config_item *item, const char *page,
- size_t len)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
- bool val;
- int ret;
-
- ret = kstrtobool(page, &val);
- if (ret)
- return ret;
-
- guard(mutex)(&dev->lock);
- if (is_bound(dev))
- return -EBUSY;
-
- dev->config.enable_multi_queue = val;
-
- return len;
-}
-
-/**
- * xe_configfs_get_psmi_enabled - get configfs enable_psmi setting
- * @pdev: pci device
- *
- * Return: enable_psmi setting in configfs
- */
-bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- bool ret;
-
- if (!dev)
- return false;
-
- ret = dev->config.enable_psmi;
- config_group_put(&dev->group);
-
- return ret;
-}
-
-static ssize_t enable_psmi_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = to_xe_config_device(item);
-
- return sprintf(page, "%d\n", dev->enable_psmi);
-}
-
-static ssize_t enable_psmi_store(struct config_item *item, const char *page, size_t len)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
- bool val;
- int ret;
-
- ret = kstrtobool(page, &val);
- if (ret)
- return ret;
-
- guard(mutex)(&dev->lock);
- if (is_bound(dev))
- return -EBUSY;
-
- dev->config.enable_psmi = val;
-
- return len;
-}
-
-/**
- * xe_configfs_get_survivability_mode - get configfs survivability mode attribute
- * @pdev: pci device
- *
- * Return: survivability_mode attribute in configfs
- */
-bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
- bool mode;
-
- if (!dev)
- return device_defaults.survivability_mode;
-
- mode = dev->config.survivability_mode;
- config_group_put(&dev->group);
-
- return mode;
-}
-
-static ssize_t survivability_mode_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = to_xe_config_device(item);
-
- return sprintf(page, "%d\n", dev->survivability_mode);
-}
-
-static ssize_t survivability_mode_store(struct config_item *item, const char *page, size_t len)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
- bool survivability_mode;
- int ret;
-
- ret = kstrtobool(page, &survivability_mode);
- if (ret)
- return ret;
-
- guard(mutex)(&dev->lock);
- if (is_bound(dev))
- return -EBUSY;
-
- dev->config.survivability_mode = survivability_mode;
-
- return len;
-}
-
-CONFIGFS_ATTR(, ctx_restore_mid_bb);
-CONFIGFS_ATTR(, ctx_restore_post_bb);
-CONFIGFS_ATTR(, engines_allowed);
-CONFIGFS_ATTR(, gt_types_allowed);
-CONFIGFS_ATTR(, enable_multi_queue);
-CONFIGFS_ATTR(, enable_psmi);
-CONFIGFS_ATTR(, survivability_mode);
-
-static struct configfs_attribute *xe_config_device_attrs[] = {
- &attr_ctx_restore_mid_bb,
- &attr_ctx_restore_post_bb,
- &attr_engines_allowed,
- &attr_gt_types_allowed,
- &attr_enable_multi_queue,
- &attr_enable_psmi,
- &attr_survivability_mode,
- NULL,
-};
-
static void xe_config_device_release(struct config_item *item)
{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
+ struct xe_config_group_device *dev = xe_configfs_to_group_device(item);
mutex_destroy(&dev->lock);
- kfree(dev->config.ctx_restore_mid_bb[0].cs);
- kfree(dev->config.ctx_restore_post_bb[0].cs);
+ xe_configfs_debug_release_config(&dev->config);
kfree(dev);
}
@@ -1028,33 +167,14 @@ static struct configfs_item_operations xe_config_device_ops = {
.release = xe_config_device_release,
};
-static bool xe_config_device_is_visible(struct config_item *item,
- struct configfs_attribute *attr, int n)
-{
- struct xe_config_group_device *dev = to_xe_config_group_device(item);
-
- if (attr == &attr_survivability_mode) {
- if (!dev->desc->is_dgfx || dev->desc->platform < XE_BATTLEMAGE)
- return false;
- }
-
- return true;
-}
-
-static struct configfs_group_operations xe_config_device_group_ops = {
- .is_visible = xe_config_device_is_visible,
-};
-
static const struct config_item_type xe_config_device_type = {
.ct_item_ops = &xe_config_device_ops,
- .ct_group_ops = &xe_config_device_group_ops,
- .ct_attrs = xe_config_device_attrs,
.ct_owner = THIS_MODULE,
};
static ssize_t sriov_max_vfs_show(struct config_item *item, char *page)
{
- struct xe_config_group_device *dev = to_xe_config_group_device(item->ci_parent);
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
guard(mutex)(&dev->lock);
@@ -1066,13 +186,13 @@ static ssize_t sriov_max_vfs_show(struct config_item *item, char *page)
static ssize_t sriov_max_vfs_store(struct config_item *item, const char *page, size_t len)
{
- struct xe_config_group_device *dev = to_xe_config_group_device(item->ci_parent);
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
unsigned int max_vfs;
int ret;
guard(mutex)(&dev->lock);
- if (is_bound(dev))
+ if (xe_configfs_is_bound(dev))
return -EBUSY;
ret = kstrtouint(page, 0, &max_vfs);
@@ -1088,7 +208,7 @@ static ssize_t sriov_max_vfs_store(struct config_item *item, const char *page, s
static ssize_t sriov_admin_only_pf_show(struct config_item *item, char *page)
{
- struct xe_config_group_device *dev = to_xe_config_group_device(item->ci_parent);
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
guard(mutex)(&dev->lock);
@@ -1097,13 +217,13 @@ static ssize_t sriov_admin_only_pf_show(struct config_item *item, char *page)
static ssize_t sriov_admin_only_pf_store(struct config_item *item, const char *page, size_t len)
{
- struct xe_config_group_device *dev = to_xe_config_group_device(item->ci_parent);
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
bool admin_only_pf;
int ret;
guard(mutex)(&dev->lock);
- if (is_bound(dev))
+ if (xe_configfs_is_bound(dev))
return -EBUSY;
ret = kstrtobool(page, &admin_only_pf);
@@ -1126,7 +246,7 @@ static struct configfs_attribute *xe_config_sriov_attrs[] = {
static bool xe_config_sriov_is_visible(struct config_item *item,
struct configfs_attribute *attr, int n)
{
- struct xe_config_group_device *dev = to_xe_config_group_device(item->ci_parent);
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
if (attr == &sriov_attr_max_vfs && dev->mode != XE_SRIOV_MODE_PF)
return false;
@@ -1262,7 +382,17 @@ static struct configfs_subsystem xe_configfs = {
},
};
-static struct xe_config_group_device *find_xe_config_group_device(struct pci_dev *pdev)
+/**
+ * xe_configfs_find_group_device() - Find a configfs group by PCI device.
+ * @pdev: the &pci_dev to look up
+ *
+ * Searches the configfs subsystem for a group whose name matches @pdev.
+ * If found, the returned group has an elevated reference count; the caller
+ * must call config_group_put() when done.
+ *
+ * Return: pointer to the matching &xe_config_group_device, or NULL.
+ */
+struct xe_config_group_device *xe_configfs_find_group_device(struct pci_dev *pdev)
{
struct config_item *item;
@@ -1273,23 +403,25 @@ static struct xe_config_group_device *find_xe_config_group_device(struct pci_dev
if (!item)
return NULL;
- return to_xe_config_group_device(item);
+ return xe_configfs_to_group_device(item);
}
static void dump_custom_dev_config(struct pci_dev *pdev,
struct xe_config_group_device *dev)
{
#define PRI_CUSTOM_ATTR(fmt_, attr_) do { \
- if (dev->config.attr_ != device_defaults.attr_) \
+ if (dev->config.attr_ != xe_configfs_device_defaults.attr_) \
pci_info(pdev, "configfs: " __stringify(attr_) " = " fmt_ "\n", \
dev->config.attr_); \
} while (0)
- PRI_CUSTOM_ATTR("%llx", engines_allowed);
- PRI_CUSTOM_ATTR("%llx", gt_types_allowed);
- PRI_CUSTOM_ATTR("%d", enable_multi_queue);
- PRI_CUSTOM_ATTR("%d", enable_psmi);
- PRI_CUSTOM_ATTR("%d", survivability_mode);
+#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
+ PRI_CUSTOM_ATTR("%llx", debug.engines_allowed);
+ PRI_CUSTOM_ATTR("%llx", debug.gt_types_allowed);
+ PRI_CUSTOM_ATTR("%d", debug.enable_multi_queue);
+ PRI_CUSTOM_ATTR("%d", debug.enable_psmi);
+ PRI_CUSTOM_ATTR("%d", debug.survivability_mode);
+#endif
PRI_CUSTOM_ATTR("%u", sriov.admin_only_pf);
#undef PRI_CUSTOM_ATTR
@@ -1304,13 +436,13 @@ static void dump_custom_dev_config(struct pci_dev *pdev,
*/
void xe_configfs_check_device(struct pci_dev *pdev)
{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
+ struct xe_config_group_device *dev = xe_configfs_find_group_device(pdev);
if (!dev)
return;
/* memcmp here is safe as both are zero-initialized */
- if (memcmp(&dev->config, &device_defaults, sizeof(dev->config))) {
+ if (memcmp(&dev->config, &xe_configfs_device_defaults, sizeof(dev->config))) {
pci_info(pdev, "Found custom settings in configfs\n");
dump_custom_dev_config(pdev, dev);
}
@@ -1332,7 +464,7 @@ void xe_configfs_check_device(struct pci_dev *pdev)
*/
bool xe_configfs_admin_only_pf(struct pci_dev *pdev)
{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
+ struct xe_config_group_device *dev = xe_configfs_find_group_device(pdev);
bool admin_only_pf;
if (!dev)
@@ -1357,7 +489,7 @@ bool xe_configfs_admin_only_pf(struct pci_dev *pdev)
*/
unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev)
{
- struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
+ struct xe_config_group_device *dev = xe_configfs_find_group_device(pdev);
unsigned int max_vfs;
if (!dev)
diff --git a/drivers/gpu/drm/xe/xe_configfs.h b/drivers/gpu/drm/xe/xe_configfs.h
index 7db2f46291fa..a2dc0a7cc7b5 100644
--- a/drivers/gpu/drm/xe/xe_configfs.h
+++ b/drivers/gpu/drm/xe/xe_configfs.h
@@ -12,24 +12,76 @@
#include "xe_defaults.h"
#include "xe_module.h"
+struct config_item;
struct pci_dev;
+struct xe_config_group_device;
+
+extern const struct xe_config_device xe_configfs_device_defaults;
#if IS_ENABLED(CONFIG_CONFIGFS_FS)
+/**
+ * xe_configfs_to_group_device() - Cast a config_item to &xe_config_group_device.
+ * @item: the &config_item embedded in the device group
+ *
+ * The @item must be the top-level device group's cg_item, not a subgroup item.
+ * Use xe_configfs_subgroup_to_group_device() for subgroup show/store callbacks.
+ *
+ * Return: pointer to the enclosing &xe_config_group_device.
+ */
+static inline struct xe_config_group_device *
+xe_configfs_to_group_device(struct config_item *item)
+{
+ return container_of(to_config_group(item), struct xe_config_group_device, group);
+}
+
+/**
+ * xe_configfs_to_device() - Cast a config_item to &xe_config_device.
+ * @item: the &config_item embedded in the device group
+ *
+ * Convenience wrapper around xe_configfs_to_group_device().
+ *
+ * Return: pointer to the &xe_config_device nested in the group.
+ */
+static inline struct xe_config_device *xe_configfs_to_device(struct config_item *item)
+{
+ return &xe_configfs_to_group_device(item)->config;
+}
+
+/**
+ * xe_configfs_subgroup_to_group_device() - Cast a subgroup item to &xe_config_group_device.
+ * @item: the &config_item of a subgroup (e.g. sriov or debug)
+ *
+ * In configfs, show/store callbacks for a subgroup's attributes receive the
+ * subgroup's cg_item, whose parent is the device group's cg_item.
+ * This helper walks up one level to return the enclosing device group.
+ *
+ * Return: pointer to the enclosing &xe_config_group_device.
+ */
+static inline struct xe_config_group_device *
+xe_configfs_subgroup_to_group_device(struct config_item *item)
+{
+ return xe_configfs_to_group_device(item->ci_parent);
+}
+
+/**
+ * xe_configfs_subgroup_to_device() - Cast a subgroup item to &xe_config_device.
+ * @item: the &config_item of a subgroup (e.g. sriov or debug)
+ *
+ * Convenience wrapper for a subgroup item to get the &xe_config_device.
+ *
+ * Return: pointer to the &xe_config_device nested in the parent device group.
+ */
+static inline struct xe_config_device *
+xe_configfs_subgroup_to_device(struct config_item *item)
+{
+ return xe_configfs_to_device(item->ci_parent);
+}
+
+bool xe_configfs_is_bound(struct xe_config_group_device *dev);
+struct xe_config_group_device *xe_configfs_find_group_device(struct pci_dev *pdev);
int xe_configfs_init(void);
void xe_configfs_exit(void);
void xe_configfs_check_device(struct pci_dev *pdev);
-u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev,
- enum xe_engine_class class,
- const u32 **cs);
-u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
- enum xe_engine_class class,
- const u32 **cs);
-u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev);
-bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev);
-bool xe_configfs_media_gt_allowed(struct pci_dev *pdev);
-bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev);
-bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev);
-bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
#ifdef CONFIG_PCI_IOV
unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev);
bool xe_configfs_admin_only_pf(struct pci_dev *pdev);
@@ -38,18 +90,6 @@ bool xe_configfs_admin_only_pf(struct pci_dev *pdev);
static inline int xe_configfs_init(void) { return 0; }
static inline void xe_configfs_exit(void) { }
static inline void xe_configfs_check_device(struct pci_dev *pdev) { }
-static inline u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev,
- enum xe_engine_class class,
- const u32 **cs) { return 0; }
-static inline u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
- enum xe_engine_class class,
- const u32 **cs) { return 0; }
-static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; }
-static inline bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev) { return true; }
-static inline bool xe_configfs_media_gt_allowed(struct pci_dev *pdev) { return true; }
-static inline bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev) { return true; }
-static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; }
-static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; }
#ifdef CONFIG_PCI_IOV
static inline unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev)
{
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.c b/drivers/gpu/drm/xe/xe_configfs_debug.c
index 45617282cec5..5420e4751b58 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug.c
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.c
@@ -3,12 +3,963 @@
* Copyright © 2026 Intel Corporation
*/
+#include <linux/bitops.h>
#include <linux/configfs.h>
#include <linux/module.h>
+#include <linux/cleanup.h>
+#include <linux/find.h>
+#include <linux/pci.h>
+#include <linux/string.h>
+#include "abi/guc_log_abi.h"
+#include "instructions/xe_mi_commands.h"
+#include "xe_configfs.h"
#include "xe_configfs_debug.h"
#include "xe_configfs_types.h"
+#include "xe_gt_types.h"
+#include "xe_hw_engine_types.h"
+#include "xe_pci_types.h"
+
+/**
+ * DOC: Xe Configfs Debug Attributes
+ *
+ * Overview
+ * ========
+ *
+ * The following configfs attributes are only available when the kernel is
+ * built with ``CONFIG_DRM_XE_DEBUG=y``. They appear under the ``debug/``
+ * subdirectory of each xe configfs device. They are intended for hardware
+ * and driver debugging and are not stable ABI. Using them is "at your own
+ * risk".
+ *
+ * See the top-level ``Xe Configfs`` documentation in ``xe_configfs.c``
+ * for how to create, probe and remove configfs devices. Once a device
+ * directory exists, the driver populates it with a ``debug/`` subdirectory
+ * containing the entries described below::
+ *
+ * /sys/kernel/config/xe/
+ * └── 0000:03:00.0
+ * └── debug/
+ * ├── ctx_restore_mid_bb
+ * ├── ctx_restore_post_bb
+ * ├── engines_allowed
+ * ├── gt_types_allowed
+ * ├── enable_multi_queue
+ * ├── enable_psmi
+ * └── survivability_mode
+ *
+ * Configure Attributes
+ * ====================
+ *
+ * Context restore BB
+ * ------------------
+ *
+ * Allow to execute a batch buffer during any context switches. When the
+ * GPU is restoring the context, it executes additional commands. It's useful
+ * for testing additional workarounds and validating certain HW behaviors: it's
+ * not intended for normal execution and will taint the kernel with TAINT_TEST
+ * when used.
+ *
+ * The syntax allows to pass straight instructions to be executed by the engine
+ * in a batch buffer or set specific registers.
+ *
+ * #. Generic instruction::
+ *
+ * <engine-class> cmd <instr> [[dword0] [dword1] [...]]
+ *
+ * #. Simple register setting::
+ *
+ * <engine-class> reg <address> <value>
+ *
+ * Commands are saved per engine class: all instances of that class will execute
+ * those commands during context switch. The instruction, dword arguments,
+ * addresses and values are in hex format like in the examples below.
+ *
+ * #. Execute a LRI command to write 0xDEADBEEF to register 0x4f10 after the
+ * normal context restore::
+ *
+ * # echo 'rcs cmd 11000001 4F100 DEADBEEF' \
+ * > /sys/kernel/config/xe/0000:03:00.0/debug/ctx_restore_post_bb
+ *
+ * #. Execute a LRI command to write 0xDEADBEEF to register 0x4f10 at the
+ * beginning of the context restore::
+ *
+ * # echo 'rcs cmd 11000001 4F100 DEADBEEF' \
+ * > /sys/kernel/config/xe/0000:03:00.0/debug/ctx_restore_mid_bb
+ *
+ * #. Load certain values in a couple of registers (it can be used as a simpler
+ * alternative to the `cmd`) action::
+ *
+ * # cat > /sys/kernel/config/xe/0000:03:00.0/debug/ctx_restore_post_bb <<EOF
+ * rcs reg 4F100 DEADBEEF
+ * rcs reg 4F104 FFFFFFFF
+ * EOF
+ *
+ * .. note::
+ *
+ * When using multiple lines, make sure to use a command that is
+ * implemented with a single write syscall, like HEREDOC.
+ *
+ * Currently this is implemented only for post and mid context restore and
+ * these attributes can only be set before binding to the device.
+ *
+ * Allowed engines:
+ * ----------------
+ *
+ * Allow only a set of engine(s) to be available, disabling the other engines
+ * even if they are available in hardware. This is applied after HW fuses are
+ * considered on each tile. Examples:
+ *
+ * Allow only one render and one copy engines, nothing else::
+ *
+ * # echo 'rcs0,bcs0' > /sys/kernel/config/xe/0000:03:00.0/debug/engines_allowed
+ *
+ * Allow only compute engines and first copy engine::
+ *
+ * # echo 'ccs*,bcs0' > /sys/kernel/config/xe/0000:03:00.0/debug/engines_allowed
+ *
+ * Note that the engine names are the per-GT hardware names. On multi-tile
+ * platforms, writing ``rcs0,bcs0`` to this file would allow the first render
+ * and copy engines on each tile.
+ *
+ * The requested configuration may not be supported by the platform and driver
+ * may fail to probe. For example: if at least one copy engine is expected to be
+ * available for migrations, but it's disabled. This is intended for debugging
+ * purposes only.
+ *
+ * This attribute can only be set before binding to the device.
+ *
+ * Allowed GT types:
+ * -----------------
+ *
+ * Allow only specific types of GTs to be detected and initialized by the
+ * driver. Any combination of GT types can be enabled/disabled, although
+ * some settings will cause the device to fail to probe.
+ *
+ * Writes support both comma- and newline-separated input format. Reads
+ * will always return one GT type per line. "primary" and "media" are the
+ * GT type names supported by this interface.
+ *
+ * This attribute can only be set before binding to the device.
+ *
+ * Examples:
+ *
+ * Allow both primary and media GTs to be initialized and used. This matches
+ * the driver's default behavior::
+ *
+ * # echo 'primary,media' > /sys/kernel/config/xe/0000:03:00.0/debug/gt_types_allowed
+ *
+ * Allow only the primary GT of each tile to be initialized and used,
+ * effectively disabling the media GT if it exists on the platform::
+ *
+ * # echo 'primary' > /sys/kernel/config/xe/0000:03:00.0/debug/gt_types_allowed
+ *
+ * Allow only the media GT of each tile to be initialized and used,
+ * effectively disabling the primary GT. **This configuration will cause
+ * device probe failure on all current platforms, but may be allowed on
+ * igpu platforms in the future**::
+ *
+ * # echo 'media' > /sys/kernel/config/xe/0000:03:00.0/debug/gt_types_allowed
+ *
+ * Disable all GTs. Only other GPU IP (such as display) is potentially usable.
+ * **This configuration will cause device probe failure on all current
+ * platforms, but may be allowed on igpu platforms in the future**::
+ *
+ * # echo '' > /sys/kernel/config/xe/0000:03:00.0/debug/gt_types_allowed
+ *
+ * Enable multi-queue
+ * ------------------
+ *
+ * Multi-queue support on the device is enabled by default where the
+ * hardware supports it. Writing 0 force-disables multi-queue support:
+ * multi-queue exec-queue group creation via ioctl is refused, and the
+ * GuC feature is disabled::
+ *
+ * # echo 0 > /sys/kernel/config/xe/0000:03:00.0/debug/enable_multi_queue
+ *
+ * This attribute can only be set before binding to the device.
+ *
+ * PSMI
+ * ----
+ *
+ * Enable extra debugging capabilities to trace engine execution. Only useful
+ * during early platform enabling and requires additional hardware connected.
+ * Once it's enabled, additionals WAs are added and runtime configuration is
+ * done via debugfs. Example to enable it::
+ *
+ * # echo 1 > /sys/kernel/config/xe/0000:03:00.0/debug/enable_psmi
+ *
+ * This attribute can only be set before binding to the device.
+ *
+ * Survivability mode:
+ * -------------------
+ *
+ * Enable survivability mode on supported cards. This setting only takes
+ * effect when probing the device. Example to enable it::
+ *
+ * # echo 1 > /sys/kernel/config/xe/0000:03:00.0/debug/survivability_mode
+ *
+ * This attribute can only be set before binding to the device.
+ *
+ */
+
+struct engine_info {
+ const char *cls;
+ u64 mask;
+ enum xe_engine_class engine_class;
+};
+
+/* Some helpful macros to aid on the sizing of buffer allocation when parsing */
+#define MAX_ENGINE_CLASS_CHARS 5
+#define MAX_ENGINE_INSTANCE_CHARS 2
+
+static const struct engine_info engine_info[] = {
+ { .cls = "rcs", .mask = XE_HW_ENGINE_RCS_MASK, .engine_class = XE_ENGINE_CLASS_RENDER },
+ { .cls = "bcs", .mask = XE_HW_ENGINE_BCS_MASK, .engine_class = XE_ENGINE_CLASS_COPY },
+ { .cls = "vcs", .mask = XE_HW_ENGINE_VCS_MASK, .engine_class = XE_ENGINE_CLASS_VIDEO_DECODE },
+ { .cls = "vecs", .mask = XE_HW_ENGINE_VECS_MASK, .engine_class = XE_ENGINE_CLASS_VIDEO_ENHANCE },
+ { .cls = "ccs", .mask = XE_HW_ENGINE_CCS_MASK, .engine_class = XE_ENGINE_CLASS_COMPUTE },
+ { .cls = "gsccs", .mask = XE_HW_ENGINE_GSCCS_MASK, .engine_class = XE_ENGINE_CLASS_OTHER },
+};
+
+static const struct {
+ const char *name;
+ enum xe_gt_type type;
+} gt_types[] = {
+ { .name = "primary", .type = XE_GT_TYPE_MAIN },
+ { .name = "media", .type = XE_GT_TYPE_MEDIA },
+};
+
+static struct xe_config_group_device *find_device(struct pci_dev *pdev)
+{
+ return xe_configfs_find_group_device(pdev);
+}
+
+/**
+ * xe_configfs_get_ctx_restore_mid_bb - get configfs ctx_restore_mid_bb setting
+ * @pdev: pci device
+ * @class: hw engine class
+ * @cs: pointer to the bb to use - only valid during probe
+ *
+ * Return: Number of dwords used in the mid_ctx_restore setting in configfs
+ */
+u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev,
+ enum xe_engine_class class,
+ const u32 **cs)
+{
+ struct xe_config_group_device *dev = find_device(pdev);
+ u32 len;
+
+ if (!dev)
+ return 0;
+
+ if (cs)
+ *cs = dev->config.debug.ctx_restore_mid_bb[class].cs;
+
+ len = dev->config.debug.ctx_restore_mid_bb[class].len;
+ config_group_put(&dev->group);
+
+ return len;
+}
+
+/**
+ * xe_configfs_get_ctx_restore_post_bb - get configfs ctx_restore_post_bb setting
+ * @pdev: pci device
+ * @class: hw engine class
+ * @cs: pointer to the bb to use - only valid during probe
+ *
+ * Return: Number of dwords used in the post_ctx_restore setting in configfs
+ */
+u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
+ enum xe_engine_class class,
+ const u32 **cs)
+{
+ struct xe_config_group_device *dev = find_device(pdev);
+ u32 len;
+
+ if (!dev)
+ return 0;
+
+ *cs = dev->config.debug.ctx_restore_post_bb[class].cs;
+ len = dev->config.debug.ctx_restore_post_bb[class].len;
+ config_group_put(&dev->group);
+
+ return len;
+}
+
+static bool wa_bb_read_advance(bool dereference, char **p,
+ const char *append, size_t len,
+ size_t *max_size)
+{
+ if (dereference) {
+ if (len >= *max_size)
+ return false;
+ *max_size -= len;
+ if (append)
+ memcpy(*p, append, len);
+ }
+
+ *p += len;
+
+ return true;
+}
+
+static ssize_t wa_bb_show(struct xe_config_group_device *dev,
+ struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX],
+ char *data, size_t sz)
+{
+ char *p = data;
+
+ guard(mutex)(&dev->lock);
+
+ for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
+ enum xe_engine_class ec = engine_info[i].engine_class;
+ size_t len;
+
+ if (!wa_bb[ec].len)
+ continue;
+
+ len = snprintf(p, sz, "%s:", engine_info[i].cls);
+ if (!wa_bb_read_advance(data, &p, NULL, len, &sz))
+ return -ENOBUFS;
+
+ for (size_t j = 0; j < wa_bb[ec].len; j++) {
+ len = snprintf(p, sz, " %08x", wa_bb[ec].cs[j]);
+ if (!wa_bb_read_advance(data, &p, NULL, len, &sz))
+ return -ENOBUFS;
+ }
+
+ if (!wa_bb_read_advance(data, &p, "\n", 1, &sz))
+ return -ENOBUFS;
+ }
+
+ if (!wa_bb_read_advance(data, &p, "", 1, &sz))
+ return -ENOBUFS;
+
+ /* Reserve one more to match check for '\0' */
+ if (!data)
+ p++;
+
+ return p - data;
+}
+
+static ssize_t ctx_restore_mid_bb_show(struct config_item *item, char *page)
+{
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+
+ return wa_bb_show(dev, dev->config.debug.ctx_restore_mid_bb, page, SZ_4K);
+}
+
+static ssize_t ctx_restore_post_bb_show(struct config_item *item, char *page)
+{
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+
+ return wa_bb_show(dev, dev->config.debug.ctx_restore_post_bb, page, SZ_4K);
+}
+
+static void wa_bb_append(struct wa_bb *wa_bb, u32 val)
+{
+ if (wa_bb->cs)
+ wa_bb->cs[wa_bb->len] = val;
+
+ wa_bb->len++;
+}
+
+static ssize_t parse_hex(const char *line, u32 *pval)
+{
+ char numstr[12];
+ const char *p;
+ ssize_t numlen;
+
+ p = line + strspn(line, " \t");
+ if (!*p || *p == '\n')
+ return 0;
+
+ numlen = strcspn(p, " \t\n");
+ if (!numlen || numlen >= sizeof(numstr) - 1)
+ return -EINVAL;
+
+ memcpy(numstr, p, numlen);
+ numstr[numlen] = '\0';
+ p += numlen;
+
+ if (kstrtou32(numstr, 16, pval))
+ return -EINVAL;
+
+ return p - line;
+}
+
+static int parse_engine(const char *s, const char *end_chars, u64 *mask,
+ const struct engine_info **pinfo);
+
+/*
+ * Parse lines with the format
+ *
+ * <engine-class> cmd <u32> <u32...>
+ * <engine-class> reg <u32_addr> <u32_val>
+ *
+ * and optionally save them in @wa_bb[i].cs is non-NULL.
+ *
+ * Return the number of dwords parsed.
+ */
+static ssize_t parse_wa_bb_lines(const char *lines,
+ struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX])
+{
+ ssize_t dwords = 0, ret;
+ const char *p;
+
+ for (p = lines; *p; p++) {
+ const struct engine_info *info = NULL;
+ u32 val, val2;
+
+ /* Also allow empty lines */
+ p += strspn(p, " \t\n");
+ if (!*p)
+ break;
+
+ ret = parse_engine(p, " \t\n", NULL, &info);
+ if (ret < 0)
+ return ret;
+
+ p += ret;
+ p += strspn(p, " \t");
+
+ if (str_has_prefix(p, "cmd")) {
+ for (p += strlen("cmd"); *p;) {
+ ret = parse_hex(p, &val);
+ if (ret < 0)
+ return -EINVAL;
+ if (!ret)
+ break;
+
+ p += ret;
+ dwords++;
+ wa_bb_append(&wa_bb[info->engine_class], val);
+ }
+ } else if (str_has_prefix(p, "reg")) {
+ p += strlen("reg");
+ ret = parse_hex(p, &val);
+ if (ret <= 0)
+ return -EINVAL;
+
+ p += ret;
+ ret = parse_hex(p, &val2);
+ if (ret <= 0)
+ return -EINVAL;
+
+ p += ret;
+ dwords += 3;
+ wa_bb_append(&wa_bb[info->engine_class],
+ MI_LOAD_REGISTER_IMM | MI_LRI_NUM_REGS(1));
+ wa_bb_append(&wa_bb[info->engine_class], val);
+ wa_bb_append(&wa_bb[info->engine_class], val2);
+ } else {
+ return -EINVAL;
+ }
+ }
+
+ return dwords;
+}
+
+static ssize_t wa_bb_store(struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX],
+ struct xe_config_group_device *dev,
+ const char *page, size_t len)
+{
+ /* tmp_wa_bb must match wa_bb's size */
+ struct wa_bb tmp_wa_bb[XE_ENGINE_CLASS_MAX] = { };
+ ssize_t count, class;
+ u32 *tmp;
+
+ /* 1. Count dwords - wa_bb[i].cs is NULL for all classes */
+ count = parse_wa_bb_lines(page, tmp_wa_bb);
+ if (count < 0)
+ return count;
+
+ guard(mutex)(&dev->lock);
+
+ if (xe_configfs_is_bound(dev))
+ return -EBUSY;
+
+ /*
+ * 2. Allocate a u32 array and set the pointers to the right positions
+ * according to the length of each class' wa_bb
+ */
+ tmp = krealloc(wa_bb[0].cs, count * sizeof(u32), GFP_KERNEL);
+ if (!tmp)
+ return -ENOMEM;
+
+ if (!count) {
+ memset(wa_bb, 0, sizeof(tmp_wa_bb));
+ return len;
+ }
+
+ for (class = 0, count = 0; class < XE_ENGINE_CLASS_MAX; ++class) {
+ tmp_wa_bb[class].cs = tmp + count;
+ count += tmp_wa_bb[class].len;
+ tmp_wa_bb[class].len = 0;
+ }
+
+ /* 3. Parse wa_bb lines again, this time saving the values */
+ count = parse_wa_bb_lines(page, tmp_wa_bb);
+ if (count < 0) {
+ kfree(tmp);
+ memset(wa_bb, 0, sizeof(tmp_wa_bb));
+ return count;
+ }
+
+ memcpy(wa_bb, tmp_wa_bb, sizeof(tmp_wa_bb));
+
+ return len;
+}
+
+static ssize_t ctx_restore_mid_bb_store(struct config_item *item,
+ const char *data, size_t sz)
+{
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+
+ return wa_bb_store(dev->config.debug.ctx_restore_mid_bb, dev, data, sz);
+}
+
+static ssize_t ctx_restore_post_bb_store(struct config_item *item,
+ const char *data, size_t sz)
+{
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+
+ return wa_bb_store(dev->config.debug.ctx_restore_post_bb, dev, data, sz);
+}
+
+/**
+ * xe_configfs_get_engines_allowed - get engine allowed mask from configfs
+ * @pdev: pci device
+ *
+ * Return: engine mask with allowed engines set in configfs
+ */
+u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_device(pdev);
+ u64 engines_allowed;
+
+ if (!dev)
+ return xe_configfs_device_defaults.debug.engines_allowed;
+
+ engines_allowed = dev->config.debug.engines_allowed;
+ config_group_put(&dev->group);
+
+ return engines_allowed;
+}
+
+static ssize_t engines_allowed_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
+ char *p = page;
+
+ for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
+ u64 mask = engine_info[i].mask;
+
+ if ((dev->debug.engines_allowed & mask) == mask) {
+ p += sprintf(p, "%s*\n", engine_info[i].cls);
+ } else if (mask & dev->debug.engines_allowed) {
+ u16 bit0 = __ffs64(mask), bit;
+
+ mask &= dev->debug.engines_allowed;
+
+ for_each_set_bit(bit, (const unsigned long *)&mask, 64)
+ p += sprintf(p, "%s%u\n", engine_info[i].cls,
+ bit - bit0);
+ }
+ }
+
+ return p - page;
+}
+
+/*
+ * Lookup engine_info. If @mask is not NULL, reduce the mask according to the
+ * instance in @pattern.
+ *
+ * Examples of inputs:
+ * - lookup_engine_info("rcs0", &mask): return "rcs" entry from @engine_info and
+ * mask == BIT_ULL(XE_HW_ENGINE_RCS0)
+ * - lookup_engine_info("rcs*", &mask): return "rcs" entry from @engine_info and
+ * mask == XE_HW_ENGINE_RCS_MASK
+ * - lookup_engine_info("rcs", NULL): return "rcs" entry from @engine_info
+ */
+static const struct engine_info *lookup_engine_info(const char *pattern, u64 *mask)
+{
+ for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
+ u8 instance;
+ u16 bit;
+
+ if (!str_has_prefix(pattern, engine_info[i].cls))
+ continue;
+
+ pattern += strlen(engine_info[i].cls);
+ if (!mask)
+ return *pattern ? NULL : &engine_info[i];
+
+ if (!strcmp(pattern, "*")) {
+ *mask = engine_info[i].mask;
+ return &engine_info[i];
+ }
+
+ if (kstrtou8(pattern, 10, &instance))
+ return NULL;
+
+ bit = __ffs64(engine_info[i].mask) + instance;
+ if (bit >= fls64(engine_info[i].mask))
+ return NULL;
+
+ *mask = BIT_ULL(bit);
+ return &engine_info[i];
+ }
+
+ return NULL;
+}
+
+static int parse_engine(const char *s, const char *end_chars, u64 *mask,
+ const struct engine_info **pinfo)
+{
+ char buf[MAX_ENGINE_CLASS_CHARS + MAX_ENGINE_INSTANCE_CHARS + 1];
+ const struct engine_info *info;
+ size_t len;
+
+ len = strcspn(s, end_chars);
+ if (len >= sizeof(buf))
+ return -EINVAL;
+
+ memcpy(buf, s, len);
+ buf[len] = '\0';
+
+ info = lookup_engine_info(buf, mask);
+ if (!info)
+ return -ENOENT;
+
+ if (pinfo)
+ *pinfo = info;
+
+ return len;
+}
+
+static ssize_t engines_allowed_store(struct config_item *item, const char *page,
+ size_t len)
+{
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+ ssize_t patternlen, p;
+ u64 mask, val = 0;
+
+ for (p = 0; p < len; p += patternlen + 1) {
+ patternlen = parse_engine(page + p, ",\n", &mask, NULL);
+ if (patternlen < 0)
+ return -EINVAL;
+
+ val |= mask;
+ }
+
+ guard(mutex)(&dev->lock);
+ if (xe_configfs_is_bound(dev))
+ return -EBUSY;
+
+ dev->config.debug.engines_allowed = val;
+
+ return len;
+}
+
+static u64 get_gt_types_allowed(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_device(pdev);
+ u64 mask;
+
+ if (!dev)
+ return xe_configfs_device_defaults.debug.gt_types_allowed;
+
+ mask = dev->config.debug.gt_types_allowed;
+ config_group_put(&dev->group);
+
+ return mask;
+}
+
+/**
+ * xe_configfs_primary_gt_allowed - determine whether primary GTs are supported
+ * @pdev: pci device
+ *
+ * Return: True if primary GTs are enabled, false if they have been disabled via
+ * configfs.
+ */
+bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev)
+{
+ return get_gt_types_allowed(pdev) & BIT_ULL(XE_GT_TYPE_MAIN);
+}
+
+/**
+ * xe_configfs_media_gt_allowed - determine whether media GTs are supported
+ * @pdev: pci device
+ *
+ * Return: True if the media GTs are enabled, false if they have been disabled
+ * via configfs.
+ */
+bool xe_configfs_media_gt_allowed(struct pci_dev *pdev)
+{
+ return get_gt_types_allowed(pdev) & BIT_ULL(XE_GT_TYPE_MEDIA);
+}
+
+static ssize_t gt_types_allowed_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
+ char *p = page;
+
+ for (size_t i = 0; i < ARRAY_SIZE(gt_types); i++)
+ if (dev->debug.gt_types_allowed & BIT_ULL(gt_types[i].type))
+ p += sprintf(p, "%s\n", gt_types[i].name);
+
+ return p - page;
+}
+
+static ssize_t gt_types_allowed_store(struct config_item *item, const char *page,
+ size_t len)
+{
+ char *buf __free(kfree) = kstrdup(page, GFP_KERNEL);
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+ u64 typemask = 0;
+ char *p = buf;
+
+ if (!buf)
+ return -ENOMEM;
+
+ while (p) {
+ char *typename = strsep(&p, ",\n");
+ bool matched = false;
+
+ if (typename[0] == '\0')
+ continue;
+
+ for (size_t i = 0; i < ARRAY_SIZE(gt_types); i++) {
+ if (strcmp(typename, gt_types[i].name) == 0) {
+ typemask |= BIT(gt_types[i].type);
+ matched = true;
+ break;
+ }
+ }
+
+ if (!matched)
+ return -EINVAL;
+ }
+
+ guard(mutex)(&dev->lock);
+ if (xe_configfs_is_bound(dev))
+ return -EBUSY;
+
+ dev->config.debug.gt_types_allowed = typemask;
+
+ return len;
+}
+
+/**
+ * xe_configfs_get_enable_multi_queue - get configfs enable_multi_queue setting
+ * @pdev: pci device
+ *
+ * Return: true if multi-queue is enabled for this device (the default),
+ * false if it has been force-disabled via configfs.
+ */
+bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_device(pdev);
+ bool ret;
+
+ if (!dev)
+ return xe_configfs_device_defaults.debug.enable_multi_queue;
+
+ ret = dev->config.debug.enable_multi_queue;
+ config_group_put(&dev->group);
+
+ return ret;
+}
+
+static ssize_t enable_multi_queue_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
+
+ return sprintf(page, "%d\n", dev->debug.enable_multi_queue);
+}
+
+static ssize_t enable_multi_queue_store(struct config_item *item, const char *page, size_t len)
+{
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+ bool val;
+ int ret;
+
+ ret = kstrtobool(page, &val);
+ if (ret)
+ return ret;
+
+ guard(mutex)(&dev->lock);
+ if (xe_configfs_is_bound(dev))
+ return -EBUSY;
+
+ dev->config.debug.enable_multi_queue = val;
+
+ return len;
+}
+
+/**
+ * xe_configfs_get_psmi_enabled - get configfs enable_psmi setting
+ * @pdev: pci device
+ *
+ * Return: enable_psmi setting in configfs
+ */
+bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_device(pdev);
+ bool ret;
+
+ if (!dev)
+ return false;
+
+ ret = dev->config.debug.enable_psmi;
+ config_group_put(&dev->group);
+
+ return ret;
+}
+
+static ssize_t enable_psmi_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
+
+ return sprintf(page, "%d\n", dev->debug.enable_psmi);
+}
+
+static ssize_t enable_psmi_store(struct config_item *item, const char *page, size_t len)
+{
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+ bool val;
+ int ret;
+
+ ret = kstrtobool(page, &val);
+ if (ret)
+ return ret;
+
+ guard(mutex)(&dev->lock);
+ if (xe_configfs_is_bound(dev))
+ return -EBUSY;
+
+ dev->config.debug.enable_psmi = val;
+
+ return len;
+}
+
+/**
+ * xe_configfs_get_survivability_mode - get configfs survivability mode attribute
+ * @pdev: pci device
+ *
+ * Return: survivability_mode attribute in configfs
+ */
+bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_device(pdev);
+ bool mode;
+
+ if (!dev)
+ return xe_configfs_device_defaults.debug.survivability_mode;
+
+ mode = dev->config.debug.survivability_mode;
+ config_group_put(&dev->group);
+
+ return mode;
+}
+
+static ssize_t survivability_mode_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
+
+ return sprintf(page, "%d\n", dev->debug.survivability_mode);
+}
+
+static ssize_t survivability_mode_store(struct config_item *item, const char *page, size_t len)
+{
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+ bool survivability_mode;
+ int ret;
+
+ ret = kstrtobool(page, &survivability_mode);
+ if (ret)
+ return ret;
+
+ guard(mutex)(&dev->lock);
+ if (xe_configfs_is_bound(dev))
+ return -EBUSY;
+
+ dev->config.debug.survivability_mode = survivability_mode;
+
+ return len;
+}
+
+CONFIGFS_ATTR(, ctx_restore_mid_bb);
+CONFIGFS_ATTR(, ctx_restore_post_bb);
+CONFIGFS_ATTR(, engines_allowed);
+CONFIGFS_ATTR(, gt_types_allowed);
+CONFIGFS_ATTR(, enable_multi_queue);
+CONFIGFS_ATTR(, enable_psmi);
+CONFIGFS_ATTR(, survivability_mode);
+
+static struct configfs_attribute *xe_configfs_debug_attrs[] = {
+ &attr_ctx_restore_mid_bb,
+ &attr_ctx_restore_post_bb,
+ &attr_engines_allowed,
+ &attr_gt_types_allowed,
+ &attr_enable_multi_queue,
+ &attr_enable_psmi,
+ &attr_survivability_mode,
+ NULL,
+};
+
+/*
+ * Per-parameter visibility predicates.
+ *
+ * XE_PARAM_VISIBLE_ALWAYS - attribute is always shown.
+ * XE_PARAM_VISIBLE_SURVIVABILITY - only shown on dGFX platforms >= Battlemage.
+ *
+ * These macros are only evaluated here, where the platform descriptor is
+ * reachable. xe_configfs_debug_params.h treats them as opaque tokens.
+ */
+#define XE_PARAM_VISIBLE_ALWAYS(_item) \
+ (true)
+#define XE_PARAM_VISIBLE_SURVIVABILITY(_item) \
+ (xe_configfs_subgroup_to_group_device(_item)->desc->is_dgfx && \
+ xe_configfs_subgroup_to_group_device(_item)->desc->platform >= XE_BATTLEMAGE)
+
+static bool xe_configfs_debug_is_visible(struct config_item *item,
+ struct configfs_attribute *attr, int n)
+{
+ if (attr == &attr_survivability_mode) {
+ struct xe_config_group_device *dev =
+ xe_configfs_to_group_device(item->ci_parent);
+
+ return dev->desc->is_dgfx && dev->desc->platform >= XE_BATTLEMAGE;
+ }
+
+ return true;
+}
+
+static struct configfs_group_operations xe_configfs_debug_group_ops = {
+ .is_visible = xe_configfs_debug_is_visible,
+};
const struct config_item_type xe_configfs_debug_type = {
+ .ct_attrs = xe_configfs_debug_attrs,
+ .ct_group_ops = &xe_configfs_debug_group_ops,
.ct_owner = THIS_MODULE,
};
+
+/**
+ * xe_configfs_debug_release_config - release debug-specific config resources
+ * @config: xe config device structure
+ *
+ * Frees any memory allocated for debug configfs parameters.
+ */
+void xe_configfs_debug_release_config(struct xe_config_device *config)
+{
+ int i;
+
+ for (i = 0; i < XE_ENGINE_CLASS_MAX; i++) {
+ kfree(config->debug.ctx_restore_mid_bb[i].cs);
+ kfree(config->debug.ctx_restore_post_bb[i].cs);
+ }
+}
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.h b/drivers/gpu/drm/xe/xe_configfs_debug.h
index 5f938450aed2..4a027ea2082d 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug.h
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.h
@@ -5,9 +5,46 @@
#ifndef _XE_CONFIGFS_DEBUG_H_
#define _XE_CONFIGFS_DEBUG_H_
+#include <linux/types.h>
+
+#include "xe_hw_engine_types.h"
+
+struct pci_dev;
+struct xe_config_device;
+
#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;
+void xe_configfs_debug_release_config(struct xe_config_device *config);
+u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev,
+ enum xe_engine_class class,
+ const u32 **cs);
+u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
+ enum xe_engine_class class,
+ const u32 **cs);
+u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev);
+bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev);
+bool xe_configfs_media_gt_allowed(struct pci_dev *pdev);
+bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev);
+bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev);
+bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
+#else
+/*
+ * Dummy values here are not used since these function accesses are always
+ * wrapped in CONFIG_DRM_XE_DEBUG.
+ */
+static inline void xe_configfs_debug_release_config(struct xe_config_device *config) { }
+static inline u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev,
+ enum xe_engine_class class,
+ const u32 **cs) { return 0; }
+static inline u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
+ enum xe_engine_class class,
+ const u32 **cs) { return 0; }
+static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; }
+static inline bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev) { return true; }
+static inline bool xe_configfs_media_gt_allowed(struct pci_dev *pdev) { return true; }
+static inline bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev) { return true; }
+static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; }
+static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; }
#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 e22b9424f719..6e8ba6f85fad 100644
--- a/drivers/gpu/drm/xe/xe_configfs_types.h
+++ b/drivers/gpu/drm/xe/xe_configfs_types.h
@@ -32,13 +32,17 @@ struct xe_config_group_device {
* type, entries are sorted alphabetically.
*/
struct xe_config_device {
- struct wa_bb ctx_restore_mid_bb[XE_ENGINE_CLASS_MAX];
- struct wa_bb ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
- u64 engines_allowed;
- u64 gt_types_allowed;
- bool enable_multi_queue;
- bool enable_psmi;
- bool survivability_mode;
+#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
+ struct {
+ struct wa_bb ctx_restore_mid_bb[XE_ENGINE_CLASS_MAX];
+ struct wa_bb ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
+ u64 engines_allowed;
+ u64 gt_types_allowed;
+ bool enable_multi_queue;
+ bool enable_psmi;
+ bool survivability_mode;
+ } debug;
+#endif
struct {
unsigned int max_vfs;
bool admin_only_pf;
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 4286bd05c686..b6322db368be 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -19,6 +19,7 @@
#include "regs/xe_irq_regs.h"
#include "xe_bo.h"
#include "xe_configfs.h"
+#include "xe_configfs_debug.h"
#include "xe_device.h"
#include "xe_force_wake.h"
#include "xe_gt.h"
diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c
index f0ac00586d3a..eaca6afff374 100644
--- a/drivers/gpu/drm/xe/xe_guc_ads.c
+++ b/drivers/gpu/drm/xe/xe_guc_ads.c
@@ -17,6 +17,7 @@
#include "regs/xe_guc_regs.h"
#include "xe_bo.h"
#include "xe_configfs.h"
+#include "xe_configfs_debug.h"
#include "xe_gt.h"
#include "xe_gt_ccs_mode.h"
#include "xe_gt_mcr.h"
diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
index 010499766fce..f4740de7f57b 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine.c
@@ -18,6 +18,7 @@
#include "xe_assert.h"
#include "xe_bo.h"
#include "xe_configfs.h"
+#include "xe_configfs_debug.h"
#include "xe_device.h"
#include "xe_execlist.h"
#include "xe_force_wake.h"
diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
index 3e7c995085d0..f93f0ee32b08 100644
--- a/drivers/gpu/drm/xe/xe_lrc.c
+++ b/drivers/gpu/drm/xe/xe_lrc.c
@@ -19,6 +19,7 @@
#include "xe_bb.h"
#include "xe_bo.h"
#include "xe_configfs.h"
+#include "xe_configfs_debug.h"
#include "xe_device.h"
#include "xe_drm_client.h"
#include "xe_exec_queue.h"
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 3133e1b99565..0cb163b831ac 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -19,6 +19,7 @@
#include "regs/xe_gt_regs.h"
#include "regs/xe_regs.h"
#include "xe_configfs.h"
+#include "xe_configfs_debug.h"
#include "xe_device.h"
#include "xe_drv.h"
#include "xe_gt.h"
diff --git a/drivers/gpu/drm/xe/xe_psmi.c b/drivers/gpu/drm/xe/xe_psmi.c
index 899b01f72ba3..59af3d145418 100644
--- a/drivers/gpu/drm/xe/xe_psmi.c
+++ b/drivers/gpu/drm/xe/xe_psmi.c
@@ -8,6 +8,7 @@
#include "xe_bo.h"
#include "xe_device_types.h"
#include "xe_configfs.h"
+#include "xe_configfs_debug.h"
#include "xe_psmi.h"
/*
diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index 6a8d6ea68f25..62068189320f 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -10,6 +10,7 @@
#include <uapi/drm/xe_drm.h>
#include "xe_configfs.h"
+#include "xe_configfs_debug.h"
#include "xe_device.h"
#include "xe_gt.h"
#include "xe_gt_topology.h"
diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
index 427afd144f3a..ff745cb614b2 100644
--- a/drivers/gpu/drm/xe/xe_survivability_mode.c
+++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
@@ -11,6 +11,7 @@
#include <linux/sysfs.h>
#include "xe_configfs.h"
+#include "xe_configfs_debug.h"
#include "xe_device.h"
#include "xe_heci_gsc.h"
#include "xe_i2c.h"
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/9] drm/xe/guc: Add configfs support for guc_log_level
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
` (3 preceding siblings ...)
2026-07-22 21:47 ` [PATCH 4/9] drm/xe: Move debug configfs entries to xe_configfs_debug.c Stuart Summers
@ 2026-07-22 21:47 ` Stuart Summers
2026-07-22 21:47 ` [PATCH 6/9] drm/xe/guc: Add support for NPK as a GuC log target Stuart Summers
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Stuart Summers @ 2026-07-22 21:47 UTC (permalink / raw)
Cc: intel-xe, rodrigo.vivi, matthew.brost, umesh.nerlige.ramappa,
Michal.Wajdeczko, matthew.d.roper, daniele.ceraolospurio,
shuicheng.lin, Stuart Summers
Allow the GuC log level to be selected per-device via configfs in
addition to the existing 'guc_log_level' module parameter. The configfs
attribute lives under the new 'debug' configfs subdirectory:
/sys/kernel/config/xe/<bdf>/debug/guc_log_level
When the configfs attribute is set to a valid level (0-5), it overrides
the module parameter for that device. The default value is -1
(XE_GUC_LOG_LEVEL_UNSET), which means 'unset' and falls back to the
'guc_log_level' module parameter, ensuring existing users that rely
solely on the module parameter are unaffected by this change.
The module parameter implementation itself is untouched.
Note that the expectation is a user will only set the log level when
CONFIG_DRM_XE_DEBUG is set.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Assisted-by: Copilot:claude-sonnet-4.6,claude-opus-4.7,claude-sonnet-5
---
drivers/gpu/drm/xe/xe_configfs.c | 2 +
drivers/gpu/drm/xe/xe_configfs_debug.c | 82 ++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_configfs_debug.h | 7 +++
drivers/gpu/drm/xe/xe_configfs_types.h | 1 +
drivers/gpu/drm/xe/xe_defaults.h | 3 +
drivers/gpu/drm/xe/xe_guc_log.c | 3 +-
6 files changed, 97 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index 111aacce8a84..ea09d5f9e925 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -100,6 +100,7 @@ const struct xe_config_device xe_configfs_device_defaults = {
.debug = {
.engines_allowed = U64_MAX,
.gt_types_allowed = U64_MAX,
+ .guc_log_level = XE_GUC_LOG_LEVEL_UNSET,
.enable_multi_queue = true,
.enable_psmi = false,
.survivability_mode = false,
@@ -418,6 +419,7 @@ static void dump_custom_dev_config(struct pci_dev *pdev,
#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
PRI_CUSTOM_ATTR("%llx", debug.engines_allowed);
PRI_CUSTOM_ATTR("%llx", debug.gt_types_allowed);
+ PRI_CUSTOM_ATTR("%d", debug.guc_log_level);
PRI_CUSTOM_ATTR("%d", debug.enable_multi_queue);
PRI_CUSTOM_ATTR("%d", debug.enable_psmi);
PRI_CUSTOM_ATTR("%d", debug.survivability_mode);
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.c b/drivers/gpu/drm/xe/xe_configfs_debug.c
index 5420e4751b58..1d95b4acca9c 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug.c
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.c
@@ -17,6 +17,7 @@
#include "xe_configfs_debug.h"
#include "xe_configfs_types.h"
#include "xe_gt_types.h"
+#include "xe_guc_log.h"
#include "xe_hw_engine_types.h"
#include "xe_pci_types.h"
@@ -44,6 +45,7 @@
* ├── ctx_restore_post_bb
* ├── engines_allowed
* ├── gt_types_allowed
+ * ├── guc_log_level
* ├── enable_multi_queue
* ├── enable_psmi
* └── survivability_mode
@@ -167,6 +169,27 @@
*
* # echo '' > /sys/kernel/config/xe/0000:03:00.0/debug/gt_types_allowed
*
+ * GuC log level:
+ * --------------
+ *
+ * Set the GuC firmware logging verbosity for this device. Accepted values
+ * match the ``guc_log_level`` module parameter:
+ *
+ * - 0: disable
+ * - 1: normal (non-verbose)
+ * - 2..%GUC_LOG_LEVEL_MAX: verbose levels
+ *
+ * Example::
+ *
+ * # echo 3 > /sys/kernel/config/xe/0000:03:00.0/debug/guc_log_level
+ *
+ * The default value is %XE_GUC_LOG_LEVEL_UNSET (-1), which means the value
+ * of the ``guc_log_level`` module parameter is used. Any value greater
+ * than -1 written to this attribute overrides the module parameter for
+ * this device.
+ *
+ * This attribute can only be set before binding to the device.
+ *
* Enable multi-queue
* ------------------
*
@@ -752,6 +775,63 @@ static ssize_t gt_types_allowed_store(struct config_item *item, const char *page
return len;
}
+/**
+ * xe_configfs_get_guc_log_level - get configfs guc_log_level setting
+ * @pdev: pci device
+ *
+ * Returns the guc_log_level value configured via configfs. If the configfs
+ * value is negative (the default is %XE_GUC_LOG_LEVEL_UNSET, -1), the value
+ * of the ``guc_log_level`` module parameter is returned instead, allowing
+ * the configfs entry to override the module parameter without affecting
+ * users that rely solely on the module parameter.
+ *
+ * Return: GuC log level to use for this device.
+ */
+int xe_configfs_get_guc_log_level(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_device(pdev);
+ int level = xe_modparam.guc_log_level;
+
+ if (!dev)
+ goto out;
+
+ if (dev->config.debug.guc_log_level >= 0)
+ level = dev->config.debug.guc_log_level;
+
+ config_group_put(&dev->group);
+out:
+ return level;
+}
+
+static ssize_t guc_log_level_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
+
+ return sprintf(page, "%d\n", dev->debug.guc_log_level);
+}
+
+static ssize_t guc_log_level_store(struct config_item *item, const char *page, size_t len)
+{
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+ int val;
+ int ret;
+
+ ret = kstrtoint(page, 0, &val);
+ if (ret)
+ return ret;
+
+ if (val > GUC_LOG_LEVEL_MAX)
+ return -EINVAL;
+
+ guard(mutex)(&dev->lock);
+ if (xe_configfs_is_bound(dev))
+ return -EBUSY;
+
+ dev->config.debug.guc_log_level = val;
+
+ return len;
+}
+
/**
* xe_configfs_get_enable_multi_queue - get configfs enable_multi_queue setting
* @pdev: pci device
@@ -895,6 +975,7 @@ CONFIGFS_ATTR(, ctx_restore_mid_bb);
CONFIGFS_ATTR(, ctx_restore_post_bb);
CONFIGFS_ATTR(, engines_allowed);
CONFIGFS_ATTR(, gt_types_allowed);
+CONFIGFS_ATTR(, guc_log_level);
CONFIGFS_ATTR(, enable_multi_queue);
CONFIGFS_ATTR(, enable_psmi);
CONFIGFS_ATTR(, survivability_mode);
@@ -904,6 +985,7 @@ static struct configfs_attribute *xe_configfs_debug_attrs[] = {
&attr_ctx_restore_post_bb,
&attr_engines_allowed,
&attr_gt_types_allowed,
+ &attr_guc_log_level,
&attr_enable_multi_queue,
&attr_enable_psmi,
&attr_survivability_mode,
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.h b/drivers/gpu/drm/xe/xe_configfs_debug.h
index 4a027ea2082d..5fe39bb72f00 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug.h
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.h
@@ -7,7 +7,9 @@
#include <linux/types.h>
+#include "xe_defaults.h"
#include "xe_hw_engine_types.h"
+#include "xe_module.h"
struct pci_dev;
struct xe_config_device;
@@ -24,6 +26,7 @@ u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev);
bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev);
bool xe_configfs_media_gt_allowed(struct pci_dev *pdev);
+int xe_configfs_get_guc_log_level(struct pci_dev *pdev);
bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev);
bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev);
bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
@@ -42,6 +45,10 @@ static inline u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; }
static inline bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev) { return true; }
static inline bool xe_configfs_media_gt_allowed(struct pci_dev *pdev) { return true; }
+static inline int xe_configfs_get_guc_log_level(struct pci_dev *pdev)
+{
+ return xe_modparam.guc_log_level;
+}
static inline bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev) { return true; }
static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; }
static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; }
diff --git a/drivers/gpu/drm/xe/xe_configfs_types.h b/drivers/gpu/drm/xe/xe_configfs_types.h
index 6e8ba6f85fad..e9460c3de891 100644
--- a/drivers/gpu/drm/xe/xe_configfs_types.h
+++ b/drivers/gpu/drm/xe/xe_configfs_types.h
@@ -38,6 +38,7 @@ struct xe_config_group_device {
struct wa_bb ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
u64 engines_allowed;
u64 gt_types_allowed;
+ int guc_log_level;
bool enable_multi_queue;
bool enable_psmi;
bool survivability_mode;
diff --git a/drivers/gpu/drm/xe/xe_defaults.h b/drivers/gpu/drm/xe/xe_defaults.h
index c8ae1d5f3d60..df88078e84b8 100644
--- a/drivers/gpu/drm/xe/xe_defaults.h
+++ b/drivers/gpu/drm/xe/xe_defaults.h
@@ -13,6 +13,9 @@
#define XE_DEFAULT_GUC_LOG_LEVEL 1
#endif
+/* Sentinel value for guc_log_level configfs: not set, fall back to module param */
+#define XE_GUC_LOG_LEVEL_UNSET -1
+
#define XE_DEFAULT_PROBE_DISPLAY IS_ENABLED(CONFIG_DRM_XE_DISPLAY)
#define XE_DEFAULT_VRAM_BAR_SIZE 0
#define XE_DEFAULT_FORCE_PROBE CONFIG_DRM_XE_FORCE_PROBE
diff --git a/drivers/gpu/drm/xe/xe_guc_log.c b/drivers/gpu/drm/xe/xe_guc_log.c
index 538d4df0f7aa..531b9759d520 100644
--- a/drivers/gpu/drm/xe/xe_guc_log.c
+++ b/drivers/gpu/drm/xe/xe_guc_log.c
@@ -13,6 +13,7 @@
#include "abi/guc_lfd_abi.h"
#include "regs/xe_guc_regs.h"
#include "xe_bo.h"
+#include "xe_configfs_debug.h"
#include "xe_devcoredump.h"
#include "xe_force_wake.h"
#include "xe_gt_printk.h"
@@ -637,7 +638,7 @@ int xe_guc_log_init(struct xe_guc_log *log)
xe_map_memset(xe, &bo->vmap, 0, 0, xe_bo_size(bo));
log->bo = bo;
- log->level = xe_modparam.guc_log_level;
+ log->level = xe_configfs_get_guc_log_level(to_pci_dev(xe->drm.dev));
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/9] drm/xe/guc: Add support for NPK as a GuC log target
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
` (4 preceding siblings ...)
2026-07-22 21:47 ` [PATCH 5/9] drm/xe/guc: Add configfs support for guc_log_level Stuart Summers
@ 2026-07-22 21:47 ` Stuart Summers
2026-07-22 21:47 ` [PATCH 7/9] drm/xe: Add infrastructure for debug configfs parameters Stuart Summers
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Stuart Summers @ 2026-07-22 21:47 UTC (permalink / raw)
Cc: intel-xe, rodrigo.vivi, matthew.brost, umesh.nerlige.ramappa,
Michal.Wajdeczko, matthew.d.roper, daniele.ceraolospurio,
shuicheng.lin, Stuart Summers
GuC provides the ability to gather logs through a hardware interface
called NPK. For certain debugging scenarios this can be advantageous
over getting logs from memory (or in addition to).
Add a hook for this alternate debugging mode via a configfs. This
translates into a parameter passed to GuC during load time.
v2: Convert to configfs from modparam (Matt)
v3: Configfs documentation formatting (Shuicheng)
Kerneldoc/comment add + configfs entry ordering
Only set the guc_log_target when GuC log is enabled (Daniele)
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Assisted-by: Copilot:claude-sonnet-4.6,claude-opus-4.7,claude-sonnet-5
---
drivers/gpu/drm/xe/abi/guc_log_abi.h | 8 ++++
drivers/gpu/drm/xe/xe_configfs.c | 2 +
drivers/gpu/drm/xe/xe_configfs_debug.c | 62 ++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_configfs_debug.h | 5 +++
drivers/gpu/drm/xe/xe_configfs_types.h | 1 +
drivers/gpu/drm/xe/xe_defaults.h | 2 +
drivers/gpu/drm/xe/xe_guc.c | 11 +++--
7 files changed, 88 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/abi/guc_log_abi.h b/drivers/gpu/drm/xe/abi/guc_log_abi.h
index fbf212d59a40..e1b121bff549 100644
--- a/drivers/gpu/drm/xe/abi/guc_log_abi.h
+++ b/drivers/gpu/drm/xe/abi/guc_log_abi.h
@@ -51,6 +51,14 @@ enum guc_log_type {
#define GUC_LOG_BUFFER_TYPE_MAX 3
+enum guc_log_target {
+ GUC_LOG_TARGET_MEM = 0,
+ GUC_LOG_TARGET_NPK,
+ GUC_LOG_TARGET_MEM_AND_NPK,
+};
+
+#define GUC_LOG_TARGET_MAX GUC_LOG_TARGET_MEM_AND_NPK
+
/**
* struct guc_log_buffer_state - GuC log buffer state
*
diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index ea09d5f9e925..c5d5017cd506 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -101,6 +101,7 @@ const struct xe_config_device xe_configfs_device_defaults = {
.engines_allowed = U64_MAX,
.gt_types_allowed = U64_MAX,
.guc_log_level = XE_GUC_LOG_LEVEL_UNSET,
+ .guc_log_target = XE_DEFAULT_GUC_LOG_TARGET,
.enable_multi_queue = true,
.enable_psmi = false,
.survivability_mode = false,
@@ -420,6 +421,7 @@ static void dump_custom_dev_config(struct pci_dev *pdev,
PRI_CUSTOM_ATTR("%llx", debug.engines_allowed);
PRI_CUSTOM_ATTR("%llx", debug.gt_types_allowed);
PRI_CUSTOM_ATTR("%d", debug.guc_log_level);
+ PRI_CUSTOM_ATTR("%d", debug.guc_log_target);
PRI_CUSTOM_ATTR("%d", debug.enable_multi_queue);
PRI_CUSTOM_ATTR("%d", debug.enable_psmi);
PRI_CUSTOM_ATTR("%d", debug.survivability_mode);
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.c b/drivers/gpu/drm/xe/xe_configfs_debug.c
index 1d95b4acca9c..32cbe12734fd 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug.c
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.c
@@ -46,6 +46,7 @@
* ├── engines_allowed
* ├── gt_types_allowed
* ├── guc_log_level
+ * ├── guc_log_target
* ├── enable_multi_queue
* ├── enable_psmi
* └── survivability_mode
@@ -190,6 +191,16 @@
*
* This attribute can only be set before binding to the device.
*
+ * GuC log target:
+ * ---------------
+ *
+ * Set the destination for the GuC log. 0 - memory only (default),
+ * 1 - NPK only, 2 - memory + NPK. Example::
+ *
+ * # echo 2 > /sys/kernel/config/xe/0000:03:00.0/debug/guc_log_target
+ *
+ * This attribute can only be set before binding to the device.
+ *
* Enable multi-queue
* ------------------
*
@@ -832,6 +843,55 @@ static ssize_t guc_log_level_store(struct config_item *item, const char *page, s
return len;
}
+/**
+ * xe_configfs_get_guc_log_target - get configfs GuC log target attribute
+ * @pdev: pci device
+ *
+ * Return: guc_log_target attribute in configfs
+ */
+u8 xe_configfs_get_guc_log_target(struct pci_dev *pdev)
+{
+ struct xe_config_group_device *dev = find_device(pdev);
+ u8 target;
+
+ if (!dev)
+ return xe_configfs_device_defaults.debug.guc_log_target;
+
+ target = dev->config.debug.guc_log_target;
+ config_group_put(&dev->group);
+
+ return target;
+}
+
+static ssize_t guc_log_target_show(struct config_item *item, char *page)
+{
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
+
+ return sprintf(page, "%d\n", dev->debug.guc_log_target);
+}
+
+static ssize_t guc_log_target_store(struct config_item *item, const char *page, size_t len)
+{
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
+ u8 guc_log_target;
+ int ret;
+
+ ret = kstrtou8(page, 0, &guc_log_target);
+ if (ret)
+ return ret;
+
+ if (guc_log_target > GUC_LOG_TARGET_MAX)
+ return -EINVAL;
+
+ guard(mutex)(&dev->lock);
+ if (xe_configfs_is_bound(dev))
+ return -EBUSY;
+
+ dev->config.debug.guc_log_target = guc_log_target;
+
+ return len;
+}
+
/**
* xe_configfs_get_enable_multi_queue - get configfs enable_multi_queue setting
* @pdev: pci device
@@ -976,6 +1036,7 @@ CONFIGFS_ATTR(, ctx_restore_post_bb);
CONFIGFS_ATTR(, engines_allowed);
CONFIGFS_ATTR(, gt_types_allowed);
CONFIGFS_ATTR(, guc_log_level);
+CONFIGFS_ATTR(, guc_log_target);
CONFIGFS_ATTR(, enable_multi_queue);
CONFIGFS_ATTR(, enable_psmi);
CONFIGFS_ATTR(, survivability_mode);
@@ -986,6 +1047,7 @@ static struct configfs_attribute *xe_configfs_debug_attrs[] = {
&attr_engines_allowed,
&attr_gt_types_allowed,
&attr_guc_log_level,
+ &attr_guc_log_target,
&attr_enable_multi_queue,
&attr_enable_psmi,
&attr_survivability_mode,
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.h b/drivers/gpu/drm/xe/xe_configfs_debug.h
index 5fe39bb72f00..b97a7fff6652 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug.h
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.h
@@ -27,6 +27,7 @@ u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev);
bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev);
bool xe_configfs_media_gt_allowed(struct pci_dev *pdev);
int xe_configfs_get_guc_log_level(struct pci_dev *pdev);
+u8 xe_configfs_get_guc_log_target(struct pci_dev *pdev);
bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev);
bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev);
bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
@@ -49,6 +50,10 @@ static inline int xe_configfs_get_guc_log_level(struct pci_dev *pdev)
{
return xe_modparam.guc_log_level;
}
+static inline u8 xe_configfs_get_guc_log_target(struct pci_dev *pdev)
+{
+ return XE_DEFAULT_GUC_LOG_TARGET;
+}
static inline bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev) { return true; }
static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; }
static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; }
diff --git a/drivers/gpu/drm/xe/xe_configfs_types.h b/drivers/gpu/drm/xe/xe_configfs_types.h
index e9460c3de891..1123f6e2a668 100644
--- a/drivers/gpu/drm/xe/xe_configfs_types.h
+++ b/drivers/gpu/drm/xe/xe_configfs_types.h
@@ -39,6 +39,7 @@ struct xe_config_group_device {
u64 engines_allowed;
u64 gt_types_allowed;
int guc_log_level;
+ u8 guc_log_target;
bool enable_multi_queue;
bool enable_psmi;
bool survivability_mode;
diff --git a/drivers/gpu/drm/xe/xe_defaults.h b/drivers/gpu/drm/xe/xe_defaults.h
index df88078e84b8..9330e08727a8 100644
--- a/drivers/gpu/drm/xe/xe_defaults.h
+++ b/drivers/gpu/drm/xe/xe_defaults.h
@@ -5,6 +5,7 @@
#ifndef _XE_DEFAULTS_H_
#define _XE_DEFAULTS_H_
+#include "abi/guc_log_abi.h"
#include "xe_device_types.h"
#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
@@ -12,6 +13,7 @@
#else
#define XE_DEFAULT_GUC_LOG_LEVEL 1
#endif
+#define XE_DEFAULT_GUC_LOG_TARGET GUC_LOG_TARGET_MEM
/* Sentinel value for guc_log_level configfs: not set, fall back to module param */
#define XE_GUC_LOG_LEVEL_UNSET -1
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index b6322db368be..599134d3d027 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -75,13 +75,18 @@ static u32 guc_bo_ggtt_addr(struct xe_guc *guc,
static u32 guc_ctl_debug_flags(struct xe_guc *guc)
{
+ struct pci_dev *pdev = to_pci_dev(guc_to_xe(guc)->drm.dev);
u32 level = xe_guc_log_get_level(&guc->log);
u32 flags = 0;
- if (!GUC_LOG_LEVEL_IS_VERBOSE(level))
+ if (!GUC_LOG_LEVEL_IS_VERBOSE(level)) {
flags |= GUC_LOG_DISABLED;
- else
- flags |= FIELD_PREP(GUC_LOG_VERBOSITY, GUC_LOG_LEVEL_TO_VERBOSITY(level));
+ } else {
+ flags |= FIELD_PREP(GUC_LOG_VERBOSITY,
+ GUC_LOG_LEVEL_TO_VERBOSITY(level));
+ flags |= FIELD_PREP(GUC_LOG_DESTINATION,
+ xe_configfs_get_guc_log_target(pdev));
+ }
return flags;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 7/9] drm/xe: Add infrastructure for debug configfs parameters
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
` (5 preceding siblings ...)
2026-07-22 21:47 ` [PATCH 6/9] drm/xe/guc: Add support for NPK as a GuC log target Stuart Summers
@ 2026-07-22 21:47 ` Stuart Summers
2026-07-22 21:47 ` [PATCH 8/9] drm/xe: Migrate existing debug configfs entries to params infrastructure Stuart Summers
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Stuart Summers @ 2026-07-22 21:47 UTC (permalink / raw)
Cc: intel-xe, rodrigo.vivi, matthew.brost, umesh.nerlige.ramappa,
Michal.Wajdeczko, matthew.d.roper, daniele.ceraolospurio,
shuicheng.lin, Stuart Summers
Borrow the X-macro pattern from i915_debugfs_params.c and adapt it to
the Xe debug configfs interface, so future debug-only configfs entries
can be added with a single line.
Add a new header xe_configfs_debug_params.h that defines:
XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(param)
invoked as
'param(type, name, default, validator, visibility, getter, fallback)'
for each debug configfs parameter. The matching backing struct, default
initializer fragment, configfs_attribute objects, show/store handlers,
entries in xe_configfs_debug_attrs[] and the xe_configfs_get_<name>()
accessor are all generated from this single list.
Supported type tokens are int, bool, u8, u16, u32 and u64. Sized
unsigned types are used directly rather than mirroring i915's
int/unsigned int (which exists there only because those debugfs
entries shadow module_param values, and module_param itself does not
support sized types).
The validator slot is a function-like macro that takes the parsed
typed value and returns 0 or a negative errno. XE_PARAM_VALIDATE_NONE
is provided for parameters whose full type range is acceptable.
Function-like macros (rather than function pointers) let the compiler
fold trivial validators away entirely.
The visibility slot is a function-like macro that takes a config_item
and returns whether the attribute should be visible.
The getter and fallback slots drive the generated
xe_configfs_get_<name>(pdev) accessor: getter(dev, name) computes the
return value from a found device group, while fallback is returned
when no device group matches. Most parameters just read the stored
value and repeat their default as the fallback (XE_PARAM_GETTER_READ);
a parameter can override either slot when its accessor needs different
behavior.
The auto-generated handlers, configfs_attribute objects and getters
live in a new xe_configfs_debug_params.c so they do not crowd the
hand-written entries in xe_configfs_debug.c. The attribute objects are
non-static (declared 'extern' in the header) so xe_configfs_debug.c can
splice them into xe_configfs_debug_attrs[] and reference them from
is_visible().
The parameter list is intentionally empty in this patch; converting
existing entries (or adding new ones) is left to follow-up changes so
this infrastructure can be reviewed in isolation.
Note that the expectation is a user will only set these debug
parameters when CONFIG_DRM_XE_DEBUG is set; the entire facility lives
behind that Kconfig.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Assisted-by: Copilot:claude-sonnet-4.6,claude-opus-4.7,claude-sonnet-5
---
drivers/gpu/drm/xe/Makefile | 2 +-
drivers/gpu/drm/xe/xe_configfs_debug_params.c | 144 +++++++++++++++
drivers/gpu/drm/xe/xe_configfs_debug_params.h | 173 ++++++++++++++++++
3 files changed, 318 insertions(+), 1 deletion(-)
create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug_params.c
create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug_params.h
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index 5765751781ae..8b4a2526e715 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -162,7 +162,7 @@ xe-$(CONFIG_HWMON) += xe_hwmon.o
xe-$(CONFIG_PERF_EVENTS) += xe_pmu.o
xe-$(CONFIG_CONFIGFS_FS) += xe_configfs.o
-xe_debug_configfs_obj-$(CONFIG_DRM_XE_DEBUG) := xe_configfs_debug.o
+xe_debug_configfs_obj-$(CONFIG_DRM_XE_DEBUG) := xe_configfs_debug.o xe_configfs_debug_params.o
xe-$(CONFIG_CONFIGFS_FS) += $(xe_debug_configfs_obj-y)
# graphics virtualization (SR-IOV) support
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug_params.c b/drivers/gpu/drm/xe/xe_configfs_debug_params.c
new file mode 100644
index 000000000000..3946e56c0ef5
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_configfs_debug_params.c
@@ -0,0 +1,144 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+/*
+ * Auto-generated debug configfs parameters.
+ *
+ * This file expands XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH() (defined in
+ * xe_configfs_debug_params.h) to define the show/store handlers and
+ * configfs_attribute objects for every parameter in the list.
+ *
+ * Per-type ops generators are provided for the simple scalar types
+ * supported by &struct xe_configfs_debug_params: int, bool, u8, u16,
+ * u32, u64. The integer template is parameterised on the kstrto helper
+ * and the printf format string; bool gets its own template because
+ * kstrtobool() has a different signature.
+ *
+ * Each store handler invokes the per-parameter validator (a
+ * function-like macro from the X-macro list), allowing range or
+ * sentinel checks to be expressed declaratively next to the parameter
+ * definition.
+ *
+ * Generated configfs_attribute objects are non-static so that
+ * xe_configfs_debug.c can reference them by symbol (attr_<name>) when
+ * assembling its xe_configfs_debug_attrs[] array and its is_visible()
+ * callback.
+ *
+ * This file also generates the xe_configfs_get_<name>() accessors used
+ * by the rest of the driver to read a parameter's effective value; see
+ * the DOC section below.
+ */
+
+#include <linux/cleanup.h>
+#include <linux/configfs.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/string.h>
+#include <linux/sysfs.h>
+
+#include "xe_configfs_debug_params.h"
+#include "xe_configfs.h"
+
+#define _XE_PARAM_DEFINE_OPS_NUMERIC(_T, _name, _kstrto, _fmt, _validator) \
+static ssize_t _name##_show(struct config_item *item, char *page) \
+{ \
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item); \
+ return sprintf(page, _fmt "\n", dev->debug.params._name); \
+} \
+static ssize_t _name##_store(struct config_item *item, const char *page, size_t len) \
+{ \
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item); \
+ XE_PARAM_TYPE_##_T val; \
+ int ret = _kstrto(page, 0, &val); \
+ if (ret) \
+ return ret; \
+ ret = _validator(val); \
+ if (ret) \
+ return ret; \
+ guard(mutex)(&dev->lock); \
+ if (xe_configfs_is_bound(dev)) \
+ return -EBUSY; \
+ dev->config.debug.params._name = val; \
+ return len; \
+}
+
+#define _XE_PARAM_DEFINE_OPS_int(_name, _validator) \
+ _XE_PARAM_DEFINE_OPS_NUMERIC(int, _name, kstrtoint, "%d", _validator)
+#define _XE_PARAM_DEFINE_OPS_u8(_name, _validator) \
+ _XE_PARAM_DEFINE_OPS_NUMERIC(u8, _name, kstrtou8, "%u", _validator)
+#define _XE_PARAM_DEFINE_OPS_u16(_name, _validator) \
+ _XE_PARAM_DEFINE_OPS_NUMERIC(u16, _name, kstrtou16, "%u", _validator)
+#define _XE_PARAM_DEFINE_OPS_u32(_name, _validator) \
+ _XE_PARAM_DEFINE_OPS_NUMERIC(u32, _name, kstrtou32, "%u", _validator)
+#define _XE_PARAM_DEFINE_OPS_u64(_name, _validator) \
+ _XE_PARAM_DEFINE_OPS_NUMERIC(u64, _name, kstrtou64, "%llu", _validator)
+#define _XE_PARAM_DEFINE_OPS_bool(_name, _validator) \
+static ssize_t _name##_show(struct config_item *item, char *page) \
+{ \
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item); \
+ return sprintf(page, "%d\n", dev->debug.params._name); \
+} \
+static ssize_t _name##_store(struct config_item *item, const char *page, size_t len) \
+{ \
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item); \
+ bool val; \
+ int ret = kstrtobool(page, &val); \
+ if (ret) \
+ return ret; \
+ ret = _validator(val); \
+ if (ret) \
+ return ret; \
+ guard(mutex)(&dev->lock); \
+ if (xe_configfs_is_bound(dev)) \
+ return -EBUSY; \
+ dev->config.debug.params._name = val; \
+ return len; \
+}
+
+#define _XE_PARAM_DEFINE_OPS(_T, _name, _def, _validator, _vis, _get, _fallback) \
+ _XE_PARAM_DEFINE_OPS_##_T(_name, _validator)
+XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(_XE_PARAM_DEFINE_OPS)
+
+/*
+ * Define the configfs_attribute objects. These are non-static so they
+ * can be referenced from xe_configfs_debug.c.
+ */
+#define _XE_PARAM_DEFINE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+struct configfs_attribute attr_##_name = { \
+ .ca_name = __stringify(_name), \
+ .ca_owner = THIS_MODULE, \
+ .ca_mode = 0644, \
+ .show = _name##_show, \
+ .store = _name##_store, \
+};
+
+XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(_XE_PARAM_DEFINE_ATTR)
+
+/**
+ * DOC: Debug configfs parameter getters
+ *
+ * xe_configfs_get_<name>() accessors for every parameter declared via
+ * XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH() are generated below from that
+ * same list. Each looks up the &xe_config_group_device matching @pdev,
+ * applies the parameter's "getter" macro to compute the return value,
+ * and drops the reference before returning. If no matching device
+ * group exists, the parameter's "fallback" value is returned instead.
+ *
+ * The CONFIG_DRM_XE_DEBUG=n stub for each of these accessors is
+ * generated separately, in xe_configfs_debug.h.
+ */
+#define _XE_PARAM_DEFINE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev) \
+{ \
+ struct xe_config_group_device *dev = xe_configfs_find_group_device(pdev); \
+ XE_PARAM_TYPE_##_T ret; \
+ if (!dev) \
+ return (_fallback); \
+ ret = _get(dev, _name); \
+ config_group_put(&dev->group); \
+ return ret; \
+}
+XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(_XE_PARAM_DEFINE_GETTER)
+#undef _XE_PARAM_DEFINE_GETTER
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug_params.h b/drivers/gpu/drm/xe/xe_configfs_debug_params.h
new file mode 100644
index 000000000000..954ca4343136
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_configfs_debug_params.h
@@ -0,0 +1,173 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+#ifndef _XE_CONFIGFS_DEBUG_PARAMS_H_
+#define _XE_CONFIGFS_DEBUG_PARAMS_H_
+
+#include <linux/configfs.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+
+struct pci_dev;
+
+/*
+ * Internal type/format aliases resolved by XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH().
+ *
+ * Each parameter declares its type using one of these tokens; the helper
+ * macros below and in xe_configfs_debug_params.c resolve the token to the
+ * underlying C type, printf format, and kstrto helper.
+ *
+ * Supported type tokens: int, bool, u8, u16, u32, u64. Add new types by
+ * defining matching XE_PARAM_TYPE_<token> and XE_PARAM_FMT_<token> here,
+ * plus an ops generator in xe_configfs_debug_params.c.
+ */
+#define XE_PARAM_TYPE_int int
+#define XE_PARAM_TYPE_bool bool
+#define XE_PARAM_TYPE_u8 u8
+#define XE_PARAM_TYPE_u16 u16
+#define XE_PARAM_TYPE_u32 u32
+#define XE_PARAM_TYPE_u64 u64
+
+#define XE_PARAM_FMT_int "%d"
+#define XE_PARAM_FMT_bool "%d"
+#define XE_PARAM_FMT_u8 "%u"
+#define XE_PARAM_FMT_u16 "%u"
+#define XE_PARAM_FMT_u32 "%u"
+#define XE_PARAM_FMT_u64 "%llu"
+
+/*
+ * Per-parameter validators
+ *
+ * A validator is a function-like macro that takes the (already-parsed)
+ * typed value and expands to an int expression: 0 if the value is
+ * acceptable, a negative errno (typically -EINVAL) otherwise.
+ *
+ * XE_PARAM_VALIDATE_NONE is the no-op validator for parameters whose
+ * full type range is acceptable.
+ */
+#define XE_PARAM_VALIDATE_NONE(_v) (0)
+
+/*
+ * Per-parameter getter helpers.
+ *
+ * "getter" is a function-like macro invoked as ``getter(dev, name)``,
+ * where @dev is a non-NULL, already-looked-up &xe_config_group_device;
+ * it expands to the value xe_configfs_get_<name>() should return.
+ * XE_PARAM_GETTER_READ is the default for parameters with no special
+ * behavior: read the value straight out of the stored params struct.
+ *
+ * "fallback" is the value xe_configfs_get_<name>() returns when no
+ * device group is found for the given PCI device, and unconditionally
+ * when CONFIG_DRM_XE_DEBUG is disabled (the generated accessor is then
+ * a static inline stub in xe_configfs_debug.h, with no device group to
+ * look up at all). Because it must be evaluable in both of those
+ * contexts, it must never reference @dev or &xe_config_group_device.
+ * It is usually just the parameter's default value; override it when
+ * the "nothing configured" value differs from the initial stored
+ * value, as with guc_log_level falling back to the guc_log_level
+ * module parameter.
+ */
+#define XE_PARAM_GETTER_READ(_dev, _name) ((_dev)->config.debug.params._name)
+
+/**
+ * XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH - iterate over debug configfs params
+ * @param: function-like macro called as
+ * ``param(type, name, default, validator, visibility, getter, fallback)``
+ *
+ * type: parameter type token, one of {int, bool, u8, u16, u32, u64}
+ * name: parameter name; appears as a configfs file at
+ * /sys/kernel/config/xe/<bdf>/debug/<name>
+ * default: initial/default value of the parameter
+ * validator: function-like macro ``v -> int`` returning 0 or a negative
+ * errno; use XE_PARAM_VALIDATE_NONE when no extra constraints
+ * apply beyond the underlying type's range
+ * visibility: function-like macro ``item -> bool`` returning true when
+ * the attribute should be visible; evaluated in
+ * xe_configfs_debug.c where the platform descriptor is
+ * accessible; use XE_PARAM_VISIBLE_ALWAYS for unconditional
+ * visibility
+ * getter: function-like macro ``(dev, name) -> value``; use
+ * XE_PARAM_GETTER_READ unless the accessor needs bespoke
+ * behavior
+ * fallback: value returned when there is no configfs override to
+ * consult; usually just repeat the default
+ *
+ * To add a new debug-only configfs parameter, append a single line to
+ * this list. The infrastructure auto-generates the struct member,
+ * default initialization, configfs attribute (show/store), inclusion in
+ * the debug attrs[] array, the xe_configfs_get_<name>() accessor (both
+ * its CONFIG_DRM_XE_DEBUG=y implementation and its =n stub), and the
+ * diagnostic dump in dump_custom_dev_config().
+ *
+ * Generated configfs files use the default permissions provided by the
+ * configfs core (read-write); a system administrator can restrict them
+ * at runtime if needed.
+ */
+#define XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(param) \
+ /* No parameters yet - add entries above this line. */
+
+/* Generate the struct that backs all debug params in xe_config_device. */
+#define _XE_PARAM_MEMBER(_T, _name, _def, _val, _vis, _get, _fallback) XE_PARAM_TYPE_##_T _name;
+struct xe_configfs_debug_params {
+ XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(_XE_PARAM_MEMBER)
+};
+
+#undef _XE_PARAM_MEMBER
+
+/*
+ * Designated-initializer fragment for &xe_configfs_device_defaults. Use as:
+ *
+ * .debug.params = {
+ * XE_CONFIGFS_DEBUG_PARAMS_DEFAULTS
+ * },
+ */
+#define _XE_PARAM_DEFAULT_INIT(_T, _name, _def, _val, _vis, _get, _fallback) ._name = (_def),
+#define XE_CONFIGFS_DEBUG_PARAMS_DEFAULTS \
+ XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(_XE_PARAM_DEFAULT_INIT)
+
+/*
+ * Forward declarations of the per-parameter configfs_attribute objects.
+ *
+ * The objects themselves are defined in xe_configfs_debug_params.c (as
+ * non-static so they can be referenced from xe_configfs_debug.c's
+ * xe_configfs_debug_attrs[] array and is_visible() callback). They live
+ * in the same translation unit as the X-macro-generated show/store
+ * handlers; consumers should reference them via attr_<name>.
+ */
+#define _XE_PARAM_DECLARE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+ extern struct configfs_attribute attr_##_name;
+XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(_XE_PARAM_DECLARE_ATTR)
+#undef _XE_PARAM_DECLARE_ATTR
+
+/*
+ * Helper used by xe_configfs_debug.c to splice the auto-generated
+ * attribute pointers into its xe_configfs_debug_attrs[] array.
+ */
+#define XE_PARAM_ATTR_PTR(_T, _name, _def, _val, _vis, _get, _fallback) &attr_##_name,
+
+/*
+ * Declarations of the per-parameter xe_configfs_get_<name>() accessors.
+ *
+ * The CONFIG_DRM_XE_DEBUG=y implementations are generated alongside the
+ * show/store handlers in xe_configfs_debug_params.c; see the DOC section
+ * there for what they do. xe_configfs_debug.h uses this macro to declare
+ * the matching prototypes for its callers.
+ */
+#define XE_PARAM_DECLARE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+ XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev);
+
+/*
+ * CONFIG_DRM_XE_DEBUG=n stub for xe_configfs_get_<name>(). There is no
+ * configfs facility to consult in this configuration, so the accessor
+ * unconditionally returns its "fallback" value. Used by
+ * xe_configfs_debug.h.
+ */
+#define XE_PARAM_DECLARE_GETTER_STUB(_T, _name, _def, _val, _vis, _get, _fallback) \
+static inline XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev) \
+{ \
+ return _fallback; \
+}
+
+#endif /* _XE_CONFIGFS_DEBUG_PARAMS_H_ */
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 8/9] drm/xe: Migrate existing debug configfs entries to params infrastructure
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
` (6 preceding siblings ...)
2026-07-22 21:47 ` [PATCH 7/9] drm/xe: Add infrastructure for debug configfs parameters Stuart Summers
@ 2026-07-22 21:47 ` Stuart Summers
2026-07-22 21:47 ` [PATCH 9/9] drm/xe: Taint kernel when debug configfs parameters are set Stuart Summers
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Stuart Summers @ 2026-07-22 21:47 UTC (permalink / raw)
Cc: intel-xe, rodrigo.vivi, matthew.brost, umesh.nerlige.ramappa,
Michal.Wajdeczko, matthew.d.roper, daniele.ceraolospurio,
shuicheng.lin, Stuart Summers
Move the existing debug configfs entries whose semantics fit the
generic show/store template into the new parameter list.
Add validators for the guc_log_level and guc_log_target.
Add a custom getter for the guc_log_level to fall back to the modparam.
The new parameters are intentionally longer than the normal 80
character limit for readability.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Assisted-by: Copilot:claude-sonnet-4.6,claude-opus-4.7,claude-sonnet-5
---
drivers/gpu/drm/xe/xe_configfs.c | 17 +-
drivers/gpu/drm/xe/xe_configfs_debug.c | 271 +-----------------
drivers/gpu/drm/xe/xe_configfs_debug.h | 20 +-
drivers/gpu/drm/xe/xe_configfs_debug_params.c | 1 +
drivers/gpu/drm/xe/xe_configfs_debug_params.h | 21 +-
drivers/gpu/drm/xe/xe_configfs_types.h | 7 +-
drivers/gpu/drm/xe/xe_guc.c | 2 +-
drivers/gpu/drm/xe/xe_psmi.c | 2 +-
drivers/gpu/drm/xe/xe_rtp.c | 2 +-
9 files changed, 46 insertions(+), 297 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index c5d5017cd506..62d3406c61b6 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -100,11 +100,9 @@ const struct xe_config_device xe_configfs_device_defaults = {
.debug = {
.engines_allowed = U64_MAX,
.gt_types_allowed = U64_MAX,
- .guc_log_level = XE_GUC_LOG_LEVEL_UNSET,
- .guc_log_target = XE_DEFAULT_GUC_LOG_TARGET,
- .enable_multi_queue = true,
- .enable_psmi = false,
- .survivability_mode = false,
+ .params = {
+ XE_CONFIGFS_DEBUG_PARAMS_DEFAULTS
+ },
},
#endif
.sriov = {
@@ -420,11 +418,10 @@ static void dump_custom_dev_config(struct pci_dev *pdev,
#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
PRI_CUSTOM_ATTR("%llx", debug.engines_allowed);
PRI_CUSTOM_ATTR("%llx", debug.gt_types_allowed);
- PRI_CUSTOM_ATTR("%d", debug.guc_log_level);
- PRI_CUSTOM_ATTR("%d", debug.guc_log_target);
- PRI_CUSTOM_ATTR("%d", debug.enable_multi_queue);
- PRI_CUSTOM_ATTR("%d", debug.enable_psmi);
- PRI_CUSTOM_ATTR("%d", debug.survivability_mode);
+#define _XE_PARAM_DUMP(_T, _name, _def, _val, _vis, _get, _fallback) \
+ PRI_CUSTOM_ATTR(XE_PARAM_FMT_##_T, debug.params._name);
+ XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(_XE_PARAM_DUMP)
+#undef _XE_PARAM_DUMP
#endif
PRI_CUSTOM_ATTR("%u", sriov.admin_only_pf);
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.c b/drivers/gpu/drm/xe/xe_configfs_debug.c
index 32cbe12734fd..b068c64e42bf 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug.c
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.c
@@ -786,274 +786,21 @@ static ssize_t gt_types_allowed_store(struct config_item *item, const char *page
return len;
}
-/**
- * xe_configfs_get_guc_log_level - get configfs guc_log_level setting
- * @pdev: pci device
- *
- * Returns the guc_log_level value configured via configfs. If the configfs
- * value is negative (the default is %XE_GUC_LOG_LEVEL_UNSET, -1), the value
- * of the ``guc_log_level`` module parameter is returned instead, allowing
- * the configfs entry to override the module parameter without affecting
- * users that rely solely on the module parameter.
- *
- * Return: GuC log level to use for this device.
- */
-int xe_configfs_get_guc_log_level(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_device(pdev);
- int level = xe_modparam.guc_log_level;
-
- if (!dev)
- goto out;
-
- if (dev->config.debug.guc_log_level >= 0)
- level = dev->config.debug.guc_log_level;
-
- config_group_put(&dev->group);
-out:
- return level;
-}
-
-static ssize_t guc_log_level_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
-
- return sprintf(page, "%d\n", dev->debug.guc_log_level);
-}
-
-static ssize_t guc_log_level_store(struct config_item *item, const char *page, size_t len)
-{
- struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
- int val;
- int ret;
-
- ret = kstrtoint(page, 0, &val);
- if (ret)
- return ret;
-
- if (val > GUC_LOG_LEVEL_MAX)
- return -EINVAL;
-
- guard(mutex)(&dev->lock);
- if (xe_configfs_is_bound(dev))
- return -EBUSY;
-
- dev->config.debug.guc_log_level = val;
-
- return len;
-}
-
-/**
- * xe_configfs_get_guc_log_target - get configfs GuC log target attribute
- * @pdev: pci device
- *
- * Return: guc_log_target attribute in configfs
- */
-u8 xe_configfs_get_guc_log_target(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_device(pdev);
- u8 target;
-
- if (!dev)
- return xe_configfs_device_defaults.debug.guc_log_target;
-
- target = dev->config.debug.guc_log_target;
- config_group_put(&dev->group);
-
- return target;
-}
-
-static ssize_t guc_log_target_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
-
- return sprintf(page, "%d\n", dev->debug.guc_log_target);
-}
-
-static ssize_t guc_log_target_store(struct config_item *item, const char *page, size_t len)
-{
- struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
- u8 guc_log_target;
- int ret;
-
- ret = kstrtou8(page, 0, &guc_log_target);
- if (ret)
- return ret;
-
- if (guc_log_target > GUC_LOG_TARGET_MAX)
- return -EINVAL;
-
- guard(mutex)(&dev->lock);
- if (xe_configfs_is_bound(dev))
- return -EBUSY;
-
- dev->config.debug.guc_log_target = guc_log_target;
-
- return len;
-}
-
-/**
- * xe_configfs_get_enable_multi_queue - get configfs enable_multi_queue setting
- * @pdev: pci device
- *
- * Return: true if multi-queue is enabled for this device (the default),
- * false if it has been force-disabled via configfs.
- */
-bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_device(pdev);
- bool ret;
-
- if (!dev)
- return xe_configfs_device_defaults.debug.enable_multi_queue;
-
- ret = dev->config.debug.enable_multi_queue;
- config_group_put(&dev->group);
-
- return ret;
-}
-
-static ssize_t enable_multi_queue_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
-
- return sprintf(page, "%d\n", dev->debug.enable_multi_queue);
-}
-
-static ssize_t enable_multi_queue_store(struct config_item *item, const char *page, size_t len)
-{
- struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
- bool val;
- int ret;
-
- ret = kstrtobool(page, &val);
- if (ret)
- return ret;
-
- guard(mutex)(&dev->lock);
- if (xe_configfs_is_bound(dev))
- return -EBUSY;
-
- dev->config.debug.enable_multi_queue = val;
-
- return len;
-}
-
-/**
- * xe_configfs_get_psmi_enabled - get configfs enable_psmi setting
- * @pdev: pci device
- *
- * Return: enable_psmi setting in configfs
- */
-bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_device(pdev);
- bool ret;
-
- if (!dev)
- return false;
-
- ret = dev->config.debug.enable_psmi;
- config_group_put(&dev->group);
-
- return ret;
-}
-
-static ssize_t enable_psmi_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
-
- return sprintf(page, "%d\n", dev->debug.enable_psmi);
-}
-
-static ssize_t enable_psmi_store(struct config_item *item, const char *page, size_t len)
-{
- struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
- bool val;
- int ret;
-
- ret = kstrtobool(page, &val);
- if (ret)
- return ret;
-
- guard(mutex)(&dev->lock);
- if (xe_configfs_is_bound(dev))
- return -EBUSY;
-
- dev->config.debug.enable_psmi = val;
-
- return len;
-}
-
-/**
- * xe_configfs_get_survivability_mode - get configfs survivability mode attribute
- * @pdev: pci device
- *
- * Return: survivability_mode attribute in configfs
- */
-bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
-{
- struct xe_config_group_device *dev = find_device(pdev);
- bool mode;
-
- if (!dev)
- return xe_configfs_device_defaults.debug.survivability_mode;
-
- mode = dev->config.debug.survivability_mode;
- config_group_put(&dev->group);
-
- return mode;
-}
-
-static ssize_t survivability_mode_show(struct config_item *item, char *page)
-{
- struct xe_config_device *dev = xe_configfs_subgroup_to_device(item);
-
- return sprintf(page, "%d\n", dev->debug.survivability_mode);
-}
-
-static ssize_t survivability_mode_store(struct config_item *item, const char *page, size_t len)
-{
- struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item);
- bool survivability_mode;
- int ret;
-
- ret = kstrtobool(page, &survivability_mode);
- if (ret)
- return ret;
-
- guard(mutex)(&dev->lock);
- if (xe_configfs_is_bound(dev))
- return -EBUSY;
-
- dev->config.debug.survivability_mode = survivability_mode;
-
- return len;
-}
-
CONFIGFS_ATTR(, ctx_restore_mid_bb);
CONFIGFS_ATTR(, ctx_restore_post_bb);
CONFIGFS_ATTR(, engines_allowed);
CONFIGFS_ATTR(, gt_types_allowed);
-CONFIGFS_ATTR(, guc_log_level);
-CONFIGFS_ATTR(, guc_log_target);
-CONFIGFS_ATTR(, enable_multi_queue);
-CONFIGFS_ATTR(, enable_psmi);
-CONFIGFS_ATTR(, survivability_mode);
static struct configfs_attribute *xe_configfs_debug_attrs[] = {
&attr_ctx_restore_mid_bb,
&attr_ctx_restore_post_bb,
&attr_engines_allowed,
&attr_gt_types_allowed,
- &attr_guc_log_level,
- &attr_guc_log_target,
- &attr_enable_multi_queue,
- &attr_enable_psmi,
- &attr_survivability_mode,
+ XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(XE_PARAM_ATTR_PTR)
NULL,
};
+
/*
* Per-parameter visibility predicates.
*
@@ -1072,16 +819,18 @@ static struct configfs_attribute *xe_configfs_debug_attrs[] = {
static bool xe_configfs_debug_is_visible(struct config_item *item,
struct configfs_attribute *attr, int n)
{
- if (attr == &attr_survivability_mode) {
- struct xe_config_group_device *dev =
- xe_configfs_to_group_device(item->ci_parent);
-
- return dev->desc->is_dgfx && dev->desc->platform >= XE_BATTLEMAGE;
- }
+#define _XE_PARAM_VIS_CHECK(_T, _name, _def, _val, _vis, _get, _fallback) \
+ if (attr == &attr_##_name) \
+ return _vis(item);
+ XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(_XE_PARAM_VIS_CHECK)
+#undef _XE_PARAM_VIS_CHECK
return true;
}
+#undef XE_PARAM_VISIBLE_ALWAYS
+#undef XE_PARAM_VISIBLE_SURVIVABILITY
+
static struct configfs_group_operations xe_configfs_debug_group_ops = {
.is_visible = xe_configfs_debug_is_visible,
};
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.h b/drivers/gpu/drm/xe/xe_configfs_debug.h
index b97a7fff6652..375ddc17ba36 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug.h
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.h
@@ -7,7 +7,7 @@
#include <linux/types.h>
-#include "xe_defaults.h"
+#include "xe_configfs_debug_params.h"
#include "xe_hw_engine_types.h"
#include "xe_module.h"
@@ -26,11 +26,7 @@ u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev);
bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev);
bool xe_configfs_media_gt_allowed(struct pci_dev *pdev);
-int xe_configfs_get_guc_log_level(struct pci_dev *pdev);
-u8 xe_configfs_get_guc_log_target(struct pci_dev *pdev);
-bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev);
-bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev);
-bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
+XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(XE_PARAM_DECLARE_GETTER)
#else
/*
* Dummy values here are not used since these function accesses are always
@@ -46,17 +42,7 @@ static inline u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; }
static inline bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev) { return true; }
static inline bool xe_configfs_media_gt_allowed(struct pci_dev *pdev) { return true; }
-static inline int xe_configfs_get_guc_log_level(struct pci_dev *pdev)
-{
- return xe_modparam.guc_log_level;
-}
-static inline u8 xe_configfs_get_guc_log_target(struct pci_dev *pdev)
-{
- return XE_DEFAULT_GUC_LOG_TARGET;
-}
-static inline bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev) { return true; }
-static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; }
-static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; }
+XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(XE_PARAM_DECLARE_GETTER_STUB)
#endif
#endif /* _XE_CONFIGFS_DEBUG_H_ */
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug_params.c b/drivers/gpu/drm/xe/xe_configfs_debug_params.c
index 3946e56c0ef5..38af06ca7504 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug_params.c
+++ b/drivers/gpu/drm/xe/xe_configfs_debug_params.c
@@ -40,6 +40,7 @@
#include "xe_configfs_debug_params.h"
#include "xe_configfs.h"
+#include "xe_configfs_debug.h"
#define _XE_PARAM_DEFINE_OPS_NUMERIC(_T, _name, _kstrto, _fmt, _validator) \
static ssize_t _name##_show(struct config_item *item, char *page) \
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug_params.h b/drivers/gpu/drm/xe/xe_configfs_debug_params.h
index 954ca4343136..57deb929fee6 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug_params.h
+++ b/drivers/gpu/drm/xe/xe_configfs_debug_params.h
@@ -10,6 +10,12 @@
#include <linux/errno.h>
#include <linux/types.h>
+#include "abi/guc_log_abi.h"
+#include "xe_defaults.h"
+#include "xe_guc_fwif.h"
+#include "xe_guc_log.h"
+#include "xe_module.h"
+
struct pci_dev;
/*
@@ -49,6 +55,11 @@ struct pci_dev;
*/
#define XE_PARAM_VALIDATE_NONE(_v) (0)
+#define XE_PARAM_VALIDATE_GUC_LOG_LEVEL(_v) \
+ ((((_v) < 0) || ((_v) <= GUC_LOG_LEVEL_MAX)) ? 0 : -EINVAL)
+#define XE_PARAM_VALIDATE_GUC_LOG_TARGET(_v) \
+ (((_v) <= GUC_LOG_TARGET_MAX) ? 0 : -EINVAL)
+
/*
* Per-parameter getter helpers.
*
@@ -71,6 +82,10 @@ struct pci_dev;
*/
#define XE_PARAM_GETTER_READ(_dev, _name) ((_dev)->config.debug.params._name)
+#define XE_PARAM_GETTER_GUC_LOG_LEVEL(_dev, _name) \
+ ({ typeof((_dev)->config.debug.params._name) __v = (_dev)->config.debug.params._name; \
+ __v >= 0 ? __v : xe_modparam.guc_log_level; })
+
/**
* XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH - iterate over debug configfs params
* @param: function-like macro called as
@@ -106,7 +121,11 @@ struct pci_dev;
* at runtime if needed.
*/
#define XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(param) \
- /* No parameters yet - add entries above this line. */
+ param(int, guc_log_level, XE_GUC_LOG_LEVEL_UNSET, XE_PARAM_VALIDATE_GUC_LOG_LEVEL, XE_PARAM_VISIBLE_ALWAYS, XE_PARAM_GETTER_GUC_LOG_LEVEL, xe_modparam.guc_log_level) \
+ param(u8, guc_log_target, XE_DEFAULT_GUC_LOG_TARGET, XE_PARAM_VALIDATE_GUC_LOG_TARGET, XE_PARAM_VISIBLE_ALWAYS, XE_PARAM_GETTER_READ, XE_DEFAULT_GUC_LOG_TARGET) \
+ param(bool, enable_multi_queue, true, XE_PARAM_VALIDATE_NONE, XE_PARAM_VISIBLE_ALWAYS, XE_PARAM_GETTER_READ, true) \
+ param(bool, enable_psmi, false, XE_PARAM_VALIDATE_NONE, XE_PARAM_VISIBLE_ALWAYS, XE_PARAM_GETTER_READ, false) \
+ param(bool, survivability_mode, false, XE_PARAM_VALIDATE_NONE, XE_PARAM_VISIBLE_SURVIVABILITY, XE_PARAM_GETTER_READ, false)
/* Generate the struct that backs all debug params in xe_config_device. */
#define _XE_PARAM_MEMBER(_T, _name, _def, _val, _vis, _get, _fallback) XE_PARAM_TYPE_##_T _name;
diff --git a/drivers/gpu/drm/xe/xe_configfs_types.h b/drivers/gpu/drm/xe/xe_configfs_types.h
index 1123f6e2a668..c6eb90573866 100644
--- a/drivers/gpu/drm/xe/xe_configfs_types.h
+++ b/drivers/gpu/drm/xe/xe_configfs_types.h
@@ -9,6 +9,7 @@
#include <linux/mutex.h>
#include <linux/types.h>
+#include "xe_configfs_debug_params.h"
#include "xe_hw_engine_types.h"
#include "xe_pci_types.h"
#include "xe_sriov_types.h"
@@ -38,11 +39,7 @@ struct xe_config_group_device {
struct wa_bb ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
u64 engines_allowed;
u64 gt_types_allowed;
- int guc_log_level;
- u8 guc_log_target;
- bool enable_multi_queue;
- bool enable_psmi;
- bool survivability_mode;
+ struct xe_configfs_debug_params params;
} debug;
#endif
struct {
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 599134d3d027..83266ad78eea 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -99,7 +99,7 @@ static u32 guc_ctl_feature_flags(struct xe_guc *guc)
if (!xe->info.skip_guc_pc)
flags |= GUC_CTL_ENABLE_SLPC;
- if (xe_configfs_get_psmi_enabled(to_pci_dev(xe->drm.dev)))
+ if (xe_configfs_get_enable_psmi(to_pci_dev(xe->drm.dev)))
flags |= GUC_CTL_ENABLE_PSMI_LOGGING;
if (xe_guc_using_main_gamctrl_queues(guc))
diff --git a/drivers/gpu/drm/xe/xe_psmi.c b/drivers/gpu/drm/xe/xe_psmi.c
index 59af3d145418..ff9a14949339 100644
--- a/drivers/gpu/drm/xe/xe_psmi.c
+++ b/drivers/gpu/drm/xe/xe_psmi.c
@@ -34,7 +34,7 @@
static bool psmi_enabled(struct xe_device *xe)
{
- return xe_configfs_get_psmi_enabled(to_pci_dev(xe->drm.dev));
+ return xe_configfs_get_enable_psmi(to_pci_dev(xe->drm.dev));
}
static void psmi_free_object(struct xe_bo *bo)
diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index 62068189320f..3ead1eac93f5 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -450,7 +450,7 @@ bool xe_rtp_match_psmi_enabled(const struct xe_device *xe,
const struct xe_gt *gt,
const struct xe_hw_engine *hwe)
{
- return xe_configfs_get_psmi_enabled(to_pci_dev(xe->drm.dev));
+ return xe_configfs_get_enable_psmi(to_pci_dev(xe->drm.dev));
}
bool xe_rtp_match_gt_has_discontiguous_dss_groups(const struct xe_device *xe,
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 9/9] drm/xe: Taint kernel when debug configfs parameters are set
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
` (7 preceding siblings ...)
2026-07-22 21:47 ` [PATCH 8/9] drm/xe: Migrate existing debug configfs entries to params infrastructure Stuart Summers
@ 2026-07-22 21:47 ` Stuart Summers
2026-07-22 22:25 ` ✗ CI.checkpatch: warning for Add new debug infrastructure for configfs (rev2) Patchwork
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Stuart Summers @ 2026-07-22 21:47 UTC (permalink / raw)
Cc: intel-xe, rodrigo.vivi, matthew.brost, umesh.nerlige.ramappa,
Michal.Wajdeczko, matthew.d.roper, daniele.ceraolospurio,
shuicheng.lin, Stuart Summers
Writing any debug configfs attribute indicates the system is running
in a non-standard configuration that may mask bugs or produce misleading
behaviour. Taint the kernel with TAINT_TEST on each successful write so
bug reports clearly reflect when debug settings were active.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Assisted-by: Copilot:claude-sonnet-4.6,claude-sonnet-5
---
drivers/gpu/drm/xe/xe_configfs_debug.c | 12 ++++++++++++
drivers/gpu/drm/xe/xe_configfs_debug_params.c | 6 ++++++
2 files changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.c b/drivers/gpu/drm/xe/xe_configfs_debug.c
index b068c64e42bf..4542f3311f4b 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug.c
+++ b/drivers/gpu/drm/xe/xe_configfs_debug.c
@@ -8,6 +8,7 @@
#include <linux/module.h>
#include <linux/cleanup.h>
#include <linux/find.h>
+#include <linux/panic.h>
#include <linux/pci.h>
#include <linux/string.h>
@@ -33,6 +34,10 @@
* and driver debugging and are not stable ABI. Using them is "at your own
* risk".
*
+ * Writing any debug attribute taints the kernel with ``TAINT_TEST``. This
+ * makes it visible in bug reports when a non-standard or unsafe configuration
+ * was active.
+ *
* See the top-level ``Xe Configfs`` documentation in ``xe_configfs.c``
* for how to create, probe and remove configfs devices. Once a device
* directory exists, the driver populates it with a ``debug/`` subdirectory
@@ -524,6 +529,7 @@ static ssize_t wa_bb_store(struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX],
if (!count) {
memset(wa_bb, 0, sizeof(tmp_wa_bb));
+ add_taint(TAINT_TEST, LOCKDEP_STILL_OK);
return len;
}
@@ -543,6 +549,8 @@ static ssize_t wa_bb_store(struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX],
memcpy(wa_bb, tmp_wa_bb, sizeof(tmp_wa_bb));
+ add_taint(TAINT_TEST, LOCKDEP_STILL_OK);
+
return len;
}
@@ -694,6 +702,8 @@ static ssize_t engines_allowed_store(struct config_item *item, const char *page,
dev->config.debug.engines_allowed = val;
+ add_taint(TAINT_TEST, LOCKDEP_STILL_OK);
+
return len;
}
@@ -783,6 +793,8 @@ static ssize_t gt_types_allowed_store(struct config_item *item, const char *page
dev->config.debug.gt_types_allowed = typemask;
+ add_taint(TAINT_TEST, LOCKDEP_STILL_OK);
+
return len;
}
diff --git a/drivers/gpu/drm/xe/xe_configfs_debug_params.c b/drivers/gpu/drm/xe/xe_configfs_debug_params.c
index 38af06ca7504..ac9e77838006 100644
--- a/drivers/gpu/drm/xe/xe_configfs_debug_params.c
+++ b/drivers/gpu/drm/xe/xe_configfs_debug_params.c
@@ -29,11 +29,15 @@
* This file also generates the xe_configfs_get_<name>() accessors used
* by the rest of the driver to read a parameter's effective value; see
* the DOC section below.
+ *
+ * Setting these parameters taints the kernel since these are intended
+ * for debug and testing purposes only.
*/
#include <linux/cleanup.h>
#include <linux/configfs.h>
#include <linux/kernel.h>
+#include <linux/panic.h>
#include <linux/pci.h>
#include <linux/string.h>
#include <linux/sysfs.h>
@@ -62,6 +66,7 @@ static ssize_t _name##_store(struct config_item *item, const char *page, size_t
if (xe_configfs_is_bound(dev)) \
return -EBUSY; \
dev->config.debug.params._name = val; \
+ add_taint(TAINT_TEST, LOCKDEP_STILL_OK); \
return len; \
}
@@ -95,6 +100,7 @@ static ssize_t _name##_store(struct config_item *item, const char *page, size_t
if (xe_configfs_is_bound(dev)) \
return -EBUSY; \
dev->config.debug.params._name = val; \
+ add_taint(TAINT_TEST, LOCKDEP_STILL_OK); \
return len; \
}
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* ✗ CI.checkpatch: warning for Add new debug infrastructure for configfs (rev2)
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
` (8 preceding siblings ...)
2026-07-22 21:47 ` [PATCH 9/9] drm/xe: Taint kernel when debug configfs parameters are set Stuart Summers
@ 2026-07-22 22:25 ` Patchwork
2026-07-22 22:27 ` ✓ CI.KUnit: success " Patchwork
2026-07-22 23:18 ` ✓ Xe.CI.BAT: " Patchwork
11 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2026-07-22 22:25 UTC (permalink / raw)
To: Stuart Summers; +Cc: intel-xe
== Series Details ==
Series: Add new debug infrastructure for configfs (rev2)
URL : https://patchwork.freedesktop.org/series/165879/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
061140b9bc586ae7f40abc1249c97e1cc72d1b9d
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 138b6c7a2b2cb072fa5c05f2056333bbd6fbae89
Author: Stuart Summers <stuart.summers@intel.com>
Date: Wed Jul 22 21:47:05 2026 +0000
drm/xe: Taint kernel when debug configfs parameters are set
Writing any debug configfs attribute indicates the system is running
in a non-standard configuration that may mask bugs or produce misleading
behaviour. Taint the kernel with TAINT_TEST on each successful write so
bug reports clearly reflect when debug settings were active.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Assisted-by: Copilot:claude-sonnet-4.6,claude-sonnet-5
+ /mt/dim checkpatch aff95d2d4b516f1618e3fb1cdb5850b6e1b19bb9 drm-intel
a30ee3f5fea7 drm/xe: Sort xe_config_device fields
-:834: WARNING:LINE_SPACING: Missing a blank line after declarations
#834: FILE: drivers/gpu/drm/xe/xe_configfs.c:862:
+ struct xe_config_group_device *dev = to_xe_config_group_device(item);
+ char *buf __free(kfree) = kstrdup(page, GFP_KERNEL);
total: 0 errors, 1 warnings, 0 checks, 1266 lines checked
220c52c39d90 drm/xe: Split out configfs data structures
-:100: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#100:
new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 122 lines checked
f6b8d8661e1a drm/xe: Add a new debug focused configfs group
-:50: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#50:
new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 61 lines checked
10811c9297b8 drm/xe: Move debug configfs entries to xe_configfs_debug.c
-:1495: WARNING:LONG_LINE: line length of 102 exceeds 100 columns
#1495: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:219:
+ { .cls = "vcs", .mask = XE_HW_ENGINE_VCS_MASK, .engine_class = XE_ENGINE_CLASS_VIDEO_DECODE },
-:1496: WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#1496: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:220:
+ { .cls = "vecs", .mask = XE_HW_ENGINE_VECS_MASK, .engine_class = XE_ENGINE_CLASS_VIDEO_ENHANCE },
-:2198: WARNING:MACRO_ARG_UNUSED: Argument '_item' is not used in function-like macro
#2198: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:922:
+#define XE_PARAM_VISIBLE_ALWAYS(_item) \
+ (true)
-:2200: CHECK:MACRO_ARG_REUSE: Macro argument reuse '_item' - possible side-effects?
#2200: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:924:
+#define XE_PARAM_VISIBLE_SURVIVABILITY(_item) \
+ (xe_configfs_subgroup_to_group_device(_item)->desc->is_dgfx && \
+ xe_configfs_subgroup_to_group_device(_item)->desc->platform >= XE_BATTLEMAGE)
total: 0 errors, 3 warnings, 1 checks, 2324 lines checked
89adee2120e3 drm/xe/guc: Add configfs support for guc_log_level
7b6ee311894e drm/xe/guc: Add support for NPK as a GuC log target
-:177: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#177: FILE: drivers/gpu/drm/xe/xe_configfs_debug.h:53:
}
+static inline u8 xe_configfs_get_guc_log_target(struct pci_dev *pdev)
total: 0 errors, 0 warnings, 1 checks, 179 lines checked
bf629054f4b4 drm/xe: Add infrastructure for debug configfs parameters
-:76: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#76:
new file mode 100644
-:124: CHECK:MACRO_ARG_REUSE: Macro argument reuse '_name' - possible side-effects?
#124: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:44:
+#define _XE_PARAM_DEFINE_OPS_NUMERIC(_T, _name, _kstrto, _fmt, _validator) \
+static ssize_t _name##_show(struct config_item *item, char *page) \
+{ \
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item); \
+ return sprintf(page, _fmt "\n", dev->debug.params._name); \
+} \
+static ssize_t _name##_store(struct config_item *item, const char *page, size_t len) \
+{ \
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item); \
+ XE_PARAM_TYPE_##_T val; \
+ int ret = _kstrto(page, 0, &val); \
+ if (ret) \
+ return ret; \
+ ret = _validator(val); \
+ if (ret) \
+ return ret; \
+ guard(mutex)(&dev->lock); \
+ if (xe_configfs_is_bound(dev)) \
+ return -EBUSY; \
+ dev->config.debug.params._name = val; \
+ return len; \
+}
-:157: CHECK:MACRO_ARG_REUSE: Macro argument reuse '_name' - possible side-effects?
#157: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:77:
+#define _XE_PARAM_DEFINE_OPS_bool(_name, _validator) \
+static ssize_t _name##_show(struct config_item *item, char *page) \
+{ \
+ struct xe_config_device *dev = xe_configfs_subgroup_to_device(item); \
+ return sprintf(page, "%d\n", dev->debug.params._name); \
+} \
+static ssize_t _name##_store(struct config_item *item, const char *page, size_t len) \
+{ \
+ struct xe_config_group_device *dev = xe_configfs_subgroup_to_group_device(item); \
+ bool val; \
+ int ret = kstrtobool(page, &val); \
+ if (ret) \
+ return ret; \
+ ret = _validator(val); \
+ if (ret) \
+ return ret; \
+ guard(mutex)(&dev->lock); \
+ if (xe_configfs_is_bound(dev)) \
+ return -EBUSY; \
+ dev->config.debug.params._name = val; \
+ return len; \
+}
-:180: WARNING:MACRO_ARG_UNUSED: Argument '_def' is not used in function-like macro
#180: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:100:
+#define _XE_PARAM_DEFINE_OPS(_T, _name, _def, _validator, _vis, _get, _fallback) \
+ _XE_PARAM_DEFINE_OPS_##_T(_name, _validator)
-:180: WARNING:MACRO_ARG_UNUSED: Argument '_vis' is not used in function-like macro
#180: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:100:
+#define _XE_PARAM_DEFINE_OPS(_T, _name, _def, _validator, _vis, _get, _fallback) \
+ _XE_PARAM_DEFINE_OPS_##_T(_name, _validator)
-:180: WARNING:MACRO_ARG_UNUSED: Argument '_get' is not used in function-like macro
#180: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:100:
+#define _XE_PARAM_DEFINE_OPS(_T, _name, _def, _validator, _vis, _get, _fallback) \
+ _XE_PARAM_DEFINE_OPS_##_T(_name, _validator)
-:180: WARNING:MACRO_ARG_UNUSED: Argument '_fallback' is not used in function-like macro
#180: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:100:
+#define _XE_PARAM_DEFINE_OPS(_T, _name, _def, _validator, _vis, _get, _fallback) \
+ _XE_PARAM_DEFINE_OPS_##_T(_name, _validator)
-:188: WARNING:MACRO_ARG_UNUSED: Argument '_T' is not used in function-like macro
#188: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:108:
+#define _XE_PARAM_DEFINE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+struct configfs_attribute attr_##_name = { \
+ .ca_name = __stringify(_name), \
+ .ca_owner = THIS_MODULE, \
+ .ca_mode = 0644, \
+ .show = _name##_show, \
+ .store = _name##_store, \
+};
-:188: WARNING:MACRO_ARG_UNUSED: Argument '_def' is not used in function-like macro
#188: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:108:
+#define _XE_PARAM_DEFINE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+struct configfs_attribute attr_##_name = { \
+ .ca_name = __stringify(_name), \
+ .ca_owner = THIS_MODULE, \
+ .ca_mode = 0644, \
+ .show = _name##_show, \
+ .store = _name##_store, \
+};
-:188: WARNING:MACRO_ARG_UNUSED: Argument '_val' is not used in function-like macro
#188: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:108:
+#define _XE_PARAM_DEFINE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+struct configfs_attribute attr_##_name = { \
+ .ca_name = __stringify(_name), \
+ .ca_owner = THIS_MODULE, \
+ .ca_mode = 0644, \
+ .show = _name##_show, \
+ .store = _name##_store, \
+};
-:188: WARNING:MACRO_ARG_UNUSED: Argument '_vis' is not used in function-like macro
#188: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:108:
+#define _XE_PARAM_DEFINE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+struct configfs_attribute attr_##_name = { \
+ .ca_name = __stringify(_name), \
+ .ca_owner = THIS_MODULE, \
+ .ca_mode = 0644, \
+ .show = _name##_show, \
+ .store = _name##_store, \
+};
-:188: WARNING:MACRO_ARG_UNUSED: Argument '_get' is not used in function-like macro
#188: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:108:
+#define _XE_PARAM_DEFINE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+struct configfs_attribute attr_##_name = { \
+ .ca_name = __stringify(_name), \
+ .ca_owner = THIS_MODULE, \
+ .ca_mode = 0644, \
+ .show = _name##_show, \
+ .store = _name##_store, \
+};
-:188: WARNING:MACRO_ARG_UNUSED: Argument '_fallback' is not used in function-like macro
#188: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:108:
+#define _XE_PARAM_DEFINE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+struct configfs_attribute attr_##_name = { \
+ .ca_name = __stringify(_name), \
+ .ca_owner = THIS_MODULE, \
+ .ca_mode = 0644, \
+ .show = _name##_show, \
+ .store = _name##_store, \
+};
-:188: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#188: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:108:
+#define _XE_PARAM_DEFINE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+struct configfs_attribute attr_##_name = { \
+ .ca_name = __stringify(_name), \
+ .ca_owner = THIS_MODULE, \
+ .ca_mode = 0644, \
+ .show = _name##_show, \
+ .store = _name##_store, \
+};
-:212: WARNING:MACRO_ARG_UNUSED: Argument '_def' is not used in function-like macro
#212: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:132:
+#define _XE_PARAM_DEFINE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev) \
+{ \
+ struct xe_config_group_device *dev = xe_configfs_find_group_device(pdev); \
+ XE_PARAM_TYPE_##_T ret; \
+ if (!dev) \
+ return (_fallback); \
+ ret = _get(dev, _name); \
+ config_group_put(&dev->group); \
+ return ret; \
+}
-:212: WARNING:MACRO_ARG_UNUSED: Argument '_val' is not used in function-like macro
#212: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:132:
+#define _XE_PARAM_DEFINE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev) \
+{ \
+ struct xe_config_group_device *dev = xe_configfs_find_group_device(pdev); \
+ XE_PARAM_TYPE_##_T ret; \
+ if (!dev) \
+ return (_fallback); \
+ ret = _get(dev, _name); \
+ config_group_put(&dev->group); \
+ return ret; \
+}
-:212: WARNING:MACRO_ARG_UNUSED: Argument '_vis' is not used in function-like macro
#212: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:132:
+#define _XE_PARAM_DEFINE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev) \
+{ \
+ struct xe_config_group_device *dev = xe_configfs_find_group_device(pdev); \
+ XE_PARAM_TYPE_##_T ret; \
+ if (!dev) \
+ return (_fallback); \
+ ret = _get(dev, _name); \
+ config_group_put(&dev->group); \
+ return ret; \
+}
-:223: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#223: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.c:143:
+}
+XE_CONFIGFS_DEBUG_PARAMS_FOR_EACH(_XE_PARAM_DEFINE_GETTER)
-:280: WARNING:MACRO_ARG_UNUSED: Argument '_v' is not used in function-like macro
#280: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:50:
+#define XE_PARAM_VALIDATE_NONE(_v) (0)
-:342: WARNING:MULTISTATEMENT_MACRO_USE_DO_WHILE: Non-declarative macros with multiple statements should be enclosed in a do - while loop
#342: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:112:
+#define _XE_PARAM_MEMBER(_T, _name, _def, _val, _vis, _get, _fallback) XE_PARAM_TYPE_##_T _name;
BUT SEE:
do {} while (0) advice is over-stated in a few situations:
The more obvious case is macros, like MODULE_PARM_DESC, invoked at
file-scope, where C disallows code (it must be in functions). See
$exceptions if you have one to add by name.
More troublesome is declarative macros used at top of new scope,
like DECLARE_PER_CPU. These might just compile with a do-while-0
wrapper, but would be incorrect. Most of these are handled by
detecting struct,union,etc declaration primitives in $exceptions.
Theres also macros called inside an if (block), which "return" an
expression. These cannot do-while, and need a ({}) wrapper.
Enjoy this qualification while we work to improve our heuristics.
-:342: WARNING:MACRO_ARG_UNUSED: Argument '_def' is not used in function-like macro
#342: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:112:
+#define _XE_PARAM_MEMBER(_T, _name, _def, _val, _vis, _get, _fallback) XE_PARAM_TYPE_##_T _name;
-:342: WARNING:MACRO_ARG_UNUSED: Argument '_val' is not used in function-like macro
#342: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:112:
+#define _XE_PARAM_MEMBER(_T, _name, _def, _val, _vis, _get, _fallback) XE_PARAM_TYPE_##_T _name;
-:342: WARNING:MACRO_ARG_UNUSED: Argument '_vis' is not used in function-like macro
#342: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:112:
+#define _XE_PARAM_MEMBER(_T, _name, _def, _val, _vis, _get, _fallback) XE_PARAM_TYPE_##_T _name;
-:342: WARNING:MACRO_ARG_UNUSED: Argument '_get' is not used in function-like macro
#342: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:112:
+#define _XE_PARAM_MEMBER(_T, _name, _def, _val, _vis, _get, _fallback) XE_PARAM_TYPE_##_T _name;
-:342: WARNING:MACRO_ARG_UNUSED: Argument '_fallback' is not used in function-like macro
#342: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:112:
+#define _XE_PARAM_MEMBER(_T, _name, _def, _val, _vis, _get, _fallback) XE_PARAM_TYPE_##_T _name;
-:342: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#342: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:112:
+#define _XE_PARAM_MEMBER(_T, _name, _def, _val, _vis, _get, _fallback) XE_PARAM_TYPE_##_T _name;
-:356: WARNING:MACRO_ARG_UNUSED: Argument '_T' is not used in function-like macro
#356: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:126:
+#define _XE_PARAM_DEFAULT_INIT(_T, _name, _def, _val, _vis, _get, _fallback) ._name = (_def),
-:356: WARNING:MACRO_ARG_UNUSED: Argument '_val' is not used in function-like macro
#356: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:126:
+#define _XE_PARAM_DEFAULT_INIT(_T, _name, _def, _val, _vis, _get, _fallback) ._name = (_def),
-:356: WARNING:MACRO_ARG_UNUSED: Argument '_vis' is not used in function-like macro
#356: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:126:
+#define _XE_PARAM_DEFAULT_INIT(_T, _name, _def, _val, _vis, _get, _fallback) ._name = (_def),
-:356: WARNING:MACRO_ARG_UNUSED: Argument '_get' is not used in function-like macro
#356: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:126:
+#define _XE_PARAM_DEFAULT_INIT(_T, _name, _def, _val, _vis, _get, _fallback) ._name = (_def),
-:356: WARNING:MACRO_ARG_UNUSED: Argument '_fallback' is not used in function-like macro
#356: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:126:
+#define _XE_PARAM_DEFAULT_INIT(_T, _name, _def, _val, _vis, _get, _fallback) ._name = (_def),
-:369: WARNING:MACRO_ARG_UNUSED: Argument '_T' is not used in function-like macro
#369: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:139:
+#define _XE_PARAM_DECLARE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+ extern struct configfs_attribute attr_##_name;
-:369: WARNING:MACRO_ARG_UNUSED: Argument '_def' is not used in function-like macro
#369: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:139:
+#define _XE_PARAM_DECLARE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+ extern struct configfs_attribute attr_##_name;
-:369: WARNING:MACRO_ARG_UNUSED: Argument '_val' is not used in function-like macro
#369: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:139:
+#define _XE_PARAM_DECLARE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+ extern struct configfs_attribute attr_##_name;
-:369: WARNING:MACRO_ARG_UNUSED: Argument '_vis' is not used in function-like macro
#369: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:139:
+#define _XE_PARAM_DECLARE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+ extern struct configfs_attribute attr_##_name;
-:369: WARNING:MACRO_ARG_UNUSED: Argument '_get' is not used in function-like macro
#369: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:139:
+#define _XE_PARAM_DECLARE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+ extern struct configfs_attribute attr_##_name;
-:369: WARNING:MACRO_ARG_UNUSED: Argument '_fallback' is not used in function-like macro
#369: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:139:
+#define _XE_PARAM_DECLARE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+ extern struct configfs_attribute attr_##_name;
-:369: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#369: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:139:
+#define _XE_PARAM_DECLARE_ATTR(_T, _name, _def, _val, _vis, _get, _fallback) \
+ extern struct configfs_attribute attr_##_name;
-:378: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#378: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:148:
+#define XE_PARAM_ATTR_PTR(_T, _name, _def, _val, _vis, _get, _fallback) &attr_##_name,
BUT SEE:
do {} while (0) advice is over-stated in a few situations:
The more obvious case is macros, like MODULE_PARM_DESC, invoked at
file-scope, where C disallows code (it must be in functions). See
$exceptions if you have one to add by name.
More troublesome is declarative macros used at top of new scope,
like DECLARE_PER_CPU. These might just compile with a do-while-0
wrapper, but would be incorrect. Most of these are handled by
detecting struct,union,etc declaration primitives in $exceptions.
Theres also macros called inside an if (block), which "return" an
expression. These cannot do-while, and need a ({}) wrapper.
Enjoy this qualification while we work to improve our heuristics.
-:378: WARNING:MACRO_ARG_UNUSED: Argument '_T' is not used in function-like macro
#378: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:148:
+#define XE_PARAM_ATTR_PTR(_T, _name, _def, _val, _vis, _get, _fallback) &attr_##_name,
-:378: WARNING:MACRO_ARG_UNUSED: Argument '_def' is not used in function-like macro
#378: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:148:
+#define XE_PARAM_ATTR_PTR(_T, _name, _def, _val, _vis, _get, _fallback) &attr_##_name,
-:378: WARNING:MACRO_ARG_UNUSED: Argument '_val' is not used in function-like macro
#378: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:148:
+#define XE_PARAM_ATTR_PTR(_T, _name, _def, _val, _vis, _get, _fallback) &attr_##_name,
-:378: WARNING:MACRO_ARG_UNUSED: Argument '_vis' is not used in function-like macro
#378: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:148:
+#define XE_PARAM_ATTR_PTR(_T, _name, _def, _val, _vis, _get, _fallback) &attr_##_name,
-:378: WARNING:MACRO_ARG_UNUSED: Argument '_get' is not used in function-like macro
#378: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:148:
+#define XE_PARAM_ATTR_PTR(_T, _name, _def, _val, _vis, _get, _fallback) &attr_##_name,
-:378: WARNING:MACRO_ARG_UNUSED: Argument '_fallback' is not used in function-like macro
#378: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:148:
+#define XE_PARAM_ATTR_PTR(_T, _name, _def, _val, _vis, _get, _fallback) &attr_##_name,
-:388: WARNING:MULTISTATEMENT_MACRO_USE_DO_WHILE: Non-declarative macros with multiple statements should be enclosed in a do - while loop
#388: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:158:
+#define XE_PARAM_DECLARE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+ XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev);
BUT SEE:
do {} while (0) advice is over-stated in a few situations:
The more obvious case is macros, like MODULE_PARM_DESC, invoked at
file-scope, where C disallows code (it must be in functions). See
$exceptions if you have one to add by name.
More troublesome is declarative macros used at top of new scope,
like DECLARE_PER_CPU. These might just compile with a do-while-0
wrapper, but would be incorrect. Most of these are handled by
detecting struct,union,etc declaration primitives in $exceptions.
Theres also macros called inside an if (block), which "return" an
expression. These cannot do-while, and need a ({}) wrapper.
Enjoy this qualification while we work to improve our heuristics.
-:388: WARNING:MACRO_ARG_UNUSED: Argument '_def' is not used in function-like macro
#388: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:158:
+#define XE_PARAM_DECLARE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+ XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev);
-:388: WARNING:MACRO_ARG_UNUSED: Argument '_val' is not used in function-like macro
#388: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:158:
+#define XE_PARAM_DECLARE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+ XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev);
-:388: WARNING:MACRO_ARG_UNUSED: Argument '_vis' is not used in function-like macro
#388: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:158:
+#define XE_PARAM_DECLARE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+ XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev);
-:388: WARNING:MACRO_ARG_UNUSED: Argument '_get' is not used in function-like macro
#388: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:158:
+#define XE_PARAM_DECLARE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+ XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev);
-:388: WARNING:MACRO_ARG_UNUSED: Argument '_fallback' is not used in function-like macro
#388: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:158:
+#define XE_PARAM_DECLARE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+ XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev);
-:388: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#388: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:158:
+#define XE_PARAM_DECLARE_GETTER(_T, _name, _def, _val, _vis, _get, _fallback) \
+ XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev);
-:397: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#397: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:167:
+#define XE_PARAM_DECLARE_GETTER_STUB(_T, _name, _def, _val, _vis, _get, _fallback) \
+static inline XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev) \
+{ \
+ return _fallback; \
+}
BUT SEE:
do {} while (0) advice is over-stated in a few situations:
The more obvious case is macros, like MODULE_PARM_DESC, invoked at
file-scope, where C disallows code (it must be in functions). See
$exceptions if you have one to add by name.
More troublesome is declarative macros used at top of new scope,
like DECLARE_PER_CPU. These might just compile with a do-while-0
wrapper, but would be incorrect. Most of these are handled by
detecting struct,union,etc declaration primitives in $exceptions.
Theres also macros called inside an if (block), which "return" an
expression. These cannot do-while, and need a ({}) wrapper.
Enjoy this qualification while we work to improve our heuristics.
-:397: WARNING:MACRO_ARG_UNUSED: Argument '_def' is not used in function-like macro
#397: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:167:
+#define XE_PARAM_DECLARE_GETTER_STUB(_T, _name, _def, _val, _vis, _get, _fallback) \
+static inline XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev) \
+{ \
+ return _fallback; \
+}
-:397: WARNING:MACRO_ARG_UNUSED: Argument '_val' is not used in function-like macro
#397: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:167:
+#define XE_PARAM_DECLARE_GETTER_STUB(_T, _name, _def, _val, _vis, _get, _fallback) \
+static inline XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev) \
+{ \
+ return _fallback; \
+}
-:397: WARNING:MACRO_ARG_UNUSED: Argument '_vis' is not used in function-like macro
#397: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:167:
+#define XE_PARAM_DECLARE_GETTER_STUB(_T, _name, _def, _val, _vis, _get, _fallback) \
+static inline XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev) \
+{ \
+ return _fallback; \
+}
-:397: WARNING:MACRO_ARG_UNUSED: Argument '_get' is not used in function-like macro
#397: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:167:
+#define XE_PARAM_DECLARE_GETTER_STUB(_T, _name, _def, _val, _vis, _get, _fallback) \
+static inline XE_PARAM_TYPE_##_T xe_configfs_get_##_name(struct pci_dev *pdev) \
+{ \
+ return _fallback; \
+}
total: 2 errors, 52 warnings, 3 checks, 325 lines checked
18d3da64ce82 drm/xe: Migrate existing debug configfs entries to params infrastructure
-:48: WARNING:MACRO_ARG_UNUSED: Argument '_def' is not used in function-like macro
#48: FILE: drivers/gpu/drm/xe/xe_configfs.c:421:
+#define _XE_PARAM_DUMP(_T, _name, _def, _val, _vis, _get, _fallback) \
+ PRI_CUSTOM_ATTR(XE_PARAM_FMT_##_T, debug.params._name);
-:48: WARNING:MACRO_ARG_UNUSED: Argument '_val' is not used in function-like macro
#48: FILE: drivers/gpu/drm/xe/xe_configfs.c:421:
+#define _XE_PARAM_DUMP(_T, _name, _def, _val, _vis, _get, _fallback) \
+ PRI_CUSTOM_ATTR(XE_PARAM_FMT_##_T, debug.params._name);
-:48: WARNING:MACRO_ARG_UNUSED: Argument '_vis' is not used in function-like macro
#48: FILE: drivers/gpu/drm/xe/xe_configfs.c:421:
+#define _XE_PARAM_DUMP(_T, _name, _def, _val, _vis, _get, _fallback) \
+ PRI_CUSTOM_ATTR(XE_PARAM_FMT_##_T, debug.params._name);
-:48: WARNING:MACRO_ARG_UNUSED: Argument '_get' is not used in function-like macro
#48: FILE: drivers/gpu/drm/xe/xe_configfs.c:421:
+#define _XE_PARAM_DUMP(_T, _name, _def, _val, _vis, _get, _fallback) \
+ PRI_CUSTOM_ATTR(XE_PARAM_FMT_##_T, debug.params._name);
-:48: WARNING:MACRO_ARG_UNUSED: Argument '_fallback' is not used in function-like macro
#48: FILE: drivers/gpu/drm/xe/xe_configfs.c:421:
+#define _XE_PARAM_DUMP(_T, _name, _def, _val, _vis, _get, _fallback) \
+ PRI_CUSTOM_ATTR(XE_PARAM_FMT_##_T, debug.params._name);
-:48: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#48: FILE: drivers/gpu/drm/xe/xe_configfs.c:421:
+#define _XE_PARAM_DUMP(_T, _name, _def, _val, _vis, _get, _fallback) \
+ PRI_CUSTOM_ATTR(XE_PARAM_FMT_##_T, debug.params._name);
-:332: CHECK:LINE_SPACING: Please don't use multiple blank lines
#332: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:803:
+
-:346: ERROR:MULTISTATEMENT_MACRO_USE_DO_WHILE: Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defects
#346: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:822:
+#define _XE_PARAM_VIS_CHECK(_T, _name, _def, _val, _vis, _get, _fallback) \
+ if (attr == &attr_##_name) \
+ return _vis(item);
-:346: WARNING:MACRO_ARG_UNUSED: Argument '_T' is not used in function-like macro
#346: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:822:
+#define _XE_PARAM_VIS_CHECK(_T, _name, _def, _val, _vis, _get, _fallback) \
+ if (attr == &attr_##_name) \
+ return _vis(item);
-:346: WARNING:MACRO_ARG_UNUSED: Argument '_def' is not used in function-like macro
#346: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:822:
+#define _XE_PARAM_VIS_CHECK(_T, _name, _def, _val, _vis, _get, _fallback) \
+ if (attr == &attr_##_name) \
+ return _vis(item);
-:346: WARNING:MACRO_ARG_UNUSED: Argument '_val' is not used in function-like macro
#346: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:822:
+#define _XE_PARAM_VIS_CHECK(_T, _name, _def, _val, _vis, _get, _fallback) \
+ if (attr == &attr_##_name) \
+ return _vis(item);
-:346: WARNING:MACRO_ARG_UNUSED: Argument '_get' is not used in function-like macro
#346: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:822:
+#define _XE_PARAM_VIS_CHECK(_T, _name, _def, _val, _vis, _get, _fallback) \
+ if (attr == &attr_##_name) \
+ return _vis(item);
-:346: WARNING:MACRO_ARG_UNUSED: Argument '_fallback' is not used in function-like macro
#346: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:822:
+#define _XE_PARAM_VIS_CHECK(_T, _name, _def, _val, _vis, _get, _fallback) \
+ if (attr == &attr_##_name) \
+ return _vis(item);
-:346: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#346: FILE: drivers/gpu/drm/xe/xe_configfs_debug.c:822:
+#define _XE_PARAM_VIS_CHECK(_T, _name, _def, _val, _vis, _get, _fallback) \
+ if (attr == &attr_##_name) \
+ return _vis(item);
-:439: CHECK:MACRO_ARG_REUSE: Macro argument reuse '_v' - possible side-effects?
#439: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:58:
+#define XE_PARAM_VALIDATE_GUC_LOG_LEVEL(_v) \
+ ((((_v) < 0) || ((_v) <= GUC_LOG_LEVEL_MAX)) ? 0 : -EINVAL)
-:451: CHECK:MACRO_ARG_REUSE: Macro argument reuse '_name' - possible side-effects?
#451: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:85:
+#define XE_PARAM_GETTER_GUC_LOG_LEVEL(_dev, _name) \
+ ({ typeof((_dev)->config.debug.params._name) __v = (_dev)->config.debug.params._name; \
+ __v >= 0 ? __v : xe_modparam.guc_log_level; })
-:463: WARNING:LONG_LINE: line length of 192 exceeds 100 columns
#463: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:124:
+ param(int, guc_log_level, XE_GUC_LOG_LEVEL_UNSET, XE_PARAM_VALIDATE_GUC_LOG_LEVEL, XE_PARAM_VISIBLE_ALWAYS, XE_PARAM_GETTER_GUC_LOG_LEVEL, xe_modparam.guc_log_level) \
-:464: WARNING:LONG_LINE: line length of 192 exceeds 100 columns
#464: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:125:
+ param(u8, guc_log_target, XE_DEFAULT_GUC_LOG_TARGET, XE_PARAM_VALIDATE_GUC_LOG_TARGET, XE_PARAM_VISIBLE_ALWAYS, XE_PARAM_GETTER_READ, XE_DEFAULT_GUC_LOG_TARGET) \
-:465: WARNING:LONG_LINE: line length of 171 exceeds 100 columns
#465: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:126:
+ param(bool, enable_multi_queue, true, XE_PARAM_VALIDATE_NONE, XE_PARAM_VISIBLE_ALWAYS, XE_PARAM_GETTER_READ, true) \
-:466: WARNING:LONG_LINE: line length of 172 exceeds 100 columns
#466: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:127:
+ param(bool, enable_psmi, false, XE_PARAM_VALIDATE_NONE, XE_PARAM_VISIBLE_ALWAYS, XE_PARAM_GETTER_READ, false) \
-:467: WARNING:LONG_LINE: line length of 170 exceeds 100 columns
#467: FILE: drivers/gpu/drm/xe/xe_configfs_debug_params.h:128:
+ param(bool, survivability_mode, false, XE_PARAM_VALIDATE_NONE, XE_PARAM_VISIBLE_SURVIVABILITY, XE_PARAM_GETTER_READ, false)
total: 1 errors, 17 warnings, 3 checks, 462 lines checked
138b6c7a2b2c drm/xe: Taint kernel when debug configfs parameters are set
^ permalink raw reply [flat|nested] 13+ messages in thread
* ✓ CI.KUnit: success for Add new debug infrastructure for configfs (rev2)
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
` (9 preceding siblings ...)
2026-07-22 22:25 ` ✗ CI.checkpatch: warning for Add new debug infrastructure for configfs (rev2) Patchwork
@ 2026-07-22 22:27 ` Patchwork
2026-07-22 23:18 ` ✓ Xe.CI.BAT: " Patchwork
11 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2026-07-22 22:27 UTC (permalink / raw)
To: Stuart Summers; +Cc: intel-xe
== Series Details ==
Series: Add new debug infrastructure for configfs (rev2)
URL : https://patchwork.freedesktop.org/series/165879/
State : success
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[22:25:27] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[22:25:32] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=25
[22:26:13] Starting KUnit Kernel (1/1)...
[22:26:13] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:26:13] ================== guc_buf (11 subtests) ===================
[22:26:13] [PASSED] test_smallest
[22:26:13] [PASSED] test_largest
[22:26:13] [PASSED] test_granular
[22:26:13] [PASSED] test_unique
[22:26:13] [PASSED] test_overlap
[22:26:13] [PASSED] test_reusable
[22:26:13] [PASSED] test_too_big
[22:26:13] [PASSED] test_flush
[22:26:13] [PASSED] test_lookup
[22:26:13] [PASSED] test_data
[22:26:13] [PASSED] test_class
[22:26:13] ===================== [PASSED] guc_buf =====================
[22:26:13] =================== guc_dbm (7 subtests) ===================
[22:26:13] [PASSED] test_empty
[22:26:13] [PASSED] test_default
[22:26:13] ======================== test_size ========================
[22:26:13] [PASSED] 4
[22:26:13] [PASSED] 8
[22:26:13] [PASSED] 32
[22:26:13] [PASSED] 256
[22:26:13] ==================== [PASSED] test_size ====================
[22:26:13] ======================= test_reuse ========================
[22:26:13] [PASSED] 4
[22:26:13] [PASSED] 8
[22:26:13] [PASSED] 32
[22:26:13] [PASSED] 256
[22:26:13] =================== [PASSED] test_reuse ====================
[22:26:13] =================== test_range_overlap ====================
[22:26:13] [PASSED] 4
[22:26:13] [PASSED] 8
[22:26:13] [PASSED] 32
[22:26:13] [PASSED] 256
[22:26:13] =============== [PASSED] test_range_overlap ================
[22:26:13] =================== test_range_compact ====================
[22:26:13] [PASSED] 4
[22:26:13] [PASSED] 8
[22:26:13] [PASSED] 32
[22:26:13] [PASSED] 256
[22:26:13] =============== [PASSED] test_range_compact ================
[22:26:13] ==================== test_range_spare =====================
[22:26:13] [PASSED] 4
[22:26:13] [PASSED] 8
[22:26:13] [PASSED] 32
[22:26:13] [PASSED] 256
[22:26:13] ================ [PASSED] test_range_spare =================
[22:26:13] ===================== [PASSED] guc_dbm =====================
[22:26:13] =================== guc_idm (6 subtests) ===================
[22:26:13] [PASSED] bad_init
[22:26:13] [PASSED] no_init
[22:26:13] [PASSED] init_fini
[22:26:13] [PASSED] check_used
[22:26:13] [PASSED] check_quota
[22:26:13] [PASSED] check_all
[22:26:13] ===================== [PASSED] guc_idm =====================
[22:26:13] =============== guc_klv_helpers (9 subtests) ===============
[22:26:13] [PASSED] test_count
[22:26:13] [PASSED] test_encode_u32
[22:26:13] [PASSED] test_encode_u64
[22:26:13] [PASSED] test_encode_string
[22:26:13] [PASSED] test_encode_object_raw
[22:26:13] [PASSED] test_encode_object_klv
[22:26:13] [PASSED] test_encode_object_nested
[22:26:13] [PASSED] test_encode_object_basic
[22:26:13] [PASSED] test_print
[22:26:13] ================= [PASSED] guc_klv_helpers =================
[22:26:13] ================== no_relay (3 subtests) ===================
[22:26:13] [PASSED] xe_drops_guc2pf_if_not_ready
[22:26:13] [PASSED] xe_drops_guc2vf_if_not_ready
[22:26:13] [PASSED] xe_rejects_send_if_not_ready
[22:26:13] ==================== [PASSED] no_relay =====================
[22:26:13] ================== pf_relay (14 subtests) ==================
[22:26:13] [PASSED] pf_rejects_guc2pf_too_short
[22:26:13] [PASSED] pf_rejects_guc2pf_too_long
[22:26:13] [PASSED] pf_rejects_guc2pf_no_payload
[22:26:13] [PASSED] pf_fails_no_payload
[22:26:13] [PASSED] pf_fails_bad_origin
[22:26:13] [PASSED] pf_fails_bad_type
[22:26:13] [PASSED] pf_txn_reports_error
[22:26:13] [PASSED] pf_txn_sends_pf2guc
[22:26:13] [PASSED] pf_sends_pf2guc
[22:26:13] [SKIPPED] pf_loopback_nop (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[22:26:13] [SKIPPED] pf_loopback_echo (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[22:26:13] [SKIPPED] pf_loopback_fail (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[22:26:13] [SKIPPED] pf_loopback_busy (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[22:26:13] [SKIPPED] pf_loopback_retry (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[22:26:13] ==================== [PASSED] pf_relay =====================
[22:26:13] ================== vf_relay (3 subtests) ===================
[22:26:13] [PASSED] vf_rejects_guc2vf_too_short
[22:26:13] [PASSED] vf_rejects_guc2vf_too_long
[22:26:13] [PASSED] vf_rejects_guc2vf_no_payload
[22:26:13] ==================== [PASSED] vf_relay =====================
[22:26:13] ================ pf_gt_config (9 subtests) =================
[22:26:13] [PASSED] fair_contexts_1vf
[22:26:13] [PASSED] fair_doorbells_1vf
[22:26:13] [PASSED] fair_ggtt_1vf
[22:26:13] ====================== fair_vram_1vf ======================
[22:26:13] [PASSED] 3.50 GiB
[22:26:13] [PASSED] 11.5 GiB
[22:26:13] [PASSED] 15.5 GiB
[22:26:13] [PASSED] 31.5 GiB
[22:26:13] [PASSED] 63.5 GiB
[22:26:13] [PASSED] 1.91 GiB
[22:26:13] ================== [PASSED] fair_vram_1vf ==================
[22:26:13] ================ fair_vram_1vf_admin_only =================
[22:26:13] [PASSED] 3.50 GiB
[22:26:13] [PASSED] 11.5 GiB
[22:26:13] [PASSED] 15.5 GiB
[22:26:13] [PASSED] 31.5 GiB
[22:26:13] [PASSED] 63.5 GiB
[22:26:13] [PASSED] 1.91 GiB
[22:26:13] ============ [PASSED] fair_vram_1vf_admin_only =============
[22:26:13] ====================== fair_contexts ======================
[22:26:13] [PASSED] 1 VF
[22:26:13] [PASSED] 2 VFs
[22:26:13] [PASSED] 3 VFs
[22:26:13] [PASSED] 4 VFs
[22:26:13] [PASSED] 5 VFs
[22:26:13] [PASSED] 6 VFs
[22:26:13] [PASSED] 7 VFs
[22:26:13] [PASSED] 8 VFs
[22:26:13] [PASSED] 9 VFs
[22:26:13] [PASSED] 10 VFs
[22:26:13] [PASSED] 11 VFs
[22:26:13] [PASSED] 12 VFs
[22:26:13] [PASSED] 13 VFs
[22:26:13] [PASSED] 14 VFs
[22:26:13] [PASSED] 15 VFs
[22:26:13] [PASSED] 16 VFs
[22:26:13] [PASSED] 17 VFs
[22:26:13] [PASSED] 18 VFs
[22:26:13] [PASSED] 19 VFs
[22:26:13] [PASSED] 20 VFs
[22:26:13] [PASSED] 21 VFs
[22:26:13] [PASSED] 22 VFs
[22:26:13] [PASSED] 23 VFs
[22:26:13] [PASSED] 24 VFs
[22:26:13] [PASSED] 25 VFs
[22:26:13] [PASSED] 26 VFs
[22:26:13] [PASSED] 27 VFs
[22:26:13] [PASSED] 28 VFs
[22:26:13] [PASSED] 29 VFs
[22:26:13] [PASSED] 30 VFs
[22:26:13] [PASSED] 31 VFs
[22:26:13] [PASSED] 32 VFs
[22:26:13] [PASSED] 33 VFs
[22:26:13] [PASSED] 34 VFs
[22:26:13] [PASSED] 35 VFs
[22:26:13] [PASSED] 36 VFs
[22:26:13] [PASSED] 37 VFs
[22:26:13] [PASSED] 38 VFs
[22:26:13] [PASSED] 39 VFs
[22:26:13] [PASSED] 40 VFs
[22:26:13] [PASSED] 41 VFs
[22:26:13] [PASSED] 42 VFs
[22:26:13] [PASSED] 43 VFs
[22:26:13] [PASSED] 44 VFs
[22:26:13] [PASSED] 45 VFs
[22:26:13] [PASSED] 46 VFs
[22:26:13] [PASSED] 47 VFs
[22:26:13] [PASSED] 48 VFs
[22:26:13] [PASSED] 49 VFs
[22:26:13] [PASSED] 50 VFs
[22:26:13] [PASSED] 51 VFs
[22:26:13] [PASSED] 52 VFs
[22:26:13] [PASSED] 53 VFs
[22:26:13] [PASSED] 54 VFs
[22:26:13] [PASSED] 55 VFs
[22:26:13] [PASSED] 56 VFs
[22:26:13] [PASSED] 57 VFs
[22:26:13] [PASSED] 58 VFs
[22:26:13] [PASSED] 59 VFs
[22:26:13] [PASSED] 60 VFs
[22:26:13] [PASSED] 61 VFs
[22:26:13] [PASSED] 62 VFs
[22:26:13] [PASSED] 63 VFs
[22:26:13] ================== [PASSED] fair_contexts ==================
[22:26:13] ===================== fair_doorbells ======================
[22:26:13] [PASSED] 1 VF
[22:26:13] [PASSED] 2 VFs
[22:26:13] [PASSED] 3 VFs
[22:26:13] [PASSED] 4 VFs
[22:26:13] [PASSED] 5 VFs
[22:26:13] [PASSED] 6 VFs
[22:26:13] [PASSED] 7 VFs
[22:26:13] [PASSED] 8 VFs
[22:26:13] [PASSED] 9 VFs
[22:26:13] [PASSED] 10 VFs
[22:26:13] [PASSED] 11 VFs
[22:26:13] [PASSED] 12 VFs
[22:26:13] [PASSED] 13 VFs
[22:26:13] [PASSED] 14 VFs
[22:26:13] [PASSED] 15 VFs
[22:26:13] [PASSED] 16 VFs
[22:26:13] [PASSED] 17 VFs
[22:26:13] [PASSED] 18 VFs
[22:26:13] [PASSED] 19 VFs
[22:26:13] [PASSED] 20 VFs
[22:26:13] [PASSED] 21 VFs
[22:26:13] [PASSED] 22 VFs
[22:26:13] [PASSED] 23 VFs
[22:26:13] [PASSED] 24 VFs
[22:26:13] [PASSED] 25 VFs
[22:26:13] [PASSED] 26 VFs
[22:26:13] [PASSED] 27 VFs
[22:26:13] [PASSED] 28 VFs
[22:26:13] [PASSED] 29 VFs
[22:26:13] [PASSED] 30 VFs
[22:26:13] [PASSED] 31 VFs
[22:26:13] [PASSED] 32 VFs
[22:26:13] [PASSED] 33 VFs
[22:26:13] [PASSED] 34 VFs
[22:26:13] [PASSED] 35 VFs
[22:26:13] [PASSED] 36 VFs
[22:26:13] [PASSED] 37 VFs
[22:26:13] [PASSED] 38 VFs
[22:26:13] [PASSED] 39 VFs
[22:26:13] [PASSED] 40 VFs
[22:26:13] [PASSED] 41 VFs
[22:26:13] [PASSED] 42 VFs
[22:26:13] [PASSED] 43 VFs
[22:26:13] [PASSED] 44 VFs
[22:26:13] [PASSED] 45 VFs
[22:26:13] [PASSED] 46 VFs
[22:26:13] [PASSED] 47 VFs
[22:26:13] [PASSED] 48 VFs
[22:26:13] [PASSED] 49 VFs
[22:26:13] [PASSED] 50 VFs
[22:26:13] [PASSED] 51 VFs
[22:26:13] [PASSED] 52 VFs
[22:26:13] [PASSED] 53 VFs
[22:26:13] [PASSED] 54 VFs
[22:26:13] [PASSED] 55 VFs
[22:26:13] [PASSED] 56 VFs
[22:26:13] [PASSED] 57 VFs
[22:26:13] [PASSED] 58 VFs
[22:26:13] [PASSED] 59 VFs
[22:26:13] [PASSED] 60 VFs
[22:26:13] [PASSED] 61 VFs
[22:26:13] [PASSED] 62 VFs
[22:26:13] [PASSED] 63 VFs
[22:26:13] ================= [PASSED] fair_doorbells ==================
[22:26:13] ======================== fair_ggtt ========================
[22:26:13] [PASSED] 1 VF
[22:26:13] [PASSED] 2 VFs
[22:26:13] [PASSED] 3 VFs
[22:26:13] [PASSED] 4 VFs
[22:26:13] [PASSED] 5 VFs
[22:26:13] [PASSED] 6 VFs
[22:26:13] [PASSED] 7 VFs
[22:26:13] [PASSED] 8 VFs
[22:26:13] [PASSED] 9 VFs
[22:26:13] [PASSED] 10 VFs
[22:26:13] [PASSED] 11 VFs
[22:26:13] [PASSED] 12 VFs
[22:26:13] [PASSED] 13 VFs
[22:26:13] [PASSED] 14 VFs
[22:26:13] [PASSED] 15 VFs
[22:26:13] [PASSED] 16 VFs
[22:26:13] [PASSED] 17 VFs
[22:26:13] [PASSED] 18 VFs
[22:26:13] [PASSED] 19 VFs
[22:26:13] [PASSED] 20 VFs
[22:26:13] [PASSED] 21 VFs
[22:26:13] [PASSED] 22 VFs
[22:26:13] [PASSED] 23 VFs
[22:26:13] [PASSED] 24 VFs
[22:26:13] [PASSED] 25 VFs
[22:26:13] [PASSED] 26 VFs
[22:26:13] [PASSED] 27 VFs
[22:26:13] [PASSED] 28 VFs
[22:26:13] [PASSED] 29 VFs
[22:26:13] [PASSED] 30 VFs
[22:26:13] [PASSED] 31 VFs
[22:26:13] [PASSED] 32 VFs
[22:26:13] [PASSED] 33 VFs
[22:26:13] [PASSED] 34 VFs
[22:26:13] [PASSED] 35 VFs
[22:26:13] [PASSED] 36 VFs
[22:26:13] [PASSED] 37 VFs
[22:26:13] [PASSED] 38 VFs
[22:26:13] [PASSED] 39 VFs
[22:26:13] [PASSED] 40 VFs
[22:26:13] [PASSED] 41 VFs
[22:26:13] [PASSED] 42 VFs
[22:26:13] [PASSED] 43 VFs
[22:26:13] [PASSED] 44 VFs
[22:26:13] [PASSED] 45 VFs
[22:26:13] [PASSED] 46 VFs
[22:26:13] [PASSED] 47 VFs
[22:26:13] [PASSED] 48 VFs
[22:26:13] [PASSED] 49 VFs
[22:26:13] [PASSED] 50 VFs
[22:26:13] [PASSED] 51 VFs
[22:26:13] [PASSED] 52 VFs
[22:26:13] [PASSED] 53 VFs
[22:26:13] [PASSED] 54 VFs
[22:26:13] [PASSED] 55 VFs
[22:26:13] [PASSED] 56 VFs
[22:26:13] [PASSED] 57 VFs
[22:26:13] [PASSED] 58 VFs
[22:26:13] [PASSED] 59 VFs
[22:26:13] [PASSED] 60 VFs
[22:26:13] [PASSED] 61 VFs
[22:26:13] [PASSED] 62 VFs
[22:26:13] [PASSED] 63 VFs
[22:26:13] ==================== [PASSED] fair_ggtt ====================
[22:26:13] ======================== fair_vram ========================
[22:26:13] [PASSED] 1 VF
[22:26:13] [PASSED] 2 VFs
[22:26:13] [PASSED] 3 VFs
[22:26:13] [PASSED] 4 VFs
[22:26:13] [PASSED] 5 VFs
[22:26:13] [PASSED] 6 VFs
[22:26:13] [PASSED] 7 VFs
[22:26:13] [PASSED] 8 VFs
[22:26:13] [PASSED] 9 VFs
[22:26:13] [PASSED] 10 VFs
[22:26:13] [PASSED] 11 VFs
[22:26:13] [PASSED] 12 VFs
[22:26:13] [PASSED] 13 VFs
[22:26:13] [PASSED] 14 VFs
[22:26:13] [PASSED] 15 VFs
[22:26:13] [PASSED] 16 VFs
[22:26:13] [PASSED] 17 VFs
[22:26:13] [PASSED] 18 VFs
[22:26:13] [PASSED] 19 VFs
[22:26:13] [PASSED] 20 VFs
[22:26:13] [PASSED] 21 VFs
[22:26:13] [PASSED] 22 VFs
[22:26:13] [PASSED] 23 VFs
[22:26:13] [PASSED] 24 VFs
[22:26:13] [PASSED] 25 VFs
[22:26:13] [PASSED] 26 VFs
[22:26:13] [PASSED] 27 VFs
[22:26:13] [PASSED] 28 VFs
[22:26:13] [PASSED] 29 VFs
[22:26:13] [PASSED] 30 VFs
[22:26:13] [PASSED] 31 VFs
[22:26:13] [PASSED] 32 VFs
[22:26:13] [PASSED] 33 VFs
[22:26:13] [PASSED] 34 VFs
[22:26:13] [PASSED] 35 VFs
[22:26:13] [PASSED] 36 VFs
[22:26:13] [PASSED] 37 VFs
[22:26:13] [PASSED] 38 VFs
[22:26:13] [PASSED] 39 VFs
[22:26:13] [PASSED] 40 VFs
[22:26:13] [PASSED] 41 VFs
[22:26:13] [PASSED] 42 VFs
[22:26:13] [PASSED] 43 VFs
[22:26:13] [PASSED] 44 VFs
[22:26:13] [PASSED] 45 VFs
[22:26:13] [PASSED] 46 VFs
[22:26:13] [PASSED] 47 VFs
[22:26:13] [PASSED] 48 VFs
[22:26:13] [PASSED] 49 VFs
[22:26:13] [PASSED] 50 VFs
[22:26:13] [PASSED] 51 VFs
[22:26:13] [PASSED] 52 VFs
[22:26:13] [PASSED] 53 VFs
[22:26:13] [PASSED] 54 VFs
[22:26:13] [PASSED] 55 VFs
[22:26:13] [PASSED] 56 VFs
[22:26:13] [PASSED] 57 VFs
[22:26:13] [PASSED] 58 VFs
[22:26:13] [PASSED] 59 VFs
[22:26:13] [PASSED] 60 VFs
[22:26:13] [PASSED] 61 VFs
[22:26:13] [PASSED] 62 VFs
[22:26:13] [PASSED] 63 VFs
[22:26:13] ==================== [PASSED] fair_vram ====================
[22:26:13] ================== [PASSED] pf_gt_config ===================
[22:26:13] ===================== lmtt (1 subtest) =====================
[22:26:13] ======================== test_ops =========================
[22:26:13] [PASSED] 2-level
[22:26:13] [PASSED] multi-level
[22:26:13] ==================== [PASSED] test_ops =====================
[22:26:13] ====================== [PASSED] lmtt =======================
[22:26:13] ================= sriov_packet (1 subtest) =================
[22:26:13] [PASSED] test_descriptor_init
[22:26:13] ================== [PASSED] sriov_packet ===================
[22:26:13] ================= pf_service (11 subtests) =================
[22:26:13] [PASSED] pf_negotiate_any
[22:26:13] [PASSED] pf_negotiate_base_match
[22:26:13] [PASSED] pf_negotiate_base_newer
[22:26:13] [PASSED] pf_negotiate_base_next
[22:26:13] [SKIPPED] pf_negotiate_base_older (no older minor)
[22:26:13] [PASSED] pf_negotiate_base_prev
[22:26:13] [PASSED] pf_negotiate_latest_match
[22:26:13] [PASSED] pf_negotiate_latest_newer
[22:26:13] [PASSED] pf_negotiate_latest_next
[22:26:13] [SKIPPED] pf_negotiate_latest_older (no older minor)
[22:26:13] [SKIPPED] pf_negotiate_latest_prev (no prev major)
[22:26:13] =================== [PASSED] pf_service ====================
[22:26:13] ================= xe_guc_g2g (2 subtests) ==================
[22:26:13] ============== xe_live_guc_g2g_kunit_default ==============
[22:26:13] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[22:26:13] ============== xe_live_guc_g2g_kunit_allmem ===============
[22:26:13] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[22:26:13] =================== [SKIPPED] xe_guc_g2g ===================
[22:26:13] =================== xe_mocs (2 subtests) ===================
[22:26:13] ================ xe_live_mocs_kernel_kunit ================
[22:26:13] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[22:26:13] ================ xe_live_mocs_reset_kunit =================
[22:26:13] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[22:26:13] ==================== [SKIPPED] xe_mocs =====================
[22:26:13] ================= xe_migrate (2 subtests) ==================
[22:26:13] ================= xe_migrate_sanity_kunit =================
[22:26:13] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[22:26:13] ================== xe_validate_ccs_kunit ==================
[22:26:13] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[22:26:13] =================== [SKIPPED] xe_migrate ===================
[22:26:13] ================== xe_dma_buf (1 subtest) ==================
[22:26:13] ==================== xe_dma_buf_kunit =====================
[22:26:13] ================ [SKIPPED] xe_dma_buf_kunit ================
[22:26:13] =================== [SKIPPED] xe_dma_buf ===================
[22:26:13] ================= xe_bo_shrink (1 subtest) =================
[22:26:13] =================== xe_bo_shrink_kunit ====================
[22:26:13] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[22:26:13] ================== [SKIPPED] xe_bo_shrink ==================
[22:26:13] ==================== xe_bo (2 subtests) ====================
[22:26:13] ================== xe_ccs_migrate_kunit ===================
[22:26:13] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[22:26:13] ==================== xe_bo_evict_kunit ====================
[22:26:13] =============== [SKIPPED] xe_bo_evict_kunit ================
[22:26:13] ===================== [SKIPPED] xe_bo ======================
[22:26:13] ==================== args (13 subtests) ====================
[22:26:13] [PASSED] count_args_test
[22:26:13] [PASSED] call_args_example
[22:26:13] [PASSED] call_args_test
[22:26:13] [PASSED] drop_first_arg_example
[22:26:13] [PASSED] drop_first_arg_test
[22:26:13] [PASSED] first_arg_example
[22:26:13] [PASSED] first_arg_test
[22:26:13] [PASSED] last_arg_example
[22:26:13] [PASSED] last_arg_test
[22:26:13] [PASSED] pick_arg_example
[22:26:13] [PASSED] if_args_example
[22:26:13] [PASSED] if_args_test
[22:26:13] [PASSED] sep_comma_example
[22:26:13] ====================== [PASSED] args =======================
[22:26:13] =================== xe_pci (3 subtests) ====================
[22:26:13] ==================== check_graphics_ip ====================
[22:26:13] [PASSED] 12.00 Xe_LP
[22:26:13] [PASSED] 12.10 Xe_LP+
[22:26:13] [PASSED] 12.55 Xe_HPG
[22:26:13] [PASSED] 12.60 Xe_HPC
[22:26:13] [PASSED] 12.70 Xe_LPG
[22:26:13] [PASSED] 12.71 Xe_LPG
[22:26:13] [PASSED] 12.74 Xe_LPG+
[22:26:13] [PASSED] 20.01 Xe2_HPG
[22:26:13] [PASSED] 20.02 Xe2_HPG
[22:26:13] [PASSED] 20.04 Xe2_LPG
[22:26:13] [PASSED] 30.00 Xe3_LPG
[22:26:13] [PASSED] 30.01 Xe3_LPG
[22:26:13] [PASSED] 30.03 Xe3_LPG
[22:26:13] [PASSED] 30.04 Xe3_LPG
[22:26:13] [PASSED] 30.05 Xe3_LPG
[22:26:13] [PASSED] 35.10 Xe3p_LPG
[22:26:13] [PASSED] 35.11 Xe3p_XPC
[22:26:13] ================ [PASSED] check_graphics_ip ================
[22:26:13] ===================== check_media_ip ======================
[22:26:13] [PASSED] 12.00 Xe_M
[22:26:13] [PASSED] 12.55 Xe_HPM
[22:26:13] [PASSED] 13.00 Xe_LPM+
[22:26:13] [PASSED] 13.01 Xe2_HPM
[22:26:13] [PASSED] 20.00 Xe2_LPM
[22:26:13] [PASSED] 30.00 Xe3_LPM
[22:26:13] [PASSED] 30.02 Xe3_LPM
[22:26:13] [PASSED] 35.00 Xe3p_LPM
[22:26:13] [PASSED] 35.03 Xe3p_HPM
[22:26:13] ================= [PASSED] check_media_ip ==================
[22:26:13] =================== check_platform_desc ===================
[22:26:13] [PASSED] 0x9A60 (TIGERLAKE)
[22:26:13] [PASSED] 0x9A68 (TIGERLAKE)
[22:26:13] [PASSED] 0x9A70 (TIGERLAKE)
[22:26:13] [PASSED] 0x9A40 (TIGERLAKE)
[22:26:13] [PASSED] 0x9A49 (TIGERLAKE)
[22:26:13] [PASSED] 0x9A59 (TIGERLAKE)
[22:26:13] [PASSED] 0x9A78 (TIGERLAKE)
[22:26:13] [PASSED] 0x9AC0 (TIGERLAKE)
[22:26:13] [PASSED] 0x9AC9 (TIGERLAKE)
[22:26:13] [PASSED] 0x9AD9 (TIGERLAKE)
[22:26:13] [PASSED] 0x9AF8 (TIGERLAKE)
[22:26:13] [PASSED] 0x4C80 (ROCKETLAKE)
[22:26:13] [PASSED] 0x4C8A (ROCKETLAKE)
[22:26:13] [PASSED] 0x4C8B (ROCKETLAKE)
[22:26:13] [PASSED] 0x4C8C (ROCKETLAKE)
[22:26:13] [PASSED] 0x4C90 (ROCKETLAKE)
[22:26:13] [PASSED] 0x4C9A (ROCKETLAKE)
[22:26:13] [PASSED] 0x4680 (ALDERLAKE_S)
[22:26:13] [PASSED] 0x4682 (ALDERLAKE_S)
[22:26:13] [PASSED] 0x4688 (ALDERLAKE_S)
[22:26:13] [PASSED] 0x468A (ALDERLAKE_S)
[22:26:13] [PASSED] 0x468B (ALDERLAKE_S)
[22:26:13] [PASSED] 0x4690 (ALDERLAKE_S)
[22:26:13] [PASSED] 0x4692 (ALDERLAKE_S)
[22:26:13] [PASSED] 0x4693 (ALDERLAKE_S)
[22:26:13] [PASSED] 0x46A0 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46A1 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46A2 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46A3 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46A6 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46A8 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46AA (ALDERLAKE_P)
[22:26:13] [PASSED] 0x462A (ALDERLAKE_P)
[22:26:13] [PASSED] 0x4626 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x4628 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46B0 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46B1 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46B2 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46B3 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46C0 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46C1 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46C2 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46C3 (ALDERLAKE_P)
[22:26:13] [PASSED] 0x46D0 (ALDERLAKE_N)
[22:26:13] [PASSED] 0x46D1 (ALDERLAKE_N)
[22:26:13] [PASSED] 0x46D2 (ALDERLAKE_N)
[22:26:13] [PASSED] 0x46D3 (ALDERLAKE_N)
[22:26:13] [PASSED] 0x46D4 (ALDERLAKE_N)
[22:26:13] [PASSED] 0xA721 (ALDERLAKE_P)
[22:26:13] [PASSED] 0xA7A1 (ALDERLAKE_P)
[22:26:13] [PASSED] 0xA7A9 (ALDERLAKE_P)
[22:26:13] [PASSED] 0xA7AC (ALDERLAKE_P)
[22:26:13] [PASSED] 0xA7AD (ALDERLAKE_P)
[22:26:13] [PASSED] 0xA720 (ALDERLAKE_P)
[22:26:13] [PASSED] 0xA7A0 (ALDERLAKE_P)
[22:26:13] [PASSED] 0xA7A8 (ALDERLAKE_P)
[22:26:13] [PASSED] 0xA7AA (ALDERLAKE_P)
[22:26:13] [PASSED] 0xA7AB (ALDERLAKE_P)
[22:26:13] [PASSED] 0xA780 (ALDERLAKE_S)
[22:26:13] [PASSED] 0xA781 (ALDERLAKE_S)
[22:26:13] [PASSED] 0xA782 (ALDERLAKE_S)
[22:26:13] [PASSED] 0xA783 (ALDERLAKE_S)
[22:26:13] [PASSED] 0xA788 (ALDERLAKE_S)
[22:26:13] [PASSED] 0xA789 (ALDERLAKE_S)
[22:26:13] [PASSED] 0xA78A (ALDERLAKE_S)
[22:26:13] [PASSED] 0xA78B (ALDERLAKE_S)
[22:26:13] [PASSED] 0x4905 (DG1)
[22:26:13] [PASSED] 0x4906 (DG1)
[22:26:13] [PASSED] 0x4907 (DG1)
[22:26:13] [PASSED] 0x4908 (DG1)
[22:26:13] [PASSED] 0x4909 (DG1)
[22:26:13] [PASSED] 0x56C0 (DG2)
[22:26:13] [PASSED] 0x56C2 (DG2)
[22:26:13] [PASSED] 0x56C1 (DG2)
[22:26:13] [PASSED] 0x7D51 (METEORLAKE)
[22:26:13] [PASSED] 0x7DD1 (METEORLAKE)
[22:26:13] [PASSED] 0x7D41 (METEORLAKE)
[22:26:13] [PASSED] 0x7D67 (METEORLAKE)
[22:26:13] [PASSED] 0xB640 (METEORLAKE)
[22:26:13] [PASSED] 0x56A0 (DG2)
[22:26:13] [PASSED] 0x56A1 (DG2)
[22:26:13] [PASSED] 0x56A2 (DG2)
[22:26:13] [PASSED] 0x56BE (DG2)
[22:26:13] [PASSED] 0x56BF (DG2)
[22:26:13] [PASSED] 0x5690 (DG2)
[22:26:13] [PASSED] 0x5691 (DG2)
[22:26:13] [PASSED] 0x5692 (DG2)
[22:26:13] [PASSED] 0x56A5 (DG2)
[22:26:13] [PASSED] 0x56A6 (DG2)
[22:26:13] [PASSED] 0x56B0 (DG2)
[22:26:13] [PASSED] 0x56B1 (DG2)
[22:26:13] [PASSED] 0x56BA (DG2)
[22:26:13] [PASSED] 0x56BB (DG2)
[22:26:13] [PASSED] 0x56BC (DG2)
[22:26:13] [PASSED] 0x56BD (DG2)
[22:26:13] [PASSED] 0x5693 (DG2)
[22:26:13] [PASSED] 0x5694 (DG2)
[22:26:13] [PASSED] 0x5695 (DG2)
[22:26:13] [PASSED] 0x56A3 (DG2)
[22:26:13] [PASSED] 0x56A4 (DG2)
[22:26:13] [PASSED] 0x56B2 (DG2)
[22:26:13] [PASSED] 0x56B3 (DG2)
[22:26:13] [PASSED] 0x5696 (DG2)
[22:26:13] [PASSED] 0x5697 (DG2)
[22:26:13] [PASSED] 0xB69 (PVC)
[22:26:13] [PASSED] 0xB6E (PVC)
[22:26:13] [PASSED] 0xBD4 (PVC)
[22:26:13] [PASSED] 0xBD5 (PVC)
[22:26:13] [PASSED] 0xBD6 (PVC)
[22:26:13] [PASSED] 0xBD7 (PVC)
[22:26:13] [PASSED] 0xBD8 (PVC)
[22:26:13] [PASSED] 0xBD9 (PVC)
[22:26:13] [PASSED] 0xBDA (PVC)
[22:26:13] [PASSED] 0xBDB (PVC)
[22:26:13] [PASSED] 0xBE0 (PVC)
[22:26:13] [PASSED] 0xBE1 (PVC)
[22:26:13] [PASSED] 0xBE5 (PVC)
[22:26:13] [PASSED] 0x7D40 (METEORLAKE)
[22:26:13] [PASSED] 0x7D45 (METEORLAKE)
[22:26:13] [PASSED] 0x7D55 (METEORLAKE)
[22:26:13] [PASSED] 0x7D60 (METEORLAKE)
[22:26:13] [PASSED] 0x7DD5 (METEORLAKE)
[22:26:13] [PASSED] 0x6420 (LUNARLAKE)
[22:26:13] [PASSED] 0x64A0 (LUNARLAKE)
[22:26:13] [PASSED] 0x64B0 (LUNARLAKE)
[22:26:13] [PASSED] 0xE202 (BATTLEMAGE)
[22:26:13] [PASSED] 0xE209 (BATTLEMAGE)
[22:26:13] [PASSED] 0xE20B (BATTLEMAGE)
[22:26:13] [PASSED] 0xE20C (BATTLEMAGE)
[22:26:13] [PASSED] 0xE20D (BATTLEMAGE)
[22:26:13] [PASSED] 0xE210 (BATTLEMAGE)
[22:26:13] [PASSED] 0xE211 (BATTLEMAGE)
[22:26:13] [PASSED] 0xE212 (BATTLEMAGE)
[22:26:13] [PASSED] 0xE216 (BATTLEMAGE)
[22:26:13] [PASSED] 0xE220 (BATTLEMAGE)
[22:26:13] [PASSED] 0xE221 (BATTLEMAGE)
[22:26:13] [PASSED] 0xE222 (BATTLEMAGE)
[22:26:13] [PASSED] 0xE223 (BATTLEMAGE)
[22:26:13] [PASSED] 0xB080 (PANTHERLAKE)
[22:26:13] [PASSED] 0xB081 (PANTHERLAKE)
[22:26:13] [PASSED] 0xB082 (PANTHERLAKE)
[22:26:13] [PASSED] 0xB083 (PANTHERLAKE)
[22:26:13] [PASSED] 0xB084 (PANTHERLAKE)
[22:26:13] [PASSED] 0xB085 (PANTHERLAKE)
[22:26:13] [PASSED] 0xB086 (PANTHERLAKE)
[22:26:13] [PASSED] 0xB087 (PANTHERLAKE)
[22:26:13] [PASSED] 0xB08F (PANTHERLAKE)
[22:26:13] [PASSED] 0xB090 (PANTHERLAKE)
[22:26:13] [PASSED] 0xB0A0 (PANTHERLAKE)
[22:26:13] [PASSED] 0xB0B0 (PANTHERLAKE)
[22:26:13] [PASSED] 0xFD80 (PANTHERLAKE)
[22:26:13] [PASSED] 0xFD81 (PANTHERLAKE)
[22:26:13] [PASSED] 0xD740 (NOVALAKE_S)
[22:26:13] [PASSED] 0xD741 (NOVALAKE_S)
[22:26:13] [PASSED] 0xD742 (NOVALAKE_S)
[22:26:13] [PASSED] 0xD743 (NOVALAKE_S)
[22:26:13] [PASSED] 0xD745 (NOVALAKE_S)
[22:26:13] [PASSED] 0xD74A (NOVALAKE_S)
[22:26:13] [PASSED] 0xD74B (NOVALAKE_S)
[22:26:13] [PASSED] 0x674C (CRESCENTISLAND)
[22:26:13] [PASSED] 0x674D (CRESCENTISLAND)
[22:26:13] [PASSED] 0x674E (CRESCENTISLAND)
[22:26:13] [PASSED] 0x674F (CRESCENTISLAND)
[22:26:13] [PASSED] 0x6750 (CRESCENTISLAND)
[22:26:13] [PASSED] 0xD750 (NOVALAKE_P)
[22:26:13] [PASSED] 0xD751 (NOVALAKE_P)
[22:26:13] [PASSED] 0xD752 (NOVALAKE_P)
[22:26:13] [PASSED] 0xD753 (NOVALAKE_P)
[22:26:13] [PASSED] 0xD754 (NOVALAKE_P)
[22:26:13] [PASSED] 0xD755 (NOVALAKE_P)
[22:26:13] [PASSED] 0xD756 (NOVALAKE_P)
[22:26:13] [PASSED] 0xD757 (NOVALAKE_P)
[22:26:13] [PASSED] 0xD75F (NOVALAKE_P)
[22:26:13] =============== [PASSED] check_platform_desc ===============
[22:26:13] ===================== [PASSED] xe_pci ======================
[22:26:13] ============= xe_rtp_tables_test (5 subtests) ==============
[22:26:13] ================== xe_rtp_table_gt_test ===================
[22:26:13] [PASSED] gt_was/14011060649
[22:26:13] [PASSED] gt_was/14011059788
[22:26:13] [PASSED] gt_was/14015795083
[22:26:13] [PASSED] gt_was/16021867713
[22:26:13] [PASSED] gt_was/14019449301
[22:26:13] [PASSED] gt_was/16028005424
[22:26:13] [PASSED] gt_was/14026578760
[22:26:13] [PASSED] gt_was/1409420604
[22:26:13] [PASSED] gt_was/1408615072
[22:26:13] [PASSED] gt_was/22010523718
[22:26:13] [PASSED] gt_was/14011006942
[22:26:13] [PASSED] gt_was/14014830051
[22:26:13] [PASSED] gt_was/18018781329
[22:26:13] [PASSED] gt_was/1509235366
[22:26:13] [PASSED] gt_was/18018781329
[22:26:13] [PASSED] gt_was/16016694945
[22:26:13] [PASSED] gt_was/14018575942
[22:26:13] [PASSED] gt_was/22016670082
[22:26:13] [PASSED] gt_was/22016670082
[22:26:13] [PASSED] gt_was/14017421178
[22:26:13] [PASSED] gt_was/16025250150
[22:26:13] [PASSED] gt_was/14021871409
[22:26:13] [PASSED] gt_was/16021865536
[22:26:13] [PASSED] gt_was/14021486841
[22:26:13] [PASSED] gt_was/14025160223
[22:26:13] [PASSED] gt_was/14026144927, 16029437861, 14026127056
[22:26:13] [PASSED] gt_was/14025635424
[22:26:13] [PASSED] gt_was/16028005424
[22:26:13] ============== [PASSED] xe_rtp_table_gt_test ===============
[22:26:13] ================== xe_rtp_table_gt_test ===================
[22:26:13] [PASSED] gt_tunings/Tuning: Blend Fill Caching Optimization Disable
[22:26:13] [PASSED] gt_tunings/Tuning: 32B Access Enable
[22:26:13] [PASSED] gt_tunings/Tuning: L3 cache
[22:26:13] [PASSED] gt_tunings/Tuning: L3 cache - media
[22:26:13] [PASSED] gt_tunings/Tuning: Compression Overfetch
[22:26:13] [PASSED] gt_tunings/Tuning: Compression Overfetch - media
[22:26:13] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3
[22:26:13] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 - media
[22:26:13] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only
[22:26:13] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only - media
[22:26:13] [PASSED] gt_tunings/Tuning: Stateless compression control
[22:26:13] [PASSED] gt_tunings/Tuning: Stateless compression control - media
[22:26:13] [PASSED] gt_tunings/Tuning: L3 RW flush all Cache
[22:26:13] [PASSED] gt_tunings/Tuning: L3 RW flush all cache - media
[22:26:13] [PASSED] gt_tunings/Tuning: Set STLB Bank Hash Mode to 4KB
[22:26:13] ============== [PASSED] xe_rtp_table_gt_test ===============
[22:26:13] ================== xe_rtp_table_oob_test ==================
[22:26:13] [PASSED] oob_was/1607983814
[22:26:13] [PASSED] oob_was/16010904313
[22:26:13] [PASSED] oob_was/18022495364
[22:26:13] [PASSED] oob_was/22012773006
[22:26:13] [PASSED] oob_was/14014475959
[22:26:13] [PASSED] oob_was/22011391025
[22:26:13] [PASSED] oob_was/22012727170
[22:26:13] [PASSED] oob_was/22012727685
[22:26:13] [PASSED] oob_was/22016596838
[22:26:13] [PASSED] oob_was/18020744125
[22:26:13] [PASSED] oob_was/1409600907
[22:26:13] [PASSED] oob_was/22014953428
[22:26:13] [PASSED] oob_was/16017236439
[22:26:13] [PASSED] oob_was/14019821291
[22:26:13] [PASSED] oob_was/14015076503
[22:26:13] [PASSED] oob_was/14018913170
[22:26:13] [PASSED] oob_was/14018094691
[22:26:13] [PASSED] oob_was/18024947630
[22:26:13] [PASSED] oob_was/16022287689
[22:26:13] [PASSED] oob_was/13011645652
[22:26:13] [PASSED] oob_was/14022293748
[22:26:13] [PASSED] oob_was/22019794406
[22:26:13] [PASSED] oob_was/22019338487
[22:26:13] [PASSED] oob_was/16023588340
[22:26:13] [PASSED] oob_was/14019789679
[22:26:13] [PASSED] oob_was/14022866841
[22:26:13] [PASSED] oob_was/16021333562
[22:26:13] [PASSED] oob_was/14016712196
[22:26:13] [PASSED] oob_was/14015568240
[22:26:13] [PASSED] oob_was/18013179988
[22:26:13] [PASSED] oob_was/1508761755
[22:26:13] [PASSED] oob_was/16023105232
[22:26:13] [PASSED] oob_was/16026508708
[22:26:13] [PASSED] oob_was/14020001231
[22:26:13] [PASSED] oob_was/16023683509
[22:26:13] [PASSED] oob_was/14025515070
[22:26:13] [PASSED] oob_was/15015404425_disable
[22:26:13] [PASSED] oob_was/16026007364
[22:26:13] [PASSED] oob_was/14020316580
[22:26:13] [PASSED] oob_was/14025883347
[22:26:13] [PASSED] oob_was/16029380221
[22:26:13] [PASSED] oob_was/22022079272
[22:26:13] [PASSED] oob_was/16029897822
[22:26:13] ============== [PASSED] xe_rtp_table_oob_test ==============
[22:26:13] ================ xe_rtp_table_dev_oob_test ================
[22:26:13] [PASSED] device_oob_was/22010954014
[22:26:13] [PASSED] device_oob_was/15015404425
[22:26:13] [PASSED] device_oob_was/22019338487_display
[22:26:13] [PASSED] device_oob_was/14022085890
[22:26:13] [PASSED] device_oob_was/14026539277
[22:26:13] [PASSED] device_oob_was/14026633728
[22:26:13] [PASSED] device_oob_was/14026746987
[22:26:13] [PASSED] device_oob_was/14026779378
[22:26:13] ============ [PASSED] xe_rtp_table_dev_oob_test ============
[22:26:13] ========== xe_rtp_table_missing_upper_bound_test ==========
[22:26:13] [PASSED] register_whitelist/WaAllowPMDepthAndInvocationCountAccessFromUMD, 1408556865
[22:26:13] [PASSED] register_whitelist/1508744258, 14012131227, 1808121037
[22:26:13] [PASSED] register_whitelist/1806527549
[22:26:13] [PASSED] register_whitelist/allow_read_ctx_timestamp
[22:26:13] [PASSED] register_whitelist/allow_read_queue_timestamp
[22:26:13] [PASSED] register_whitelist/16014440446
[22:26:13] [PASSED] register_whitelist/16017236439
[22:26:13] [PASSED] register_whitelist/16020183090
[22:26:13] [PASSED] register_whitelist/14024997852
[22:26:13] [PASSED] register_whitelist/14024997852
[22:26:13] ====== [PASSED] xe_rtp_table_missing_upper_bound_test ======
[22:26:13] =============== [PASSED] xe_rtp_tables_test ================
[22:26:13] =================== xe_rtp (3 subtests) ====================
[22:26:13] =================== xe_rtp_rules_tests ====================
[22:26:13] [PASSED] no
[22:26:13] [PASSED] yes
[22:26:13] [PASSED] no-and-no
[22:26:13] [PASSED] no-and-yes
[22:26:13] [PASSED] yes-and-no
[22:26:13] [PASSED] yes-and-yes
[22:26:13] [PASSED] no-or-no
[22:26:13] [PASSED] no-or-yes
[22:26:13] [PASSED] yes-or-no
[22:26:13] [PASSED] yes-or-yes
[22:26:13] [PASSED] no-yes-or-yes-no
[22:26:13] [PASSED] no-yes-or-yes-yes
[22:26:13] [PASSED] yes-yes-or-no-yes
[22:26:13] [PASSED] yes-yes-or-yes-yes
[22:26:13] [PASSED] no-no-or-yes-or-no
[22:26:13] [PASSED] or
[22:26:13] [PASSED] or-yes
[22:26:13] [PASSED] or-no
[22:26:13] [PASSED] yes-or
[22:26:13] [PASSED] no-or
[22:26:13] [PASSED] no-or-or-yes
[22:26:13] [PASSED] yes-or-or-no
[22:26:13] [PASSED] no-or-or-no
[22:26:13] [PASSED] missing-context-engine-class
[22:26:13] [PASSED] missing-context-engine-class-or-yes
[22:26:13] [PASSED] missing-context-engine-class-or-or-yes
[22:26:13] =============== [PASSED] xe_rtp_rules_tests ================
[22:26:13] =============== xe_rtp_process_to_sr_tests ================
[22:26:13] [PASSED] coalesce-same-reg
[22:26:13] [PASSED] coalesce-same-reg-literal-and-func
[22:26:13] [PASSED] no-match-no-add
[22:26:13] [PASSED] two-regs-two-entries
[22:26:13] [PASSED] clr-one-set-other
[22:26:13] [PASSED] set-field
[22:26:13] [PASSED] conflict-duplicate
[22:26:13] [PASSED] conflict-not-disjoint
[22:26:13] [PASSED] conflict-not-disjoint-literal-and-func
[22:26:13] [PASSED] conflict-reg-type
[22:26:13] [PASSED] bad-mcr-reg-forced-to-regular
[22:26:13] [PASSED] bad-regular-reg-forced-to-mcr
[22:26:13] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[22:26:13] ================== xe_rtp_process_tests ===================
[22:26:13] [PASSED] active1
[22:26:13] [PASSED] active2
[22:26:13] [PASSED] active-inactive
[22:26:13] [PASSED] inactive-active
[22:26:13] [PASSED] inactive-active-inactive
[22:26:13] [PASSED] inactive-inactive-inactive
[22:26:13] ============== [PASSED] xe_rtp_process_tests ===============
[22:26:13] ===================== [PASSED] xe_rtp ======================
[22:26:13] ==================== xe_wa (1 subtest) =====================
[22:26:13] ======================== xe_wa_gt =========================
[22:26:13] [PASSED] TIGERLAKE B0
[22:26:13] [PASSED] DG1 A0
[22:26:13] [PASSED] DG1 B0
[22:26:13] [PASSED] ALDERLAKE_S A0
[22:26:13] [PASSED] ALDERLAKE_S B0
[22:26:13] [PASSED] ALDERLAKE_S C0
[22:26:13] [PASSED] ALDERLAKE_S D0
[22:26:13] [PASSED] ALDERLAKE_P A0
[22:26:13] [PASSED] ALDERLAKE_P B0
[22:26:13] [PASSED] ALDERLAKE_P C0
[22:26:13] [PASSED] ALDERLAKE_S RPLS D0
[22:26:13] [PASSED] ALDERLAKE_P RPLU E0
[22:26:13] [PASSED] DG2 G10 C0
[22:26:13] [PASSED] DG2 G11 B1
[22:26:13] [PASSED] DG2 G12 A1
[22:26:13] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[22:26:13] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[22:26:13] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[22:26:13] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[22:26:13] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[22:26:13] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[22:26:13] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[22:26:13] ==================== [PASSED] xe_wa_gt =====================
[22:26:13] ====================== [PASSED] xe_wa ======================
[22:26:13] ============================================================
[22:26:13] Testing complete. Ran 741 tests: passed: 723, skipped: 18
[22:26:13] Elapsed time: 45.834s total, 4.606s configuring, 40.513s building, 0.678s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[22:26:13] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[22:26:15] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=25
[22:26:47] Starting KUnit Kernel (1/1)...
[22:26:47] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:26:47] ============ drm_test_pick_cmdline (2 subtests) ============
[22:26:47] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[22:26:47] =============== drm_test_pick_cmdline_named ===============
[22:26:47] [PASSED] NTSC
[22:26:47] [PASSED] NTSC-J
[22:26:47] [PASSED] PAL
[22:26:47] [PASSED] PAL-M
[22:26:47] =========== [PASSED] drm_test_pick_cmdline_named ===========
[22:26:47] ============== [PASSED] drm_test_pick_cmdline ==============
[22:26:47] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[22:26:47] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[22:26:47] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[22:26:47] =========== drm_validate_clone_mode (2 subtests) ===========
[22:26:47] ============== drm_test_check_in_clone_mode ===============
[22:26:47] [PASSED] in_clone_mode
[22:26:47] [PASSED] not_in_clone_mode
[22:26:47] ========== [PASSED] drm_test_check_in_clone_mode ===========
[22:26:47] =============== drm_test_check_valid_clones ===============
[22:26:47] [PASSED] not_in_clone_mode
[22:26:47] [PASSED] valid_clone
[22:26:47] [PASSED] invalid_clone
[22:26:47] =========== [PASSED] drm_test_check_valid_clones ===========
[22:26:47] ============= [PASSED] drm_validate_clone_mode =============
[22:26:47] ============= drm_validate_modeset (1 subtest) =============
[22:26:47] [PASSED] drm_test_check_connector_changed_modeset
[22:26:47] ============== [PASSED] drm_validate_modeset ===============
[22:26:47] ====== drm_test_bridge_get_current_state (1 subtest) =======
[22:26:47] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[22:26:47] ======== [PASSED] drm_test_bridge_get_current_state ========
[22:26:47] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[22:26:47] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[22:26:47] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[22:26:47] [PASSED] drm_test_drm_bridge_helper_hdmi_output_bus_fmts
[22:26:47] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[22:26:47] ============== drm_bridge_alloc (2 subtests) ===============
[22:26:47] [PASSED] drm_test_drm_bridge_alloc_basic
[22:26:47] [PASSED] drm_test_drm_bridge_alloc_get_put
[22:26:47] ================ [PASSED] drm_bridge_alloc =================
[22:26:47] ============= drm_bridge_bus_fmt (5 subtests) ==============
[22:26:47] [PASSED] drm_test_bridge_rgb_yuv_rgb
[22:26:47] [PASSED] drm_test_bridge_must_convert_to_yuv444
[22:26:47] [PASSED] drm_test_bridge_hdmi_auto_rgb
[22:26:47] [PASSED] drm_test_bridge_auto_first
[22:26:47] [PASSED] drm_test_bridge_rgb_yuv_no_path
[22:26:47] =============== [PASSED] drm_bridge_bus_fmt ================
[22:26:47] ============= drm_cmdline_parser (40 subtests) =============
[22:26:47] [PASSED] drm_test_cmdline_force_d_only
[22:26:47] [PASSED] drm_test_cmdline_force_D_only_dvi
[22:26:47] [PASSED] drm_test_cmdline_force_D_only_hdmi
[22:26:47] [PASSED] drm_test_cmdline_force_D_only_not_digital
[22:26:47] [PASSED] drm_test_cmdline_force_e_only
[22:26:47] [PASSED] drm_test_cmdline_res
[22:26:47] [PASSED] drm_test_cmdline_res_vesa
[22:26:47] [PASSED] drm_test_cmdline_res_vesa_rblank
[22:26:47] [PASSED] drm_test_cmdline_res_rblank
[22:26:47] [PASSED] drm_test_cmdline_res_bpp
[22:26:47] [PASSED] drm_test_cmdline_res_refresh
[22:26:47] [PASSED] drm_test_cmdline_res_bpp_refresh
[22:26:47] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[22:26:47] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[22:26:47] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[22:26:47] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[22:26:47] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[22:26:47] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[22:26:47] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[22:26:47] [PASSED] drm_test_cmdline_res_margins_force_on
[22:26:47] [PASSED] drm_test_cmdline_res_vesa_margins
[22:26:47] [PASSED] drm_test_cmdline_name
[22:26:47] [PASSED] drm_test_cmdline_name_bpp
[22:26:47] [PASSED] drm_test_cmdline_name_option
[22:26:47] [PASSED] drm_test_cmdline_name_bpp_option
[22:26:47] [PASSED] drm_test_cmdline_rotate_0
[22:26:47] [PASSED] drm_test_cmdline_rotate_90
[22:26:47] [PASSED] drm_test_cmdline_rotate_180
[22:26:47] [PASSED] drm_test_cmdline_rotate_270
[22:26:47] [PASSED] drm_test_cmdline_hmirror
[22:26:47] [PASSED] drm_test_cmdline_vmirror
[22:26:47] [PASSED] drm_test_cmdline_margin_options
[22:26:47] [PASSED] drm_test_cmdline_multiple_options
[22:26:47] [PASSED] drm_test_cmdline_bpp_extra_and_option
[22:26:47] [PASSED] drm_test_cmdline_extra_and_option
[22:26:47] [PASSED] drm_test_cmdline_freestanding_options
[22:26:47] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[22:26:47] [PASSED] drm_test_cmdline_panel_orientation
[22:26:47] ================ drm_test_cmdline_invalid =================
[22:26:47] [PASSED] margin_only
[22:26:47] [PASSED] interlace_only
[22:26:47] [PASSED] res_missing_x
[22:26:47] [PASSED] res_missing_y
[22:26:47] [PASSED] res_bad_y
[22:26:47] [PASSED] res_missing_y_bpp
[22:26:47] [PASSED] res_bad_bpp
[22:26:47] [PASSED] res_bad_refresh
[22:26:47] [PASSED] res_bpp_refresh_force_on_off
[22:26:47] [PASSED] res_invalid_mode
[22:26:47] [PASSED] res_bpp_wrong_place_mode
[22:26:47] [PASSED] name_bpp_refresh
[22:26:47] [PASSED] name_refresh
[22:26:47] [PASSED] name_refresh_wrong_mode
[22:26:47] [PASSED] name_refresh_invalid_mode
[22:26:47] [PASSED] rotate_multiple
[22:26:47] [PASSED] rotate_invalid_val
[22:26:47] [PASSED] rotate_truncated
[22:26:47] [PASSED] invalid_option
[22:26:47] [PASSED] invalid_tv_option
[22:26:47] [PASSED] truncated_tv_option
[22:26:47] ============ [PASSED] drm_test_cmdline_invalid =============
[22:26:47] =============== drm_test_cmdline_tv_options ===============
[22:26:47] [PASSED] NTSC
[22:26:47] [PASSED] NTSC_443
[22:26:47] [PASSED] NTSC_J
[22:26:47] [PASSED] PAL
[22:26:47] [PASSED] PAL_M
[22:26:47] [PASSED] PAL_N
[22:26:47] [PASSED] SECAM
[22:26:47] [PASSED] MONO_525
[22:26:47] [PASSED] MONO_625
[22:26:47] =========== [PASSED] drm_test_cmdline_tv_options ===========
[22:26:47] =============== [PASSED] drm_cmdline_parser ================
[22:26:47] ========== drmm_connector_hdmi_init (20 subtests) ==========
[22:26:47] [PASSED] drm_test_connector_hdmi_init_valid
[22:26:47] [PASSED] drm_test_connector_hdmi_init_bpc_8
[22:26:47] [PASSED] drm_test_connector_hdmi_init_bpc_10
[22:26:47] [PASSED] drm_test_connector_hdmi_init_bpc_12
[22:26:47] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[22:26:47] [PASSED] drm_test_connector_hdmi_init_bpc_null
[22:26:47] [PASSED] drm_test_connector_hdmi_init_formats_empty
[22:26:47] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[22:26:47] === drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[22:26:47] [PASSED] supported_formats=0x9 yuv420_allowed=1
[22:26:47] [PASSED] supported_formats=0x9 yuv420_allowed=0
[22:26:47] [PASSED] supported_formats=0x5 yuv420_allowed=1
[22:26:47] [PASSED] supported_formats=0x5 yuv420_allowed=0
[22:26:47] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[22:26:47] [PASSED] drm_test_connector_hdmi_init_null_ddc
[22:26:47] [PASSED] drm_test_connector_hdmi_init_null_product
[22:26:47] [PASSED] drm_test_connector_hdmi_init_null_vendor
[22:26:47] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[22:26:47] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[22:26:47] [PASSED] drm_test_connector_hdmi_init_product_valid
[22:26:47] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[22:26:47] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[22:26:47] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[22:26:47] ========= drm_test_connector_hdmi_init_type_valid =========
[22:26:47] [PASSED] HDMI-A
[22:26:47] [PASSED] HDMI-B
[22:26:47] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[22:26:47] ======== drm_test_connector_hdmi_init_type_invalid ========
[22:26:47] [PASSED] Unknown
[22:26:47] [PASSED] VGA
[22:26:47] [PASSED] DVI-I
[22:26:47] [PASSED] DVI-D
[22:26:47] [PASSED] DVI-A
[22:26:47] [PASSED] Composite
[22:26:47] [PASSED] SVIDEO
[22:26:47] [PASSED] LVDS
[22:26:47] [PASSED] Component
[22:26:47] [PASSED] DIN
[22:26:47] [PASSED] DP
[22:26:47] [PASSED] TV
[22:26:47] [PASSED] eDP
[22:26:47] [PASSED] Virtual
[22:26:47] [PASSED] DSI
[22:26:47] [PASSED] DPI
[22:26:47] [PASSED] Writeback
[22:26:47] [PASSED] SPI
[22:26:47] [PASSED] USB
[22:26:47] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[22:26:47] ============ [PASSED] drmm_connector_hdmi_init =============
[22:26:47] ============= drmm_connector_init (3 subtests) =============
[22:26:47] [PASSED] drm_test_drmm_connector_init
[22:26:47] [PASSED] drm_test_drmm_connector_init_null_ddc
[22:26:47] ========= drm_test_drmm_connector_init_type_valid =========
[22:26:47] [PASSED] Unknown
[22:26:47] [PASSED] VGA
[22:26:47] [PASSED] DVI-I
[22:26:47] [PASSED] DVI-D
[22:26:47] [PASSED] DVI-A
[22:26:47] [PASSED] Composite
[22:26:47] [PASSED] SVIDEO
[22:26:47] [PASSED] LVDS
[22:26:47] [PASSED] Component
[22:26:47] [PASSED] DIN
[22:26:47] [PASSED] DP
[22:26:47] [PASSED] HDMI-A
[22:26:47] [PASSED] HDMI-B
[22:26:47] [PASSED] TV
[22:26:47] [PASSED] eDP
[22:26:47] [PASSED] Virtual
[22:26:47] [PASSED] DSI
[22:26:47] [PASSED] DPI
[22:26:47] [PASSED] Writeback
[22:26:47] [PASSED] SPI
[22:26:47] [PASSED] USB
[22:26:47] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[22:26:47] =============== [PASSED] drmm_connector_init ===============
[22:26:47] ========= drm_connector_dynamic_init (6 subtests) ==========
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_init
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_init_properties
[22:26:47] ===== drm_test_drm_connector_dynamic_init_type_valid ======
[22:26:47] [PASSED] Unknown
[22:26:47] [PASSED] VGA
[22:26:47] [PASSED] DVI-I
[22:26:47] [PASSED] DVI-D
[22:26:47] [PASSED] DVI-A
[22:26:47] [PASSED] Composite
[22:26:47] [PASSED] SVIDEO
[22:26:47] [PASSED] LVDS
[22:26:47] [PASSED] Component
[22:26:47] [PASSED] DIN
[22:26:47] [PASSED] DP
[22:26:47] [PASSED] HDMI-A
[22:26:47] [PASSED] HDMI-B
[22:26:47] [PASSED] TV
[22:26:47] [PASSED] eDP
[22:26:47] [PASSED] Virtual
[22:26:47] [PASSED] DSI
[22:26:47] [PASSED] DPI
[22:26:47] [PASSED] Writeback
[22:26:47] [PASSED] SPI
[22:26:47] [PASSED] USB
[22:26:47] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[22:26:47] ======== drm_test_drm_connector_dynamic_init_name =========
[22:26:47] [PASSED] Unknown
[22:26:47] [PASSED] VGA
[22:26:47] [PASSED] DVI-I
[22:26:47] [PASSED] DVI-D
[22:26:47] [PASSED] DVI-A
[22:26:47] [PASSED] Composite
[22:26:47] [PASSED] SVIDEO
[22:26:47] [PASSED] LVDS
[22:26:47] [PASSED] Component
[22:26:47] [PASSED] DIN
[22:26:47] [PASSED] DP
[22:26:47] [PASSED] HDMI-A
[22:26:47] [PASSED] HDMI-B
[22:26:47] [PASSED] TV
[22:26:47] [PASSED] eDP
[22:26:47] [PASSED] Virtual
[22:26:47] [PASSED] DSI
[22:26:47] [PASSED] DPI
[22:26:47] [PASSED] Writeback
[22:26:47] [PASSED] SPI
[22:26:47] [PASSED] USB
[22:26:47] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[22:26:47] =========== [PASSED] drm_connector_dynamic_init ============
[22:26:47] ==== drm_connector_dynamic_register_early (4 subtests) =====
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[22:26:47] ====== [PASSED] drm_connector_dynamic_register_early =======
[22:26:47] ======= drm_connector_dynamic_register (7 subtests) ========
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[22:26:47] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[22:26:47] ========= [PASSED] drm_connector_dynamic_register ==========
[22:26:47] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[22:26:47] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[22:26:47] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[22:26:47] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[22:26:47] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[22:26:47] ========== drm_test_get_tv_mode_from_name_valid ===========
[22:26:47] [PASSED] NTSC
[22:26:47] [PASSED] NTSC-443
[22:26:47] [PASSED] NTSC-J
[22:26:47] [PASSED] PAL
[22:26:47] [PASSED] PAL-M
[22:26:47] [PASSED] PAL-N
[22:26:47] [PASSED] SECAM
[22:26:47] [PASSED] Mono
[22:26:47] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[22:26:47] [PASSED] drm_test_get_tv_mode_from_name_truncated
[22:26:47] ============ [PASSED] drm_get_tv_mode_from_name ============
[22:26:47] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[22:26:47] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[22:26:47] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[22:26:47] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[22:26:47] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[22:26:47] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[22:26:47] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[22:26:47] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid =
[22:26:47] [PASSED] VIC 96
[22:26:47] [PASSED] VIC 97
[22:26:47] [PASSED] VIC 101
[22:26:47] [PASSED] VIC 102
[22:26:47] [PASSED] VIC 106
[22:26:47] [PASSED] VIC 107
[22:26:47] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[22:26:47] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[22:26:47] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[22:26:47] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[22:26:47] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[22:26:47] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[22:26:47] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[22:26:47] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[22:26:47] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ====
[22:26:47] [PASSED] Automatic
[22:26:47] [PASSED] Full
[22:26:47] [PASSED] Limited 16:235
[22:26:47] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[22:26:47] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[22:26:47] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[22:26:47] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[22:26:47] === drm_test_drm_hdmi_connector_get_output_format_name ====
[22:26:47] [PASSED] RGB
[22:26:47] [PASSED] YUV 4:2:0
[22:26:47] [PASSED] YUV 4:2:2
[22:26:47] [PASSED] YUV 4:4:4
[22:26:47] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[22:26:47] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[22:26:47] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[22:26:47] ============= drm_damage_helper (21 subtests) ==============
[22:26:47] [PASSED] drm_test_damage_iter_no_damage
[22:26:47] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[22:26:47] [PASSED] drm_test_damage_iter_no_damage_src_moved
[22:26:47] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[22:26:47] [PASSED] drm_test_damage_iter_no_damage_not_visible
[22:26:47] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[22:26:47] [PASSED] drm_test_damage_iter_no_damage_no_fb
[22:26:47] [PASSED] drm_test_damage_iter_simple_damage
[22:26:47] [PASSED] drm_test_damage_iter_single_damage
[22:26:47] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[22:26:47] [PASSED] drm_test_damage_iter_single_damage_outside_src
[22:26:47] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[22:26:47] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[22:26:47] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[22:26:47] [PASSED] drm_test_damage_iter_single_damage_src_moved
[22:26:47] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[22:26:47] [PASSED] drm_test_damage_iter_damage
[22:26:47] [PASSED] drm_test_damage_iter_damage_one_intersect
[22:26:47] [PASSED] drm_test_damage_iter_damage_one_outside
[22:26:47] [PASSED] drm_test_damage_iter_damage_src_moved
[22:26:47] [PASSED] drm_test_damage_iter_damage_not_visible
[22:26:47] ================ [PASSED] drm_damage_helper ================
[22:26:47] ============== drm_dp_mst_helper (3 subtests) ==============
[22:26:47] ============== drm_test_dp_mst_calc_pbn_mode ==============
[22:26:47] [PASSED] Clock 154000 BPP 30 DSC disabled
[22:26:47] [PASSED] Clock 234000 BPP 30 DSC disabled
[22:26:47] [PASSED] Clock 297000 BPP 24 DSC disabled
[22:26:47] [PASSED] Clock 332880 BPP 24 DSC enabled
[22:26:47] [PASSED] Clock 324540 BPP 24 DSC enabled
[22:26:47] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[22:26:47] ============== drm_test_dp_mst_calc_pbn_div ===============
[22:26:47] [PASSED] Link rate 2000000 lane count 4
[22:26:47] [PASSED] Link rate 2000000 lane count 2
[22:26:47] [PASSED] Link rate 2000000 lane count 1
[22:26:47] [PASSED] Link rate 1350000 lane count 4
[22:26:47] [PASSED] Link rate 1350000 lane count 2
[22:26:47] [PASSED] Link rate 1350000 lane count 1
[22:26:47] [PASSED] Link rate 1000000 lane count 4
[22:26:47] [PASSED] Link rate 1000000 lane count 2
[22:26:47] [PASSED] Link rate 1000000 lane count 1
[22:26:47] [PASSED] Link rate 810000 lane count 4
[22:26:47] [PASSED] Link rate 810000 lane count 2
[22:26:47] [PASSED] Link rate 810000 lane count 1
[22:26:47] [PASSED] Link rate 540000 lane count 4
[22:26:47] [PASSED] Link rate 540000 lane count 2
[22:26:47] [PASSED] Link rate 540000 lane count 1
[22:26:47] [PASSED] Link rate 270000 lane count 4
[22:26:47] [PASSED] Link rate 270000 lane count 2
[22:26:47] [PASSED] Link rate 270000 lane count 1
[22:26:47] [PASSED] Link rate 162000 lane count 4
[22:26:47] [PASSED] Link rate 162000 lane count 2
[22:26:47] [PASSED] Link rate 162000 lane count 1
[22:26:47] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[22:26:47] ========= drm_test_dp_mst_sideband_msg_req_decode =========
[22:26:47] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[22:26:47] [PASSED] DP_POWER_UP_PHY with port number
[22:26:47] [PASSED] DP_POWER_DOWN_PHY with port number
[22:26:47] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[22:26:47] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[22:26:47] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[22:26:47] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[22:26:47] [PASSED] DP_QUERY_PAYLOAD with port number
[22:26:47] [PASSED] DP_QUERY_PAYLOAD with VCPI
[22:26:47] [PASSED] DP_REMOTE_DPCD_READ with port number
[22:26:47] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[22:26:47] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[22:26:47] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[22:26:47] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[22:26:47] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[22:26:47] [PASSED] DP_REMOTE_I2C_READ with port number
[22:26:47] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[22:26:47] [PASSED] DP_REMOTE_I2C_READ with transactions array
[22:26:47] [PASSED] DP_REMOTE_I2C_WRITE with port number
[22:26:47] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[22:26:47] [PASSED] DP_REMOTE_I2C_WRITE with data array
[22:26:47] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[22:26:47] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[22:26:47] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[22:26:47] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[22:26:47] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[22:26:47] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[22:26:47] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[22:26:47] ================ [PASSED] drm_dp_mst_helper ================
[22:26:47] ================== drm_exec (7 subtests) ===================
[22:26:47] [PASSED] sanitycheck
[22:26:47] [PASSED] test_lock
[22:26:47] [PASSED] test_lock_unlock
[22:26:47] [PASSED] test_duplicates
[22:26:47] [PASSED] test_prepare
[22:26:47] [PASSED] test_prepare_array
[22:26:47] [PASSED] test_multiple_loops
[22:26:47] ==================== [PASSED] drm_exec =====================
[22:26:47] =========== drm_format_helper_test (17 subtests) ===========
[22:26:47] ============== drm_test_fb_xrgb8888_to_gray8 ==============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[22:26:47] ============= drm_test_fb_xrgb8888_to_rgb332 ==============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[22:26:47] ============= drm_test_fb_xrgb8888_to_rgb565 ==============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[22:26:47] ============ drm_test_fb_xrgb8888_to_xrgb1555 =============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[22:26:47] ============ drm_test_fb_xrgb8888_to_argb1555 =============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[22:26:47] ============ drm_test_fb_xrgb8888_to_rgba5551 =============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[22:26:47] ============= drm_test_fb_xrgb8888_to_rgb888 ==============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[22:26:47] ============= drm_test_fb_xrgb8888_to_bgr888 ==============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[22:26:47] ============ drm_test_fb_xrgb8888_to_argb8888 =============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[22:26:47] =========== drm_test_fb_xrgb8888_to_xrgb2101010 ===========
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[22:26:47] =========== drm_test_fb_xrgb8888_to_argb2101010 ===========
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[22:26:47] ============== drm_test_fb_xrgb8888_to_mono ===============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[22:26:47] ==================== drm_test_fb_swab =====================
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ================ [PASSED] drm_test_fb_swab =================
[22:26:47] ============ drm_test_fb_xrgb8888_to_xbgr8888 =============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[22:26:47] ============ drm_test_fb_xrgb8888_to_abgr8888 =============
[22:26:47] [PASSED] single_pixel_source_buffer
[22:26:47] [PASSED] single_pixel_clip_rectangle
[22:26:47] [PASSED] well_known_colors
[22:26:47] [PASSED] destination_pitch
[22:26:47] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[22:26:47] ================= drm_test_fb_clip_offset =================
[22:26:47] [PASSED] pass through
[22:26:47] [PASSED] horizontal offset
[22:26:47] [PASSED] vertical offset
[22:26:47] [PASSED] horizontal and vertical offset
[22:26:47] [PASSED] horizontal offset (custom pitch)
[22:26:47] [PASSED] vertical offset (custom pitch)
[22:26:47] [PASSED] horizontal and vertical offset (custom pitch)
[22:26:47] ============= [PASSED] drm_test_fb_clip_offset =============
[22:26:47] =================== drm_test_fb_memcpy ====================
[22:26:47] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[22:26:47] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[22:26:47] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[22:26:47] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[22:26:47] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[22:26:47] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[22:26:47] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[22:26:47] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[22:26:47] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[22:26:47] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[22:26:47] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[22:26:47] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[22:26:47] =============== [PASSED] drm_test_fb_memcpy ================
[22:26:47] ============= [PASSED] drm_format_helper_test ==============
[22:26:47] ================= drm_format (18 subtests) =================
[22:26:47] [PASSED] drm_test_format_block_width_invalid
[22:26:47] [PASSED] drm_test_format_block_width_one_plane
[22:26:47] [PASSED] drm_test_format_block_width_two_plane
[22:26:47] [PASSED] drm_test_format_block_width_three_plane
[22:26:47] [PASSED] drm_test_format_block_width_tiled
[22:26:47] [PASSED] drm_test_format_block_height_invalid
[22:26:47] [PASSED] drm_test_format_block_height_one_plane
[22:26:47] [PASSED] drm_test_format_block_height_two_plane
[22:26:47] [PASSED] drm_test_format_block_height_three_plane
[22:26:47] [PASSED] drm_test_format_block_height_tiled
[22:26:47] [PASSED] drm_test_format_min_pitch_invalid
[22:26:47] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[22:26:47] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[22:26:47] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[22:26:47] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[22:26:47] [PASSED] drm_test_format_min_pitch_two_plane
[22:26:47] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[22:26:47] [PASSED] drm_test_format_min_pitch_tiled
[22:26:47] =================== [PASSED] drm_format ====================
[22:26:47] ============== drm_framebuffer (10 subtests) ===============
[22:26:47] ========== drm_test_framebuffer_check_src_coords ==========
[22:26:47] [PASSED] Success: source fits into fb
[22:26:47] [PASSED] Fail: overflowing fb with x-axis coordinate
[22:26:47] [PASSED] Fail: overflowing fb with y-axis coordinate
[22:26:47] [PASSED] Fail: overflowing fb with source width
[22:26:47] [PASSED] Fail: overflowing fb with source height
[22:26:47] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[22:26:47] [PASSED] drm_test_framebuffer_cleanup
[22:26:47] =============== drm_test_framebuffer_create ===============
[22:26:47] [PASSED] ABGR8888 normal sizes
[22:26:47] [PASSED] ABGR8888 max sizes
[22:26:47] [PASSED] ABGR8888 pitch greater than min required
[22:26:47] [PASSED] ABGR8888 pitch less than min required
[22:26:47] [PASSED] ABGR8888 Invalid width
[22:26:47] [PASSED] ABGR8888 Invalid buffer handle
[22:26:47] [PASSED] No pixel format
[22:26:47] [PASSED] ABGR8888 Width 0
[22:26:47] [PASSED] ABGR8888 Height 0
[22:26:47] [PASSED] ABGR8888 Out of bound height * pitch combination
[22:26:47] [PASSED] ABGR8888 Large buffer offset
[22:26:47] [PASSED] ABGR8888 Buffer offset for inexistent plane
[22:26:47] [PASSED] ABGR8888 Invalid flag
[22:26:47] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[22:26:47] [PASSED] ABGR8888 Valid buffer modifier
[22:26:47] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[22:26:47] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[22:26:47] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[22:26:47] [PASSED] NV12 Normal sizes
[22:26:47] [PASSED] NV12 Max sizes
[22:26:47] [PASSED] NV12 Invalid pitch
[22:26:47] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[22:26:47] [PASSED] NV12 different modifier per-plane
[22:26:47] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[22:26:47] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[22:26:47] [PASSED] NV12 Modifier for inexistent plane
[22:26:47] [PASSED] NV12 Handle for inexistent plane
[22:26:47] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[22:26:47] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[22:26:47] [PASSED] YVU420 Normal sizes
[22:26:47] [PASSED] YVU420 Max sizes
[22:26:47] [PASSED] YVU420 Invalid pitch
[22:26:47] [PASSED] YVU420 Different pitches
[22:26:47] [PASSED] YVU420 Different buffer offsets/pitches
[22:26:47] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[22:26:47] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[22:26:47] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[22:26:47] [PASSED] YVU420 Valid modifier
[22:26:47] [PASSED] YVU420 Different modifiers per plane
[22:26:47] [PASSED] YVU420 Modifier for inexistent plane
[22:26:47] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[22:26:47] [PASSED] X0L2 Normal sizes
[22:26:47] [PASSED] X0L2 Max sizes
[22:26:47] [PASSED] X0L2 Invalid pitch
[22:26:47] [PASSED] X0L2 Pitch greater than minimum required
[22:26:47] [PASSED] X0L2 Handle for inexistent plane
[22:26:47] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[22:26:47] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[22:26:47] [PASSED] X0L2 Valid modifier
[22:26:47] [PASSED] X0L2 Modifier for inexistent plane
[22:26:47] =========== [PASSED] drm_test_framebuffer_create ===========
[22:26:47] [PASSED] drm_test_framebuffer_free
[22:26:47] [PASSED] drm_test_framebuffer_init
[22:26:47] [PASSED] drm_test_framebuffer_init_bad_format
[22:26:47] [PASSED] drm_test_framebuffer_init_dev_mismatch
[22:26:47] [PASSED] drm_test_framebuffer_lookup
[22:26:47] [PASSED] drm_test_framebuffer_lookup_inexistent
[22:26:47] [PASSED] drm_test_framebuffer_modifiers_not_supported
[22:26:47] ================= [PASSED] drm_framebuffer =================
[22:26:47] ================ drm_gem_shmem (8 subtests) ================
[22:26:47] [PASSED] drm_gem_shmem_test_obj_create
[22:26:47] [PASSED] drm_gem_shmem_test_obj_create_private
[22:26:47] [PASSED] drm_gem_shmem_test_pin_pages
[22:26:47] [PASSED] drm_gem_shmem_test_vmap
[22:26:47] [PASSED] drm_gem_shmem_test_get_sg_table
[22:26:47] [PASSED] drm_gem_shmem_test_get_pages_sgt
[22:26:47] [PASSED] drm_gem_shmem_test_madvise
[22:26:47] [PASSED] drm_gem_shmem_test_purge
[22:26:47] ================== [PASSED] drm_gem_shmem ==================
[22:26:47] === drm_atomic_helper_connector_hdmi_check (29 subtests) ===
[22:26:47] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[22:26:47] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[22:26:47] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[22:26:47] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[22:26:47] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[22:26:47] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[22:26:47] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 =======
[22:26:47] [PASSED] Automatic
[22:26:47] [PASSED] Full
[22:26:47] [PASSED] Limited 16:235
[22:26:47] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[22:26:47] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[22:26:47] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[22:26:47] [PASSED] drm_test_check_disable_connector
[22:26:47] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[22:26:47] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[22:26:47] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[22:26:47] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[22:26:47] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[22:26:47] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[22:26:47] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[22:26:47] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[22:26:47] [PASSED] drm_test_check_output_bpc_dvi
[22:26:47] [PASSED] drm_test_check_output_bpc_format_vic_1
[22:26:47] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[22:26:47] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[22:26:47] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[22:26:47] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[22:26:47] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[22:26:47] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[22:26:47] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[22:26:47] ============ drm_test_check_hdmi_color_format =============
[22:26:47] [PASSED] AUTO -> RGB
[22:26:47] [PASSED] YCBCR422 -> YUV422
[22:26:47] [PASSED] YCBCR420 -> YUV420
[22:26:47] [PASSED] YCBCR444 -> YUV444
[22:26:47] [PASSED] RGB -> RGB
[22:26:47] ======== [PASSED] drm_test_check_hdmi_color_format =========
[22:26:47] ======== drm_test_check_hdmi_color_format_420_only ========
[22:26:47] [PASSED] RGB should fail
[22:26:47] [PASSED] YUV444 should fail
[22:26:47] [PASSED] YUV422 should fail
[22:26:47] [PASSED] YUV420 should work
[22:26:47] ==== [PASSED] drm_test_check_hdmi_color_format_420_only ====
[22:26:47] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[22:26:47] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[22:26:47] [PASSED] drm_test_check_broadcast_rgb_value
[22:26:47] [PASSED] drm_test_check_bpc_8_value
[22:26:47] [PASSED] drm_test_check_bpc_10_value
[22:26:47] [PASSED] drm_test_check_bpc_12_value
[22:26:47] [PASSED] drm_test_check_format_value
[22:26:47] [PASSED] drm_test_check_tmds_char_value
[22:26:47] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[22:26:47] = drm_atomic_helper_connector_hdmi_mode_valid (7 subtests) =
[22:26:47] [PASSED] drm_test_check_mode_valid
[22:26:47] [PASSED] drm_test_check_mode_valid_reject
[22:26:47] [PASSED] drm_test_check_mode_valid_reject_rate
[22:26:47] [PASSED] drm_test_check_mode_valid_reject_max_clock
[22:26:47] [PASSED] drm_test_check_mode_valid_yuv420_only_max_clock
[22:26:47] [PASSED] drm_test_check_mode_valid_reject_yuv420_only_connector
[22:26:47] [PASSED] drm_test_check_mode_valid_accept_yuv420_also_connector_rgb
[22:26:47] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[22:26:47] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) =
[22:26:47] [PASSED] drm_test_check_infoframes
[22:26:47] [PASSED] drm_test_check_reject_avi_infoframe
[22:26:47] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8
[22:26:47] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10
[22:26:47] [PASSED] drm_test_check_reject_audio_infoframe
[22:26:47] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes ===
[22:26:47] ================= drm_managed (2 subtests) =================
[22:26:47] [PASSED] drm_test_managed_release_action
[22:26:47] [PASSED] drm_test_managed_run_action
[22:26:47] =================== [PASSED] drm_managed ===================
[22:26:47] =================== drm_mm (6 subtests) ====================
[22:26:47] [PASSED] drm_test_mm_init
[22:26:47] [PASSED] drm_test_mm_debug
[22:26:47] [PASSED] drm_test_mm_align32
[22:26:47] [PASSED] drm_test_mm_align64
[22:26:47] [PASSED] drm_test_mm_lowest
[22:26:47] [PASSED] drm_test_mm_highest
[22:26:47] ===================== [PASSED] drm_mm ======================
[22:26:47] ============= drm_modes_analog_tv (5 subtests) =============
[22:26:47] [PASSED] drm_test_modes_analog_tv_mono_576i
[22:26:47] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[22:26:47] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[22:26:47] [PASSED] drm_test_modes_analog_tv_pal_576i
[22:26:47] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[22:26:47] =============== [PASSED] drm_modes_analog_tv ===============
[22:26:47] ============== drm_plane_helper (2 subtests) ===============
[22:26:47] =============== drm_test_check_plane_state ================
[22:26:47] [PASSED] clipping_simple
[22:26:47] [PASSED] clipping_rotate_reflect
[22:26:47] [PASSED] positioning_simple
[22:26:47] [PASSED] upscaling
[22:26:47] [PASSED] downscaling
[22:26:47] [PASSED] rounding1
[22:26:47] [PASSED] rounding2
[22:26:47] [PASSED] rounding3
[22:26:47] [PASSED] rounding4
[22:26:47] =========== [PASSED] drm_test_check_plane_state ============
[22:26:47] =========== drm_test_check_invalid_plane_state ============
[22:26:47] [PASSED] positioning_invalid
[22:26:47] [PASSED] upscaling_invalid
[22:26:47] [PASSED] downscaling_invalid
[22:26:47] ======= [PASSED] drm_test_check_invalid_plane_state ========
[22:26:47] ================ [PASSED] drm_plane_helper =================
[22:26:47] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[22:26:47] ====== drm_test_connector_helper_tv_get_modes_check =======
[22:26:47] [PASSED] None
[22:26:47] [PASSED] PAL
[22:26:47] [PASSED] NTSC
[22:26:47] [PASSED] Both, NTSC Default
[22:26:47] [PASSED] Both, PAL Default
[22:26:47] [PASSED] Both, NTSC Default, with PAL on command-line
[22:26:47] [PASSED] Both, PAL Default, with NTSC on command-line
[22:26:47] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[22:26:47] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[22:26:47] ================== drm_rect (9 subtests) ===================
[22:26:47] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[22:26:47] [PASSED] drm_test_rect_clip_scaled_not_clipped
[22:26:47] [PASSED] drm_test_rect_clip_scaled_clipped
[22:26:47] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[22:26:47] ================= drm_test_rect_intersect =================
[22:26:47] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[22:26:47] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[22:26:47] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[22:26:47] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[22:26:47] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[22:26:47] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[22:26:47] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[22:26:47] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[22:26:47] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[22:26:47] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[22:26:47] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[22:26:47] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[22:26:47] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[22:26:47] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[22:26:47] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[22:26:47] ============= [PASSED] drm_test_rect_intersect =============
[22:26:47] ================ drm_test_rect_calc_hscale ================
[22:26:47] [PASSED] normal use
[22:26:47] [PASSED] out of max range
[22:26:47] [PASSED] out of min range
[22:26:47] [PASSED] zero dst
[22:26:47] [PASSED] negative src
[22:26:47] [PASSED] negative dst
[22:26:47] ============ [PASSED] drm_test_rect_calc_hscale ============
[22:26:47] ================ drm_test_rect_calc_vscale ================
[22:26:47] [PASSED] normal use
[22:26:47] [PASSED] out of max range
[22:26:47] [PASSED] out of min range
[22:26:47] [PASSED] zero dst
[22:26:47] [PASSED] negative src
[22:26:47] [PASSED] negative dst
[22:26:47] ============ [PASSED] drm_test_rect_calc_vscale ============
[22:26:47] ================== drm_test_rect_rotate ===================
[22:26:47] [PASSED] reflect-x
[22:26:47] [PASSED] reflect-y
[22:26:47] [PASSED] rotate-0
[22:26:47] [PASSED] rotate-90
[22:26:47] [PASSED] rotate-180
[22:26:47] [PASSED] rotate-270
[22:26:47] ============== [PASSED] drm_test_rect_rotate ===============
[22:26:47] ================ drm_test_rect_rotate_inv =================
[22:26:47] [PASSED] reflect-x
[22:26:47] [PASSED] reflect-y
[22:26:47] [PASSED] rotate-0
[22:26:47] [PASSED] rotate-90
[22:26:47] [PASSED] rotate-180
[22:26:47] [PASSED] rotate-270
[22:26:47] ============ [PASSED] drm_test_rect_rotate_inv =============
[22:26:47] ==================== [PASSED] drm_rect =====================
[22:26:47] ============ drm_sysfb_modeset_test (1 subtest) ============
[22:26:47] ============ drm_test_sysfb_build_fourcc_list =============
[22:26:47] [PASSED] no native formats
[22:26:47] [PASSED] XRGB8888 as native format
[22:26:47] [PASSED] remove duplicates
[22:26:47] [PASSED] convert alpha formats
[22:26:47] [PASSED] random formats
[22:26:47] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[22:26:47] ============= [PASSED] drm_sysfb_modeset_test ==============
[22:26:47] ================== drm_fixp (2 subtests) ===================
[22:26:47] [PASSED] drm_test_int2fixp
[22:26:47] [PASSED] drm_test_sm2fixp
[22:26:47] ==================== [PASSED] drm_fixp =====================
[22:26:47] ============================================================
[22:26:47] Testing complete. Ran 637 tests: passed: 637
[22:26:47] Elapsed time: 33.398s total, 1.741s configuring, 31.441s building, 0.205s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
[22:26:47] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[22:26:49] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=25
[22:26:59] Starting KUnit Kernel (1/1)...
[22:26:59] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:26:59] ================= ttm_device (5 subtests) ==================
[22:26:59] [PASSED] ttm_device_init_basic
[22:26:59] [PASSED] ttm_device_init_multiple
[22:26:59] [PASSED] ttm_device_fini_basic
[22:26:59] [PASSED] ttm_device_init_no_vma_man
[22:26:59] ================== ttm_device_init_pools ==================
[22:26:59] [PASSED] No DMA allocations, no DMA32 required
[22:26:59] [PASSED] DMA allocations, DMA32 required
[22:26:59] [PASSED] No DMA allocations, DMA32 required
[22:26:59] [PASSED] DMA allocations, no DMA32 required
[22:26:59] ============== [PASSED] ttm_device_init_pools ==============
[22:26:59] =================== [PASSED] ttm_device ====================
[22:26:59] ================== ttm_pool (8 subtests) ===================
[22:26:59] ================== ttm_pool_alloc_basic ===================
[22:26:59] [PASSED] One page
[22:26:59] [PASSED] More than one page
[22:26:59] [PASSED] Above the allocation limit
[22:26:59] [PASSED] One page, with coherent DMA mappings enabled
[22:26:59] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[22:26:59] ============== [PASSED] ttm_pool_alloc_basic ===============
[22:26:59] ============== ttm_pool_alloc_basic_dma_addr ==============
[22:26:59] [PASSED] One page
[22:26:59] [PASSED] More than one page
[22:26:59] [PASSED] Above the allocation limit
[22:26:59] [PASSED] One page, with coherent DMA mappings enabled
[22:26:59] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[22:26:59] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[22:26:59] [PASSED] ttm_pool_alloc_order_caching_match
[22:26:59] [PASSED] ttm_pool_alloc_caching_mismatch
[22:26:59] [PASSED] ttm_pool_alloc_order_mismatch
[22:26:59] [PASSED] ttm_pool_free_dma_alloc
[22:26:59] [PASSED] ttm_pool_free_no_dma_alloc
[22:26:59] [PASSED] ttm_pool_fini_basic
[22:26:59] ==================== [PASSED] ttm_pool =====================
[22:26:59] ================ ttm_resource (8 subtests) =================
[22:26:59] ================= ttm_resource_init_basic =================
[22:26:59] [PASSED] Init resource in TTM_PL_SYSTEM
[22:26:59] [PASSED] Init resource in TTM_PL_VRAM
[22:26:59] [PASSED] Init resource in a private placement
[22:26:59] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[22:26:59] ============= [PASSED] ttm_resource_init_basic =============
[22:26:59] [PASSED] ttm_resource_init_pinned
[22:26:59] [PASSED] ttm_resource_fini_basic
[22:26:59] [PASSED] ttm_resource_manager_init_basic
[22:26:59] [PASSED] ttm_resource_manager_usage_basic
[22:26:59] [PASSED] ttm_resource_manager_set_used_basic
[22:26:59] [PASSED] ttm_sys_man_alloc_basic
[22:26:59] [PASSED] ttm_sys_man_free_basic
[22:26:59] ================== [PASSED] ttm_resource ===================
[22:26:59] =================== ttm_tt (15 subtests) ===================
[22:26:59] ==================== ttm_tt_init_basic ====================
[22:26:59] [PASSED] Page-aligned size
[22:26:59] [PASSED] Extra pages requested
[22:26:59] ================ [PASSED] ttm_tt_init_basic ================
[22:26:59] [PASSED] ttm_tt_init_misaligned
[22:26:59] [PASSED] ttm_tt_fini_basic
[22:26:59] [PASSED] ttm_tt_fini_sg
[22:26:59] [PASSED] ttm_tt_fini_shmem
[22:26:59] [PASSED] ttm_tt_create_basic
[22:26:59] [PASSED] ttm_tt_create_invalid_bo_type
[22:26:59] [PASSED] ttm_tt_create_ttm_exists
[22:26:59] [PASSED] ttm_tt_create_failed
[22:26:59] [PASSED] ttm_tt_destroy_basic
[22:26:59] [PASSED] ttm_tt_populate_null_ttm
[22:26:59] [PASSED] ttm_tt_populate_populated_ttm
[22:26:59] [PASSED] ttm_tt_unpopulate_basic
[22:26:59] [PASSED] ttm_tt_unpopulate_empty_ttm
[22:26:59] [PASSED] ttm_tt_swapin_basic
[22:26:59] ===================== [PASSED] ttm_tt ======================
[22:26:59] =================== ttm_bo (14 subtests) ===================
[22:26:59] =========== ttm_bo_reserve_optimistic_no_ticket ===========
[22:26:59] [PASSED] Cannot be interrupted and sleeps
[22:26:59] [PASSED] Cannot be interrupted, locks straight away
[22:26:59] [PASSED] Can be interrupted, sleeps
[22:26:59] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[22:26:59] [PASSED] ttm_bo_reserve_locked_no_sleep
[22:26:59] [PASSED] ttm_bo_reserve_no_wait_ticket
[22:26:59] [PASSED] ttm_bo_reserve_double_resv
[22:26:59] [PASSED] ttm_bo_reserve_interrupted
[22:26:59] [PASSED] ttm_bo_reserve_deadlock
[22:26:59] [PASSED] ttm_bo_unreserve_basic
[22:26:59] [PASSED] ttm_bo_unreserve_pinned
[22:26:59] [PASSED] ttm_bo_unreserve_bulk
[22:26:59] [PASSED] ttm_bo_fini_basic
[22:26:59] [PASSED] ttm_bo_fini_shared_resv
[22:26:59] [PASSED] ttm_bo_pin_basic
[22:26:59] [PASSED] ttm_bo_pin_unpin_resource
[22:26:59] [PASSED] ttm_bo_multiple_pin_one_unpin
[22:26:59] ===================== [PASSED] ttm_bo ======================
[22:26:59] ============== ttm_bo_validate (22 subtests) ===============
[22:26:59] ============== ttm_bo_init_reserved_sys_man ===============
[22:26:59] [PASSED] Buffer object for userspace
[22:26:59] [PASSED] Kernel buffer object
[22:26:59] [PASSED] Shared buffer object
[22:26:59] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[22:26:59] ============== ttm_bo_init_reserved_mock_man ==============
[22:26:59] [PASSED] Buffer object for userspace
[22:26:59] [PASSED] Kernel buffer object
[22:26:59] [PASSED] Shared buffer object
[22:26:59] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[22:26:59] [PASSED] ttm_bo_init_reserved_resv
[22:26:59] ================== ttm_bo_validate_basic ==================
[22:26:59] [PASSED] Buffer object for userspace
[22:26:59] [PASSED] Kernel buffer object
[22:26:59] [PASSED] Shared buffer object
[22:26:59] ============== [PASSED] ttm_bo_validate_basic ==============
[22:26:59] [PASSED] ttm_bo_validate_invalid_placement
[22:26:59] ============= ttm_bo_validate_same_placement ==============
[22:26:59] [PASSED] System manager
[22:26:59] [PASSED] VRAM manager
[22:26:59] ========= [PASSED] ttm_bo_validate_same_placement ==========
[22:26:59] [PASSED] ttm_bo_validate_failed_alloc
[22:26:59] [PASSED] ttm_bo_validate_pinned
[22:26:59] [PASSED] ttm_bo_validate_busy_placement
[22:26:59] ================ ttm_bo_validate_multihop =================
[22:26:59] [PASSED] Buffer object for userspace
[22:26:59] [PASSED] Kernel buffer object
[22:26:59] [PASSED] Shared buffer object
[22:26:59] ============ [PASSED] ttm_bo_validate_multihop =============
[22:26:59] ========== ttm_bo_validate_no_placement_signaled ==========
[22:26:59] [PASSED] Buffer object in system domain, no page vector
[22:26:59] [PASSED] Buffer object in system domain with an existing page vector
[22:26:59] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[22:26:59] ======== ttm_bo_validate_no_placement_not_signaled ========
[22:26:59] [PASSED] Buffer object for userspace
[22:26:59] [PASSED] Kernel buffer object
[22:26:59] [PASSED] Shared buffer object
[22:26:59] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[22:26:59] [PASSED] ttm_bo_validate_move_fence_signaled
[22:26:59] ========= ttm_bo_validate_move_fence_not_signaled =========
[22:26:59] [PASSED] Waits for GPU
[22:26:59] [PASSED] Tries to lock straight away
[22:26:59] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[22:26:59] [PASSED] ttm_bo_validate_swapout
[22:26:59] [PASSED] ttm_bo_validate_happy_evict
[22:26:59] [PASSED] ttm_bo_validate_all_pinned_evict
[22:26:59] [PASSED] ttm_bo_validate_allowed_only_evict
[22:26:59] [PASSED] ttm_bo_validate_deleted_evict
[22:26:59] [PASSED] ttm_bo_validate_busy_domain_evict
[22:26:59] [PASSED] ttm_bo_validate_evict_gutting
[22:26:59] [PASSED] ttm_bo_validate_recrusive_evict
[22:26:59] ================= [PASSED] ttm_bo_validate =================
[22:26:59] ============================================================
[22:26:59] Testing complete. Ran 102 tests: passed: 102
[22:26:59] Elapsed time: 12.184s total, 1.742s configuring, 10.176s building, 0.226s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 13+ messages in thread
* ✓ Xe.CI.BAT: success for Add new debug infrastructure for configfs (rev2)
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
` (10 preceding siblings ...)
2026-07-22 22:27 ` ✓ CI.KUnit: success " Patchwork
@ 2026-07-22 23:18 ` Patchwork
11 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2026-07-22 23:18 UTC (permalink / raw)
To: Stuart Summers; +Cc: intel-xe
[-- Attachment #1: Type: text/plain, Size: 871 bytes --]
== Series Details ==
Series: Add new debug infrastructure for configfs (rev2)
URL : https://patchwork.freedesktop.org/series/165879/
State : success
== Summary ==
CI Bug Log - changes from xe-5463-aff95d2d4b516f1618e3fb1cdb5850b6e1b19bb9_BAT -> xe-pw-165879v2_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (13 -> 13)
------------------------------
No changes in participating hosts
Changes
-------
No changes found
Build changes
-------------
* Linux: xe-5463-aff95d2d4b516f1618e3fb1cdb5850b6e1b19bb9 -> xe-pw-165879v2
IGT_9020: 9020
xe-5463-aff95d2d4b516f1618e3fb1cdb5850b6e1b19bb9: aff95d2d4b516f1618e3fb1cdb5850b6e1b19bb9
xe-pw-165879v2: 165879v2
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-165879v2/index.html
[-- Attachment #2: Type: text/html, Size: 1419 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-07-22 23:18 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 21:46 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
2026-07-22 21:46 ` [PATCH 1/9] drm/xe: Sort xe_config_device fields Stuart Summers
2026-07-22 21:46 ` [PATCH 2/9] drm/xe: Split out configfs data structures Stuart Summers
2026-07-22 21:46 ` [PATCH 3/9] drm/xe: Add a new debug focused configfs group Stuart Summers
2026-07-22 21:47 ` [PATCH 4/9] drm/xe: Move debug configfs entries to xe_configfs_debug.c Stuart Summers
2026-07-22 21:47 ` [PATCH 5/9] drm/xe/guc: Add configfs support for guc_log_level Stuart Summers
2026-07-22 21:47 ` [PATCH 6/9] drm/xe/guc: Add support for NPK as a GuC log target Stuart Summers
2026-07-22 21:47 ` [PATCH 7/9] drm/xe: Add infrastructure for debug configfs parameters Stuart Summers
2026-07-22 21:47 ` [PATCH 8/9] drm/xe: Migrate existing debug configfs entries to params infrastructure Stuart Summers
2026-07-22 21:47 ` [PATCH 9/9] drm/xe: Taint kernel when debug configfs parameters are set Stuart Summers
2026-07-22 22:25 ` ✗ CI.checkpatch: warning for Add new debug infrastructure for configfs (rev2) Patchwork
2026-07-22 22:27 ` ✓ CI.KUnit: success " Patchwork
2026-07-22 23:18 ` ✓ Xe.CI.BAT: " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox