Skip to contentSkip to conversation

Intel Xe GPU Debug Support (eudebug) v9

PATCH Superseded Mika Kuoppala 3 participants 22 messages Jun 8

Subsystems (4)

v1 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

cover Intel Xe GPU Debug Support (eudebug) v9

Hi,

This is the v9 patch series for Intel Xe GPU debug support (eudebug).

This series continues from the following previous submissions:
- v1: https://lists.freedesktop.org/archives/intel-xe/2024-July/043605.html
- v2: https://lists.freedesktop.org/archives/intel-xe/2024-October/052260.html
- v3: https://lists.freedesktop.org/archives/intel-xe/2024-December/061476.html
- v4: https://lists.freedesktop.org/archives/intel-xe/2025-August/091645.html
- v5: https://lists.freedesktop.org/archives/intel-xe/2025-October/097859.html
- v6: https://lists.freedesktop.org/archives/intel-xe/2025-December/106405.html
- v7: https://lists.freedesktop.org/archives/intel-xe/2026-February/115750.html
- v8: https://lists.freedesktop.org/archives/intel-xe/2026-April/124147.html

# Major Changes from v8

Addressed Sashiko feedback for v8:
https://sashiko.dev/#/patchset/20260430105121.712843-1-mika.kuoppala%40linux.intel.com
Sashiko reported a good number of issues with a high hit rate. Hopefully we’ve addressed all the critical and high-priority ones without introducing new ones. Big thanks to Maciej for helping with this effort.

A major rework was done on the locking and memory management front:

Session establishment and teardown are now protected by a single lock to address concurrency issues (KISS principle).

The DMA reservation lock was previously held during eudebug event creation. To fix this, the event FIFO has been restructured into a preallocated bytestream. Resource handles are still allocated under the reservation lock but now use GFP_ATOMIC. There should be no more sleeps or waits on the event producer side. If we run out of FIFO space, we disconnect the debugger.

Further, page faults and their interaction with SVM have been stripped out from this eudebug-core series and will be sent separately as a follow-up series.

# Major Changes from v7

Rework of eudebug pagefault handling to better align with xe core pagefaults (Maciej Patelczyk).
Refactored eu control to streamline common parts. Refactored resource handle bookkeepping.

# Major Changes from v6

Added documentation. Two new documentation patches introduce .rst documentation under Documentation/gpu/xe/ and kernel-doc for the eudebug interface. The eudebug source now includes DOC sections covering connection establishment, security model, file descriptor acquisition methods, and the event interface.

UAPI header documentation in xe_drm_eudebug.h has been significantly expanded with kernel-doc comments for interface structures and ioctls.

Eliminated the separate xe_eudebug_resources struct, removing a level of indirection. The resources lock has been consolidated with the target lock, which is now a mutex instead of a spinlock.

Improved input validation: seqno fields are now checked to be zero on EU control and read_event entry. The read_event ioctl validation was simplified to only check for DRM_XE_EUDEBUG_EVENT_READ type.

Replaced drm_file->authenticated check with xe_file and device validation, allowing render node access for debug targets.

# Major Changes from v5

With v5, when relaying vm bind with the associated ops, the transient bind relay state was held in struct xe_vm. As debug metadata add and remove ops simplifies the way binds are handled wrt v3, this gave us opportunity to use vm_ops for relaying instead of using eudebug baked bind ops state. This change removes ~200 lines.

Debuggable GuC context support was reworked. Now GuC version is required to be 70.49.4 or higher for eudebug support.

Eudebug pagefaults were reworked on top of producer/consumer pagefaults, introduced in core xe side. We reduced the footprint eudebug pagefaults have in xe pagefault handler side.

# Major Changes from v4

v4 omitted page fault support, it is reworked from v3 and included in this series.

### Major Changes from v3

#### 1. Elimination of ptrace_may_access() and pid

In previous series, the connection attempt was made using the process ID (PID) as the target. Access was checked using the ptrace_may_access() helper to achieve security parity with CPU-side debugging.

In v4, this has been changed to connect to a DRM client, using a file descriptor as the target. This approach eliminates the need for the ptrace_may_access() symbol export, as access control is now managed through the debugger process's access to the file descriptor. For example, accessing a remote DRM client requires the debugger process to successfully call pidfd_getfd() to obtain a duplicate of the target file descriptor. The 1:1 mapping between DRM clients and their debuggers eliminates the need for EVENT_OPEN and simplifies overall connection tracking.

#### 2. ELF binaries not held in kernel memory

In v4, debug data is delivered as a VM bind 'OP_ADD_DEBUG_DATA' extension. The ELF binaries are no longer stored within the Xe KMD but are instead kept in a file. The file path is passed as part of an extension in the newly introduced 'OP_ADD_DEBUG_DATA' VM bind operation. Alternatively pseudo-paths can be used to annotate special address ranges similar to /proc/<pid>/maps.

#### 3. Debug metadata not carried in VMA struct

Instead of attaching debug data to vma created by 'OP_MAP', we introduce separate ops for managing the metadata. Debug data is no longer held in the VMA struct. xe_vm contains a list of all associated debug data.

#### 4. Reading debug data via debugfs

This revision introduces the possibility to access debug data using per client debugfs entries. The intent was to achieve similar interface to '/proc/<pid>/maps'

### Supported Hardware
- Lunarlake (LNL)
- Battlemage (BMG)
- Pantherlake (PTL)

The code for this submission can be found at:
https://gitlab.freedesktop.org/miku/kernel/-/tree/eudebug-v9

Tests:
https://gitlab.freedesktop.org/DominikPiatkowski-Intel/igt-gpu-tools/-/tree/eudebug-dev-next

Christoph Manszewski (5):
drm/xe: Introduce ADD_DEBUG_DATA and REMOVE_DEBUG_DATA vm bind ops drm/xe/eudebug: Introduce vm bind and vm bind debug data events drm/xe/eudebug_test: Introduce eudebug live tests drm/xe: Implement SR-IOV and eudebug exclusivity drm/xe: Add xe_client_debugfs and introduce debug_data file

Dominik Grzegorzek (5):
drm/xe: Add EUDEBUG_ENABLE exec queue property drm/xe/eudebug: Introduce exec_queue events drm/xe/eudebug: hw enablement for eudebug drm/xe/eudebug: Introduce EU control interface drm/xe/eudebug: Introduce per device attention scan worker

Mika Kuoppala (8):
drm/xe/eudebug: Introduce eudebug interface drm/xe/eudebug: Add documentation drm/xe/eudebug: Add connection establishment documentation drm/xe/eudebug: Introduce discovery for resources drm/xe/eudebug: Mark guc contexts as debuggable drm/xe/eudebug: Add ufence events with acks drm/xe/eudebug: vm open/pread/pwrite drm/xe/eudebug: userptr vm pread/pwrite

 Documentation/gpu/xe/index.rst              |    1 +
 Documentation/gpu/xe/xe_eudebug.rst         |   83 +
 drivers/gpu/drm/xe/Kconfig                  |   10 +
 drivers/gpu/drm/xe/Makefile                 |    7 +-
 drivers/gpu/drm/xe/abi/guc_actions_abi.h    |    5 +
 drivers/gpu/drm/xe/abi/guc_klvs_abi.h       |    1 +
 drivers/gpu/drm/xe/regs/xe_engine_regs.h    |    1 +
 drivers/gpu/drm/xe/regs/xe_gt_regs.h        |   43 +
 drivers/gpu/drm/xe/tests/xe_eudebug_test.c  |  201 ++
 drivers/gpu/drm/xe/tests/xe_live_test_mod.c |    5 +
 drivers/gpu/drm/xe/xe_client_debugfs.c      |  132 ++
 drivers/gpu/drm/xe/xe_client_debugfs.h      |   19 +
 drivers/gpu/drm/xe/xe_debug_data.c          |  385 +++
 drivers/gpu/drm/xe/xe_debug_data.h          |   22 +
 drivers/gpu/drm/xe/xe_debug_data_types.h    |   25 +
 drivers/gpu/drm/xe/xe_device.c              |   26 +-
 drivers/gpu/drm/xe/xe_device.h              |   42 +
 drivers/gpu/drm/xe/xe_device_types.h        |   38 +
 drivers/gpu/drm/xe/xe_eudebug.c             | 2347 +++++++++++++++++++
 drivers/gpu/drm/xe/xe_eudebug.h             |  104 +
 drivers/gpu/drm/xe/xe_eudebug_hw.c          |  716 ++++++
 drivers/gpu/drm/xe/xe_eudebug_hw.h          |   32 +
 drivers/gpu/drm/xe/xe_eudebug_types.h       |  175 ++
 drivers/gpu/drm/xe/xe_eudebug_vm.c          |  442 ++++
 drivers/gpu/drm/xe/xe_eudebug_vm.h          |    8 +
 drivers/gpu/drm/xe/xe_exec_queue.c          |   56 +-
 drivers/gpu/drm/xe/xe_exec_queue.h          |   19 +
 drivers/gpu/drm/xe/xe_exec_queue_types.h    |    7 +
 drivers/gpu/drm/xe/xe_gt_debug.c            |  182 ++
 drivers/gpu/drm/xe/xe_gt_debug.h            |   32 +
 drivers/gpu/drm/xe/xe_guc.c                 |   13 +
 drivers/gpu/drm/xe/xe_guc.h                 |    3 +
 drivers/gpu/drm/xe/xe_guc_ads.c             |   17 +
 drivers/gpu/drm/xe/xe_guc_submit.c          |   34 +
 drivers/gpu/drm/xe/xe_guc_submit.h          |    1 +
 drivers/gpu/drm/xe/xe_hw_engine.h           |   14 +
 drivers/gpu/drm/xe/xe_reg_sr.c              |   21 +-
 drivers/gpu/drm/xe/xe_reg_sr.h              |    4 +-
 drivers/gpu/drm/xe/xe_reg_whitelist.c       |    2 +-
 drivers/gpu/drm/xe/xe_rtp.c                 |    2 +-
 drivers/gpu/drm/xe/xe_sync.c                |   43 +-
 drivers/gpu/drm/xe/xe_sync.h                |    7 +-
 drivers/gpu/drm/xe/xe_sync_types.h          |   28 +-
 drivers/gpu/drm/xe/xe_userptr.c             |    4 +
 drivers/gpu/drm/xe/xe_userptr.h             |   32 +
 drivers/gpu/drm/xe/xe_vm.c                  |  168 +-
 drivers/gpu/drm/xe/xe_vm_types.h            |   19 +
 drivers/gpu/drm/xe/xe_wa_oob.rules          |    5 +-
 include/uapi/drm/xe_drm.h                   |   89 +
 include/uapi/drm/xe_drm_eudebug.h           |  366 +++
 50 files changed, 5992 insertions(+), 46 deletions(-)
 create mode 100644 Documentation/gpu/xe/xe_eudebug.rst
 create mode 100644 drivers/gpu/drm/xe/tests/xe_eudebug_test.c
 create mode 100644 drivers/gpu/drm/xe/xe_client_debugfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_client_debugfs.h
 create mode 100644 drivers/gpu/drm/xe/xe_debug_data.c
 create mode 100644 drivers/gpu/drm/xe/xe_debug_data.h
 create mode 100644 drivers/gpu/drm/xe/xe_debug_data_types.h
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug.c
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug.h
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug_hw.c
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug_hw.h
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug_types.h
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug_vm.c
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug_vm.h
 create mode 100644 drivers/gpu/drm/xe/xe_gt_debug.c
 create mode 100644 drivers/gpu/drm/xe/xe_gt_debug.h
 create mode 100644 include/uapi/drm/xe_drm_eudebug.h
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/18 drm/xe/eudebug: Introduce eudebug interface

This patch adds the eudebug interface to the Xe driver, enabling user-space debuggers (e.g., GDB) to track and interact with GPU resources of a DRM client. Debuggers can inspect or modify these resources, for example, to locate ISA/ELF sections and install breakpoints in a shader's instruction stream.

A debugger opens a connection to the Xe driver via a DRM ioctl, specifying the target DRM client's file descriptor. This returns an anonymous file descriptor for the connection, which can be used to listen for resource creation/destruction events. The same file descriptor can also be used to receive hardware state change events and control execution flow by interrupting EU threads on the GPU (in follow-up patches).

This patch introduces the eudebug connection and event queuing, adding VM create/destroy events as a baseline. Additional events and hardware control for full debugger operation are needed and will be introduced in follow-up patches.

The resource tracking components are inspired by Maciej Patelczyk's work on resource handling for i915. Chris Wilson suggested a two-way mapping approach, which simplifies using the resource map as definitive bookkeeping forresources relayed to the debugger during the discovery phase (in a follow-up patch).

v2: - Kconfig support (Matthew)
- ptraced access control (Lucas)
- pass expected event length to user (Zbigniew)
- only track long running VMs
- checkpatch (Tilak)
- include order (Andrzej)
- 32bit fixes (Andrzej)
- cleaner get_task_struct
- remove xa_array and use clients.list for tracking (Mika)

v3: - adapt to removal of clients.lock (Mika)
- create_event cleanup (Christoph)

v4: - add proper header guards (Christoph)
- better read_event fault handling (Christoph, Mika)
- simplify attach (Mika)
- connect using target file descriptors
- avoid event->seqno after queue as it is can UAF (Mika)
- use drmm for eudebug_fini (Maciej)
- squash dynamic enable

v6: - drm->authenticated is overzealous for render (Mika)

v7: - struct member documentation (Mika)
- enforce seqno mbz (Mika)

v8: - head->seqno fix (Mika)
- resource alloc and removal cleanup (Mika)
- s/wait_interruptible_timeout/wait_timeout (Mika)
- use fd_install in connect (Mika)

v9: - fix xef vs debugger race (Sashiko)
- assign d->xe early (Sashiko)
- simplify locking (Mika)
- fix pending->len outside lock (Sashiko)
- remove version from connect to address fd_install leak (Sashiko)
- create vm by id to avoid use after free (Sashiko)
- use xe_eudebug_detach on connection error path (Sashiko)
- dont sleep on kzalloc as we can disconnect (Sashiko)
- check if enabled on connection (Sashiko)
- preallocated event fifo to avoid locked allocs (Sashiko, Mika)

Cc Maarten Lankhorst <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Dominik Grzegorzek <[email protected]>
Cc Andi Shyti <[email protected]>
Cc Matt Roper <[email protected]>
Cc Matthew Brost <[email protected]>
Cc Zbigniew Kempczyński <[email protected]>
Cc Andrzej Hajda <[email protected]>
---
 drivers/gpu/drm/xe/Kconfig            |   10 +
 drivers/gpu/drm/xe/Makefile           |    3 +
 drivers/gpu/drm/xe/xe_device.c        |   10 +
 drivers/gpu/drm/xe/xe_device_types.h  |   29 +
 drivers/gpu/drm/xe/xe_eudebug.c       | 1078 +++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_eudebug.h       |   65 ++
 drivers/gpu/drm/xe/xe_eudebug_types.h |  132 +++
 drivers/gpu/drm/xe/xe_vm.c            |    7 +-
 include/uapi/drm/xe_drm.h             |   23 +
 include/uapi/drm/xe_drm_eudebug.h     |   80 ++
 10 files changed, 1436 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug.c
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug.h
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug_types.h
 create mode 100644 include/uapi/drm/xe_drm_eudebug.h
drivers/gpu/drm/xe/Kconfig +10 -0
index 4d7dcaff2b91..78d4673665b4 100644
@@ -129,6 +129,16 @@ config DRM_XE_FORCE_PROBE
 
 	  Use "!*" to block the probe of the driver for all known devices.
 
+config DRM_XE_EUDEBUG
+	bool "Enable gdb debugger support (eudebug)"
+	depends on DRM_XE
+	default y
+	help
+	  Choose this option if you want to add support for debugger (gdb) to
+	  attach into process using Xe and debug the gpu/gpgpu programs.
+	  With debugger support, Xe will provide interface for a debugger to
+	  process to track, inspect and modify resources.
+
 menu "drm/Xe Debugging"
 depends on DRM_XE
 depends on EXPERT
drivers/gpu/drm/xe/Makefile +3 -0
index 09661f079d03..7212ceb339ab 100644
@@ -156,6 +156,9 @@ xe-$(CONFIG_I2C)	+= xe_i2c.o
 xe-$(CONFIG_DRM_XE_GPUSVM) += xe_svm.o
 xe-$(CONFIG_DRM_GPUSVM) += xe_userptr.o
 
+# debugging shaders with gdb (eudebug) support
+xe-$(CONFIG_DRM_XE_EUDEBUG) += xe_eudebug.o
+
 # graphics hardware monitoring (HWMON) support
 xe-$(CONFIG_HWMON) += xe_hwmon.o
 
drivers/gpu/drm/xe/xe_device.c +10 -0
index 51e3a2dd7b22..326d61407dc2 100644
@@ -33,6 +33,7 @@
 #include "xe_dma_buf.h"
 #include "xe_drm_client.h"
 #include "xe_drv.h"
+#include "xe_eudebug.h"
 #include "xe_exec.h"
 #include "xe_exec_queue.h"
 #include "xe_force_wake.h"
@@ -109,6 +110,10 @@ static int xe_file_open(struct drm_device *dev, struct drm_file *file)
 	mutex_init(&xef->exec_queue.lock);
 	xa_init_flags(&xef->exec_queue.xa, XA_FLAGS_ALLOC1);
 
+#if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
+	INIT_LIST_HEAD(&xef->eudebug.target_link);
+#endif
+
 	file->driver_priv = xef;
 	kref_init(&xef->refcount);
 
@@ -172,6 +177,8 @@ static void xe_file_close(struct drm_device *dev, struct drm_file *file)
 
 	guard(xe_pm_runtime)(xe);
 
+	xe_eudebug_file_close(xef);
+
 	/*
 	 * No need for exec_queue.lock here as there is no contention for it
 	 * when FD is closing as IOCTLs presumably can't be modifying the
@@ -215,6 +222,7 @@ static const struct drm_ioctl_desc xe_ioctls[] = {
 			  DRM_RENDER_ALLOW),
 	DRM_IOCTL_DEF_DRV(XE_VM_GET_PROPERTY, xe_vm_get_property_ioctl,
 			  DRM_RENDER_ALLOW),
+	DRM_IOCTL_DEF_DRV(XE_EUDEBUG_CONNECT, xe_eudebug_connect_ioctl, DRM_RENDER_ALLOW),
 };
 
 static long xe_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
@@ -1097,6 +1105,8 @@ int xe_device_probe(struct xe_device *xe)
 	if (err)
 		goto err_unregister_display;
 
+	xe_eudebug_init(xe);
+
 	detect_preproduction_hw(xe);
 
 	err = drmm_add_action_or_reset(&xe->drm, xe_device_wedged_fini, xe);
drivers/gpu/drm/xe/xe_device_types.h +29 -0
index 32dd2ffbc796..3981473b8b12 100644
@@ -14,6 +14,7 @@
 
 #include "xe_devcoredump_types.h"
 #include "xe_drm_ras_types.h"
+#include "xe_eudebug_types.h"
 #include "xe_heci_gsc.h"
 #include "xe_late_bind_fw_types.h"
 #include "xe_oa_types.h"
@@ -571,6 +572,23 @@ struct xe_device {
 		spinlock_t lock;
 	} uncore;
 #endif
+
+#if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
+	/** @debugger connection list and globals for device */
+	struct {
+		/** @eudebug.session_count: session counter to track connections */
+		u64 session_count;
+
+		/** @eudebug.available: is the debugging functionality available */
+		enum xe_eudebug_state state;
+
+		/** @eudebug.targets: this is list for xe_files for each target */
+		struct list_head targets;
+
+		/** @eudebug.lock: protects state and targets */
+		struct mutex lock;
+	} eudebug;
+#endif
 };
 
 /**
@@ -632,6 +650,17 @@ struct xe_file {
 
 	/** @refcount: ref count of this xe file */
 	struct kref refcount;
+
+#if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
+	/** @eudebug: struct to hold eudebug connection specifics */
+	struct {
+		/** @eudebug.debugger: the debugger connection into this xe_file */
+		struct xe_eudebug *debugger;
+
+		/** @target_link: link into xe_device.eudebug.targets */
+		struct list_head target_link;
+	} eudebug;
+#endif
 };
 
 #endif
drivers/gpu/drm/xe/xe_eudebug.c new file +1078 -0

1,078 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug.h new file +65 -0

65 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug_types.h new file +132 -0

132 lines not on this page · raw message

drivers/gpu/drm/xe/xe_vm.c +6 -1
index 080c2fff0e95..5d2bfe96612e 100644
@@ -26,6 +26,7 @@
 #include "xe_bo.h"
 #include "xe_device.h"
 #include "xe_drm_client.h"
+#include "xe_eudebug.h"
 #include "xe_exec_queue.h"
 #include "xe_gt.h"
 #include "xe_migrate.h"
@@ -2129,6 +2130,8 @@ int xe_vm_create_ioctl(struct drm_device *dev, void *data,
 
 	args->vm_id = id;
 
+	xe_eudebug_vm_create(xef, id);
+
 	return 0;
 
 err_close_and_put:
@@ -2160,8 +2163,10 @@ int xe_vm_destroy_ioctl(struct drm_device *dev, void *data,
 		xa_erase(&xef->vm.xa, args->vm_id);
 	mutex_unlock(&xef->vm.lock);
 
-	if (!err)
+	if (!err) {
+		xe_eudebug_vm_destroy(xef, vm);
 		xe_vm_close_and_put(vm);
+	}
 
 	return err;
 }
include/uapi/drm/xe_drm.h +23 -0
index 48e9f1fdb78d..bfd7cbfd2ff5 100644
@@ -110,6 +110,7 @@ extern "C" {
 #define DRM_XE_VM_QUERY_MEM_RANGE_ATTRS	0x0d
 #define DRM_XE_EXEC_QUEUE_SET_PROPERTY	0x0e
 #define DRM_XE_VM_GET_PROPERTY		0x0f
+#define DRM_XE_EUDEBUG_CONNECT		0x10
 
 /* Must be kept compact -- no holes */
 
@@ -129,6 +130,7 @@ extern "C" {
 #define DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS	DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_VM_QUERY_MEM_RANGE_ATTRS, struct drm_xe_vm_query_mem_range_attr)
 #define DRM_IOCTL_XE_EXEC_QUEUE_SET_PROPERTY	DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_SET_PROPERTY, struct drm_xe_exec_queue_set_property)
 #define DRM_IOCTL_XE_VM_GET_PROPERTY		DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_VM_GET_PROPERTY, struct drm_xe_vm_get_property)
+#define DRM_IOCTL_XE_EUDEBUG_CONNECT		DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EUDEBUG_CONNECT, struct drm_xe_eudebug_connect)
 
 /**
  * DOC: Xe IOCTL Extensions
@@ -2609,6 +2611,27 @@ enum drm_xe_ras_error_component {
 	[DRM_XE_RAS_ERR_COMP_SOC_INTERNAL] = "soc-internal"		\
 }
 
+/*
+ * struct drm_xe_eudebug_connect - Input of &DRM_IOCTL_XE_EUDEBUG_CONNECT
+ *
+ * This structure is used to connect to an eudebug interface of target drm file.
+ */
+struct drm_xe_eudebug_connect {
+	/** @extensions: Pointer to the first extension struct, if any */
+	__u64 extensions;
+
+	/** @fd: Debug target DRM client fd */
+	__u64 fd;
+
+	/** @flags: Flags, MBZ */
+	__u64 flags;
+
+	/** @reserved: MBZ */
+	__u64 reserved;
+};
+
+#include "xe_drm_eudebug.h"
+
 #if defined(__cplusplus)
 }
 #endif
include/uapi/drm/xe_drm_eudebug.h new file +80 -0

80 lines not on this page · raw message

Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/18 drm/xe/eudebug: Add documentation

In reply to Mika Kuoppala

Add a core documentation for connection setup and events. Followup patches can then incrementally add their workings.

---
 Documentation/gpu/xe/index.rst      |  1 +
 Documentation/gpu/xe/xe_eudebug.rst | 45 +++++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_eudebug.c     | 19 ++++++++++++
 3 files changed, 65 insertions(+)
 create mode 100644 Documentation/gpu/xe/xe_eudebug.rst
Documentation/gpu/xe/index.rst +1 -0
index 665c0e93601c..a6888245899b 100644
@@ -35,3 +35,4 @@ The display, or :ref:`drm-kms`, support for drm/xe is provided by
    xe-drm-usage-stats.rst
    xe_configfs
    xe_gt_stats
+   xe_eudebug
Documentation/gpu/xe/xe_eudebug.rst new file +45 -0

45 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug.c +19 -0
index 6f4ac6c83b56..4fdd4e8394da 100644
@@ -18,6 +18,25 @@
 #include "xe_macros.h"
 #include "xe_vm.h"
 
+/**
+ * DOC: Connection Establishment
+ *
+ * To debug a target DRM client, the debugger must first establish
+ * a connection using :c:type:`drm_xe_eudebug_connect`.
+ *
+ */
+
+/**
+ * DOC: Events
+ *
+ * Resource creation/destruction and hardware state changes are
+ * delivered as events for debugger.
+ *
+ * To read an event, ioctl DRM_XE_EUDEBUG_IOCTL_READ_EVENT command
+ * can be issued with prefilled :c:type:`drm_xe_eudebug_event` as argument.
+ *
+ */
+
 /*
  * If there is no detected event read by userspace, during this period, assume
  * userspace problem and disconnect debugger to allow forward progress.
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/18 drm/xe/eudebug: Add connection establishment documentation

In reply to Mika Kuoppala

v2: improved Pipe and Fork documentation (Sashiko)

Add documentation for connecting to a target DRM Xe client for debugging.

---
 Documentation/gpu/xe/xe_eudebug.rst | 11 +++++
 drivers/gpu/drm/xe/xe_eudebug.c     | 71 +++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+)
Documentation/gpu/xe/xe_eudebug.rst +11 -0
index ff7fbc403ebb..c21fa7c47ab8 100644
@@ -21,6 +21,17 @@ Connection Establishment
 .. kernel-doc:: drivers/gpu/drm/xe/xe_eudebug.c
    :doc: Connection Establishment
 
+File Descriptor Acquisition Methods
+-----------------------------------
+
+.. kernel-doc:: drivers/gpu/drm/xe/xe_eudebug.c
+   :doc: File Descriptor Acquisition Methods
+
+Security Model
+--------------
+.. kernel-doc:: drivers/gpu/drm/xe/xe_eudebug.c
+   :doc: Security Model
+
 Events
 ======
 
drivers/gpu/drm/xe/xe_eudebug.c +71 -0

77 lines not on this page · raw message

Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/18 drm/xe/eudebug: Introduce discovery for resources

In reply to Mika Kuoppala

A debugger connection can occur after a client has created and destroyed an arbitrary number of resources. To support this, we need to relay all currently existing resources to the debugger. The client is held on selected ioctls until this discovery process, executed by a workqueue, is complete.

This patch is based on discovery work by Maciej Patelczyk for the i915 driver.

v2: - use rw_semaphore to block DRM ioctls during discovery (Matthew)
- only lock according to ioctl at play (Dominik)

v4: - s/discovery_lock/ioctl_lock
- change lock to be per xe_file as is connections
v5: - helper to get eudebug instance during discovery (Maciej)
v6: - complete_all even if no client (Sashiko)
v6: - dont flush on detach (Sashiko)
v7: - guard close with ioctl lock (Sashiko)

---
 Documentation/gpu/xe/xe_eudebug.rst   |   3 +
 drivers/gpu/drm/xe/xe_device.c        |  13 ++-
 drivers/gpu/drm/xe/xe_device.h        |  42 +++++++++
 drivers/gpu/drm/xe/xe_device_types.h  |   6 ++
 drivers/gpu/drm/xe/xe_eudebug.c       | 118 +++++++++++++++++++++++++-
 drivers/gpu/drm/xe/xe_eudebug.h       |  11 +++
 drivers/gpu/drm/xe/xe_eudebug_types.h |  14 ++-
 drivers/gpu/drm/xe/xe_exec_queue.c    |   5 ++
 drivers/gpu/drm/xe/xe_hw_engine.h     |  14 +++
 include/uapi/drm/xe_drm_eudebug.h     |  26 ++++++
 10 files changed, 246 insertions(+), 6 deletions(-)
Documentation/gpu/xe/xe_eudebug.rst +3 -0
index c21fa7c47ab8..e191e2c8ded4 100644
@@ -54,3 +54,6 @@ Resource Event Types
 
 .. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
    :identifiers: drm_xe_eudebug_event_vm
+
+.. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
+   :identifiers: drm_xe_eudebug_event_exec_queue
drivers/gpu/drm/xe/xe_device.c +11 -2
index 326d61407dc2..02ab8b307c9f 100644
@@ -112,6 +112,7 @@ static int xe_file_open(struct drm_device *dev, struct drm_file *file)
 
 #if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
 	INIT_LIST_HEAD(&xef->eudebug.target_link);
+	init_rwsem(&xef->eudebug.ioctl_lock);
 #endif
 
 	file->driver_priv = xef;
@@ -236,8 +237,12 @@ static long xe_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
 	ACQUIRE(xe_pm_runtime_ioctl, pm)(xe);
 	ret = ACQUIRE_ERR(xe_pm_runtime_ioctl, &pm);
-	if (ret >= 0)
+	if (ret >= 0) {
+		bool lock = xe_eudebug_discovery_lock(file, cmd);
 		ret = drm_ioctl(file, cmd, arg);
+		if (lock)
+			xe_eudebug_discovery_unlock(file, cmd);
+	}
 
 	return ret;
 }
@@ -254,8 +259,12 @@ static long xe_drm_compat_ioctl(struct file *file, unsigned int cmd, unsigned lo
 
 	ACQUIRE(xe_pm_runtime_ioctl, pm)(xe);
 	ret = ACQUIRE_ERR(xe_pm_runtime_ioctl, &pm);
-	if (ret >= 0)
+	if (ret >= 0) {
+		bool lock = xe_eudebug_discovery_lock(file, cmd);
 		ret = drm_compat_ioctl(file, cmd, arg);
+		if (lock)
+			xe_eudebug_discovery_unlock(file, cmd);
+	}
 
 	return ret;
 }
drivers/gpu/drm/xe/xe_device.h +42 -0

52 lines not on this page · raw message

drivers/gpu/drm/xe/xe_device_types.h +6 -0
index 3981473b8b12..b7f140932588 100644
@@ -587,6 +587,9 @@ struct xe_device {
 
 		/** @eudebug.lock: protects state and targets */
 		struct mutex lock;
+
+		/** @wq: used for client discovery */
+		struct workqueue_struct *wq;
 	} eudebug;
 #endif
 };
@@ -659,6 +662,9 @@ struct xe_file {
 
 		/** @target_link: link into xe_device.eudebug.targets */
 		struct list_head target_link;
+
+		/** @eudebug.ioctl_lock syncing ioctl access */
+		struct rw_semaphore ioctl_lock;
 	} eudebug;
 #endif
 };
drivers/gpu/drm/xe/xe_eudebug.c +116 -2

212 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug.h +11 -0
index 511decdf0e34..c0d4ccd5f44f 100644
@@ -13,6 +13,7 @@ struct drm_file;
 struct xe_device;
 struct xe_file;
 struct xe_vm;
+struct xe_exec_queue;
 
 #if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
 
@@ -46,6 +47,13 @@ void xe_eudebug_vm_create(struct xe_file *xef, u32 id);
 void xe_eudebug_vm_destroy(struct xe_file *xef, struct xe_vm *vm);
 int xe_eudebug_enable(struct xe_device *xe, bool enable);
 
+struct xe_eudebug *xe_eudebug_get_nolock(struct xe_file *xef);
+struct xe_eudebug *xe_eudebug_get_nolock_with_discovery(struct xe_file *xef);
+void xe_eudebug_put(struct xe_eudebug *d);
+
+void xe_eudebug_exec_queue_create(struct xe_file *xef, u32 id);
+void xe_eudebug_exec_queue_destroy(struct xe_file *xef, struct xe_exec_queue *q);
+
 #else
 
 static inline int xe_eudebug_connect_ioctl(struct drm_device *dev,
@@ -60,6 +68,9 @@ static inline void xe_eudebug_file_close(struct xe_file *xef) { }
 static inline void xe_eudebug_vm_create(struct xe_file *xef, u32 id) { }
 static inline void xe_eudebug_vm_destroy(struct xe_file *xef, struct xe_vm *vm) { }
 
+static inline void xe_eudebug_exec_queue_create(struct xe_file *xef, u32 id) { }
+static inline void xe_eudebug_exec_queue_destroy(struct xe_file *xef, struct xe_exec_queue *q) { }
+
 #endif /* CONFIG_DRM_XE_EUDEBUG */
 
 #endif /* _XE_EUDEBUG_H_ */
drivers/gpu/drm/xe/xe_eudebug_types.h +12 -2
index 4bf29d8f1f16..4ad692008131 100644
@@ -17,6 +17,7 @@
 
 struct xe_device;
 struct task_struct;
+struct workqueue_struct;
 
 /**
  * enum xe_eudebug_state - eudebug capability state
@@ -32,7 +33,7 @@ enum xe_eudebug_state {
 };
 
 #define CONFIG_DRM_XE_DEBUGGER_EVENT_QUEUE_SIZE 64
-#define XE_EUDEBUG_MAX_EVENT_TYPE DRM_XE_EUDEBUG_EVENT_VM
+#define XE_EUDEBUG_MAX_EVENT_TYPE DRM_XE_EUDEBUG_EVENT_EXEC_QUEUE
 
 /**
  * struct xe_eudebug_handle - eudebug resource handle
@@ -63,7 +64,9 @@ struct xe_eudebug_resource {
 };
 
 #define XE_EUDEBUG_RES_TYPE_VM		0
-#define XE_EUDEBUG_RES_TYPE_COUNT	(XE_EUDEBUG_RES_TYPE_VM + 1)
+#define XE_EUDEBUG_RES_TYPE_EXEC_QUEUE	1
+#define XE_EUDEBUG_RES_TYPE_LRC		2
+#define XE_EUDEBUG_RES_TYPE_COUNT	(XE_EUDEBUG_RES_TYPE_LRC + 1)
 
 /**
  * struct xe_eudebug - Top level struct for eudebug: the connection
@@ -102,6 +105,12 @@ struct xe_eudebug {
 	unsigned long flags;
 #define XE_EUDEBUG_READER_ACTIVE 0
 
+	/** @discovery: completion to wait for discovery */
+	struct completion discovery;
+
+	/** @discovery_work: worker to discover resources for target_task */
+	struct work_struct discovery_work;
+
 	/** @events: kfifo queue of to-be-delivered events */
 	struct {
 		/** @lock: guards access to fifo, pending and staging */
@@ -130,3 +139,4 @@ struct xe_eudebug {
 };
 
 #endif /* _XE_EUDEBUG_TYPES_H_ */
+
drivers/gpu/drm/xe/xe_exec_queue.c +5 -0
index 1b5ca3ce578a..1a8d3f5ecc25 100644
@@ -29,6 +29,7 @@
 #include "xe_trace.h"
 #include "xe_vm.h"
 #include "xe_pxp.h"
+#include "xe_eudebug.h"
 
 /**
  * DOC: Execution Queue
@@ -1420,6 +1421,8 @@ int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data,
 
 	args->exec_queue_id = id;
 
+	xe_eudebug_exec_queue_create(xef, id);
+
 	return 0;
 
 del_hw_engine_group:
@@ -1617,6 +1620,8 @@ int xe_exec_queue_destroy_ioctl(struct drm_device *dev, void *data,
 	if (q->vm && q->hwe->hw_engine_group)
 		xe_hw_engine_group_del_exec_queue(q->hwe->hw_engine_group, q);
 
+	xe_eudebug_exec_queue_destroy(xef, q);
+
 	xe_exec_queue_kill(q);
 
 	trace_xe_exec_queue_close(q);
drivers/gpu/drm/xe/xe_hw_engine.h +14 -0
index c3ee37f8cfc0..7319ac0bb91e 100644
@@ -78,4 +78,18 @@ enum xe_force_wake_domains xe_hw_engine_to_fw_domain(struct xe_hw_engine *hwe);
 
 u32 xe_hw_engine_mmio_read32(struct xe_hw_engine *hwe, struct xe_reg reg);
 
+static inline bool xe_engine_supports_eudebug(const enum xe_engine_class ec)
+{
+	if (ec == XE_ENGINE_CLASS_COMPUTE ||
+	    ec == XE_ENGINE_CLASS_RENDER)
+		return true;
+
+	return false;
+}
+
+static inline bool xe_hw_engine_has_eudebug(const struct xe_hw_engine *hwe)
+{
+	return xe_engine_supports_eudebug(hwe->class);
+}
+
 #endif
include/uapi/drm/xe_drm_eudebug.h +26 -0
index cdb4e4af4879..c9f21283ffdf 100644
@@ -45,6 +45,7 @@ struct drm_xe_eudebug_event {
 #define DRM_XE_EUDEBUG_EVENT_NONE		0
 #define DRM_XE_EUDEBUG_EVENT_READ		1
 #define DRM_XE_EUDEBUG_EVENT_VM			2
+#define DRM_XE_EUDEBUG_EVENT_EXEC_QUEUE		3
 
 	/** @flags: Flags */
 	__u16 flags;
@@ -73,6 +74,31 @@ struct drm_xe_eudebug_event_vm {
 	__u64 vm_handle;
 };
 
+/**
+ * struct drm_xe_eudebug_event_exec_queue - Exec Queue resource event
+ *
+ * Resource creation/destruction event for an Exec Queue
+ */
+struct drm_xe_eudebug_event_exec_queue {
+	/** @base: base event */
+	struct drm_xe_eudebug_event base;
+
+	/** @vm_handle: the vm handle this exec queue belongs to */
+	__u64 vm_handle;
+
+	/** @exec_queue_handle: unique handle for this exec queue */
+	__u64 exec_queue_handle;
+
+	/** @engine_class: engine class for the exec queue */
+	__u32 engine_class;
+
+	/** @width: width of exec queue, how many lrcs (handles) it has */
+	__u32 width;
+
+	/** @lrc_handle: array of lrc handles */
+	__u64 lrc_handle[];
+};
+
 #if defined(__cplusplus)
 }
 #endif
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/18 drm/xe: Add EUDEBUG_ENABLE exec queue property

In reply to Mika Kuoppala

From: Dominik Grzegorzek <[email protected]>

This patch introduces an immutable eudebug property for exec_queues, using a flags value to enable eudebug-specific features. For now, the engine LRC uses this flag to enable the runalone hardware feature. Runalone ensures that only one hardware engine in a group [rcs0, ccs0-3] is active on a tile.

v2: - check CONFIG_DRM_XE_EUDEBUG and LR mode (Matthew)
- disable preempt (Dominik)
- lrc_create remove from engine init

v3: - remove redundant runalone setup (Sashiko)

---
 drivers/gpu/drm/xe/xe_exec_queue.c       | 46 +++++++++++++++++++++++-
 drivers/gpu/drm/xe/xe_exec_queue.h       | 19 ++++++++++
 drivers/gpu/drm/xe/xe_exec_queue_types.h |  7 ++++
 include/uapi/drm/xe_drm.h                |  2 ++
 4 files changed, 73 insertions(+), 1 deletion(-)
drivers/gpu/drm/xe/xe_exec_queue.c +45 -1
index 1a8d3f5ecc25..496ca0300dd4 100644
@@ -361,6 +361,9 @@ static int __xe_exec_queue_init(struct xe_exec_queue *q, u32 exec_queue_flags)
 	if (q->flags & EXEC_QUEUE_FLAG_DISABLE_STATE_CACHE_PERF_FIX)
 		flags |= XE_LRC_DISABLE_STATE_CACHE_PERF_FIX;
 
+	if (q->eudebug_flags & EXEC_QUEUE_EUDEBUG_FLAG_ENABLE)
+		flags |= XE_LRC_CREATE_RUNALONE;
+
 	err = q->ops->init(q);
 	if (err)
 		return err;
@@ -993,6 +996,45 @@ static int exec_queue_set_state_cache_perf_fix(struct xe_device *xe, struct xe_e
 	return 0;
 }
 
+static int exec_queue_set_eudebug(struct xe_device *xe, struct xe_exec_queue *q,
+				  u64 value)
+{
+	const u64 known_flags = DRM_XE_EXEC_QUEUE_EUDEBUG_FLAG_ENABLE;
+
+	if (XE_IOCTL_DBG(xe, (q->class != XE_ENGINE_CLASS_RENDER &&
+			      q->class != XE_ENGINE_CLASS_COMPUTE)))
+		return -EINVAL;
+
+	if (XE_IOCTL_DBG(xe, (value & ~known_flags)))
+		return -EINVAL;
+
+	if (XE_IOCTL_DBG(xe, !IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)))
+		return -EOPNOTSUPP;
+
+	if (XE_IOCTL_DBG(xe, !xe_exec_queue_is_lr(q)))
+		return -EINVAL;
+	/*
+	 * We want to explicitly set the global feature if
+	 * property is set.
+	 */
+	if (XE_IOCTL_DBG(xe,
+			 !(value & DRM_XE_EXEC_QUEUE_EUDEBUG_FLAG_ENABLE)))
+		return -EINVAL;
+
+	if (XE_IOCTL_DBG(xe, !xe_eudebug_is_enabled(xe)))
+		return -EPERM;
+
+	q->eudebug_flags = EXEC_QUEUE_EUDEBUG_FLAG_ENABLE;
+	q->sched_props.preempt_timeout_us = 0;
+
+	return 0;
+}
+
+int xe_exec_queue_is_debuggable(struct xe_exec_queue *q)
+{
+	return q->eudebug_flags & EXEC_QUEUE_EUDEBUG_FLAG_ENABLE;
+}
+
 typedef int (*xe_exec_queue_set_property_fn)(struct xe_device *xe,
 					     struct xe_exec_queue *q,
 					     u64 value);
@@ -1007,6 +1049,7 @@ static const xe_exec_queue_set_property_fn exec_queue_set_property_funcs[] = {
 							exec_queue_set_multi_queue_priority,
 	[DRM_XE_EXEC_QUEUE_SET_DISABLE_STATE_CACHE_PERF_FIX] =
 							exec_queue_set_state_cache_perf_fix,
+	[DRM_XE_EXEC_QUEUE_SET_PROPERTY_EUDEBUG] = exec_queue_set_eudebug,
 };
 
 /**
@@ -1103,7 +1146,8 @@ static int exec_queue_user_ext_set_property(struct xe_device *xe,
 			 ext.property != DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE &&
 			 ext.property != DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_GROUP &&
 			 ext.property != DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY &&
-			 ext.property != DRM_XE_EXEC_QUEUE_SET_DISABLE_STATE_CACHE_PERF_FIX))
+			 ext.property != DRM_XE_EXEC_QUEUE_SET_DISABLE_STATE_CACHE_PERF_FIX &&
+			 ext.property != DRM_XE_EXEC_QUEUE_SET_PROPERTY_EUDEBUG))
 		return -EINVAL;
 
 	idx = array_index_nospec(ext.property, ARRAY_SIZE(exec_queue_set_property_funcs));
drivers/gpu/drm/xe/xe_exec_queue.h +19 -0
index 0225426c57b0..f7babd1e2940 100644
@@ -162,4 +162,23 @@ int xe_exec_queue_contexts_hwsp_rebase(struct xe_exec_queue *q, void *scratch);
 struct xe_lrc *xe_exec_queue_lrc(struct xe_exec_queue *q);
 struct xe_lrc *xe_exec_queue_get_lrc(struct xe_exec_queue *q, u16 idx);
 
+/**
+ * xe_exec_queue_idle_skip_suspend() - Can exec queue skip suspend
+ * @q: The exec_queue
+ *
+ * If an exec queue is not parallel and is idle, the suspend steps can be
+ * skipped in the submission backend immediatley signaling the suspend fence.
+ * Parallel queues cannot skip this step due to limitations in the submission
+ * backend.
+ *
+ * Return: True if exec queue is idle and can skip suspend steps, False
+ * otherwise
+ */
+static inline bool xe_exec_queue_idle_skip_suspend(struct xe_exec_queue *q)
+{
+	return !xe_exec_queue_is_parallel(q) && xe_exec_queue_is_idle(q);
+}
+
+int xe_exec_queue_is_debuggable(struct xe_exec_queue *q);
+
 #endif
drivers/gpu/drm/xe/xe_exec_queue_types.h +7 -0
index 2f5ccf294675..10be00a3a7af 100644
@@ -143,6 +143,13 @@ struct xe_exec_queue {
 	 */
 	unsigned long flags;
 
+	/**
+	 * @eudebug_flags: immutable eudebug flags for this exec queue.
+	 * Set up with DRM_XE_EXEC_QUEUE_SET_PROPERTY_EUDEBUG.
+	 */
+#define EXEC_QUEUE_EUDEBUG_FLAG_ENABLE		BIT(0)
+	unsigned long eudebug_flags;
+
 	union {
 		/** @multi_gt_list: list head for VM bind engines if multi-GT */
 		struct list_head multi_gt_list;
include/uapi/drm/xe_drm.h +2 -0
index bfd7cbfd2ff5..065966a0f271 100644
@@ -1442,6 +1442,8 @@ struct drm_xe_exec_queue_create {
 #define     DRM_XE_MULTI_GROUP_CREATE				(1ull << 63)
 #define   DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY	5
 #define   DRM_XE_EXEC_QUEUE_SET_DISABLE_STATE_CACHE_PERF_FIX	6
+#define   DRM_XE_EXEC_QUEUE_SET_PROPERTY_EUDEBUG		7
+#define     DRM_XE_EXEC_QUEUE_EUDEBUG_FLAG_ENABLE		(1 << 0)
 	/** @extensions: Pointer to the first extension struct, if any */
 	__u64 extensions;
 
Signature · 1 line
2.43.0
#6 lore raw

PATCH 6/18 drm/xe/eudebug: Introduce exec_queue events

In reply to Mika Kuoppala

From: Dominik Grzegorzek <[email protected]>

Add events to inform the debugger about the creation and destruction of exec_queues. Use user engine class types instead of the internal xe_engine_class enum in exec_queue events. During discovery, only advertise exec_queues with render or compute class,excluding others.

v2: - Only track long running queues
- Checkpatch (Tilak)
v3: __counted_by added
v4: - use helpers for filtering engines (Mika)
v5: - fix lrc handles memcpy size bug (Mika)
v6: - lookup for create event (Sashiko)
- defer engine class lookup (Sashiko)
- avoid uninitialized read on adding handle (Sashiko)
- too strict warn on q->width check (Sashiko)

---
 drivers/gpu/drm/xe/xe_eudebug.c | 240 +++++++++++++++++++++++++++++++-
 1 file changed, 236 insertions(+), 4 deletions(-)
drivers/gpu/drm/xe/xe_eudebug.c +236 -4
index 799b34db8f9d..95d589101fd5 100644
@@ -431,6 +431,28 @@ __find_handle(struct xe_eudebug_resource *r,
 	return h;
 }
 
+static int find_handle(struct xe_eudebug *d,
+		       const int type,
+		       const void *p)
+{
+	const u64 key = (uintptr_t)p;
+	struct xe_eudebug_resource *r;
+	struct xe_eudebug_handle *h;
+	int id;
+
+	if (XE_WARN_ON(!key))
+		return -EINVAL;
+
+	r = resource_from_type(d, type);
+
+	mutex_lock(&r->lock);
+	h = __find_handle(r, key);
+	id = h ? h->id : -ENOENT;
+	mutex_unlock(&r->lock);
+
+	return id;
+}
+
 static int _xe_eudebug_add_handle(struct xe_eudebug *d,
 				  int type,
 				  void *p,
@@ -699,6 +721,206 @@ void xe_eudebug_vm_destroy(struct xe_file *xef, struct xe_vm *vm)
 	xe_eudebug_put(d);
 }
 
+static const u16 xe_to_user_engine_class[] = {
+	[XE_ENGINE_CLASS_RENDER] = DRM_XE_ENGINE_CLASS_RENDER,
+	[XE_ENGINE_CLASS_COPY] = DRM_XE_ENGINE_CLASS_COPY,
+	[XE_ENGINE_CLASS_VIDEO_DECODE] = DRM_XE_ENGINE_CLASS_VIDEO_DECODE,
+	[XE_ENGINE_CLASS_VIDEO_ENHANCE] = DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE,
+	[XE_ENGINE_CLASS_COMPUTE] = DRM_XE_ENGINE_CLASS_COMPUTE,
+};
+
+static int send_exec_queue_event(struct xe_eudebug *d, u32 flags,
+				 u64 vm_handle, u64 exec_queue_handle,
+				 enum xe_engine_class class,
+				 u32 width, u64 *lrc_handles, u64 seqno)
+{
+	struct drm_xe_eudebug_event *event;
+	struct drm_xe_eudebug_event_exec_queue *e;
+	const u32 sz = struct_size(e, lrc_handle, width);
+	u32 xe_engine_class;
+	int err;
+
+	if (!xe_engine_supports_eudebug(class))
+		return -EINVAL;
+
+	xe_engine_class = xe_to_user_engine_class[class];
+
+	spin_lock(&d->events.lock);
+	event = xe_eudebug_prepare_event(d, DRM_XE_EUDEBUG_EVENT_EXEC_QUEUE,
+					 seqno, flags, sz);
+	e = cast_event(e, event);
+
+	e->vm_handle = vm_handle;
+	e->exec_queue_handle = exec_queue_handle;
+	e->engine_class = xe_engine_class;
+	e->width = width;
+
+	memcpy(e->lrc_handle, lrc_handles, width * sizeof(u64));
+
+	err = xe_eudebug_queue_event(d, event);
+	spin_unlock(&d->events.lock);
+
+	if (err)
+		xe_eudebug_disconnect(d, err);
+
+	return err;
+}
+
+static int exec_queue_create_event(struct xe_eudebug *d,
+				   struct xe_file *xef, struct xe_exec_queue *q)
+{
+	int h_vm, h_queue;
+	u64 h_lrc[XE_HW_ENGINE_MAX_INSTANCE], seqno;
+	int i;
+	int ret;
+
+	if (!xe_exec_queue_is_debuggable(q))
+		return 0;
+
+	h_vm = find_handle(d, XE_EUDEBUG_RES_TYPE_VM, q->vm);
+	if (h_vm < 0)
+		return h_vm;
+
+	if (XE_WARN_ON(q->width > XE_HW_ENGINE_MAX_INSTANCE))
+		return -EINVAL;
+
+	ret = 0;
+	for (i = 0; i < q->width; i++) {
+		int h;
+
+		ret = _xe_eudebug_add_handle(d,
+					     XE_EUDEBUG_RES_TYPE_LRC,
+					     q->lrc[i],
+					     NULL,
+					     &h);
+
+		if (ret < 0)
+			break;
+
+		XE_WARN_ON(!h);
+
+		h_lrc[i] = h;
+	}
+
+	if (ret < 0)
+		return ret;
+
+	h_queue = xe_eudebug_add_handle(d, XE_EUDEBUG_RES_TYPE_EXEC_QUEUE, q, &seqno);
+	if (h_queue <= 0)
+		return h_queue;
+
+	/* No need to cleanup for added handles on error as if we fail
+	 * we disconnect
+	 */
+
+	ret = send_exec_queue_event(d, DRM_XE_EUDEBUG_EVENT_CREATE,
+				    h_vm, h_queue, q->class,
+				    q->width, h_lrc, seqno);
+
+	if (ret)
+		eu_dbg(d, "send_exec_queue_event create error %d", ret);
+
+	return ret;
+}
+
+static int exec_queue_destroy_event(struct xe_eudebug *d,
+				    struct xe_file *xef,
+				    struct xe_exec_queue *q)
+{
+	int h_vm, h_queue;
+	u64 h_lrc[XE_HW_ENGINE_MAX_INSTANCE], seqno;
+	int i;
+	int ret, err = 0;
+
+	if (!xe_exec_queue_is_debuggable(q))
+		return 0;
+
+	h_vm = find_handle(d, XE_EUDEBUG_RES_TYPE_VM, q->vm);
+	if (h_vm < 0)
+		return h_vm;
+
+	if (XE_WARN_ON(q->width > XE_HW_ENGINE_MAX_INSTANCE))
+		return -EINVAL;
+
+	for (i = 0; i < q->width; i++) {
+		ret = _xe_eudebug_remove_handle(d,
+						XE_EUDEBUG_RES_TYPE_LRC,
+						q->lrc[i],
+						NULL);
+		if (ret < 0) {
+			XE_WARN_ON(ret != -ENOENT);
+			if (!err)
+				err = ret;
+			h_lrc[i] = 0;
+			continue;
+		}
+
+		XE_WARN_ON(!ret);
+		h_lrc[i] = ret;
+	}
+
+	if (err)
+		return err;
+
+	h_queue = xe_eudebug_remove_handle(d,
+					   XE_EUDEBUG_RES_TYPE_EXEC_QUEUE,
+					   q,
+					   &seqno);
+	if (h_queue <= 0)
+		return h_queue;
+
+	ret = send_exec_queue_event(d, DRM_XE_EUDEBUG_EVENT_DESTROY,
+				    h_vm, h_queue, q->class,
+				    q->width, h_lrc, seqno);
+
+	if (ret)
+		eu_dbg(d, "send_exec_queue_event destroy error %d\n", ret);
+
+	return ret;
+}
+
+void xe_eudebug_exec_queue_create(struct xe_file *xef, u32 id)
+{
+	struct xe_exec_queue *q;
+	struct xe_eudebug *d;
+	int err;
+
+	q = xe_exec_queue_lookup(xef, id);
+	if (!q)
+		return;
+
+	if (xe_engine_supports_eudebug(q->class)) {
+		d = xe_eudebug_get(xef);
+		if (d) {
+			err = exec_queue_create_event(d, xef, q);
+			if (err)
+				xe_eudebug_disconnect(d, err);
+			xe_eudebug_put(d);
+		}
+	}
+
+	xe_exec_queue_put(q);
+}
+
+void xe_eudebug_exec_queue_destroy(struct xe_file *xef, struct xe_exec_queue *q)
+{
+	struct xe_eudebug *d;
+	int err;
+
+	if (!xe_engine_supports_eudebug(q->class))
+		return;
+
+	d = xe_eudebug_get(xef);
+	if (!d)
+		return;
+
+	err = exec_queue_destroy_event(d, xef, q);
+	if (err)
+		xe_eudebug_disconnect(d, err);
+
+	xe_eudebug_put(d);
+}
+
 static struct xe_file *xe_eudebug_target_get(struct xe_eudebug *d)
 {
 	struct xe_file *xef = NULL;
@@ -714,9 +936,10 @@ static struct xe_file *xe_eudebug_target_get(struct xe_eudebug *d)
 static void discover_client(struct xe_eudebug *d)
 {
 	struct xe_file *xef;
+	struct xe_exec_queue *q;
 	struct xe_vm *vm;
 	unsigned long i;
-	unsigned int vm_count = 0;
+	unsigned int vm_count = 0, eq_count = 0;
 	int err = 0;
 
 	xef = xe_eudebug_target_get(d);
@@ -737,6 +960,15 @@ static void discover_client(struct xe_eudebug *d)
 		vm_count++;
 	}
 
+	xa_for_each(&xef->exec_queue.xa, i, q) {
+		if (!xe_engine_supports_eudebug(q->class))
+			continue;
+
+		err = exec_queue_create_event(d, xef, q);
+		if (err)
+			goto out;
+	}
+
 out:
 	complete_all(&d->discovery);
 
@@ -744,9 +976,9 @@ static void discover_client(struct xe_eudebug *d)
 
 	up_write(&xef->eudebug.ioctl_lock);
 
-	if (vm_count)
-		eu_dbg(d, "Discovery found %u vms",
-		       vm_count);
+	if (vm_count || eq_count)
+		eu_dbg(d, "Discovery found %u vms, %u exec_queues",
+		       vm_count, eq_count);
 
 	xe_file_put(xef);
 }
Signature · 1 line
2.43.0
#7 lore raw

PATCH 7/18 drm/xe/eudebug: Mark guc contexts as debuggable

In reply to Mika Kuoppala

We need to inform to guc which contexts are debuggable as their handling is different from ordinary contexts.

v2: void return, use xe_gt_dbg, no need for lrc (Matt)
v3: add the workaround enabling (Daniele)
v4: version needed to 70.49.4
v5: bail out early before registering eq (Daniele)
v6: export the guc action for future (Mika)
v7: remove redundant xe_gt_info (Sashiko)

---
 drivers/gpu/drm/xe/abi/guc_actions_abi.h |  5 ++++
 drivers/gpu/drm/xe/abi/guc_klvs_abi.h    |  1 +
 drivers/gpu/drm/xe/xe_exec_queue.c       |  5 ++++
 drivers/gpu/drm/xe/xe_guc.c              | 13 +++++++++
 drivers/gpu/drm/xe/xe_guc.h              |  3 +++
 drivers/gpu/drm/xe/xe_guc_ads.c          | 17 ++++++++++++
 drivers/gpu/drm/xe/xe_guc_submit.c       | 34 ++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_guc_submit.h       |  1 +
 drivers/gpu/drm/xe/xe_wa_oob.rules       |  3 ++-
 9 files changed, 81 insertions(+), 1 deletion(-)
drivers/gpu/drm/xe/abi/guc_actions_abi.h +5 -0
index 83a6e7794982..918247d1f526 100644
@@ -161,6 +161,7 @@ enum xe_guc_action {
 	XE_GUC_ACTION_NOTIFY_FLUSH_LOG_BUFFER_TO_FILE = 0x8003,
 	XE_GUC_ACTION_NOTIFY_CRASH_DUMP_POSTED = 0x8004,
 	XE_GUC_ACTION_NOTIFY_EXCEPTION = 0x8005,
+	XE_GUC_ACTION_EU_KERNEL_DEBUG = 0x8006,
 	XE_GUC_ACTION_TEST_G2G_SEND = 0xF001,
 	XE_GUC_ACTION_TEST_G2G_RECV = 0xF002,
 	XE_GUC_ACTION_LIMIT
@@ -284,4 +285,8 @@ enum xe_guc_g2g_type {
 /* invalid type for XE_GUC_ACTION_NOTIFY_MEMORY_CAT_ERROR */
 #define XE_GUC_CAT_ERR_TYPE_INVALID 0xdeadbeef
 
+enum  xe_guc_eu_kernel_debug_request_type {
+	XE_GUC_EU_KERNEL_DEBUG_ENABLE = 0x3,
+};
+
 #endif
drivers/gpu/drm/xe/abi/guc_klvs_abi.h +1 -0
index 644f5a4226d7..4cca653e37a1 100644
@@ -504,6 +504,7 @@ enum xe_guc_klv_ids {
 	GUC_WA_KLV_RESET_BB_STACK_PTR_ON_VF_SWITCH					= 0x900b,
 	GUC_WA_KLV_RESTORE_UNSAVED_MEDIA_CONTROL_REG					= 0x900c,
 	GUC_WA_KLV_CLR_CS_INDIRECT_RING_STATE_IF_IDLE_AT_CTX_REG			= 0x900e,
+	GUC_WA_KLV_RESET_DEP_ENGINES_ON_DEBUG_CTX_SWITCH				= 0x900d,
 };
 
 #endif
drivers/gpu/drm/xe/xe_exec_queue.c +5 -0
index 496ca0300dd4..1ea5ba57d007 100644
@@ -19,6 +19,7 @@
 #include "xe_gt.h"
 #include "xe_gt_sriov_pf.h"
 #include "xe_gt_sriov_vf.h"
+#include "xe_guc.h"
 #include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_engine_group.h"
 #include "xe_irq.h"
@@ -1000,6 +1001,7 @@ static int exec_queue_set_eudebug(struct xe_device *xe, struct xe_exec_queue *q,
 				  u64 value)
 {
 	const u64 known_flags = DRM_XE_EXEC_QUEUE_EUDEBUG_FLAG_ENABLE;
+	struct xe_guc *guc = &q->gt->uc.guc;
 
 	if (XE_IOCTL_DBG(xe, (q->class != XE_ENGINE_CLASS_RENDER &&
 			      q->class != XE_ENGINE_CLASS_COMPUTE)))
@@ -1011,6 +1013,9 @@ static int exec_queue_set_eudebug(struct xe_device *xe, struct xe_exec_queue *q,
 	if (XE_IOCTL_DBG(xe, !IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)))
 		return -EOPNOTSUPP;
 
+	if (XE_IOCTL_DBG(xe, !xe_guc_has_debug_contexts(guc)))
+		return -EOPNOTSUPP;
+
 	if (XE_IOCTL_DBG(xe, !xe_exec_queue_is_lr(q)))
 		return -EINVAL;
 	/*
drivers/gpu/drm/xe/xe_guc.c +13 -0
index 4023700ff2a9..314e1fb6e278 100644
@@ -1846,6 +1846,19 @@ bool xe_guc_using_main_gamctrl_queues(struct xe_guc *guc)
 	return GT_VER(gt) >= 35;
 }
 
+bool xe_guc_has_debug_contexts(struct xe_guc *guc)
+{
+	const struct xe_uc_fw_version required =
+		XE_UC_FW_VERSION_DEBUG_CONTEXTS;
+	const struct xe_uc_fw_version *version =
+		&guc->fw.versions.found[XE_UC_FW_VER_RELEASE];
+
+	if (MAKE_GUC_VER_STRUCT(*version) < MAKE_GUC_VER_STRUCT(required))
+		return false;
+
+	return true;
+}
+
 #if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
 #include "tests/xe_guc_g2g_test.c"
 #endif
drivers/gpu/drm/xe/xe_guc.h +3 -0
index 02514914f404..9c6b3845d0bc 100644
@@ -29,6 +29,8 @@
 #define GUC_FIRMWARE_VER_AT_LEAST(guc, ver...) \
 	xe_guc_fw_version_at_least((guc), MAKE_GUC_VER_ARGS(ver))
 
+#define XE_UC_FW_VERSION_DEBUG_CONTEXTS { .major = 70, .minor = 49, .patch = 4 }
+
 struct drm_printer;
 
 void xe_guc_comm_init_early(struct xe_guc *guc);
@@ -62,6 +64,7 @@ void xe_guc_stop(struct xe_guc *guc);
 int xe_guc_start(struct xe_guc *guc);
 void xe_guc_declare_wedged(struct xe_guc *guc);
 bool xe_guc_using_main_gamctrl_queues(struct xe_guc *guc);
+bool xe_guc_has_debug_contexts(struct xe_guc *guc);
 
 #if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
 int xe_guc_g2g_test_notification(struct xe_guc *guc, u32 *payload, u32 len);
drivers/gpu/drm/xe/xe_guc_ads.c +17 -0
index c98454545a85..7f9b4c9de6ed 100644
@@ -364,6 +364,23 @@ static void guc_waklv_init(struct xe_guc_ads *ads)
 		guc_waklv_enable(ads, NULL, 0, &offset, &remain,
 				 GUC_WA_KLV_CLR_CS_INDIRECT_RING_STATE_IF_IDLE_AT_CTX_REG);
 
+#if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
+	if (XE_GT_WA(gt, 14022766366)) {
+		if (xe_guc_has_debug_contexts(&gt->uc.guc)) {
+			guc_waklv_enable(ads, NULL, 0, &offset, &remain,
+					 GUC_WA_KLV_RESET_DEP_ENGINES_ON_DEBUG_CTX_SWITCH);
+		} else  {
+			const struct xe_uc_fw_version required =
+				XE_UC_FW_VERSION_DEBUG_CONTEXTS;
+
+			xe_gt_info(gt, "eudebug needs GuC version %u.%u.%u or greater\n",
+				   required.major,
+				   required.minor,
+				   required.patch);
+		}
+	}
+#endif
+
 	size = guc_ads_waklv_size(ads) - remain;
 	if (!size)
 		return;
drivers/gpu/drm/xe/xe_guc_submit.c +34 -0
index 4b247a3019d2..0b45c78d7b34 100644
@@ -967,6 +967,37 @@ static void __register_exec_queue(struct xe_guc *guc,
 	xe_guc_ct_send(&guc->ct, action, ARRAY_SIZE(action), 0, 0);
 }
 
+int xe_guc_action_eu_kernel_debug(struct xe_guc *guc, u32 id, u32 cmd)
+{
+	const u32 action[] = {
+		XE_GUC_ACTION_EU_KERNEL_DEBUG,
+		id,
+		cmd,
+		0, /* reserved */
+	};
+
+	return xe_guc_ct_send(&guc->ct, action,
+			      ARRAY_SIZE(action), 0, 0);
+}
+
+static void set_eu_kernel_debug(struct xe_exec_queue *q)
+{
+	struct xe_guc *guc = exec_queue_to_guc(q);
+	struct xe_gt *gt = guc_to_gt(guc);
+	int ret;
+
+	ret = xe_guc_action_eu_kernel_debug(guc, q->guc->id,
+					    XE_GUC_EU_KERNEL_DEBUG_ENABLE);
+
+	if (ret)
+		xe_gt_warn(gt,
+			   "GuC ctx=%u debug enabling failed with %d",
+			   q->guc->id, ret);
+	else
+		xe_gt_dbg(gt,
+			  "GuC ctx=%u enabled for debug", q->guc->id);
+}
+
 static void register_exec_queue(struct xe_exec_queue *q, int ctx_type)
 {
 	struct xe_guc *guc = exec_queue_to_guc(q);
@@ -1027,6 +1058,9 @@ static void register_exec_queue(struct xe_exec_queue *q, int ctx_type)
 
 	if (xe_exec_queue_is_multi_queue_secondary(q))
 		guc_exec_queue_send_cgp_sync(q);
+
+	if (xe_exec_queue_is_debuggable(q))
+		set_eu_kernel_debug(q);
 }
 
 static u32 wq_space_until_wrap(struct xe_exec_queue *q)
drivers/gpu/drm/xe/xe_guc_submit.h +1 -0
index b3839a90c142..d296e30f9e39 100644
@@ -55,5 +55,6 @@ void xe_guc_register_vf_exec_queue(struct xe_exec_queue *q, int ctx_type);
 bool xe_guc_has_registered_mlrc_queues(struct xe_guc *guc);
 
 int xe_guc_contexts_hwsp_rebase(struct xe_guc *guc, void *scratch);
+int xe_guc_action_eu_kernel_debug(struct xe_guc *guc, u32 id, u32 cmd);
 
 #endif
drivers/gpu/drm/xe/xe_wa_oob.rules +2 -1
index f8a185103b80..445ba0d19051 100644
@@ -62,6 +62,7 @@
 15015404425_disable	PLATFORM(PANTHERLAKE), MEDIA_STEP(B0, FOREVER)
 16026007364    MEDIA_VERSION(3000)
 14020316580    MEDIA_VERSION(1301)
-
 14025883347	MEDIA_VERSION_RANGE(1301, 3503)
 		GRAPHICS_VERSION_RANGE(2004, 3005)
+14022766366	GRAPHICS_VERSION_RANGE(2001, 2004)
+		GRAPHICS_VERSION_RANGE(3000, 3005)
Signature · 1 line
2.43.0
#8 lore raw

PATCH 8/18 drm/xe: Introduce ADD_DEBUG_DATA and REMOVE_DEBUG_DATA vm bind ops

In reply to Mika Kuoppala

From: Christoph Manszewski <[email protected]>

Make it possible to add and remove per vm debug data, which can be used to annotate vm ranges (using pseudopaths) or to associate them with a file which can carry arbitrary debug data (e.g. binary instruction to code line mapping). The debug data is kept separe from the vmas. Each address can be associated with only one debug data entry i.e. debug data entries cannot overlap. Each entry is atomic so to remove it the creation address and range has to be passed for removal.

For debug data manipulation only the 'op' and 'extensions' field from 'struct drm_xe_vm_bind_op' is used. All required parameters are passed through 'struct drm_xe_vm_bind_op_ext_debug_data' and a valid instance should be present in the extension chain pointed by the 'extensions' field.

Debug data will be accessible through the eudebug event interface, introduced in the following patch. An alternative way to access debug data using debugfs, without relying on eudebug, will be proposed as a follow-up to the eudebug series.

v2: enforce empty path on unmap (Joonas, Mika)
v3: - fix overflow, deny zero ranges, null str for empty check (Sashiko)
- fix TOCTOUs and list handling issues (Sashiko)

Assisted-by Claude:Opus-4.6
---
 drivers/gpu/drm/xe/Makefile              |   1 +
 drivers/gpu/drm/xe/xe_debug_data.c       | 385 +++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_debug_data.h       |  22 ++
 drivers/gpu/drm/xe/xe_debug_data_types.h |  25 ++
 drivers/gpu/drm/xe/xe_vm.c               | 157 ++++++++-
 drivers/gpu/drm/xe/xe_vm_types.h         |  19 ++
 include/uapi/drm/xe_drm.h                |  64 ++++
 7 files changed, 667 insertions(+), 6 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_debug_data.c
 create mode 100644 drivers/gpu/drm/xe/xe_debug_data.h
 create mode 100644 drivers/gpu/drm/xe/xe_debug_data_types.h
drivers/gpu/drm/xe/Makefile +1 -0
index 7212ceb339ab..97c721cd32aa 100644
@@ -35,6 +35,7 @@ $(obj)/generated/%_device_wa_oob.c $(obj)/generated/%_device_wa_oob.h: $(obj)/xe
 xe-y += xe_bb.o \
 	xe_bo.o \
 	xe_bo_evict.o \
+	xe_debug_data.o \
 	xe_dep_scheduler.o \
 	xe_devcoredump.o \
 	xe_device.o \
drivers/gpu/drm/xe/xe_debug_data.c new file +385 -0

385 lines not on this page · raw message

drivers/gpu/drm/xe/xe_debug_data.h new file +22 -0
new file mode 100644
index 000000000000..0c0089a427a0
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2025 Intel Corporation
+ */
+
+#ifndef _XE_DEBUG_DATA_H_
+#define _XE_DEBUG_DATA_H_
+
+#include <linux/types.h>
+
+struct drm_gpuva_ops;
+struct xe_vm;
+struct xe_vma_op;
+
+const char *xe_debug_data_pseudo_path_to_string(u64 pseudopath);
+int xe_debug_data_check_extension(struct xe_vm *vm, u32 operation, u64 extension);
+int xe_debug_data_process_extension(struct xe_vm *vm, struct drm_gpuva_ops *ops, u32 operation,
+				    u64 extension);
+int xe_debug_data_op_unwind(struct xe_vm *vm, struct xe_vma_op *vma_op);
+void xe_debug_data_destroy(struct xe_vm *vm);
+
+#endif /* _XE_DEBUG_DATA_H_ */
drivers/gpu/drm/xe/xe_debug_data_types.h new file +25 -0
new file mode 100644
index 000000000000..a8b430af2275
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2025 Intel Corporation
+ */
+
+#ifndef _XE_DEBUG_DATA_TYPES_H_
+#define _XE_DEBUG_DATA_TYPES_H_
+
+#include <linux/limits.h>
+#include <linux/list.h>
+#include <linux/types.h>
+
+struct xe_debug_data {
+	struct list_head link;
+	u64 addr;
+	u64 range;
+	u64 flags;
+	u32 offset;
+	union {
+		u64 pseudopath;
+		char pathname[PATH_MAX];
+	};
+};
+
+#endif /* _XE_DEBUG_DATA_TYPES_H_ */
drivers/gpu/drm/xe/xe_vm.c +151 -6

279 lines not on this page · raw message

drivers/gpu/drm/xe/xe_vm_types.h +19 -0
index 635ed29b9a69..d24e594e7c33 100644
@@ -15,6 +15,7 @@
 #include <linux/mmu_notifier.h>
 #include <linux/scatterlist.h>
 
+#include "xe_debug_data_types.h"
 #include "xe_device_types.h"
 #include "xe_pt_types.h"
 #include "xe_range_fence.h"
@@ -406,6 +407,12 @@ struct xe_vm {
 	bool batch_invalidate_tlb;
 	/** @xef: Xe file handle for tracking this VM's drm client */
 	struct xe_file *xef;
+
+	/** @debug_data: track debug_data mapped to vm */
+	struct {
+		struct list_head list;
+		struct mutex lock;
+	} debug_data;
 };
 
 /** struct xe_vma_op_map - VMA map operation */
@@ -479,6 +486,12 @@ struct xe_vma_op_prefetch_range {
 	struct drm_pagemap *dpagemap;
 };
 
+/** struct xe_vma_op_debug_data - debug data altering operation */
+struct xe_vma_op_modify_debug_data {
+	/** @debug_data: debug data associated with that operation */
+	struct xe_debug_data debug_data;
+};
+
 /** enum xe_vma_op_flags - flags for VMA operation */
 enum xe_vma_op_flags {
 	/** @XE_VMA_OP_COMMITTED: VMA operation committed */
@@ -495,6 +508,10 @@ enum xe_vma_subop {
 	XE_VMA_SUBOP_MAP_RANGE,
 	/** @XE_VMA_SUBOP_UNMAP_RANGE: Unmap range */
 	XE_VMA_SUBOP_UNMAP_RANGE,
+	/** @XE_VMA_SUBOP_ADD_DEBUG_DATA: Add debug data to vm */
+	XE_VMA_SUBOP_ADD_DEBUG_DATA,
+	/** @XE_VMA_SUBOP_REMOVE_DEBUG_DATA: Remove debug data from vm */
+	XE_VMA_SUBOP_REMOVE_DEBUG_DATA,
 };
 
 /** struct xe_vma_op - VMA operation */
@@ -523,6 +540,8 @@ struct xe_vma_op {
 		struct xe_vma_op_unmap_range unmap_range;
 		/** @prefetch_range: VMA prefetch range operation specific data */
 		struct xe_vma_op_prefetch_range prefetch_range;
+		/** @debug_data: debug_data operation specific data */
+		struct xe_vma_op_modify_debug_data modify_debug_data;
 	};
 };
 
include/uapi/drm/xe_drm.h +64 -0

94 lines not on this page · raw message

Signature · 1 line
2.43.0
#9 lore raw

PATCH 9/18 drm/xe/eudebug: Introduce vm bind and vm bind debug data events

In reply to Mika Kuoppala

From: Christoph Manszewski <[email protected]>

This patch adds events to track the bind ioctl and associated debug data add and remove operations. As a single bind can involve multiple operations and may fail mid-process.

Add bind event to signal to debugger when bind operation is executed. Further add debug data add and remove operations so debugger can keep track of regions where they reside. The bind event is important as we will want to include ufence event further in the series and tie it to this bind.

Only deliver bind+operations to the debugger if the vm bind op execution chain succeeds.

v2: - avoid sending bind if there is no operations (Mika)
- documentation (Christoph, Mika)

---
 Documentation/gpu/xe/xe_eudebug.rst   |   6 +
 drivers/gpu/drm/xe/xe_eudebug.c       | 238 +++++++++++++++++++++++++-
 drivers/gpu/drm/xe/xe_eudebug.h       |   7 +
 drivers/gpu/drm/xe/xe_eudebug_types.h |   2 +-
 drivers/gpu/drm/xe/xe_vm.c            |   4 +
 include/uapi/drm/xe_drm_eudebug.h     |  86 ++++++++++
 6 files changed, 338 insertions(+), 5 deletions(-)
Documentation/gpu/xe/xe_eudebug.rst +6 -0
index e191e2c8ded4..1f743f1d6f2a 100644
@@ -57,3 +57,9 @@ Resource Event Types
 
 .. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
    :identifiers: drm_xe_eudebug_event_exec_queue
+
+.. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
+   :identifiers: drm_xe_eudebug_event_vm_bind
+
+.. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
+   :identifiers: drm_xe_eudebug_event_vm_bind_op_debug_data
drivers/gpu/drm/xe/xe_eudebug.c +234 -4

286 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug.h +7 -0
index c0d4ccd5f44f..42679fcbac47 100644
@@ -10,10 +10,14 @@
 
 struct drm_device;
 struct drm_file;
+struct xe_debug_data;
 struct xe_device;
 struct xe_file;
 struct xe_vm;
+struct xe_vma;
+struct xe_vma_ops;
 struct xe_exec_queue;
+struct xe_user_fence;
 
 #if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
 
@@ -54,6 +58,8 @@ void xe_eudebug_put(struct xe_eudebug *d);
 void xe_eudebug_exec_queue_create(struct xe_file *xef, u32 id);
 void xe_eudebug_exec_queue_destroy(struct xe_file *xef, struct xe_exec_queue *q);
 
+void xe_eudebug_vm_bind_execute(struct xe_vm *vm, struct xe_vma_ops *ops);
+
 #else
 
 static inline int xe_eudebug_connect_ioctl(struct drm_device *dev,
@@ -71,6 +77,7 @@ static inline void xe_eudebug_vm_destroy(struct xe_file *xef, struct xe_vm *vm)
 static inline void xe_eudebug_exec_queue_create(struct xe_file *xef, u32 id) { }
 static inline void xe_eudebug_exec_queue_destroy(struct xe_file *xef, struct xe_exec_queue *q) { }
 
+static inline void xe_eudebug_vm_bind_execute(struct xe_vm *vm, struct xe_vma_ops *ops) { }
 #endif /* CONFIG_DRM_XE_EUDEBUG */
 
 #endif /* _XE_EUDEBUG_H_ */
drivers/gpu/drm/xe/xe_eudebug_types.h +1 -1
index 4ad692008131..0e5b6e9bc1a8 100644
@@ -33,7 +33,7 @@ enum xe_eudebug_state {
 };
 
 #define CONFIG_DRM_XE_DEBUGGER_EVENT_QUEUE_SIZE 64
-#define XE_EUDEBUG_MAX_EVENT_TYPE DRM_XE_EUDEBUG_EVENT_EXEC_QUEUE
+#define XE_EUDEBUG_MAX_EVENT_TYPE DRM_XE_EUDEBUG_EVENT_VM_BIND_OP_DEBUG_DATA
 
 /**
  * struct xe_eudebug_handle - eudebug resource handle
drivers/gpu/drm/xe/xe_vm.c +4 -0
index 6aad0fc14184..e3203fce6b92 100644
@@ -3620,6 +3620,10 @@ static struct dma_fence *vm_bind_ioctl_ops_execute(struct xe_vm *vm,
 		xe_vm_set_validation_exec(vm, &exec);
 		fence = ops_execute(vm, vops);
 		xe_vm_set_validation_exec(vm, NULL);
+
+		if (!IS_ERR(fence) || PTR_ERR(fence) == -ENODATA)
+			xe_eudebug_vm_bind_execute(vm, vops);
+
 		if (IS_ERR(fence)) {
 			if (PTR_ERR(fence) == -ENODATA)
 				vm_bind_ioctl_ops_fini(vm, vops, NULL);
include/uapi/drm/xe_drm_eudebug.h +86 -0

98 lines not on this page · raw message

Signature · 1 line
2.43.0
#10 lore raw

PATCH 10/18 drm/xe/eudebug: Add ufence events with acks

In reply to Mika Kuoppala

When vma is in place, debugger needs to intercept before userspace proceeds with the workload. For example to install a breakpoint in an eu shader.

If ufence is part of bind sequence,aAttach debugger in xe_user_fence. When ufence signal is about to be delivered, check if this ufence needs to be tracked by debugger. If so, stall the delivery of the ufence signal up until debugger has acked the ufence (event), with the ack ioctl.

v2: - return err instead of 0 to guarantee signalling (Dominik)
- checkpatch (Tilak)
- Kconfig (Mika, Andrzej)
- use lock instead of cmpxchg (Mika)
v4: - improve ref handling and no ufences nodebug binds
v5: - remove overzealous warn_on on bind_ref_seqno (Christoph)
- remove superfluous signalled (Mika)
- fix double free on bind sequence (Mika)
- Dont fill op fields if no debugger (Maciej)
v6: - rework to align with xe_eudebug_bind_execute()
v7: - fix setting signalled before debugger acks (Jan)
v8: - explicit debugger set and clears (Mika)
- take reference for tracking check (Mika)
- fix leak of ref in handle_ack (Mika)
v9: - enforce mbz on user_arg.type (Sashiko)

---
 Documentation/gpu/xe/xe_eudebug.rst   |   3 +
 drivers/gpu/drm/xe/xe_eudebug.c       | 315 +++++++++++++++++++++++++-
 drivers/gpu/drm/xe/xe_eudebug.h       |   9 +
 drivers/gpu/drm/xe/xe_eudebug_types.h |  11 +-
 drivers/gpu/drm/xe/xe_sync.c          |  43 ++--
 drivers/gpu/drm/xe/xe_sync.h          |   7 +-
 drivers/gpu/drm/xe/xe_sync_types.h    |  28 ++-
 include/uapi/drm/xe_drm_eudebug.h     |  58 +++++
 8 files changed, 447 insertions(+), 27 deletions(-)
Documentation/gpu/xe/xe_eudebug.rst +3 -0
index 1f743f1d6f2a..db52945714f3 100644
@@ -63,3 +63,6 @@ Resource Event Types
 
 .. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
    :identifiers: drm_xe_eudebug_event_vm_bind_op_debug_data
+
+.. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
+   :identifiers: drm_xe_eudebug_event_vm_bind_ufence
drivers/gpu/drm/xe/xe_eudebug.c +314 -1

380 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug.h +9 -0
index 42679fcbac47..6906d93c7927 100644
@@ -60,6 +60,10 @@ void xe_eudebug_exec_queue_destroy(struct xe_file *xef, struct xe_exec_queue *q)
 
 void xe_eudebug_vm_bind_execute(struct xe_vm *vm, struct xe_vma_ops *ops);
 
+void xe_eudebug_ufence_init(struct xe_user_fence *ufence);
+void xe_eudebug_ufence_fini(struct xe_user_fence *ufence);
+bool xe_eudebug_ufence_track(struct xe_user_fence *ufence);
+
 #else
 
 static inline int xe_eudebug_connect_ioctl(struct drm_device *dev,
@@ -78,6 +82,11 @@ static inline void xe_eudebug_exec_queue_create(struct xe_file *xef, u32 id) { }
 static inline void xe_eudebug_exec_queue_destroy(struct xe_file *xef, struct xe_exec_queue *q) { }
 
 static inline void xe_eudebug_vm_bind_execute(struct xe_vm *vm, struct xe_vma_ops *ops) { }
+
+static inline void xe_eudebug_ufence_init(struct xe_user_fence *ufence) { }
+static inline void xe_eudebug_ufence_fini(struct xe_user_fence *ufence) { }
+static inline bool xe_eudebug_ufence_track(struct xe_user_fence *ufence) { return false; }
+
 #endif /* CONFIG_DRM_XE_EUDEBUG */
 
 #endif /* _XE_EUDEBUG_H_ */
drivers/gpu/drm/xe/xe_eudebug_types.h +10 -1
index 0e5b6e9bc1a8..9a3378af1bb4 100644
@@ -33,7 +33,7 @@ enum xe_eudebug_state {
 };
 
 #define CONFIG_DRM_XE_DEBUGGER_EVENT_QUEUE_SIZE 64
-#define XE_EUDEBUG_MAX_EVENT_TYPE DRM_XE_EUDEBUG_EVENT_VM_BIND_OP_DEBUG_DATA
+#define XE_EUDEBUG_MAX_EVENT_TYPE DRM_XE_EUDEBUG_EVENT_VM_BIND_UFENCE
 
 /**
  * struct xe_eudebug_handle - eudebug resource handle
@@ -136,6 +136,15 @@ struct xe_eudebug {
 		/** @event_seqno: seqno counter to stamp events for fifo */
 		atomic_long_t seqno;
 	} events;
+
+	/** @acks: user fence acks tracked by this debugger */
+	struct {
+		/** @lock: guards access to tree */
+		spinlock_t lock;
+
+		/** @tree: pending acks by seqnos */
+		struct rb_root tree;
+	} acks;
 };
 
 #endif /* _XE_EUDEBUG_TYPES_H_ */
drivers/gpu/drm/xe/xe_sync.c +24 -19

83 lines not on this page · raw message

drivers/gpu/drm/xe/xe_sync.h +6 -1
index 6b949194acff..768c0517f104 100644
@@ -10,8 +10,12 @@
 
 struct drm_syncobj;
 struct xe_device;
-struct xe_exec_queue;
 struct xe_file;
+struct xe_exec_queue;
+struct drm_syncobj;
+struct dma_fence;
+struct dma_fence_chain;
+struct drm_xe_sync;
 struct xe_sched_job;
 struct xe_vm;
 
@@ -45,5 +49,6 @@ struct xe_user_fence *__xe_sync_ufence_get(struct xe_user_fence *ufence);
 struct xe_user_fence *xe_sync_ufence_get(struct xe_sync_entry *sync);
 void xe_sync_ufence_put(struct xe_user_fence *ufence);
 int xe_sync_ufence_get_status(struct xe_user_fence *ufence);
+void xe_sync_ufence_signal(struct xe_user_fence *ufence);
 
 #endif
drivers/gpu/drm/xe/xe_sync_types.h +23 -5
index b88f1833e28c..33a93a0faa72 100644
@@ -6,13 +6,31 @@
 #ifndef _XE_SYNC_TYPES_H_
 #define _XE_SYNC_TYPES_H_
 
+#include <linux/dma-fence-array.h>
+#include <linux/kref.h>
+#include <linux/spinlock.h>
 #include <linux/types.h>
 
-struct drm_syncobj;
-struct dma_fence;
-struct dma_fence_chain;
-struct drm_xe_sync;
-struct user_fence;
+struct xe_user_fence {
+	struct xe_device *xe;
+	struct kref refcount;
+	struct dma_fence_cb cb;
+	struct work_struct worker;
+	struct mm_struct *mm;
+	u64 __user *addr;
+	u64 value;
+	int signalled;
+
+#if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
+	struct {
+		spinlock_t lock;
+		struct xe_eudebug *debugger;
+		u64 bind_ref_seqno;
+		u64 signalled_seqno;
+		struct work_struct worker;
+	} eudebug;
+#endif
+};
 
 struct xe_sync_entry {
 	struct drm_syncobj *syncobj;
include/uapi/drm/xe_drm_eudebug.h +58 -0

88 lines not on this page · raw message

Signature · 1 line
2.43.0
#11 lore raw

PATCH 11/18 drm/xe/eudebug: vm open/pread/pwrite

In reply to Mika Kuoppala

Debugger needs access to the client's vm to read and write. For example inspecting ISA/ELF and setting up breakpoints.

Add ioctl to open target vm with debugger client and vm_handle and hook up pread/pwrite possibility.

Open will take timeout argument so that standard fsync can be used for explicit flushing between cpu/gpu for the target vm.

Implement this for bo backed storage. userptr will be done in following patch.

v2: - checkpatch (Maciej)
- 32bit fixes (Andrzej)
- bo_vmap (Mika)
- fix vm leak if can't allocate k_buffer (Mika)
- assert vm write held for vma (Matthew)

v3: - fw ref, ttm_bo_access
- timeout boundary check (Dominik)
- dont try to copy to user on zero bytes (Mika)

v4: - offset as unsigned long (Thomas)
- check XE_VMA_DESTROYED

v5: - drm_dev_put before releasing debugger (Mika)
v6: - stop flushing on first error (Mika)
v7: - deny access on debugger disconnect (Andrzej)

Cc Andrzej Hajda <[email protected]>
Cc Matthew Brost <[email protected]>
---
 Documentation/gpu/xe/xe_eudebug.rst  |   6 +
 drivers/gpu/drm/xe/Makefile          |   2 +-
 drivers/gpu/drm/xe/regs/xe_gt_regs.h |  24 ++
 drivers/gpu/drm/xe/xe_eudebug.c      |  32 +-
 drivers/gpu/drm/xe/xe_eudebug.h      |  10 +
 drivers/gpu/drm/xe/xe_eudebug_vm.c   | 426 +++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_eudebug_vm.h   |   8 +
 include/uapi/drm/xe_drm_eudebug.h    |  29 ++
 8 files changed, 535 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug_vm.c
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug_vm.h
Documentation/gpu/xe/xe_eudebug.rst +6 -0
index db52945714f3..466d366c1e83 100644
@@ -66,3 +66,9 @@ Resource Event Types
 
 .. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
    :identifiers: drm_xe_eudebug_event_vm_bind_ufence
+
+VM Access
+=========
+
+.. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
+   :identifiers: drm_xe_eudebug_vm_open
drivers/gpu/drm/xe/Makefile +1 -1
index 97c721cd32aa..83e88d75c3e0 100644
@@ -158,7 +158,7 @@ xe-$(CONFIG_DRM_XE_GPUSVM) += xe_svm.o
 xe-$(CONFIG_DRM_GPUSVM) += xe_userptr.o
 
 # debugging shaders with gdb (eudebug) support
-xe-$(CONFIG_DRM_XE_EUDEBUG) += xe_eudebug.o
+xe-$(CONFIG_DRM_XE_EUDEBUG) += xe_eudebug.o xe_eudebug_vm.o
 
 # graphics hardware monitoring (HWMON) support
 xe-$(CONFIG_HWMON) += xe_hwmon.o
drivers/gpu/drm/xe/regs/xe_gt_regs.h +24 -0
index 08251c7a1a4b..15b98a413831 100644
@@ -616,6 +616,30 @@
 #define   CCS_MODE_CSLICE(cslice, ccs) \
 	((ccs) << ((cslice) * CCS_MODE_CSLICE_WIDTH))
 
+#define RCU_ASYNC_FLUSH				XE_REG(0x149fc)
+#define   RCU_ASYNC_FLUSH_IN_PROGRESS	REG_BIT(31)
+#define   RCU_ASYNC_FLUSH_ENGINE_ID_SHIFT	28
+#define   RCU_ASYNC_FLUSH_ENGINE_ID_DECODE1 REG_BIT(26)
+#define   RCU_ASYNC_FLUSH_AMFS		REG_BIT(8)
+#define   RCU_ASYNC_FLUSH_PREFETCH	REG_BIT(7)
+#define   RCU_ASYNC_FLUSH_DATA_PORT	REG_BIT(6)
+#define   RCU_ASYNC_FLUSH_DATA_CACHE	REG_BIT(5)
+#define   RCU_ASYNC_FLUSH_HDC_PIPELINE	REG_BIT(4)
+#define   RCU_ASYNC_INVALIDATE_HDC_PIPELINE REG_BIT(3)
+#define   RCU_ASYNC_INVALIDATE_CONSTANT_CACHE REG_BIT(2)
+#define   RCU_ASYNC_INVALIDATE_TEXTURE_CACHE REG_BIT(1)
+#define   RCU_ASYNC_INVALIDATE_INSTRUCTION_CACHE REG_BIT(0)
+#define   RCU_ASYNC_FLUSH_AND_INVALIDATE_ALL ( \
+	RCU_ASYNC_FLUSH_AMFS | \
+	RCU_ASYNC_FLUSH_PREFETCH | \
+	RCU_ASYNC_FLUSH_DATA_PORT | \
+	RCU_ASYNC_FLUSH_DATA_CACHE | \
+	RCU_ASYNC_FLUSH_HDC_PIPELINE | \
+	RCU_ASYNC_INVALIDATE_HDC_PIPELINE | \
+	RCU_ASYNC_INVALIDATE_CONSTANT_CACHE | \
+	RCU_ASYNC_INVALIDATE_TEXTURE_CACHE | \
+	RCU_ASYNC_INVALIDATE_INSTRUCTION_CACHE)
+
 #define FORCEWAKE_ACK_GT			XE_REG(0x130044)
 
 /* Applicable for all FORCEWAKE_DOMAIN and FORCEWAKE_ACK_DOMAIN regs */
drivers/gpu/drm/xe/xe_eudebug.c +31 -1
index 3221489f79a9..08c7c08c44a6 100644
@@ -16,6 +16,7 @@
 #include "xe_device.h"
 #include "xe_eudebug.h"
 #include "xe_eudebug_types.h"
+#include "xe_eudebug_vm.h"
 #include "xe_exec_queue.h"
 #include "xe_hw_engine.h"
 #include "xe_macros.h"
@@ -210,7 +211,7 @@ xe_eudebug_resources_destroy(struct xe_eudebug *d)
 	}
 }
 
-static bool xe_eudebug_detached(struct xe_eudebug *d)
+bool xe_eudebug_detached(struct xe_eudebug *d)
 {
 	return READ_ONCE(d->target.xef) == NULL;
 }
@@ -702,6 +703,31 @@ static int xe_eudebug_remove_handle(struct xe_eudebug *d, int type, void *p,
 	return ret;
 }
 
+static void *find_resource__unlocked(struct xe_eudebug_resource *r,
+				     u32 id)
+{
+	struct xe_eudebug_handle *h;
+
+	h = xa_load(&r->xa, id);
+
+	return h ? (void *)(uintptr_t)h->key : NULL;
+}
+
+struct xe_vm *xe_eudebug_vm_get(struct xe_eudebug *d, u32 id)
+{
+	struct xe_eudebug_resource *r =
+		resource_from_type(d, XE_EUDEBUG_RES_TYPE_VM);
+	struct xe_vm *vm;
+
+	mutex_lock(&r->lock);
+	vm = find_resource__unlocked(r, id);
+	if (vm)
+		xe_vm_get(vm);
+	mutex_unlock(&r->lock);
+
+	return vm;
+}
+
 static struct drm_xe_eudebug_event *
 xe_eudebug_prepare_event(struct xe_eudebug *d, u16 type, u64 seqno, u16 flags,
 			 u32 len)
@@ -1791,6 +1817,10 @@ static long xe_eudebug_ioctl(struct file *file,
 		ret = xe_eudebug_ack_event_ioctl(d, cmd, arg);
 		eu_dbg(d, "ioctl cmd=EVENT_ACK ret=%ld\n", ret);
 		break;
+	case DRM_XE_EUDEBUG_IOCTL_VM_OPEN:
+		ret = xe_eudebug_vm_open_ioctl(d, arg);
+		eu_dbg(d, "ioctl cmd=VM_OPEN ret=%ld\n", ret);
+		break;
 	default:
 		ret = -EINVAL;
 	}
drivers/gpu/drm/xe/xe_eudebug.h +10 -0
index 6906d93c7927..c042e55ad8be 100644
@@ -18,6 +18,7 @@ struct xe_vma;
 struct xe_vma_ops;
 struct xe_exec_queue;
 struct xe_user_fence;
+struct xe_eudebug;
 
 #if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
 
@@ -38,6 +39,10 @@ struct xe_user_fence;
 
 #define xe_eudebug_assert(d, ...) xe_assert((d)->xe, ##__VA_ARGS__)
 
+#define xe_eudebug_for_each_hw_engine(__hwe, __gt, __id) \
+	for_each_hw_engine(__hwe, __gt, __id)	       \
+		if (xe_hw_engine_has_eudebug(__hwe))
+
 int xe_eudebug_connect_ioctl(struct drm_device *dev,
 			     void *data,
 			     struct drm_file *file);
@@ -47,14 +52,19 @@ bool xe_eudebug_is_enabled(struct xe_device *xe);
 
 void xe_eudebug_file_close(struct xe_file *xef);
 
+bool xe_eudebug_detached(struct xe_eudebug *d);
+
 void xe_eudebug_vm_create(struct xe_file *xef, u32 id);
 void xe_eudebug_vm_destroy(struct xe_file *xef, struct xe_vm *vm);
+
 int xe_eudebug_enable(struct xe_device *xe, bool enable);
 
 struct xe_eudebug *xe_eudebug_get_nolock(struct xe_file *xef);
 struct xe_eudebug *xe_eudebug_get_nolock_with_discovery(struct xe_file *xef);
 void xe_eudebug_put(struct xe_eudebug *d);
 
+struct xe_vm *xe_eudebug_vm_get(struct xe_eudebug *d, u32 vm_id);
+
 void xe_eudebug_exec_queue_create(struct xe_file *xef, u32 id);
 void xe_eudebug_exec_queue_destroy(struct xe_file *xef, struct xe_exec_queue *q);
 
drivers/gpu/drm/xe/xe_eudebug_vm.c new file +426 -0

426 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug_vm.h new file +8 -0
new file mode 100644
index 000000000000..b3dc5618a5e6
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023-2025 Intel Corporation
+ */
+
+struct xe_eudebug;
+
+long xe_eudebug_vm_open_ioctl(struct xe_eudebug *d, unsigned long arg);
include/uapi/drm/xe_drm_eudebug.h +29 -0
index 1be453df493e..86ee80f6b91c 100644
@@ -12,6 +12,7 @@ extern "C" {
 
 #define DRM_XE_EUDEBUG_IOCTL_READ_EVENT		_IO('j', 0x0)
 #define DRM_XE_EUDEBUG_IOCTL_ACK_EVENT		_IOW('j', 0x1, struct drm_xe_eudebug_ack)
+#define DRM_XE_EUDEBUG_IOCTL_VM_OPEN		_IOW('j', 0x2, struct drm_xe_eudebug_vm_open)
 
 /**
  * struct drm_xe_eudebug_event - Base type of event delivered by xe_eudebug.
@@ -243,6 +244,34 @@ struct drm_xe_eudebug_ack {
 	__u64 seqno;
 };
 
+/**
+ * struct drm_xe_eudebug_vm_open - Open a target vm
+ *
+ * Open target VM for reading and writing with DRM_XE_EUDEBUG_IOCTL_VM_OPEN.
+ *
+ * File descriptor is returned which can be used with pread and pwrite
+ * to inspect and modify the target VM.
+ *
+ * Multiple operations can be synced with calling fsync(fd). If
+ * timeout_ns was specified, the fsync will timeout if the
+ * VM can't be guaranteed to be in sync. Caller should re-read the
+ * state with pread again.
+ *
+ */
+struct drm_xe_eudebug_vm_open {
+	/** @extensions: Pointer to the first extension struct, if any */
+	__u64 extensions;
+
+	/** @vm_handle: handle of vm to be accessed */
+	__u64 vm_handle;
+
+	/** @flags: flags, must be zero */
+	__u64 flags;
+
+	/** @timeout_ns: Timeout value in nanoseconds */
+	__u64 timeout_ns;
+};
+
 #if defined(__cplusplus)
 }
 #endif
Signature · 1 line
2.43.0
#12 lore raw

PATCH 12/18 drm/xe/eudebug: userptr vm pread/pwrite

In reply to Mika Kuoppala

Implement debugger vm access for userptrs.

When bind is done, take ref to current task so that we know from which vm the address was bound. Then during debugger pread/pwrite we use this target task as parameter to access the debuggee vm with access_process_vm().

This is based on suggestions from Simona, Thomas and Joonas.

v2: need to add offset into vma (Dominik)
v3: move code into xe_userptr.c (Mika)

Cc Simona Vetter <[email protected]>
Cc Matthew Brost <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Thomas Hellström <[email protected]>
Cc Dominik Grzegorzek <[email protected]>
Cc Christian König <[email protected]>
Cc Joonas Lahtinen <[email protected]>
---
 drivers/gpu/drm/xe/xe_eudebug_vm.c | 16 +++++++++++++++
 drivers/gpu/drm/xe/xe_userptr.c    |  4 ++++
 drivers/gpu/drm/xe/xe_userptr.h    | 32 ++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+)
drivers/gpu/drm/xe/xe_eudebug_vm.c +16 -0
index b886db98667f..15edbe7a9d00 100644
@@ -51,6 +51,22 @@ static int xe_eudebug_vma_access(struct xe_vma *vma,
 		xe_bo_put(bo);
 
 		return ret;
+	} else if (xe_vma_is_userptr(vma)) {
+		struct xe_userptr *userptr = &to_userptr_vma(vma)->userptr;
+
+		if (XE_WARN_ON(!userptr->eudebug.task))
+			return -EINVAL;
+
+		/*
+		 * access_remote_vm() would fit as userptr notifier has
+		 * mm ref so we would not need to carry task ref at all.
+		 * But access_remote_vm is not exported. access_process_vm()
+		 * is exported so use it instead.
+		 */
+		return access_process_vm(userptr->eudebug.task,
+					 xe_vma_userptr(vma) + offset_in_vma,
+					 buf, bytes,
+					 write ? FOLL_WRITE : 0);
 	}
 
 	return -EINVAL;
drivers/gpu/drm/xe/xe_userptr.c +4 -0
index 6761005c0b90..ce7f30d2ccee 100644
@@ -403,6 +403,8 @@ int xe_userptr_setup(struct xe_userptr_vma *uvma, unsigned long start,
 
 	userptr->pages.notifier_seq = LONG_MAX;
 
+	xe_eudebug_track_userptr_task(userptr);
+
 	return 0;
 }
 
@@ -411,6 +413,8 @@ void xe_userptr_remove(struct xe_userptr_vma *uvma)
 	struct xe_vm *vm = xe_vma_vm(&uvma->vma);
 	struct xe_userptr *userptr = &uvma->userptr;
 
+	xe_eudebug_untrack_userptr_task(userptr);
+
 	drm_gpusvm_free_pages(&vm->svm.gpusvm, &uvma->userptr.pages,
 			      xe_vma_size(&uvma->vma) >> PAGE_SHIFT);
 
drivers/gpu/drm/xe/xe_userptr.h +32 -0
index 2a3cd1b5efbb..b0781618b3f4 100644
@@ -95,6 +95,12 @@ struct xe_userptr {
 #if IS_ENABLED(CONFIG_DRM_XE_USERPTR_INVAL_INJECT)
 	u32 divisor;
 #endif
+
+#if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
+	struct {
+		struct task_struct *task;
+	} eudebug;
+#endif
 };
 
 #if IS_ENABLED(CONFIG_DRM_GPUSVM)
@@ -133,4 +139,30 @@ static inline void xe_vma_userptr_force_invalidate(struct xe_userptr_vma *uvma)
 {
 }
 #endif
+
+#if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
+static inline void xe_eudebug_track_userptr_task(struct xe_userptr *userptr)
+{
+	/*
+	 * We could use the mm which is on notifier. But
+	 * the access_remote_vm() is not exported. Thus
+	 * we get reference to task for access_process_vm()
+	 */
+	userptr->eudebug.task = get_task_struct(current);
+}
+
+static inline void xe_eudebug_untrack_userptr_task(struct xe_userptr *userptr)
+{
+	put_task_struct(userptr->eudebug.task);
+}
+#else
+static inline void xe_eudebug_track_userptr_task(struct xe_userptr *userptr)
+{
+}
+
+static inline void xe_eudebug_untrack_userptr_task(struct xe_userptr *userptr)
+{
+}
+#endif /* CONFIG_DRM_XE_EUDEBUG */
+
 #endif
Signature · 1 line
2.43.0
#13 lore raw

PATCH 13/18 drm/xe/eudebug: hw enablement for eudebug

In reply to Mika Kuoppala

From: Dominik Grzegorzek <[email protected]>

In order to turn on debug capabilities, (i.e. breakpoints), TD_CTL and some other registers needs to be programmed. Implement eudebug mode enabling including eudebug related workarounds.

v2: Move workarounds to xe_wa_oob. Use reg_sr directly instead of xe_rtp as it suits better for dynamic manipulation of those register we do later in the series.
v3: get rid of undefining XE_MCR_REG (Mika)
v4: return if dss_mask is all 0.
v5: remove unused GLOBAL_DEBUG_ENABLE (Sashiko)

---
 drivers/gpu/drm/xe/Makefile           |   2 +-
 drivers/gpu/drm/xe/regs/xe_gt_regs.h  |  19 +++
 drivers/gpu/drm/xe/xe_eudebug_hw.c    |  72 ++++++++++
 drivers/gpu/drm/xe/xe_eudebug_hw.h    |  25 ++++
 drivers/gpu/drm/xe/xe_gt_debug.c      | 182 ++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_gt_debug.h      |  32 +++++
 drivers/gpu/drm/xe/xe_reg_sr.c        |  21 ++-
 drivers/gpu/drm/xe/xe_reg_sr.h        |   4 +-
 drivers/gpu/drm/xe/xe_reg_whitelist.c |   2 +-
 drivers/gpu/drm/xe/xe_rtp.c           |   2 +-
 drivers/gpu/drm/xe/xe_wa_oob.rules    |   2 +
 11 files changed, 353 insertions(+), 10 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug_hw.c
 create mode 100644 drivers/gpu/drm/xe/xe_eudebug_hw.h
 create mode 100644 drivers/gpu/drm/xe/xe_gt_debug.c
 create mode 100644 drivers/gpu/drm/xe/xe_gt_debug.h
drivers/gpu/drm/xe/Makefile +1 -1
index 83e88d75c3e0..1531ea9b3a93 100644
@@ -158,7 +158,7 @@ xe-$(CONFIG_DRM_XE_GPUSVM) += xe_svm.o
 xe-$(CONFIG_DRM_GPUSVM) += xe_userptr.o
 
 # debugging shaders with gdb (eudebug) support
-xe-$(CONFIG_DRM_XE_EUDEBUG) += xe_eudebug.o xe_eudebug_vm.o
+xe-$(CONFIG_DRM_XE_EUDEBUG) += xe_eudebug.o xe_eudebug_vm.o xe_eudebug_hw.o xe_gt_debug.o
 
 # graphics hardware monitoring (HWMON) support
 xe-$(CONFIG_HWMON) += xe_hwmon.o
drivers/gpu/drm/xe/regs/xe_gt_regs.h +19 -0
index 15b98a413831..0573d007e62e 100644
@@ -515,10 +515,20 @@
 #define   DG2_DISABLE_ROUND_ENABLE_ALLOW_FOR_SSLA	REG_BIT(15)
 #define   CLEAR_OPTIMIZATION_DISABLE			REG_BIT(6)
 
+#define TD_CTL					XE_REG_MCR(0xe400)
+#define   TD_CTL_FEH_AND_FEE_ENABLE		REG_BIT(7) /* forced halt and exception */
+#define   TD_CTL_FORCE_EXTERNAL_HALT		REG_BIT(6)
+#define   TD_CTL_FORCE_THREAD_BREAKPOINT_ENABLE	REG_BIT(4)
+#define   TD_CTL_FORCE_EXCEPTION		REG_BIT(3)
+#define   TD_CTL_BREAKPOINT_ENABLE		REG_BIT(2)
+#define   TD_CTL_GLOBAL_DEBUG_ENABLE		REG_BIT(0) /* XeHP */
+
 #define CACHE_MODE_SS				XE_REG_MCR(0xe420, XE_REG_OPTION_MASKED)
 #define   DISABLE_ECC				REG_BIT(5)
 #define   ENABLE_PREFETCH_INTO_IC		REG_BIT(3)
 
+#define EU_ATT(reg, row)			XE_REG_MCR((reg ? 0xe478 : 0xe470) + (row) * 4)
+
 #define ROW_CHICKEN4				XE_REG_MCR(0xe48c, XE_REG_OPTION_MASKED)
 #define   DISABLE_GRF_CLEAR			REG_BIT(13)
 #define   XEHP_DIS_BBL_SYSPIPE			REG_BIT(11)
@@ -528,6 +538,8 @@
 #define   THREAD_EX_ARB_MODE			REG_GENMASK(3, 2)
 #define   THREAD_EX_ARB_MODE_RR_AFTER_DEP	REG_FIELD_PREP(THREAD_EX_ARB_MODE, 0x2)
 
+#define EU_ATT_CLR(reg, row)			XE_REG_MCR((reg ? 0xe698 : 0xe490) + (row) * 4)
+
 #define ROW_CHICKEN3				XE_REG_MCR(0xe49c, XE_REG_OPTION_MASKED)
 #define   XE2_EUPEND_CHK_FLUSH_DIS		REG_BIT(14)
 #define   DIS_EU_GRF_POISON_TO_LSC		REG_BIT(13)
@@ -546,11 +558,13 @@
 #define   MDQ_ARBITRATION_MODE			REG_BIT(12)
 #define   STALL_DOP_GATING_DISABLE		REG_BIT(5)
 #define   EARLY_EOT_DIS				REG_BIT(1)
+#define   STALL_DOP_GATING_DISABLE		REG_BIT(5)
 
 #define ROW_CHICKEN2				XE_REG_MCR(0xe4f4, XE_REG_OPTION_MASKED)
 #define   DISABLE_READ_SUPPRESSION		REG_BIT(15)
 #define   DISABLE_EARLY_READ			REG_BIT(14)
 #define   ENABLE_LARGE_GRF_MODE			REG_BIT(12)
+#define   XEHPC_DISABLE_BTB			REG_BIT(11)
 #define   PUSH_CONST_DEREF_HOLD_DIS		REG_BIT(8)
 #define   DISABLE_TDL_SVHS_GATING		REG_BIT(1)
 #define   DISABLE_DOP_GATING			REG_BIT(0)
@@ -616,6 +630,11 @@
 #define   CCS_MODE_CSLICE(cslice, ccs) \
 	((ccs) << ((cslice) * CCS_MODE_CSLICE_WIDTH))
 
+#define RCU_DEBUG_1				XE_REG(0x14a00)
+#define   RCU_DEBUG_1_ENGINE_STATUS		REG_GENMASK(2, 0)
+#define   RCU_DEBUG_1_RUNALONE_ACTIVE		REG_BIT(2)
+#define   RCU_DEBUG_1_CONTEXT_ACTIVE		REG_BIT(0)
+
 #define RCU_ASYNC_FLUSH				XE_REG(0x149fc)
 #define   RCU_ASYNC_FLUSH_IN_PROGRESS	REG_BIT(31)
 #define   RCU_ASYNC_FLUSH_ENGINE_ID_SHIFT	28
drivers/gpu/drm/xe/xe_eudebug_hw.c new file +72 -0

72 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug_hw.h new file +25 -0
new file mode 100644
index 000000000000..7362ed9bde68
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023-2025 Intel Corporation
+ */
+
+#include <linux/types.h>
+
+#ifndef _XE_EUDEBUG_HW_H_
+#define _XE_EUDEBUG_HW_H_
+
+#include <linux/types.h>
+
+struct xe_eudebug;
+struct xe_hw_engine;
+struct xe_gt;
+
+#if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
+
+void xe_eudebug_init_hw_engine(struct xe_hw_engine *hwe, bool enable);
+
+#else /* CONFIG_DRM_XE_EUDEBUG */
+
+#endif /* CONFIG_DRM_XE_EUDEBUG */
+
+#endif /* _XE_EUDEBUG_HW_H_ */
drivers/gpu/drm/xe/xe_gt_debug.c new file +182 -0

182 lines not on this page · raw message

drivers/gpu/drm/xe/xe_gt_debug.h new file +32 -0
new file mode 100644
index 000000000000..9dabe9cc1d25
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#ifndef __XE_GT_DEBUG_
+#define __XE_GT_DEBUG_
+
+#include <linux/bits.h>
+#include <linux/math.h>
+
+struct xe_gt;
+
+#define XE_GT_ATTENTION_TIMEOUT_MS 100
+#define XE_GT_EU_ATT_ROWS 2u
+
+unsigned int xe_gt_eu_att_regs(struct xe_gt *gt);
+
+int xe_gt_eu_threads_needing_attention(struct xe_gt *gt);
+int xe_gt_foreach_dss_group_instance(struct xe_gt *gt,
+				     int (*fn)(struct xe_gt *gt,
+					       void *data,
+					       u16 group,
+					       u16 instance,
+					       bool present),
+				     void *data);
+
+int xe_gt_eu_attention_bitmap_size(struct xe_gt *gt);
+int xe_gt_eu_attention_bitmap(struct xe_gt *gt, u8 *bits,
+			      unsigned int bitmap_size);
+
+#endif
drivers/gpu/drm/xe/xe_reg_sr.c +15 -6
index e328f5072557..6d184a4b62d6 100644
@@ -104,7 +104,8 @@ static struct xe_reg sanitize_mcr(struct xe_reg_sr *sr,
 
 int xe_reg_sr_add(struct xe_reg_sr *sr,
 		  const struct xe_reg_sr_entry *e,
-		  struct xe_gt *gt)
+		  struct xe_gt *gt,
+		  bool overwrite)
 {
 	unsigned long idx = e->reg.addr;
 	struct xe_reg_sr_entry *pentry = xa_load(&sr->xa, idx);
@@ -114,15 +115,23 @@ int xe_reg_sr_add(struct xe_reg_sr *sr,
 	reg = sanitize_mcr(sr, e, gt);
 
 	if (pentry) {
-		if (!compatible_entries(pentry, e)) {
+		if (overwrite && e->set_bits) {
+			pentry->clr_bits |= e->clr_bits;
+			pentry->set_bits |= e->set_bits;
+			pentry->read_mask |= e->read_mask;
+		} else if (overwrite && !e->set_bits) {
+			pentry->clr_bits |= e->clr_bits;
+			pentry->set_bits &= ~e->clr_bits;
+			pentry->read_mask |= e->read_mask;
+		} else if (!compatible_entries(pentry, e)) {
 			ret = -EINVAL;
 			goto fail;
+		} else {
+			pentry->clr_bits |= e->clr_bits;
+			pentry->set_bits |= e->set_bits;
+			pentry->read_mask |= e->read_mask;
 		}
 
-		pentry->clr_bits |= e->clr_bits;
-		pentry->set_bits |= e->set_bits;
-		pentry->read_mask |= e->read_mask;
-
 		return 0;
 	}
 
drivers/gpu/drm/xe/xe_reg_sr.h +3 -1
index d26cf4713383..8231640edb0f 100644
@@ -6,6 +6,8 @@
 #ifndef _XE_REG_SR_H_
 #define _XE_REG_SR_H_
 
+#include <linux/types.h>
+
 /*
  * Reg save/restore bookkeeping
  */
@@ -28,7 +30,7 @@ void xe_reg_sr_lrc_check(struct xe_reg_sr *sr,
 			 struct drm_printer *p);
 
 int xe_reg_sr_add(struct xe_reg_sr *sr, const struct xe_reg_sr_entry *e,
-		  struct xe_gt *gt);
+		  struct xe_gt *gt, bool overwrite);
 void xe_reg_sr_apply_mmio(struct xe_reg_sr *sr, struct xe_gt *gt);
 void xe_reg_sr_apply_whitelist(struct xe_hw_engine *hwe);
 
drivers/gpu/drm/xe/xe_reg_whitelist.c +1 -1
index 2e84b1c49f37..1e9f37753e4b 100644
@@ -184,7 +184,7 @@ static void whitelist_apply_to_hwe(struct xe_hw_engine *hwe)
 		}
 
 		xe_reg_whitelist_print_entry(&p, 0, reg, entry);
-		xe_reg_sr_add(&hwe->reg_sr, &hwe_entry, hwe->gt);
+		xe_reg_sr_add(&hwe->reg_sr, &hwe_entry, hwe->gt, false);
 
 		slot++;
 	}
drivers/gpu/drm/xe/xe_rtp.c +1 -1
index 83a40e1f9528..dd92550b01c9 100644
@@ -238,7 +238,7 @@ static void rtp_add_sr_entry(const struct xe_rtp_action *action,
 	};
 
 	sr_entry.reg.addr += mmio_base;
-	xe_reg_sr_add(sr, &sr_entry, gt);
+	xe_reg_sr_add(sr, &sr_entry, gt, false);
 }
 
 static bool rtp_process_one_sr(const struct xe_rtp_entry_sr *entry,
drivers/gpu/drm/xe/xe_wa_oob.rules +2 -0
index 445ba0d19051..1eef9b082fa3 100644
@@ -66,3 +66,5 @@
 		GRAPHICS_VERSION_RANGE(2004, 3005)
 14022766366	GRAPHICS_VERSION_RANGE(2001, 2004)
 		GRAPHICS_VERSION_RANGE(3000, 3005)
+18022722726	GRAPHICS_VERSION_RANGE(1250, 1274)
+14015474168	PLATFORM(PVC)
Signature · 1 line
2.43.0
#14 lore raw

PATCH 14/18 drm/xe/eudebug: Introduce EU control interface

In reply to Mika Kuoppala

From: Dominik Grzegorzek <[email protected]>

Introduce EU control functionality, which allows EU debugger to interrupt, resume, and inform about the current state of EU threads during execution. Provide an abstraction layer, so in the future guc will only need to provide appropriate callbacks.

Based on implementation created by authors and other folks within i915 driver.

v2: - checkpatch (Maciej)
- lrc index off by one fix (Mika)
- checkpatch (Tilak)
- 32bit fixes (Andrzej, Mika)
- find_resource_get for client (Mika)

v3: - fw ref (Mika)
- attention register naming

v4: - fused off handling (Dominik)
- squash xe3 parts and ptl attentions (Mika)
v5: - s/ioctl_lock/exec_queue.lock to avoid wrong lock order (Mika)
v6: - require seqno MBZ (Mika)
v7: - error return consistency (Mika)
v8: - consolidate boilerplate and lrc sanity check (Mika)
v9: - keep FEE when setting FEH, user_arg reserved (Sashiko)

---
 Documentation/gpu/xe/xe_eudebug.rst      |   6 +
 drivers/gpu/drm/xe/regs/xe_engine_regs.h |   1 +
 drivers/gpu/drm/xe/xe_eudebug.c          |  59 +++
 drivers/gpu/drm/xe/xe_eudebug.h          |   2 +
 drivers/gpu/drm/xe/xe_eudebug_hw.c       | 644 +++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_eudebug_hw.h       |   7 +
 drivers/gpu/drm/xe/xe_eudebug_types.h    |  25 +
 include/uapi/drm/xe_drm_eudebug.h        |  58 ++
 8 files changed, 802 insertions(+)
Documentation/gpu/xe/xe_eudebug.rst +6 -0
index 466d366c1e83..76f255c7da73 100644
@@ -72,3 +72,9 @@ VM Access
 
 .. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
    :identifiers: drm_xe_eudebug_vm_open
+
+EU/HW Control
+=============
+
+.. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
+   :identifiers: drm_xe_eudebug_eu_control
drivers/gpu/drm/xe/regs/xe_engine_regs.h +1 -0
index 94033982e694..7987e05a78ae 100644
@@ -156,6 +156,7 @@
 #define   IDLE_DELAY				REG_GENMASK(20, 0)
 
 #define RING_CURRENT_LRCA(base)			XE_REG((base) + 0x240)
+#define   CURRENT_LRCA_VALID			REG_BIT(0)
 
 #define RING_CONTEXT_CONTROL(base)		XE_REG((base) + 0x244, XE_REG_OPTION_MASKED)
 #define	  CTX_CTRL_PXP_ENABLE			REG_BIT(10)
drivers/gpu/drm/xe/xe_eudebug.c +59 -0

100 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug.h +2 -0
index c042e55ad8be..525a84fc7ca8 100644
@@ -67,6 +67,8 @@ struct xe_vm *xe_eudebug_vm_get(struct xe_eudebug *d, u32 vm_id);
 
 void xe_eudebug_exec_queue_create(struct xe_file *xef, u32 id);
 void xe_eudebug_exec_queue_destroy(struct xe_file *xef, struct xe_exec_queue *q);
+struct xe_exec_queue *xe_eudebug_exec_queue_get(struct xe_eudebug *d, u32 id);
+struct xe_lrc *xe_eudebug_find_lrc(struct xe_eudebug *d, u32 id);
 
 void xe_eudebug_vm_bind_execute(struct xe_vm *vm, struct xe_vma_ops *ops);
 
drivers/gpu/drm/xe/xe_eudebug_hw.c +644 -0

647 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug_hw.h +7 -0
index 7362ed9bde68..8f59ec574e4e 100644
@@ -16,10 +16,17 @@ struct xe_gt;
 
 #if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
 
+void xe_eudebug_hw_init(struct xe_eudebug *d);
 void xe_eudebug_init_hw_engine(struct xe_hw_engine *hwe, bool enable);
 
+long xe_eudebug_eu_control(struct xe_eudebug *d, const u64 arg);
+
+struct xe_exec_queue *xe_gt_runalone_active_queue_get(struct xe_gt *gt, int *lrc_idx);
+
 #else /* CONFIG_DRM_XE_EUDEBUG */
 
+static inline void xe_eudebug_init_hw_engine(struct xe_hw_engine *hwe, bool enable) { }
+
 #endif /* CONFIG_DRM_XE_EUDEBUG */
 
 #endif /* _XE_EUDEBUG_HW_H_ */
drivers/gpu/drm/xe/xe_eudebug_types.h +25 -0
index 9a3378af1bb4..e92e8c09a34d 100644
@@ -17,7 +17,11 @@
 
 struct xe_device;
 struct task_struct;
+struct xe_eudebug;
+struct xe_hw_engine;
 struct workqueue_struct;
+struct xe_exec_queue;
+struct xe_lrc;
 
 /**
  * enum xe_eudebug_state - eudebug capability state
@@ -68,6 +72,24 @@ struct xe_eudebug_resource {
 #define XE_EUDEBUG_RES_TYPE_LRC		2
 #define XE_EUDEBUG_RES_TYPE_COUNT	(XE_EUDEBUG_RES_TYPE_LRC + 1)
 
+/**
+ * struct xe_eudebug_eu_control_ops - interface for eu thread
+ * state control backend
+ */
+struct xe_eudebug_eu_control_ops {
+	/** @interrupt_all: interrupts workload active on given hwe */
+	int (*interrupt_all)(struct xe_eudebug *e, struct xe_exec_queue *q,
+			     struct xe_lrc *lrc);
+
+	/** @resume: resumes threads reflected by bitmask active on given hwe */
+	int (*resume)(struct xe_eudebug *e, struct xe_exec_queue *q,
+		      struct xe_lrc *lrc, u8 *bitmap, unsigned int bitmap_size);
+
+	/** @stopped: returns bitmap reflecting threads which signal attention */
+	int (*stopped)(struct xe_eudebug *e, struct xe_exec_queue *q,
+		       struct xe_lrc *lrc, u8 *bitmap, unsigned int bitmap_size);
+};
+
 /**
  * struct xe_eudebug - Top level struct for eudebug: the connection
  */
@@ -145,6 +167,9 @@ struct xe_eudebug {
 		/** @tree: pending acks by seqnos */
 		struct rb_root tree;
 	} acks;
+
+	/** @ops: operations for eu_control */
+	struct xe_eudebug_eu_control_ops *ops;
 };
 
 #endif /* _XE_EUDEBUG_TYPES_H_ */
include/uapi/drm/xe_drm_eudebug.h +58 -0

70 lines not on this page · raw message

Signature · 1 line
2.43.0
#15 lore raw

PATCH 15/18 drm/xe/eudebug: Introduce per device attention scan worker

In reply to Mika Kuoppala

From: Dominik Grzegorzek <[email protected]>

Scan for EU debugging attention bits periodically to detect if some EU thread has entered the system routine (SIP) due to EU thread exception.

Make the scanning interval 10 times slower when there is no debugger connection open. Send attention event whenever we see attention with debugger presence. If there is no debugger connection active - reset.

Based on work by authors and other folks who were part of attentions in i915.

v2: - use xa_array for files
- null ptr deref fix for non-debugged context (Dominik)
- checkpatch (Tilak)
- use discovery_lock during list traversal

v3: - engine status per gen improvements, force_wake ref
- __counted_by (Mika)

v4: - attention register naming (Dominik)
v5: - free event on error (Mika)
v6: - annotata data race on extending the poll interval (Mika)
v7: - sysfs race fix, return error instead of XA_WARN_ON (Sashiko)
- attention_poll_stop to async to avoid deadlock (lockdep)

---
 Documentation/gpu/xe/xe_eudebug.rst   |   3 +
 drivers/gpu/drm/xe/xe_device_types.h  |   3 +
 drivers/gpu/drm/xe/xe_eudebug.c       | 178 ++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_eudebug_types.h |   3 +-
 include/uapi/drm/xe_drm_eudebug.h     |  29 +++++
 5 files changed, 214 insertions(+), 2 deletions(-)
Documentation/gpu/xe/xe_eudebug.rst +3 -0
index 76f255c7da73..29f70b023326 100644
@@ -67,6 +67,9 @@ Resource Event Types
 .. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
    :identifiers: drm_xe_eudebug_event_vm_bind_ufence
 
+.. kernel-doc:: include/uapi/drm/xe_drm_eudebug.h
+   :identifiers: drm_xe_eudebug_event_eu_attention
+
 VM Access
 =========
 
drivers/gpu/drm/xe/xe_device_types.h +3 -0
index b7f140932588..89cf7c1badaf 100644
@@ -590,6 +590,9 @@ struct xe_device {
 
 		/** @wq: used for client discovery */
 		struct workqueue_struct *wq;
+
+		/** @attention_poll: attention poll work */
+		struct delayed_work attention_dwork;
 	} eudebug;
 #endif
 };
drivers/gpu/drm/xe/xe_eudebug.c +178 -0

220 lines not on this page · raw message

drivers/gpu/drm/xe/xe_eudebug_types.h +1 -2
index e92e8c09a34d..f9ffd0ed8858 100644
@@ -37,7 +37,7 @@ enum xe_eudebug_state {
 };
 
 #define CONFIG_DRM_XE_DEBUGGER_EVENT_QUEUE_SIZE 64
-#define XE_EUDEBUG_MAX_EVENT_TYPE DRM_XE_EUDEBUG_EVENT_VM_BIND_UFENCE
+#define XE_EUDEBUG_MAX_EVENT_TYPE DRM_XE_EUDEBUG_EVENT_EU_ATTENTION
 
 /**
  * struct xe_eudebug_handle - eudebug resource handle
@@ -173,4 +173,3 @@ struct xe_eudebug {
 };
 
 #endif /* _XE_EUDEBUG_TYPES_H_ */
-
include/uapi/drm/xe_drm_eudebug.h +29 -0
index 3e61102d416d..12cdfda7e11a 100644
@@ -52,6 +52,7 @@ struct drm_xe_eudebug_event {
 #define DRM_XE_EUDEBUG_EVENT_VM_BIND		4
 #define DRM_XE_EUDEBUG_EVENT_VM_BIND_OP_DEBUG_DATA	5
 #define DRM_XE_EUDEBUG_EVENT_VM_BIND_UFENCE	6
+#define DRM_XE_EUDEBUG_EVENT_EU_ATTENTION	7
 
 	/** @flags: Flags */
 	__u16 flags;
@@ -330,6 +331,34 @@ struct drm_xe_eudebug_eu_control {
 	__u64 bitmask_ptr;
 };
 
+/**
+ * struct drm_xe_eudebug_event_eu_attention - EU Attention Event
+ *
+ * Whenever there is any thread in halted/attentions state, this
+ * event will be delivered. The event will be delivered periodically
+ * until there are no attentions detected.
+ *
+ */
+struct drm_xe_eudebug_event_eu_attention {
+	/** @base: base event */
+	struct drm_xe_eudebug_event base;
+
+	/** @exec_queue_handle: Exec queue handle for the attentions */
+	__u64 exec_queue_handle;
+
+	/** @lrc_handle: LRC handle for the attentions */
+	__u64 lrc_handle;
+
+	/** @flags: Flags */
+	__u32 flags;
+
+	/** @bitmask_size: Bitmask size in bytes for bitmask[] */
+	__u32 bitmask_size;
+
+	/** @bitmask: Attention bits, one per thread */
+	__u8 bitmask[];
+};
+
 #if defined(__cplusplus)
 }
 #endif
Signature · 1 line
2.43.0
#16 lore raw

PATCH 16/18 drm/xe/eudebug_test: Introduce eudebug live tests

In reply to Mika Kuoppala

From: Christoph Manszewski <[email protected]>

Introduce kunit test for eudebug. For now it checks the dynamic application of WAs.

v2: adapt to removal of call_for_each_device (Mika)
v3: s/FW_RENDER/FORCEWAKE_ALL (Mika)
v4: enforce kunit rules and naming (Michal)

---
 drivers/gpu/drm/xe/tests/xe_eudebug_test.c  | 195 ++++++++++++++++++++
 drivers/gpu/drm/xe/tests/xe_live_test_mod.c |   5 +
 drivers/gpu/drm/xe/xe_eudebug.c             |   4 +
 3 files changed, 204 insertions(+)
 create mode 100644 drivers/gpu/drm/xe/tests/xe_eudebug_test.c
drivers/gpu/drm/xe/tests/xe_eudebug_test.c new file +195 -0
new file mode 100644
index 000000000000..c7c1ce3e0a26
@@ -0,0 +1,195 @@
+// SPDX-License-Identifier: GPL-2.0 AND MIT
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+#include <kunit/visibility.h>
+
+#include "regs/xe_gt_regs.h"
+#include "xe_force_wake.h"
+#include "xe_gt_mcr.h"
+#include "xe_mmio.h"
+#include "tests/xe_kunit_helpers.h"
+#include "tests/xe_pci_test.h"
+#include "tests/xe_test.h"
+
+#undef XE_REG_MCR
+#define XE_REG_MCR(r_, ...)	((const struct xe_reg_mcr){					\
+				 .__reg = XE_REG_INITIALIZER(r_,  ##__VA_ARGS__, .mcr = 1)	\
+				 })
+
+static const char *reg_to_str(struct xe_reg reg)
+{
+	if (reg.raw == TD_CTL.__reg.raw)
+		return "TD_CTL";
+	else if (reg.raw == ROW_CHICKEN.__reg.raw)
+		return "ROW_CHICKEN";
+	else if (reg.raw == ROW_CHICKEN2.__reg.raw)
+		return "ROW_CHICKEN2";
+	else if (reg.raw == ROW_CHICKEN3.__reg.raw)
+		return "ROW_CHICKEN3";
+	else
+		return "UNKNOWN REG";
+}
+
+static u32 get_reg_mask(struct xe_device *xe, struct xe_reg reg, struct kunit *test)
+{
+	u32 val = 0;
+
+	if (reg.raw == TD_CTL.__reg.raw) {
+		val = TD_CTL_BREAKPOINT_ENABLE |
+		      TD_CTL_FORCE_THREAD_BREAKPOINT_ENABLE |
+		      TD_CTL_FEH_AND_FEE_ENABLE;
+		if (GRAPHICS_VERx100(xe) >= 1250)
+			val |= TD_CTL_GLOBAL_DEBUG_ENABLE;
+	} else if (reg.raw == ROW_CHICKEN.__reg.raw) {
+		val = STALL_DOP_GATING_DISABLE;
+	} else if (reg.raw == ROW_CHICKEN2.__reg.raw) {
+		val = XEHPC_DISABLE_BTB;
+	} else if (reg.raw == ROW_CHICKEN3.__reg.raw) {
+		val = XE2_EUPEND_CHK_FLUSH_DIS;
+	} else {
+		KUNIT_FAIL(test, "Invalid register selection: 0x%x\n", reg.raw);
+	}
+
+	return val;
+}
+
+static u32 get_reg_expected(struct xe_device *xe, struct xe_reg reg,
+			    bool enable_eudebug, struct kunit *test)
+{
+	const u32 reg_mask = get_reg_mask(xe, reg, test);
+	u32 reg_bits = 0;
+
+	if (enable_eudebug || reg.raw == ROW_CHICKEN3.__reg.raw)
+		reg_bits = reg_mask;
+	else
+		reg_bits = 0;
+
+	return reg_bits;
+}
+
+static void check_reg(struct xe_gt *gt, bool enable_eudebug,
+		      struct xe_reg reg, struct kunit *test)
+{
+	struct xe_device *xe = gt_to_xe(gt);
+	const u32 reg_bits_expected = get_reg_expected(xe, reg, enable_eudebug, test);
+	const u32 reg_mask = get_reg_mask(xe, reg, test);
+	u32 reg_bits = 0;
+
+	if (reg.mcr)
+		reg_bits = xe_gt_mcr_unicast_read_any(gt, (struct xe_reg_mcr){.__reg = reg});
+	else
+		reg_bits = xe_mmio_read32(&gt->mmio, reg);
+
+	reg_bits &= reg_mask;
+
+	KUNIT_EXPECT_EQ_MSG(test, reg_bits_expected, reg_bits,
+			    "Invalid bits set for %s\n", reg_to_str(reg));
+}
+
+static void __check_regs(struct xe_gt *gt, bool enable_eudebug, struct kunit *test)
+{
+	struct xe_device *xe = gt_to_xe(gt);
+
+	if (GRAPHICS_VERx100(xe) >= 1200)
+		check_reg(gt, enable_eudebug, TD_CTL.__reg, test);
+
+	if (GRAPHICS_VERx100(xe) >= 1250 && GRAPHICS_VERx100(xe) <= 1274)
+		check_reg(gt, enable_eudebug, ROW_CHICKEN.__reg, test);
+
+	if (xe->info.platform == XE_PVC)
+		check_reg(gt, enable_eudebug, ROW_CHICKEN2.__reg, test);
+
+	if (GRAPHICS_VERx100(xe) >= 2000 && GRAPHICS_VERx100(xe) <= 2004)
+		check_reg(gt, enable_eudebug, ROW_CHICKEN3.__reg, test);
+}
+
+static void check_regs(struct xe_device *xe, bool enable_eudebug, struct kunit *test)
+{
+	struct xe_gt *gt;
+	unsigned int fw_ref;
+	u8 id;
+
+	kunit_printk(KERN_DEBUG, test, "Check regs for eudebug %s\n",
+		     enable_eudebug ? "enabled" : "disabled");
+
+	for_each_gt(gt, xe, id) {
+		if (xe_gt_is_media_type(gt))
+			continue;
+
+		/* XXX: Figure out per platform proper domain */
+		fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
+		KUNIT_ASSERT_TRUE_MSG(test, fw_ref, "Forcewake failed.\n");
+
+		__check_regs(gt, enable_eudebug, test);
+
+		xe_force_wake_put(gt_to_fw(gt), fw_ref);
+	}
+}
+
+static int toggle_reg_value(struct xe_device *xe, struct kunit *test)
+{
+	const bool enable_eudebug = xe_eudebug_is_enabled(xe);
+
+	kunit_printk(KERN_DEBUG, test, "Test eudebug WAs for graphics version: %u\n",
+		     GRAPHICS_VERx100(xe));
+
+	check_regs(xe, enable_eudebug, test);
+
+	xe_eudebug_enable(xe, !enable_eudebug);
+	check_regs(xe, !enable_eudebug, test);
+
+	xe_eudebug_enable(xe, enable_eudebug);
+	check_regs(xe, enable_eudebug, test);
+
+	return 0;
+}
+
+static void toggle_reg(struct kunit *test)
+{
+	struct xe_device *xe = test->priv;
+
+	toggle_reg_value(xe, test);
+}
+
+static bool xe_eudebug_has_regs(struct xe_device *xe)
+{
+	u32 ver = GRAPHICS_VERx100(xe);
+
+	return ver >= 1200 ||
+	       (ver >= 1250 && ver <= 1274) ||
+	       xe->info.platform == XE_PVC ||
+	       (ver >= 2000 && ver <= 2004);
+}
+
+static int xe_eudebug_test_init(struct kunit *test)
+{
+	struct xe_device *xe;
+	int ret;
+
+	ret = xe_kunit_helper_xe_device_live_test_init(test);
+	if (ret)
+		return ret;
+
+	xe = test->priv;
+	kunit_info(test, "running on graphics version: %u\n", GRAPHICS_VERx100(xe));
+
+	if (!xe_eudebug_has_regs(xe))
+		kunit_skip(test, "hardware not supported: 0x%x\n", GRAPHICS_VERx100(xe));
+
+	return 0;
+}
+
+static struct kunit_case xe_eudebug_tests[] = {
+	KUNIT_CASE_PARAM(toggle_reg, xe_pci_live_device_gen_param),
+	{}
+};
+
+VISIBLE_IF_KUNIT
+struct kunit_suite xe_eudebug_test_suite = {
+	.name = "xe_eudebug",
+	.test_cases = xe_eudebug_tests,
+	.init = xe_eudebug_test_init,
+};
+EXPORT_SYMBOL_IF_KUNIT(xe_eudebug_test_suite);
drivers/gpu/drm/xe/tests/xe_live_test_mod.c +5 -0
index c55e46f1ae92..dc83bb6a892d 100644
@@ -19,6 +19,11 @@ kunit_test_suite(xe_migrate_test_suite);
 kunit_test_suite(xe_mocs_test_suite);
 kunit_test_suite(xe_guc_g2g_test_suite);
 
+#if IS_ENABLED(CONFIG_DRM_XE_EUDEBUG)
+extern struct kunit_suite xe_eudebug_test_suite;
+kunit_test_suite(xe_eudebug_test_suite);
+#endif
+
 MODULE_AUTHOR("Intel Corporation");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("xe live kunit tests");
drivers/gpu/drm/xe/xe_eudebug.c +4 -0
index a0489bec2457..a4f80a73c305 100644
@@ -2322,3 +2322,7 @@ int xe_eudebug_connect_ioctl(struct drm_device *dev,
 
 	return xe_eudebug_connect(xe, file, param);
 }
+
+#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
+#include "tests/xe_eudebug_test.c"
+#endif
Signature · 1 line
2.43.0
#17 lore raw

PATCH 17/18 drm/xe: Implement SR-IOV and eudebug exclusivity

In reply to Mika Kuoppala

From: Christoph Manszewski <[email protected]>

EU debug functionality relies on access to specific mmio registers. Since VFs don't have access to those registers and in order to avoid interference with VFs, make SR-IOV and eudebug functionality exclusive. I.e. don't allow to enable eudebug in VF mode and don't allow to enable eudebug when any VFs are provisioned. Likewise, don't allow to provision VFs when eudebug is enabled.

v2: initialize lock early (Sashiko)

---
 drivers/gpu/drm/xe/tests/xe_eudebug_test.c |  6 ++++++
 drivers/gpu/drm/xe/xe_eudebug.c            | 23 ++++++++++++++++++++--
 2 files changed, 27 insertions(+), 2 deletions(-)
drivers/gpu/drm/xe/tests/xe_eudebug_test.c +6 -0
index c7c1ce3e0a26..0f43efdb014e 100644
@@ -132,6 +132,12 @@ static int toggle_reg_value(struct xe_device *xe, struct kunit *test)
 {
 	const bool enable_eudebug = xe_eudebug_is_enabled(xe);
 
+	if (IS_SRIOV_VF(xe))
+		kunit_skip(test, "eudebug not available in SR-IOV VF mode\n");
+
+	if (xe->eudebug.state == XE_EUDEBUG_NOT_SUPPORTED)
+		kunit_skip(test, "eudebug not supported\n");
+
 	kunit_printk(KERN_DEBUG, test, "Test eudebug WAs for graphics version: %u\n",
 		     GRAPHICS_VERx100(xe));
 
drivers/gpu/drm/xe/xe_eudebug.c +21 -2
index a4f80a73c305..12a2ff3a7328 100644
@@ -24,6 +24,7 @@
 #include "xe_hw_engine.h"
 #include "xe_macros.h"
 #include "xe_pm.h"
+#include "xe_sriov_pf.h"
 #include "xe_sync.h"
 #include "xe_vm.h"
 
@@ -2163,6 +2164,7 @@ bool xe_eudebug_is_enabled(struct xe_device *xe)
 int xe_eudebug_enable(struct xe_device *xe, bool enable)
 {
 	struct xe_gt *gt;
+	int ret;
 	int i;
 	u8 id;
 
@@ -2183,6 +2185,14 @@ int xe_eudebug_enable(struct xe_device *xe, bool enable)
 		return 0;
 	}
 
+	if (enable && IS_SRIOV_PF(xe)) {
+		ret = xe_sriov_pf_lockdown(xe);
+		if (ret) {
+			mutex_unlock(&xe->eudebug.lock);
+			return ret;
+		}
+	}
+
 	xe_pm_runtime_get(xe);
 
 	for_each_gt(gt, xe, id) {
@@ -2202,11 +2212,15 @@ int xe_eudebug_enable(struct xe_device *xe, bool enable)
 	xe->eudebug.state = enable ?
 		XE_EUDEBUG_ENABLED : XE_EUDEBUG_DISABLED;
 
-	if (enable)
+	if (enable) {
 		attention_poll_start(xe);
-	else
+	} else {
 		attention_poll_stop(xe);
 
+		if (IS_SRIOV_PF(xe))
+			xe_sriov_pf_end_lockdown(xe);
+	}
+
 	mutex_unlock(&xe->eudebug.lock);
 
 	return 0;
@@ -2274,6 +2288,11 @@ void xe_eudebug_init(struct xe_device *xe)
 	if (err)
 		goto out_err;
 
+	if (IS_SRIOV_VF(xe)) {
+		drm_info(&xe->drm, "eudebug not available in SR-IOV VF mode\n");
+		return;
+	}
+
 	wq = drmm_alloc_ordered_workqueue(dev, "xe-eudebug", 0);
 	if (IS_ERR(wq)) {
 		err = PTR_ERR(wq);
Signature · 1 line
2.43.0
#18 lore raw

PATCH 18/18 drm/xe: Add xe_client_debugfs and introduce debug_data file

In reply to Mika Kuoppala

From: Christoph Manszewski <[email protected]>

Create a debug_data file for each xe file/client which is supposed to list all mapped debug data and attempts to mimic '/proc/pid/maps'. Each line represents a single mapping and has the following format:

<vm id> <begin>-<end> <flags> <offset> <pathname>

v2: trim len in debug_data_read() (Sashiko)

---
 drivers/gpu/drm/xe/Makefile            |   3 +-
 drivers/gpu/drm/xe/xe_client_debugfs.c | 132 +++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_client_debugfs.h |  19 ++++
 drivers/gpu/drm/xe/xe_device.c         |   3 +
 4 files changed, 156 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/xe/xe_client_debugfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_client_debugfs.h
drivers/gpu/drm/xe/Makefile +2 -1
index 1531ea9b3a93..e43d89a45d39 100644
@@ -354,7 +354,8 @@ ifeq ($(CONFIG_DRM_FBDEV_EMULATION),y)
 endif
 
 ifeq ($(CONFIG_DEBUG_FS),y)
-	xe-y += xe_debugfs.o \
+	xe-y += xe_client_debugfs.o \
+		xe_debugfs.o \
 		xe_gt_debugfs.o \
 		xe_gt_sriov_vf_debugfs.o \
 		xe_gt_stats.o \
drivers/gpu/drm/xe/xe_client_debugfs.c new file +132 -0

132 lines not on this page · raw message

drivers/gpu/drm/xe/xe_client_debugfs.h new file +19 -0
new file mode 100644
index 000000000000..9eace15c0a49
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2025 Intel Corporation
+ */
+
+#ifndef _XE_CLIENT_DEBUGFS_H_
+#define _XE_CLIENT_DEBUGFS_H_
+
+#include <linux/debugfs.h>
+
+struct xe_file;
+
+#ifdef CONFIG_DEBUG_FS
+void xe_client_debugfs_register(struct xe_file *xef);
+#else
+static inline void xe_client_debugfs_register(struct xe_file *xef) { }
+#endif
+
+#endif // _XE_CLIENT_DEBUGFS_H_
drivers/gpu/drm/xe/xe_device.c +3 -0
index 02ab8b307c9f..539ce3be8d42 100644
@@ -25,6 +25,7 @@
 #include "regs/xe_regs.h"
 #include "xe_bo.h"
 #include "xe_bo_evict.h"
+#include "xe_client_debugfs.h"
 #include "xe_configfs.h"
 #include "xe_debugfs.h"
 #include "xe_defaults.h"
@@ -125,6 +126,8 @@ static int xe_file_open(struct drm_device *dev, struct drm_file *file)
 		put_task_struct(task);
 	}
 
+	xe_client_debugfs_register(xef);
+
 	return 0;
 }
 
Signature · 1 line
2.43.0
#19 lore raw

Re: [PATCH 18/18] drm/xe: Add xe_client_debugfs and introduce debug_data file

Quoted 43 lines · Mika Kuoppala

From: Christoph Manszewski <[email protected]>

Create a debug_data file for each xe file/client which is supposed to list all mapped debug data and attempts to mimic '/proc/pid/maps'. Each line represents a single mapping and has the following format:

<vm id> <begin>-<end> <flags> <offset> <pathname>

v2: trim len in debug_data_read() (Sashiko)

---
 drivers/gpu/drm/xe/Makefile            |   3 +-
 drivers/gpu/drm/xe/xe_client_debugfs.c | 132 +++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_client_debugfs.h |  19 ++++
 drivers/gpu/drm/xe/xe_device.c         |   3 +
 4 files changed, 156 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/xe/xe_client_debugfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_client_debugfs.h
drivers/gpu/drm/xe/Makefile +2 -1
index 1531ea9b3a93..e43d89a45d39 100644
@@ -354,7 +354,8 @@ ifeq ($(CONFIG_DRM_FBDEV_EMULATION),y)
 endif
 
 ifeq ($(CONFIG_DEBUG_FS),y)
-	xe-y += xe_debugfs.o \
+	xe-y += xe_client_debugfs.o \
+		xe_debugfs.o \
 		xe_gt_debugfs.o \
 		xe_gt_sriov_vf_debugfs.o \
 		xe_gt_stats.o \
drivers/gpu/drm/xe/xe_client_debugfs.c new file +0 -0
new file mode 100644
index 000000000000..3ce9527188c4

drivers/gpu/drm/xe/xe_client_debugfs.c line 3

Quoted 3 lines
drivers/gpu/drm/xe/xe_client_debugfs.c new file +3 -0
@@ -0,0 +1,132 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2025 Intel Corporation

2026 ?

drivers/gpu/drm/xe/xe_client_debugfs.c line 7

Quoted 4 lines
drivers/gpu/drm/xe/xe_client_debugfs.c new file +4 -0
+ */
+
+#include "xe_device.h"
+#include "xe_client_debugfs.h"

keep then in order together with other xe includes below

Quoted 7 lines
drivers/gpu/drm/xe/xe_client_debugfs.c new file +7 -0
+
+#include <linux/debugfs.h>
+
+#include "xe_debug_data.h"
+#include "xe_debug_data_types.h"
+#include "xe_device_types.h"
+#include "xe_vm_types.h"

drivers/gpu/drm/xe/xe_client_debugfs.c line 24

Quoted 10 lines
drivers/gpu/drm/xe/xe_client_debugfs.c new file +10 -0
+
+#define MAX_LINE_LEN (64 + PATH_MAX)
+
+static ssize_t debug_data_read(struct file *file, char __user *buf, size_t count,
+			       loff_t *ppos)
+{
+	struct xe_debug_data *dd;
+	unsigned long vm_index;
+	const char *path;
+	char *kbuf;

maybe

char *kbuf __free(kfree) = NULL

to avoid leaks?

drivers/gpu/drm/xe/xe_client_debugfs.c line 25

Quoted 1 line
drivers/gpu/drm/xe/xe_client_debugfs.c new file +1 -0
+	struct xe_vm *vm;

keep vars in rev-xmas-tree order

drivers/gpu/drm/xe/xe_client_debugfs.c line 26

Quoted 1 line
drivers/gpu/drm/xe/xe_client_debugfs.c new file +1 -0
+

no spaces

drivers/gpu/drm/xe/xe_client_debugfs.c line 31

Quoted 5 lines
drivers/gpu/drm/xe/xe_client_debugfs.c new file +5 -0
+	struct xe_file *xef = file->private_data;
+	ssize_t total = 0;
+	loff_t pos = 0;
+
+	if (!xef || !buf)

can xef be NULL here?
if xe_file_get() can return NULL, then maybe .open shall fail?

can buf be NULL here?
it's unusual check

drivers/gpu/drm/xe/xe_client_debugfs.c line 38

Quoted 7 lines
drivers/gpu/drm/xe/xe_client_debugfs.c new file +7 -0
+		return -EINVAL;
+
+	kbuf = kmalloc(MAX_LINE_LEN, GFP_KERNEL);
+	if (!kbuf)
+		return -ENOMEM;
+
+	mutex_lock(&xef->vm.lock);

maybe

	guard(mutex)(&xef->vm.lock);

to simplify and have more robust code?

drivers/gpu/drm/xe/xe_client_debugfs.c line 41

Quoted 3 lines
drivers/gpu/drm/xe/xe_client_debugfs.c new file +3 -0
+
+	xa_for_each(&xef->vm.xa, vm_index, vm) {
+		mutex_lock(&vm->debug_data.lock);

ditto

Quoted 77 lines
drivers/gpu/drm/xe/xe_client_debugfs.c new file +77 -0
+		list_for_each_entry(dd, &vm->debug_data.list, link) {
+			int len;
+
+			path = dd->flags & DRM_XE_VM_BIND_DEBUG_DATA_FLAG_PSEUDO ?
+				xe_debug_data_pseudo_path_to_string(dd->pseudopath) :
+				dd->pathname;
+
+			/* Format: <vm id> <begin>-<end> <flags> <offset> <pathname> */
+			len = snprintf(kbuf, MAX_LINE_LEN, "%lu 0x%llx-0x%llx 0x%llx 0x%x\t%s\n",
+				vm_index,
+				dd->addr,
+				dd->addr + dd->range,
+				dd->flags,
+				dd->offset,
+				path);
+
+			/* snprintf may return more but string is truncated to size */
+			if (len > MAX_LINE_LEN)
+				len = MAX_LINE_LEN;
+
+			if (pos + len <= *ppos) {
+				pos += len;
+				continue;
+			}
+
+			if (pos < *ppos) {
+				const int skip = *ppos - pos;
+
+				len -= skip;
+				memmove(kbuf, kbuf + skip, len);
+				pos = *ppos;
+			}
+
+			if (total + len > count)
+				len = count - total;
+
+			if (copy_to_user(buf + total, kbuf, len)) {
+				mutex_unlock(&vm->debug_data.lock);
+				mutex_unlock(&xef->vm.lock);
+				kfree(kbuf);
+				return -EFAULT;
+			}
+
+			total += len;
+			pos += len;
+
+			if (total >= count) {
+				mutex_unlock(&vm->debug_data.lock);
+				mutex_unlock(&xef->vm.lock);
+				kfree(kbuf);
+				*ppos = pos;
+				return total;
+			}
+		}
+		mutex_unlock(&vm->debug_data.lock);
+	}
+
+	mutex_unlock(&xef->vm.lock);
+	kfree(kbuf);
+	*ppos = pos;
+	return total;
+}
+
+static int debug_data_open(struct inode *inode, struct file *file)
+{
+	struct xe_file *xef = inode->i_private;
+
+	file->private_data = xe_file_get(xef);
+	return 0;
+}
+
+static int debug_data_release(struct inode *inode, struct file *file)
+{
+	struct xe_file *xef = inode->i_private;
+
+	xe_file_put(xef);
+	return 0;

drivers/gpu/drm/xe/xe_client_debugfs.c line 128

Quoted 10 lines
drivers/gpu/drm/xe/xe_client_debugfs.c new file +10 -0
+}
+
+static const struct file_operations maps_fops = {
+	.owner = THIS_MODULE,
+	.open = debug_data_open,
+	.release = debug_data_release,
+	.read = debug_data_read,
+	.llseek = default_llseek,
+};
+

all public xe functions shall have kernel-doc

Quoted 10 lines
drivers/gpu/drm/xe/xe_client_debugfs.c new file +4 -0
+void xe_client_debugfs_register(struct xe_file *xef)
+{
+	debugfs_create_file("debug_data", 0444, xef->drm->debugfs_client, xef, &maps_fops);
+}
drivers/gpu/drm/xe/xe_client_debugfs.h new file +0 -0
new file mode 100644
index 000000000000..9eace15c0a49

drivers/gpu/drm/xe/xe_client_debugfs.h line 9

Quoted 9 lines
drivers/gpu/drm/xe/xe_client_debugfs.h new file +9 -0
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2025 Intel Corporation
+ */
+
+#ifndef _XE_CLIENT_DEBUGFS_H_
+#define _XE_CLIENT_DEBUGFS_H_
+
+#include <linux/debugfs.h>

is this needed ?

drivers/gpu/drm/xe/xe_client_debugfs.h line 19

Quoted 10 lines
drivers/gpu/drm/xe/xe_client_debugfs.h new file +10 -0
+
+struct xe_file;
+
+#ifdef CONFIG_DEBUG_FS
+void xe_client_debugfs_register(struct xe_file *xef);
+#else
+static inline void xe_client_debugfs_register(struct xe_file *xef) { }
+#endif
+
+#endif // _XE_CLIENT_DEBUGFS_H_

we don't use // comments
we don't use trailing guard comments

Quoted 21 lines
drivers/gpu/drm/xe/xe_device.c +3 -0
index 02ab8b307c9f..539ce3be8d42 100644
@@ -25,6 +25,7 @@
 #include "regs/xe_regs.h"
 #include "xe_bo.h"
 #include "xe_bo_evict.h"
+#include "xe_client_debugfs.h"
 #include "xe_configfs.h"
 #include "xe_debugfs.h"
 #include "xe_defaults.h"
@@ -125,6 +126,8 @@ static int xe_file_open(struct drm_device *dev, struct drm_file *file)
 		put_task_struct(task);
 	}
 
+	xe_client_debugfs_register(xef);
+
 	return 0;
 }
 
#20 lore raw

✗ CI.checkpatch: warning for Intel Xe GPU Debug Support (eudebug) v9

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: Intel Xe GPU Debug Support (eudebug) v9
URL : https://patchwork.freedesktop.org/series/168104/
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 28a3a9eb917fa47d6ebfe89f126867f248576393

Author: Christoph Manszewski <[email protected]>
Date:   Mon Jun 8 19:16:36 2026 +0300

drm/xe: Add xe_client_debugfs and introduce debug_data file

Create a debug_data file for each xe file/client which is supposed to list all mapped debug data and attempts to mimic '/proc/pid/maps'. Each line represents a single mapping and has the following format:

<vm id> <begin>-<end> <flags> <offset> <pathname>

v2: trim len in debug_data_read() (Sashiko)

+ /mt/dim checkpatch 044152a1643f7150f482c8d326caa5023ae4c397 drm-intel 7d145466de5f drm/xe/eudebug: Introduce eudebug interface
-:228: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #228:
new file mode 100644

-:349: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!READ_ONCE" #349: FILE: drivers/gpu/drm/xe/xe_eudebug.c:117:
+ return READ_ONCE(d->target.xef) == NULL;

-:410: CHECK:MACRO_ARG_REUSE: Macro argument reuse '_d' - possible side-effects? #410: FILE: drivers/gpu/drm/xe/xe_eudebug.c:178:
+#define xe_eudebug_disconnect(_d, _err) ({ \
+ if (_xe_eudebug_disconnect((_d), (_err))) { \
+ if ((_err) == 0 || (_err) == -ETIMEDOUT) \
+ eu_dbg((_d), "Session closed (%d)", (_err)); \
+ else \
+ eu_err((_d), "Session disconnected, err = %d (%s:%d)", \
+ (_err), __func__, __LINE__); \
+ } \
+})

-:410: CHECK:MACRO_ARG_REUSE: Macro argument reuse '_err' - possible side-effects? #410: FILE: drivers/gpu/drm/xe/xe_eudebug.c:178:
+#define xe_eudebug_disconnect(_d, _err) ({ \
+ if (_xe_eudebug_disconnect((_d), (_err))) { \
+ if ((_err) == 0 || (_err) == -ETIMEDOUT) \
+ eu_dbg((_d), "Session closed (%d)", (_err)); \
+ else \
+ eu_err((_d), "Session disconnected, err = %d (%s:%d)", \
+ (_err), __func__, __LINE__); \
+ } \
+})

-:1336: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #1336: FILE: drivers/gpu/drm/xe/xe_eudebug.h:20:
+#define XE_EUDEBUG_DBG_ARGS(d) (d)->session, \
+ atomic_long_read(&(d)->events.seqno), \
+ !READ_ONCE(d->target.xef) ? "disconnected" : "", \
+ current->pid, \
+ task_tgid_nr(current), \
+ READ_ONCE(d->target.xef) ? d->target.xef->pid : -1

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.

-:1336: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'd' - possible side-effects? #1336: FILE: drivers/gpu/drm/xe/xe_eudebug.h:20:
+#define XE_EUDEBUG_DBG_ARGS(d) (d)->session, \
+ atomic_long_read(&(d)->events.seqno), \
+ !READ_ONCE(d->target.xef) ? "disconnected" : "", \
+ current->pid, \
+ task_tgid_nr(current), \
+ READ_ONCE(d->target.xef) ? d->target.xef->pid : -1

-:1343: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'd' - possible side-effects? #1343: FILE: drivers/gpu/drm/xe/xe_eudebug.h:27:
+#define eu_err(d, fmt, ...) drm_err(&(d)->xe->drm, XE_EUDEBUG_DBG_STR # fmt, \
+ XE_EUDEBUG_DBG_ARGS(d), ##__VA_ARGS__)

-:1345: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'd' - possible side-effects? #1345: FILE: drivers/gpu/drm/xe/xe_eudebug.h:29:
+#define eu_warn(d, fmt, ...) drm_warn(&(d)->xe->drm, XE_EUDEBUG_DBG_STR # fmt, \
+ XE_EUDEBUG_DBG_ARGS(d), ##__VA_ARGS__)

-:1347: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'd' - possible side-effects? #1347: FILE: drivers/gpu/drm/xe/xe_eudebug.h:31:
+#define eu_dbg(d, fmt, ...) drm_dbg(&(d)->xe->drm, XE_EUDEBUG_DBG_STR # fmt, \
+ XE_EUDEBUG_DBG_ARGS(d), ##__VA_ARGS__)

-:1569: WARNING:LONG_LINE: line length of 129 exceeds 100 columns #1569: FILE: include/uapi/drm/xe_drm.h:133:
+#define DRM_IOCTL_XE_EUDEBUG_CONNECT DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EUDEBUG_CONNECT, struct drm_xe_eudebug_connect)

total: 1 errors, 2 warnings, 7 checks, 1534 lines checked
e8c5c56d4c52 drm/xe/eudebug: Add documentation
-:21: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 74 lines checked
ead67f97b767 drm/xe/eudebug: Add connection establishment documentation 7934fecb8a0c drm/xe/eudebug: Introduce discovery for resources
9942530d243d drm/xe: Add EUDEBUG_ENABLE exec queue property
5739be64f362 drm/xe/eudebug: Introduce exec_queue events
8cabf443a121 drm/xe/eudebug: Mark guc contexts as debuggable
73f8b036237c drm/xe: Introduce ADD_DEBUG_DATA and REMOVE_DEBUG_DATA vm bind ops -:47: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #47:
new file mode 100644

-:691: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #691: FILE: drivers/gpu/drm/xe/xe_vm.c:3692:
+ if (XE_IOCTL_DBG(xe, operation != DRM_XE_VM_BIND_OP_ADD_DEBUG_DATA &&
+ operation != DRM_XE_VM_BIND_OP_REMOVE_DEBUG_DATA &&

-:694: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #694: FILE: drivers/gpu/drm/xe/xe_vm.c:3695:
+ XE_IOCTL_DBG(xe, ext.name == XE_VM_BIND_OP_EXTENSIONS_DEBUG_DATA &&
+ ++debug_data_count > 1))

-:818: CHECK:UNCOMMENTED_DEFINITION: struct mutex definition without comment #818: FILE: drivers/gpu/drm/xe/xe_vm_types.h:414:
+ struct mutex lock;

total: 0 errors, 1 warnings, 3 checks, 861 lines checked
9acd4ea869b7 drm/xe/eudebug: Introduce vm bind and vm bind debug data events
-:7: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?) #7:
This patch adds events to track the bind ioctl and associated debug data add

-:427: WARNING:LONG_LINE_COMMENT: line length of 102 exceeds 100 columns #427: FILE: include/uapi/drm/xe_drm_eudebug.h:112:
+ * │ EVENT_VM_BIND ├──────────────────┬─┬┄┐

-:428: WARNING:LONG_LINE_COMMENT: line length of 108 exceeds 100 columns #428: FILE: include/uapi/drm/xe_drm_eudebug.h:113:
+ * └───────────────────────┘ │ │ ┊

-:429: WARNING:LONG_LINE_COMMENT: line length of 130 exceeds 100 columns #429: FILE: include/uapi/drm/xe_drm_eudebug.h:114:
+ * ┌──────────────────────────────────┐ │ │ ┊

-:431: WARNING:LONG_LINE_COMMENT: line length of 128 exceeds 100 columns #431: FILE: include/uapi/drm/xe_drm_eudebug.h:116:
+ * └──────────────────────────────────┘ │ ┊

-:433: WARNING:LONG_LINE_COMMENT: line length of 128 exceeds 100 columns #433: FILE: include/uapi/drm/xe_drm_eudebug.h:118:
+ * ┌──────────────────────────────────┐ │ ┊

-:435: WARNING:LONG_LINE_COMMENT: line length of 126 exceeds 100 columns #435: FILE: include/uapi/drm/xe_drm_eudebug.h:120:
+ * └──────────────────────────────────┘ ┊

-:437: WARNING:LONG_LINE_COMMENT: line length of 126 exceeds 100 columns #437: FILE: include/uapi/drm/xe_drm_eudebug.h:122:
+ * ┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐ ┊

-:439: WARNING:LONG_LINE_COMMENT: line length of 116 exceeds 100 columns #439: FILE: include/uapi/drm/xe_drm_eudebug.h:124:
+ * └┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘

total: 0 errors, 9 warnings, 0 checks, 440 lines checked ff6c4d73bab5 drm/xe/eudebug: Add ufence events with acks
-:337: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!ufence" #337: FILE: drivers/gpu/drm/xe/xe_eudebug.c:1299:
+ xe_assert(vm->xe, ufence == NULL);

-:641: CHECK:UNCOMMENTED_DEFINITION: spinlock_t definition without comment #641: FILE: drivers/gpu/drm/xe/xe_sync_types.h:26:
+ spinlock_t lock;

total: 0 errors, 0 warnings, 2 checks, 656 lines checked
261f837fa8a5 drm/xe/eudebug: vm open/pread/pwrite
-:182: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #182: FILE: drivers/gpu/drm/xe/xe_eudebug.h:42:
+#define xe_eudebug_for_each_hw_engine(__hwe, __gt, __id) \
+ for_each_hw_engine(__hwe, __gt, __id) \
+ if (xe_hw_engine_has_eudebug(__hwe))

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.

-:182: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__hwe' - possible side-effects? #182: FILE: drivers/gpu/drm/xe/xe_eudebug.h:42:
+#define xe_eudebug_for_each_hw_engine(__hwe, __gt, __id) \
+ for_each_hw_engine(__hwe, __gt, __id) \
+ if (xe_hw_engine_has_eudebug(__hwe))

-:210: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #210:
new file mode 100644

total: 1 errors, 1 warnings, 1 checks, 614 lines checked
159eb0cbc906 drm/xe/eudebug: userptr vm pread/pwrite
2cd0ca8cb89e drm/xe/eudebug: hw enablement for eudebug
-:95: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #95:
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 445 lines checked a1cb4ab87aaa drm/xe/eudebug: Introduce EU control interface -:303: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #303: FILE: drivers/gpu/drm/xe/xe_eudebug_hw.c:183:
+static bool engine_has_runalone_set(const struct xe_hw_engine * const hwe,
+ u32 rcu_debug1)

-:309: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #309: FILE: drivers/gpu/drm/xe/xe_eudebug_hw.c:189:
+static bool engine_has_context_set(const struct xe_hw_engine * const hwe,
+ u32 rcu_debug1)

total: 0 errors, 0 warnings, 2 checks, 902 lines checked
a84a2f84a023 drm/xe/eudebug: Introduce per device attention scan worker 93d992d05f92 drm/xe/eudebug_test: Introduce eudebug live tests
-:18: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #18:
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 213 lines checked
4f1d68521cbf drm/xe: Implement SR-IOV and eudebug exclusivity
28a3a9eb917f drm/xe: Add xe_client_debugfs and introduce debug_data file
-:34: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #34:
new file mode 100644

-:89: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #89: FILE: drivers/gpu/drm/xe/xe_client_debugfs.c:51:
+ len = snprintf(kbuf, MAX_LINE_LEN, "%lu 0x%llx-0x%llx 0x%llx 0x%x\t%s\n",
+ vm_index,

total: 0 errors, 1 warnings, 1 checks, 175 lines checked

#21 lore raw

✓ CI.KUnit: success for Intel Xe GPU Debug Support (eudebug) v9

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: Intel Xe GPU Debug Support (eudebug) v9
URL : https://patchwork.freedesktop.org/series/168104/
State : success

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [16:24:40] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[16:24:44] 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=48
[16:25:15] Starting KUnit Kernel (1/1)...
[16:25:15] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[16:25:15] ================== guc_buf (11 subtests) ===================
[16:25:15] [PASSED] test_smallest
[16:25:15] [PASSED] test_largest
[16:25:15] [PASSED] test_granular
[16:25:15] [PASSED] test_unique
[16:25:15] [PASSED] test_overlap
[16:25:15] [PASSED] test_reusable
[16:25:15] [PASSED] test_too_big
[16:25:15] [PASSED] test_flush
[16:25:15] [PASSED] test_lookup
[16:25:15] [PASSED] test_data
[16:25:15] [PASSED] test_class
[16:25:15] ===================== [PASSED] guc_buf =====================
[16:25:15] =================== guc_dbm (7 subtests) ===================
[16:25:15] [PASSED] test_empty
[16:25:15] [PASSED] test_default
[16:25:15] ======================== test_size  ========================
[16:25:15] [PASSED] 4
[16:25:15] [PASSED] 8
[16:25:15] [PASSED] 32
[16:25:15] [PASSED] 256
[16:25:15] ==================== [PASSED] test_size ====================
[16:25:15] ======================= test_reuse  ========================
[16:25:15] [PASSED] 4
[16:25:15] [PASSED] 8
[16:25:15] [PASSED] 32
[16:25:15] [PASSED] 256
[16:25:15] =================== [PASSED] test_reuse ====================
[16:25:15] =================== test_range_overlap  ====================
[16:25:15] [PASSED] 4
[16:25:15] [PASSED] 8
[16:25:15] [PASSED] 32
[16:25:15] [PASSED] 256
[16:25:15] =============== [PASSED] test_range_overlap ================
[16:25:15] =================== test_range_compact  ====================
[16:25:15] [PASSED] 4
[16:25:15] [PASSED] 8
[16:25:15] [PASSED] 32
[16:25:15] [PASSED] 256
[16:25:15] =============== [PASSED] test_range_compact ================
[16:25:15] ==================== test_range_spare  =====================
[16:25:15] [PASSED] 4
[16:25:15] [PASSED] 8
[16:25:15] [PASSED] 32
[16:25:15] [PASSED] 256
[16:25:15] ================ [PASSED] test_range_spare =================
[16:25:15] ===================== [PASSED] guc_dbm =====================
[16:25:15] =================== guc_idm (6 subtests) ===================
[16:25:15] [PASSED] bad_init
[16:25:15] [PASSED] no_init
[16:25:15] [PASSED] init_fini
[16:25:15] [PASSED] check_used
[16:25:15] [PASSED] check_quota
[16:25:15] [PASSED] check_all
[16:25:15] ===================== [PASSED] guc_idm =====================
[16:25:15] ================== no_relay (3 subtests) ===================
[16:25:15] [PASSED] xe_drops_guc2pf_if_not_ready
[16:25:15] [PASSED] xe_drops_guc2vf_if_not_ready
[16:25:15] [PASSED] xe_rejects_send_if_not_ready
[16:25:15] ==================== [PASSED] no_relay =====================
[16:25:15] ================== pf_relay (14 subtests) ==================
[16:25:15] [PASSED] pf_rejects_guc2pf_too_short
[16:25:15] [PASSED] pf_rejects_guc2pf_too_long
[16:25:15] [PASSED] pf_rejects_guc2pf_no_payload
[16:25:15] [PASSED] pf_fails_no_payload
[16:25:15] [PASSED] pf_fails_bad_origin
[16:25:15] [PASSED] pf_fails_bad_type
[16:25:15] [PASSED] pf_txn_reports_error
[16:25:15] [PASSED] pf_txn_sends_pf2guc
[16:25:15] [PASSED] pf_sends_pf2guc
[16:25:15] [SKIPPED] pf_loopback_nop
[16:25:15] [SKIPPED] pf_loopback_echo
[16:25:15] [SKIPPED] pf_loopback_fail
[16:25:15] [SKIPPED] pf_loopback_busy
[16:25:15] [SKIPPED] pf_loopback_retry
[16:25:15] ==================== [PASSED] pf_relay =====================
[16:25:15] ================== vf_relay (3 subtests) ===================
[16:25:15] [PASSED] vf_rejects_guc2vf_too_short
[16:25:15] [PASSED] vf_rejects_guc2vf_too_long
[16:25:15] [PASSED] vf_rejects_guc2vf_no_payload
[16:25:15] ==================== [PASSED] vf_relay =====================
[16:25:15] ================ pf_gt_config (9 subtests) =================
[16:25:15] [PASSED] fair_contexts_1vf
[16:25:15] [PASSED] fair_doorbells_1vf
[16:25:15] [PASSED] fair_ggtt_1vf
[16:25:15] ====================== fair_vram_1vf  ======================
[16:25:15] [PASSED] 3.50 GiB
[16:25:15] [PASSED] 11.5 GiB
[16:25:15] [PASSED] 15.5 GiB
[16:25:15] [PASSED] 31.5 GiB
[16:25:15] [PASSED] 63.5 GiB
[16:25:15] [PASSED] 1.91 GiB
[16:25:15] ================== [PASSED] fair_vram_1vf ==================
[16:25:15] ================ fair_vram_1vf_admin_only  =================
[16:25:15] [PASSED] 3.50 GiB
[16:25:15] [PASSED] 11.5 GiB
[16:25:15] [PASSED] 15.5 GiB
[16:25:15] [PASSED] 31.5 GiB
[16:25:15] [PASSED] 63.5 GiB
[16:25:15] [PASSED] 1.91 GiB
[16:25:15] ============ [PASSED] fair_vram_1vf_admin_only =============
[16:25:15] ====================== fair_contexts  ======================
[16:25:15] [PASSED] 1 VF
[16:25:15] [PASSED] 2 VFs
[16:25:15] [PASSED] 3 VFs
[16:25:15] [PASSED] 4 VFs
[16:25:15] [PASSED] 5 VFs
[16:25:15] [PASSED] 6 VFs
[16:25:15] [PASSED] 7 VFs
[16:25:15] [PASSED] 8 VFs
[16:25:15] [PASSED] 9 VFs
[16:25:15] [PASSED] 10 VFs
[16:25:15] [PASSED] 11 VFs
[16:25:15] [PASSED] 12 VFs
[16:25:15] [PASSED] 13 VFs
[16:25:15] [PASSED] 14 VFs
[16:25:15] [PASSED] 15 VFs
[16:25:15] [PASSED] 16 VFs
[16:25:15] [PASSED] 17 VFs
[16:25:15] [PASSED] 18 VFs
[16:25:15] [PASSED] 19 VFs
[16:25:15] [PASSED] 20 VFs
[16:25:15] [PASSED] 21 VFs
[16:25:15] [PASSED] 22 VFs
[16:25:15] [PASSED] 23 VFs
[16:25:15] [PASSED] 24 VFs
[16:25:15] [PASSED] 25 VFs
[16:25:15] [PASSED] 26 VFs
[16:25:15] [PASSED] 27 VFs
[16:25:15] [PASSED] 28 VFs
[16:25:15] [PASSED] 29 VFs
[16:25:15] [PASSED] 30 VFs
[16:25:15] [PASSED] 31 VFs
[16:25:15] [PASSED] 32 VFs
[16:25:15] [PASSED] 33 VFs
[16:25:15] [PASSED] 34 VFs
[16:25:15] [PASSED] 35 VFs
[16:25:15] [PASSED] 36 VFs
[16:25:15] [PASSED] 37 VFs
[16:25:15] [PASSED] 38 VFs
[16:25:15] [PASSED] 39 VFs
[16:25:15] [PASSED] 40 VFs
[16:25:15] [PASSED] 41 VFs
[16:25:15] [PASSED] 42 VFs
[16:25:15] [PASSED] 43 VFs
[16:25:15] [PASSED] 44 VFs
[16:25:15] [PASSED] 45 VFs
[16:25:15] [PASSED] 46 VFs
[16:25:15] [PASSED] 47 VFs
[16:25:15] [PASSED] 48 VFs
[16:25:15] [PASSED] 49 VFs
[16:25:15] [PASSED] 50 VFs
[16:25:15] [PASSED] 51 VFs
[16:25:15] [PASSED] 52 VFs
[16:25:15] [PASSED] 53 VFs
[16:25:16] [PASSED] 54 VFs
[16:25:16] [PASSED] 55 VFs
[16:25:16] [PASSED] 56 VFs
[16:25:16] [PASSED] 57 VFs
[16:25:16] [PASSED] 58 VFs
[16:25:16] [PASSED] 59 VFs
[16:25:16] [PASSED] 60 VFs
[16:25:16] [PASSED] 61 VFs
[16:25:16] [PASSED] 62 VFs
[16:25:16] [PASSED] 63 VFs
[16:25:16] ================== [PASSED] fair_contexts ==================
[16:25:16] ===================== fair_doorbells  ======================
[16:25:16] [PASSED] 1 VF
[16:25:16] [PASSED] 2 VFs
[16:25:16] [PASSED] 3 VFs
[16:25:16] [PASSED] 4 VFs
[16:25:16] [PASSED] 5 VFs
[16:25:16] [PASSED] 6 VFs
[16:25:16] [PASSED] 7 VFs
[16:25:16] [PASSED] 8 VFs
[16:25:16] [PASSED] 9 VFs
[16:25:16] [PASSED] 10 VFs
[16:25:16] [PASSED] 11 VFs
[16:25:16] [PASSED] 12 VFs
[16:25:16] [PASSED] 13 VFs
[16:25:16] [PASSED] 14 VFs
[16:25:16] [PASSED] 15 VFs
[16:25:16] [PASSED] 16 VFs
[16:25:16] [PASSED] 17 VFs
[16:25:16] [PASSED] 18 VFs
[16:25:16] [PASSED] 19 VFs
[16:25:16] [PASSED] 20 VFs
[16:25:16] [PASSED] 21 VFs
[16:25:16] [PASSED] 22 VFs
[16:25:16] [PASSED] 23 VFs
[16:25:16] [PASSED] 24 VFs
[16:25:16] [PASSED] 25 VFs
[16:25:16] [PASSED] 26 VFs
[16:25:16] [PASSED] 27 VFs
[16:25:16] [PASSED] 28 VFs
[16:25:16] [PASSED] 29 VFs
[16:25:16] [PASSED] 30 VFs
[16:25:16] [PASSED] 31 VFs
[16:25:16] [PASSED] 32 VFs
[16:25:16] [PASSED] 33 VFs
[16:25:16] [PASSED] 34 VFs
[16:25:16] [PASSED] 35 VFs
[16:25:16] [PASSED] 36 VFs
[16:25:16] [PASSED] 37 VFs
[16:25:16] [PASSED] 38 VFs
[16:25:16] [PASSED] 39 VFs
[16:25:16] [PASSED] 40 VFs
[16:25:16] [PASSED] 41 VFs
[16:25:16] [PASSED] 42 VFs
[16:25:16] [PASSED] 43 VFs
[16:25:16] [PASSED] 44 VFs
[16:25:16] [PASSED] 45 VFs
[16:25:16] [PASSED] 46 VFs
[16:25:16] [PASSED] 47 VFs
[16:25:16] [PASSED] 48 VFs
[16:25:16] [PASSED] 49 VFs
[16:25:16] [PASSED] 50 VFs
[16:25:16] [PASSED] 51 VFs
[16:25:16] [PASSED] 52 VFs
[16:25:16] [PASSED] 53 VFs
[16:25:16] [PASSED] 54 VFs
[16:25:16] [PASSED] 55 VFs
[16:25:16] [PASSED] 56 VFs
[16:25:16] [PASSED] 57 VFs
[16:25:16] [PASSED] 58 VFs
[16:25:16] [PASSED] 59 VFs
[16:25:16] [PASSED] 60 VFs
[16:25:16] [PASSED] 61 VFs
[16:25:16] [PASSED] 62 VFs
[16:25:16] [PASSED] 63 VFs
[16:25:16] ================= [PASSED] fair_doorbells ==================
[16:25:16] ======================== fair_ggtt  ========================
[16:25:16] [PASSED] 1 VF
[16:25:16] [PASSED] 2 VFs
[16:25:16] [PASSED] 3 VFs
[16:25:16] [PASSED] 4 VFs
[16:25:16] [PASSED] 5 VFs
[16:25:16] [PASSED] 6 VFs
[16:25:16] [PASSED] 7 VFs
[16:25:16] [PASSED] 8 VFs
[16:25:16] [PASSED] 9 VFs
[16:25:16] [PASSED] 10 VFs
[16:25:16] [PASSED] 11 VFs
[16:25:16] [PASSED] 12 VFs
[16:25:16] [PASSED] 13 VFs
[16:25:16] [PASSED] 14 VFs
[16:25:16] [PASSED] 15 VFs
[16:25:16] [PASSED] 16 VFs
[16:25:16] [PASSED] 17 VFs
[16:25:16] [PASSED] 18 VFs
[16:25:16] [PASSED] 19 VFs
[16:25:16] [PASSED] 20 VFs
[16:25:16] [PASSED] 21 VFs
[16:25:16] [PASSED] 22 VFs
[16:25:16] [PASSED] 23 VFs
[16:25:16] [PASSED] 24 VFs
[16:25:16] [PASSED] 25 VFs
[16:25:16] [PASSED] 26 VFs
[16:25:16] [PASSED] 27 VFs
[16:25:16] [PASSED] 28 VFs
[16:25:16] [PASSED] 29 VFs
[16:25:16] [PASSED] 30 VFs
[16:25:16] [PASSED] 31 VFs
[16:25:16] [PASSED] 32 VFs
[16:25:16] [PASSED] 33 VFs
[16:25:16] [PASSED] 34 VFs
[16:25:16] [PASSED] 35 VFs
[16:25:16] [PASSED] 36 VFs
[16:25:16] [PASSED] 37 VFs
[16:25:16] [PASSED] 38 VFs
[16:25:16] [PASSED] 39 VFs
[16:25:16] [PASSED] 40 VFs
[16:25:16] [PASSED] 41 VFs
[16:25:16] [PASSED] 42 VFs
[16:25:16] [PASSED] 43 VFs
[16:25:16] [PASSED] 44 VFs
[16:25:16] [PASSED] 45 VFs
[16:25:16] [PASSED] 46 VFs
[16:25:16] [PASSED] 47 VFs
[16:25:16] [PASSED] 48 VFs
[16:25:16] [PASSED] 49 VFs
[16:25:16] [PASSED] 50 VFs
[16:25:16] [PASSED] 51 VFs
[16:25:16] [PASSED] 52 VFs
[16:25:16] [PASSED] 53 VFs
[16:25:16] [PASSED] 54 VFs
[16:25:16] [PASSED] 55 VFs
[16:25:16] [PASSED] 56 VFs
[16:25:16] [PASSED] 57 VFs
[16:25:16] [PASSED] 58 VFs
[16:25:16] [PASSED] 59 VFs
[16:25:16] [PASSED] 60 VFs
[16:25:16] [PASSED] 61 VFs
[16:25:16] [PASSED] 62 VFs
[16:25:16] [PASSED] 63 VFs
[16:25:16] ==================== [PASSED] fair_ggtt ====================
[16:25:16] ======================== fair_vram  ========================
[16:25:16] [PASSED] 1 VF
[16:25:16] [PASSED] 2 VFs
[16:25:16] [PASSED] 3 VFs
[16:25:16] [PASSED] 4 VFs
[16:25:16] [PASSED] 5 VFs
[16:25:16] [PASSED] 6 VFs
[16:25:16] [PASSED] 7 VFs
[16:25:16] [PASSED] 8 VFs
[16:25:16] [PASSED] 9 VFs
[16:25:16] [PASSED] 10 VFs
[16:25:16] [PASSED] 11 VFs
[16:25:16] [PASSED] 12 VFs
[16:25:16] [PASSED] 13 VFs
[16:25:16] [PASSED] 14 VFs
[16:25:16] [PASSED] 15 VFs
[16:25:16] [PASSED] 16 VFs
[16:25:16] [PASSED] 17 VFs
[16:25:16] [PASSED] 18 VFs
[16:25:16] [PASSED] 19 VFs
[16:25:16] [PASSED] 20 VFs
[16:25:16] [PASSED] 21 VFs
[16:25:16] [PASSED] 22 VFs
[16:25:16] [PASSED] 23 VFs
[16:25:16] [PASSED] 24 VFs
[16:25:16] [PASSED] 25 VFs
[16:25:16] [PASSED] 26 VFs
[16:25:16] [PASSED] 27 VFs
[16:25:16] [PASSED] 28 VFs
[16:25:16] [PASSED] 29 VFs
[16:25:16] [PASSED] 30 VFs
[16:25:16] [PASSED] 31 VFs
[16:25:16] [PASSED] 32 VFs
[16:25:16] [PASSED] 33 VFs
[16:25:16] [PASSED] 34 VFs
[16:25:16] [PASSED] 35 VFs
[16:25:16] [PASSED] 36 VFs
[16:25:16] [PASSED] 37 VFs
[16:25:16] [PASSED] 38 VFs
[16:25:16] [PASSED] 39 VFs
[16:25:16] [PASSED] 40 VFs
[16:25:16] [PASSED] 41 VFs
[16:25:16] [PASSED] 42 VFs
[16:25:16] [PASSED] 43 VFs
[16:25:16] [PASSED] 44 VFs
[16:25:16] [PASSED] 45 VFs
[16:25:16] [PASSED] 46 VFs
[16:25:16] [PASSED] 47 VFs
[16:25:16] [PASSED] 48 VFs
[16:25:16] [PASSED] 49 VFs
[16:25:16] [PASSED] 50 VFs
[16:25:16] [PASSED] 51 VFs
[16:25:16] [PASSED] 52 VFs
[16:25:16] [PASSED] 53 VFs
[16:25:16] [PASSED] 54 VFs
[16:25:16] [PASSED] 55 VFs
[16:25:16] [PASSED] 56 VFs
[16:25:16] [PASSED] 57 VFs
[16:25:16] [PASSED] 58 VFs
[16:25:16] [PASSED] 59 VFs
[16:25:16] [PASSED] 60 VFs
[16:25:16] [PASSED] 61 VFs
[16:25:16] [PASSED] 62 VFs
[16:25:16] [PASSED] 63 VFs
[16:25:16] ==================== [PASSED] fair_vram ====================
[16:25:16] ================== [PASSED] pf_gt_config ===================
[16:25:16] ===================== lmtt (1 subtest) =====================
[16:25:16] ======================== test_ops  =========================
[16:25:16] [PASSED] 2-level
[16:25:16] [PASSED] multi-level
[16:25:16] ==================== [PASSED] test_ops =====================
[16:25:16] ====================== [PASSED] lmtt =======================
[16:25:16] ================= pf_service (11 subtests) =================
[16:25:16] [PASSED] pf_negotiate_any
[16:25:16] [PASSED] pf_negotiate_base_match
[16:25:16] [PASSED] pf_negotiate_base_newer
[16:25:16] [PASSED] pf_negotiate_base_next
[16:25:16] [SKIPPED] pf_negotiate_base_older
[16:25:16] [PASSED] pf_negotiate_base_prev
[16:25:16] [PASSED] pf_negotiate_latest_match
[16:25:16] [PASSED] pf_negotiate_latest_newer
[16:25:16] [PASSED] pf_negotiate_latest_next
[16:25:16] [SKIPPED] pf_negotiate_latest_older
[16:25:16] [SKIPPED] pf_negotiate_latest_prev
[16:25:16] =================== [PASSED] pf_service ====================
[16:25:16] ================== xe_eudebug (1 subtest) ==================
[16:25:16] ======================= toggle_reg  ========================
[16:25:16] =================== [SKIPPED] toggle_reg ===================
[16:25:16] =================== [SKIPPED] xe_eudebug ===================
[16:25:16] ================= xe_guc_g2g (2 subtests) ==================
[16:25:16] ============== xe_live_guc_g2g_kunit_default  ==============
[16:25:16] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[16:25:16] ============== xe_live_guc_g2g_kunit_allmem  ===============
[16:25:16] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[16:25:16] =================== [SKIPPED] xe_guc_g2g ===================
[16:25:16] =================== xe_mocs (2 subtests) ===================
[16:25:16] ================ xe_live_mocs_kernel_kunit  ================
[16:25:16] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[16:25:16] ================ xe_live_mocs_reset_kunit  =================
[16:25:16] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[16:25:16] ==================== [SKIPPED] xe_mocs =====================
[16:25:16] ================= xe_migrate (2 subtests) ==================
[16:25:16] ================= xe_migrate_sanity_kunit  =================
[16:25:16] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[16:25:16] ================== xe_validate_ccs_kunit  ==================
[16:25:16] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[16:25:16] =================== [SKIPPED] xe_migrate ===================
[16:25:16] ================== xe_dma_buf (1 subtest) ==================
[16:25:16] ==================== xe_dma_buf_kunit  =====================
[16:25:16] ================ [SKIPPED] xe_dma_buf_kunit ================
[16:25:16] =================== [SKIPPED] xe_dma_buf ===================
[16:25:16] ================= xe_bo_shrink (1 subtest) =================
[16:25:16] =================== xe_bo_shrink_kunit  ====================
[16:25:16] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[16:25:16] ================== [SKIPPED] xe_bo_shrink ==================
[16:25:16] ==================== xe_bo (2 subtests) ====================
[16:25:16] ================== xe_ccs_migrate_kunit  ===================
[16:25:16] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[16:25:16] ==================== xe_bo_evict_kunit  ====================
[16:25:16] =============== [SKIPPED] xe_bo_evict_kunit ================
[16:25:16] ===================== [SKIPPED] xe_bo ======================
[16:25:16] ==================== args (13 subtests) ====================
[16:25:16] [PASSED] count_args_test
[16:25:16] [PASSED] call_args_example
[16:25:16] [PASSED] call_args_test
[16:25:16] [PASSED] drop_first_arg_example
[16:25:16] [PASSED] drop_first_arg_test
[16:25:16] [PASSED] first_arg_example
[16:25:16] [PASSED] first_arg_test
[16:25:16] [PASSED] last_arg_example
[16:25:16] [PASSED] last_arg_test
[16:25:16] [PASSED] pick_arg_example
[16:25:16] [PASSED] if_args_example
[16:25:16] [PASSED] if_args_test
[16:25:16] [PASSED] sep_comma_example
[16:25:16] ====================== [PASSED] args =======================
[16:25:16] =================== xe_pci (3 subtests) ====================
[16:25:16] ==================== check_graphics_ip  ====================
[16:25:16] [PASSED] 12.00 Xe_LP
[16:25:16] [PASSED] 12.10 Xe_LP+
[16:25:16] [PASSED] 12.55 Xe_HPG
[16:25:16] [PASSED] 12.60 Xe_HPC
[16:25:16] [PASSED] 12.70 Xe_LPG
[16:25:16] [PASSED] 12.71 Xe_LPG
[16:25:16] [PASSED] 12.74 Xe_LPG+
[16:25:16] [PASSED] 20.01 Xe2_HPG
[16:25:16] [PASSED] 20.02 Xe2_HPG
[16:25:16] [PASSED] 20.04 Xe2_LPG
[16:25:16] [PASSED] 30.00 Xe3_LPG
[16:25:16] [PASSED] 30.01 Xe3_LPG
[16:25:16] [PASSED] 30.03 Xe3_LPG
[16:25:16] [PASSED] 30.04 Xe3_LPG
[16:25:16] [PASSED] 30.05 Xe3_LPG
[16:25:16] [PASSED] 35.10 Xe3p_LPG
[16:25:16] [PASSED] 35.11 Xe3p_XPC
[16:25:16] ================ [PASSED] check_graphics_ip ================
[16:25:16] ===================== check_media_ip  ======================
[16:25:16] [PASSED] 12.00 Xe_M
[16:25:16] [PASSED] 12.55 Xe_HPM
[16:25:16] [PASSED] 13.00 Xe_LPM+
[16:25:16] [PASSED] 13.01 Xe2_HPM
[16:25:16] [PASSED] 20.00 Xe2_LPM
[16:25:16] [PASSED] 30.00 Xe3_LPM
[16:25:16] [PASSED] 30.02 Xe3_LPM
[16:25:16] [PASSED] 35.00 Xe3p_LPM
[16:25:16] [PASSED] 35.03 Xe3p_HPM
[16:25:16] ================= [PASSED] check_media_ip ==================
[16:25:16] =================== check_platform_desc  ===================
[16:25:16] [PASSED] 0x9A60 (TIGERLAKE)
[16:25:16] [PASSED] 0x9A68 (TIGERLAKE)
[16:25:16] [PASSED] 0x9A70 (TIGERLAKE)
[16:25:16] [PASSED] 0x9A40 (TIGERLAKE)
[16:25:16] [PASSED] 0x9A49 (TIGERLAKE)
[16:25:16] [PASSED] 0x9A59 (TIGERLAKE)
[16:25:16] [PASSED] 0x9A78 (TIGERLAKE)
[16:25:16] [PASSED] 0x9AC0 (TIGERLAKE)
[16:25:16] [PASSED] 0x9AC9 (TIGERLAKE)
[16:25:16] [PASSED] 0x9AD9 (TIGERLAKE)
[16:25:16] [PASSED] 0x9AF8 (TIGERLAKE)
[16:25:16] [PASSED] 0x4C80 (ROCKETLAKE)
[16:25:16] [PASSED] 0x4C8A (ROCKETLAKE)
[16:25:16] [PASSED] 0x4C8B (ROCKETLAKE)
[16:25:16] [PASSED] 0x4C8C (ROCKETLAKE)
[16:25:16] [PASSED] 0x4C90 (ROCKETLAKE)
[16:25:16] [PASSED] 0x4C9A (ROCKETLAKE)
[16:25:16] [PASSED] 0x4680 (ALDERLAKE_S)
[16:25:16] [PASSED] 0x4682 (ALDERLAKE_S)
[16:25:16] [PASSED] 0x4688 (ALDERLAKE_S)
[16:25:16] [PASSED] 0x468A (ALDERLAKE_S)
[16:25:16] [PASSED] 0x468B (ALDERLAKE_S)
[16:25:16] [PASSED] 0x4690 (ALDERLAKE_S)
[16:25:16] [PASSED] 0x4692 (ALDERLAKE_S)
[16:25:16] [PASSED] 0x4693 (ALDERLAKE_S)
[16:25:16] [PASSED] 0x46A0 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46A1 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46A2 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46A3 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46A6 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46A8 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46AA (ALDERLAKE_P)
[16:25:16] [PASSED] 0x462A (ALDERLAKE_P)
[16:25:16] [PASSED] 0x4626 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x4628 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46B0 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46B1 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46B2 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46B3 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46C0 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46C1 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46C2 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46C3 (ALDERLAKE_P)
[16:25:16] [PASSED] 0x46D0 (ALDERLAKE_N)
[16:25:16] [PASSED] 0x46D1 (ALDERLAKE_N)
[16:25:16] [PASSED] 0x46D2 (ALDERLAKE_N)
[16:25:16] [PASSED] 0x46D3 (ALDERLAKE_N)
[16:25:16] [PASSED] 0x46D4 (ALDERLAKE_N)
[16:25:16] [PASSED] 0xA721 (ALDERLAKE_P)
[16:25:16] [PASSED] 0xA7A1 (ALDERLAKE_P)
[16:25:16] [PASSED] 0xA7A9 (ALDERLAKE_P)
[16:25:16] [PASSED] 0xA7AC (ALDERLAKE_P)
[16:25:16] [PASSED] 0xA7AD (ALDERLAKE_P)
[16:25:16] [PASSED] 0xA720 (ALDERLAKE_P)
[16:25:16] [PASSED] 0xA7A0 (ALDERLAKE_P)
[16:25:16] [PASSED] 0xA7A8 (ALDERLAKE_P)
[16:25:16] [PASSED] 0xA7AA (ALDERLAKE_P)
[16:25:16] [PASSED] 0xA7AB (ALDERLAKE_P)
[16:25:16] [PASSED] 0xA780 (ALDERLAKE_S)
[16:25:16] [PASSED] 0xA781 (ALDERLAKE_S)
[16:25:16] [PASSED] 0xA782 (ALDERLAKE_S)
[16:25:16] [PASSED] 0xA783 (ALDERLAKE_S)
[16:25:16] [PASSED] 0xA788 (ALDERLAKE_S)
[16:25:16] [PASSED] 0xA789 (ALDERLAKE_S)
[16:25:16] [PASSED] 0xA78A (ALDERLAKE_S)
[16:25:16] [PASSED] 0xA78B (ALDERLAKE_S)
[16:25:16] [PASSED] 0x4905 (DG1)
[16:25:16] [PASSED] 0x4906 (DG1)
[16:25:16] [PASSED] 0x4907 (DG1)
[16:25:16] [PASSED] 0x4908 (DG1)
[16:25:16] [PASSED] 0x4909 (DG1)
[16:25:16] [PASSED] 0x56C0 (DG2)
[16:25:16] [PASSED] 0x56C2 (DG2)
[16:25:16] [PASSED] 0x56C1 (DG2)
[16:25:16] [PASSED] 0x7D51 (METEORLAKE)
[16:25:16] [PASSED] 0x7DD1 (METEORLAKE)
[16:25:16] [PASSED] 0x7D41 (METEORLAKE)
[16:25:16] [PASSED] 0x7D67 (METEORLAKE)
[16:25:16] [PASSED] 0xB640 (METEORLAKE)
[16:25:16] [PASSED] 0x56A0 (DG2)
[16:25:16] [PASSED] 0x56A1 (DG2)
[16:25:16] [PASSED] 0x56A2 (DG2)
[16:25:16] [PASSED] 0x56BE (DG2)
[16:25:16] [PASSED] 0x56BF (DG2)
[16:25:16] [PASSED] 0x5690 (DG2)
[16:25:16] [PASSED] 0x5691 (DG2)
[16:25:16] [PASSED] 0x5692 (DG2)
[16:25:16] [PASSED] 0x56A5 (DG2)
[16:25:16] [PASSED] 0x56A6 (DG2)
[16:25:16] [PASSED] 0x56B0 (DG2)
[16:25:16] [PASSED] 0x56B1 (DG2)
[16:25:16] [PASSED] 0x56BA (DG2)
[16:25:16] [PASSED] 0x56BB (DG2)
[16:25:16] [PASSED] 0x56BC (DG2)
[16:25:16] [PASSED] 0x56BD (DG2)
[16:25:16] [PASSED] 0x5693 (DG2)
[16:25:16] [PASSED] 0x5694 (DG2)
[16:25:16] [PASSED] 0x5695 (DG2)
[16:25:16] [PASSED] 0x56A3 (DG2)
[16:25:16] [PASSED] 0x56A4 (DG2)
[16:25:16] [PASSED] 0x56B2 (DG2)
[16:25:16] [PASSED] 0x56B3 (DG2)
[16:25:16] [PASSED] 0x5696 (DG2)
[16:25:16] [PASSED] 0x5697 (DG2)
[16:25:16] [PASSED] 0xB69 (PVC)
[16:25:16] [PASSED] 0xB6E (PVC)
[16:25:16] [PASSED] 0xBD4 (PVC)
[16:25:16] [PASSED] 0xBD5 (PVC)
[16:25:16] [PASSED] 0xBD6 (PVC)
[16:25:16] [PASSED] 0xBD7 (PVC)
[16:25:16] [PASSED] 0xBD8 (PVC)
[16:25:16] [PASSED] 0xBD9 (PVC)
[16:25:16] [PASSED] 0xBDA (PVC)
[16:25:16] [PASSED] 0xBDB (PVC)
[16:25:16] [PASSED] 0xBE0 (PVC)
[16:25:16] [PASSED] 0xBE1 (PVC)
[16:25:16] [PASSED] 0xBE5 (PVC)
[16:25:16] [PASSED] 0x7D40 (METEORLAKE)
[16:25:16] [PASSED] 0x7D45 (METEORLAKE)
[16:25:16] [PASSED] 0x7D55 (METEORLAKE)
[16:25:16] [PASSED] 0x7D60 (METEORLAKE)
[16:25:16] [PASSED] 0x7DD5 (METEORLAKE)
[16:25:16] [PASSED] 0x6420 (LUNARLAKE)
[16:25:16] [PASSED] 0x64A0 (LUNARLAKE)
[16:25:16] [PASSED] 0x64B0 (LUNARLAKE)
[16:25:16] [PASSED] 0xE202 (BATTLEMAGE)
[16:25:16] [PASSED] 0xE209 (BATTLEMAGE)
[16:25:16] [PASSED] 0xE20B (BATTLEMAGE)
[16:25:16] [PASSED] 0xE20C (BATTLEMAGE)
[16:25:16] [PASSED] 0xE20D (BATTLEMAGE)
[16:25:16] [PASSED] 0xE210 (BATTLEMAGE)
[16:25:16] [PASSED] 0xE211 (BATTLEMAGE)
[16:25:16] [PASSED] 0xE212 (BATTLEMAGE)
[16:25:16] [PASSED] 0xE216 (BATTLEMAGE)
[16:25:16] [PASSED] 0xE220 (BATTLEMAGE)
[16:25:16] [PASSED] 0xE221 (BATTLEMAGE)
[16:25:16] [PASSED] 0xE222 (BATTLEMAGE)
[16:25:16] [PASSED] 0xE223 (BATTLEMAGE)
[16:25:16] [PASSED] 0xB080 (PANTHERLAKE)
[16:25:16] [PASSED] 0xB081 (PANTHERLAKE)
[16:25:16] [PASSED] 0xB082 (PANTHERLAKE)
[16:25:16] [PASSED] 0xB083 (PANTHERLAKE)
[16:25:16] [PASSED] 0xB084 (PANTHERLAKE)
[16:25:16] [PASSED] 0xB085 (PANTHERLAKE)
[16:25:16] [PASSED] 0xB086 (PANTHERLAKE)
[16:25:16] [PASSED] 0xB087 (PANTHERLAKE)
[16:25:16] [PASSED] 0xB08F (PANTHERLAKE)
[16:25:16] [PASSED] 0xB090 (PANTHERLAKE)
[16:25:16] [PASSED] 0xB0A0 (PANTHERLAKE)
[16:25:16] [PASSED] 0xB0B0 (PANTHERLAKE)
[16:25:16] [PASSED] 0xFD80 (PANTHERLAKE)
[16:25:16] [PASSED] 0xFD81 (PANTHERLAKE)
[16:25:16] [PASSED] 0xD740 (NOVALAKE_S)
[16:25:16] [PASSED] 0xD741 (NOVALAKE_S)
[16:25:16] [PASSED] 0xD742 (NOVALAKE_S)
[16:25:16] [PASSED] 0xD743 (NOVALAKE_S)
[16:25:16] [PASSED] 0xD744 (NOVALAKE_S)
[16:25:16] [PASSED] 0xD745 (NOVALAKE_S)
[16:25:16] [PASSED] 0x674C (CRESCENTISLAND)
[16:25:16] [PASSED] 0x674D (CRESCENTISLAND)
[16:25:16] [PASSED] 0x674E (CRESCENTISLAND)
[16:25:16] [PASSED] 0x674F (CRESCENTISLAND)
[16:25:16] [PASSED] 0x6750 (CRESCENTISLAND)
[16:25:16] [PASSED] 0xD750 (NOVALAKE_P)
[16:25:16] [PASSED] 0xD751 (NOVALAKE_P)
[16:25:16] [PASSED] 0xD752 (NOVALAKE_P)
[16:25:16] [PASSED] 0xD753 (NOVALAKE_P)
[16:25:16] [PASSED] 0xD754 (NOVALAKE_P)
[16:25:16] [PASSED] 0xD755 (NOVALAKE_P)
[16:25:16] [PASSED] 0xD756 (NOVALAKE_P)
[16:25:16] [PASSED] 0xD757 (NOVALAKE_P)
[16:25:16] [PASSED] 0xD75F (NOVALAKE_P)
[16:25:16] =============== [PASSED] check_platform_desc ===============
[16:25:16] ===================== [PASSED] xe_pci ======================
[16:25:16] ============= xe_rtp_tables_test (4 subtests) ==============
[16:25:16] ================== xe_rtp_table_gt_test  ===================
[16:25:16] [PASSED] gt_was/14011060649
[16:25:16] [PASSED] gt_was/14011059788
[16:25:16] [PASSED] gt_was/14015795083
[16:25:16] [PASSED] gt_was/16021867713
[16:25:16] [PASSED] gt_was/14019449301
[16:25:16] [PASSED] gt_was/16028005424
[16:25:16] [PASSED] gt_was/14026578760
[16:25:16] [PASSED] gt_was/1409420604
[16:25:16] [PASSED] gt_was/1408615072
[16:25:16] [PASSED] gt_was/22010523718
[16:25:16] [PASSED] gt_was/14011006942
[16:25:16] [PASSED] gt_was/14014830051
[16:25:16] [PASSED] gt_was/18018781329
[16:25:16] [PASSED] gt_was/1509235366
[16:25:16] [PASSED] gt_was/18018781329
[16:25:16] [PASSED] gt_was/16016694945
[16:25:16] [PASSED] gt_was/14018575942
[16:25:16] [PASSED] gt_was/22016670082
[16:25:16] [PASSED] gt_was/22016670082
[16:25:16] [PASSED] gt_was/14017421178
[16:25:16] [PASSED] gt_was/16025250150
[16:25:16] [PASSED] gt_was/14021871409
[16:25:16] [PASSED] gt_was/16021865536
[16:25:16] [PASSED] gt_was/14021486841
[16:25:16] [PASSED] gt_was/14025160223
[16:25:16] [PASSED] gt_was/14026144927, 16029437861
[16:25:16] [PASSED] gt_was/14025635424
[16:25:16] [PASSED] gt_was/16028005424
[16:25:16] ============== [PASSED] xe_rtp_table_gt_test ===============
[16:25:16] ================== xe_rtp_table_gt_test  ===================
[16:25:16] [PASSED] gt_tunings/Tuning: Blend Fill Caching Optimization Disable
[16:25:16] [PASSED] gt_tunings/Tuning: 32B Access Enable
[16:25:16] [PASSED] gt_tunings/Tuning: L3 cache
[16:25:16] [PASSED] gt_tunings/Tuning: L3 cache - media
[16:25:16] [PASSED] gt_tunings/Tuning: Compression Overfetch
[16:25:16] [PASSED] gt_tunings/Tuning: Compression Overfetch - media
[16:25:16] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3
[16:25:16] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 - media
[16:25:16] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only
[16:25:16] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only - media
[16:25:16] [PASSED] gt_tunings/Tuning: Stateless compression control
[16:25:16] [PASSED] gt_tunings/Tuning: Stateless compression control - media
[16:25:16] [PASSED] gt_tunings/Tuning: L3 RW flush all Cache
[16:25:16] [PASSED] gt_tunings/Tuning: L3 RW flush all cache - media
[16:25:16] [PASSED] gt_tunings/Tuning: Set STLB Bank Hash Mode to 4KB
[16:25:16] ============== [PASSED] xe_rtp_table_gt_test ===============
[16:25:16] ================== xe_rtp_table_oob_test  ==================
[16:25:16] [PASSED] oob_was/1607983814
[16:25:16] [PASSED] oob_was/16010904313
[16:25:16] [PASSED] oob_was/18022495364
[16:25:16] [PASSED] oob_was/22012773006
[16:25:16] [PASSED] oob_was/14014475959
[16:25:16] [PASSED] oob_was/22011391025
[16:25:16] [PASSED] oob_was/22012727170
[16:25:16] [PASSED] oob_was/22012727685
[16:25:16] [PASSED] oob_was/22016596838
[16:25:16] [PASSED] oob_was/18020744125
[16:25:16] [PASSED] oob_was/1409600907
[16:25:16] [PASSED] oob_was/22014953428
[16:25:16] [PASSED] oob_was/16017236439
[16:25:16] [PASSED] oob_was/14019821291
[16:25:16] [PASSED] oob_was/14015076503
[16:25:16] [PASSED] oob_was/14018913170
[16:25:16] [PASSED] oob_was/14018094691
[16:25:16] [PASSED] oob_was/18024947630
[16:25:16] [PASSED] oob_was/16022287689
[16:25:16] [PASSED] oob_was/13011645652
[16:25:16] [PASSED] oob_was/14022293748
[16:25:16] [PASSED] oob_was/22019794406
[16:25:16] [PASSED] oob_was/22019338487
[16:25:16] [PASSED] oob_was/16023588340
[16:25:16] [PASSED] oob_was/14019789679
[16:25:16] [PASSED] oob_was/14022866841
[16:25:16] [PASSED] oob_was/16021333562
[16:25:16] [PASSED] oob_was/14016712196
[16:25:16] [PASSED] oob_was/14015568240
[16:25:16] [PASSED] oob_was/18013179988
[16:25:16] [PASSED] oob_was/1508761755
[16:25:16] [PASSED] oob_was/16023105232
[16:25:16] [PASSED] oob_was/16026508708
[16:25:16] [PASSED] oob_was/14020001231
[16:25:16] [PASSED] oob_was/16023683509
[16:25:16] [PASSED] oob_was/14025515070
[16:25:16] [PASSED] oob_was/15015404425_disable
[16:25:16] [PASSED] oob_was/16026007364
[16:25:16] [PASSED] oob_was/14020316580
[16:25:16] [PASSED] oob_was/14025883347
[16:25:16] [PASSED] oob_was/14022766366
[16:25:16] [PASSED] oob_was/18022722726
[16:25:16] [PASSED] oob_was/14015474168
[16:25:16] ============== [PASSED] xe_rtp_table_oob_test ==============
[16:25:16] ================ xe_rtp_table_dev_oob_test  ================
[16:25:16] [PASSED] device_oob_was/22010954014
[16:25:16] [PASSED] device_oob_was/15015404425
[16:25:16] [PASSED] device_oob_was/22019338487_display
[16:25:16] [PASSED] device_oob_was/14022085890
[16:25:16] [PASSED] device_oob_was/14026539277
[16:25:16] [PASSED] device_oob_was/14026633728
[16:25:16] [PASSED] device_oob_was/14026746987
[16:25:16] [PASSED] device_oob_was/14026779378
[16:25:16] ============ [PASSED] xe_rtp_table_dev_oob_test ============
[16:25:16] =============== [PASSED] xe_rtp_tables_test ================
[16:25:16] =================== xe_rtp (3 subtests) ====================
[16:25:16] =================== xe_rtp_rules_tests  ====================
[16:25:16] [PASSED] no
[16:25:16] [PASSED] yes
[16:25:16] [PASSED] no-and-no
[16:25:16] [PASSED] no-and-yes
[16:25:16] [PASSED] yes-and-no
[16:25:16] [PASSED] yes-and-yes
[16:25:16] [PASSED] no-or-no
[16:25:16] [PASSED] no-or-yes
[16:25:16] [PASSED] yes-or-no
[16:25:16] [PASSED] yes-or-yes
[16:25:16] [PASSED] no-yes-or-yes-no
[16:25:16] [PASSED] no-yes-or-yes-yes
[16:25:16] [PASSED] yes-yes-or-no-yes
[16:25:16] [PASSED] yes-yes-or-yes-yes
[16:25:16] [PASSED] no-no-or-yes-or-no
[16:25:16] [PASSED] or
[16:25:16] [PASSED] or-yes
[16:25:16] [PASSED] or-no
[16:25:16] [PASSED] yes-or
[16:25:16] [PASSED] no-or
[16:25:16] [PASSED] no-or-or-yes
[16:25:16] [PASSED] yes-or-or-no
[16:25:16] [PASSED] no-or-or-no
[16:25:16] [PASSED] missing-context-engine-class
[16:25:16] [PASSED] missing-context-engine-class-or-yes
[16:25:16] [PASSED] missing-context-engine-class-or-or-yes
[16:25:16] =============== [PASSED] xe_rtp_rules_tests ================
[16:25:16] =============== xe_rtp_process_to_sr_tests  ================
[16:25:16] [PASSED] coalesce-same-reg
[16:25:16] [PASSED] no-match-no-add
[16:25:16] [PASSED] two-regs-two-entries
[16:25:16] [PASSED] clr-one-set-other
[16:25:16] [PASSED] set-field
[16:25:16] [PASSED] conflict-duplicate
[16:25:16] [PASSED] conflict-not-disjoint
[16:25:16] [PASSED] conflict-reg-type
[16:25:16] [PASSED] bad-mcr-reg-forced-to-regular
[16:25:16] [PASSED] bad-regular-reg-forced-to-mcr
[16:25:16] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[16:25:16] ================== xe_rtp_process_tests  ===================
[16:25:16] [PASSED] active1
[16:25:16] [PASSED] active2
[16:25:16] [PASSED] active-inactive
[16:25:16] [PASSED] inactive-active
[16:25:16] [PASSED] inactive-active-inactive
[16:25:16] [PASSED] inactive-inactive-inactive
[16:25:16] ============== [PASSED] xe_rtp_process_tests ===============
[16:25:16] ===================== [PASSED] xe_rtp ======================
[16:25:16] ==================== xe_wa (1 subtest) =====================
[16:25:16] ======================== xe_wa_gt  =========================
[16:25:16] [PASSED] TIGERLAKE B0
[16:25:16] [PASSED] DG1 A0
[16:25:16] [PASSED] DG1 B0
[16:25:16] [PASSED] ALDERLAKE_S A0
[16:25:16] [PASSED] ALDERLAKE_S B0
[16:25:16] [PASSED] ALDERLAKE_S C0
[16:25:16] [PASSED] ALDERLAKE_S D0
[16:25:16] [PASSED] ALDERLAKE_P A0
[16:25:16] [PASSED] ALDERLAKE_P B0
[16:25:16] [PASSED] ALDERLAKE_P C0
[16:25:16] [PASSED] ALDERLAKE_S RPLS D0
[16:25:16] [PASSED] ALDERLAKE_P RPLU E0
[16:25:16] [PASSED] DG2 G10 C0
[16:25:16] [PASSED] DG2 G11 B1
[16:25:16] [PASSED] DG2 G12 A1
[16:25:16] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[16:25:16] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[16:25:16] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[16:25:16] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[16:25:16] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[16:25:16] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[16:25:16] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[16:25:16] ==================== [PASSED] xe_wa_gt =====================
[16:25:16] ====================== [PASSED] xe_wa ======================
[16:25:16] ============================================================
[16:25:16] Testing complete. Ran 719 tests: passed: 700, skipped: 19
[16:25:16] Elapsed time: 36.283s total, 4.265s configuring, 31.352s building, 0.653s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [16:25:16] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[16:25:18] 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=48
[16:25:42] Starting KUnit Kernel (1/1)...
[16:25:42] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[16:25:42] ============ drm_test_pick_cmdline (2 subtests) ============
[16:25:42] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[16:25:42] =============== drm_test_pick_cmdline_named  ===============
[16:25:42] [PASSED] NTSC
[16:25:42] [PASSED] NTSC-J
[16:25:42] [PASSED] PAL
[16:25:42] [PASSED] PAL-M
[16:25:42] =========== [PASSED] drm_test_pick_cmdline_named ===========
[16:25:42] ============== [PASSED] drm_test_pick_cmdline ==============
[16:25:42] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[16:25:42] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[16:25:42] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[16:25:42] =========== drm_validate_clone_mode (2 subtests) ===========
[16:25:42] ============== drm_test_check_in_clone_mode  ===============
[16:25:42] [PASSED] in_clone_mode
[16:25:42] [PASSED] not_in_clone_mode
[16:25:42] ========== [PASSED] drm_test_check_in_clone_mode ===========
[16:25:42] =============== drm_test_check_valid_clones  ===============
[16:25:42] [PASSED] not_in_clone_mode
[16:25:42] [PASSED] valid_clone
[16:25:42] [PASSED] invalid_clone
[16:25:42] =========== [PASSED] drm_test_check_valid_clones ===========
[16:25:42] ============= [PASSED] drm_validate_clone_mode =============
[16:25:42] ============= drm_validate_modeset (1 subtest) =============
[16:25:42] [PASSED] drm_test_check_connector_changed_modeset
[16:25:42] ============== [PASSED] drm_validate_modeset ===============
[16:25:42] ====== drm_test_bridge_get_current_state (2 subtests) ======
[16:25:42] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[16:25:42] [PASSED] drm_test_drm_bridge_get_current_state_legacy
[16:25:42] ======== [PASSED] drm_test_bridge_get_current_state ========
[16:25:42] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[16:25:42] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[16:25:42] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[16:25:42] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy
[16:25:42] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[16:25:42] ============== drm_bridge_alloc (2 subtests) ===============
[16:25:42] [PASSED] drm_test_drm_bridge_alloc_basic
[16:25:42] [PASSED] drm_test_drm_bridge_alloc_get_put
[16:25:42] ================ [PASSED] drm_bridge_alloc =================
[16:25:42] ============= drm_cmdline_parser (40 subtests) =============
[16:25:42] [PASSED] drm_test_cmdline_force_d_only
[16:25:42] [PASSED] drm_test_cmdline_force_D_only_dvi
[16:25:42] [PASSED] drm_test_cmdline_force_D_only_hdmi
[16:25:42] [PASSED] drm_test_cmdline_force_D_only_not_digital
[16:25:42] [PASSED] drm_test_cmdline_force_e_only
[16:25:42] [PASSED] drm_test_cmdline_res
[16:25:42] [PASSED] drm_test_cmdline_res_vesa
[16:25:42] [PASSED] drm_test_cmdline_res_vesa_rblank
[16:25:42] [PASSED] drm_test_cmdline_res_rblank
[16:25:42] [PASSED] drm_test_cmdline_res_bpp
[16:25:42] [PASSED] drm_test_cmdline_res_refresh
[16:25:42] [PASSED] drm_test_cmdline_res_bpp_refresh
[16:25:42] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[16:25:42] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[16:25:42] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[16:25:42] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[16:25:42] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[16:25:42] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[16:25:42] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[16:25:42] [PASSED] drm_test_cmdline_res_margins_force_on
[16:25:42] [PASSED] drm_test_cmdline_res_vesa_margins
[16:25:42] [PASSED] drm_test_cmdline_name
[16:25:42] [PASSED] drm_test_cmdline_name_bpp
[16:25:42] [PASSED] drm_test_cmdline_name_option
[16:25:42] [PASSED] drm_test_cmdline_name_bpp_option
[16:25:42] [PASSED] drm_test_cmdline_rotate_0
[16:25:42] [PASSED] drm_test_cmdline_rotate_90
[16:25:42] [PASSED] drm_test_cmdline_rotate_180
[16:25:42] [PASSED] drm_test_cmdline_rotate_270
[16:25:42] [PASSED] drm_test_cmdline_hmirror
[16:25:42] [PASSED] drm_test_cmdline_vmirror
[16:25:42] [PASSED] drm_test_cmdline_margin_options
[16:25:42] [PASSED] drm_test_cmdline_multiple_options
[16:25:42] [PASSED] drm_test_cmdline_bpp_extra_and_option
[16:25:42] [PASSED] drm_test_cmdline_extra_and_option
[16:25:42] [PASSED] drm_test_cmdline_freestanding_options
[16:25:42] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[16:25:42] [PASSED] drm_test_cmdline_panel_orientation
[16:25:42] ================ drm_test_cmdline_invalid  =================
[16:25:42] [PASSED] margin_only
[16:25:42] [PASSED] interlace_only
[16:25:42] [PASSED] res_missing_x
[16:25:42] [PASSED] res_missing_y
[16:25:42] [PASSED] res_bad_y
[16:25:42] [PASSED] res_missing_y_bpp
[16:25:42] [PASSED] res_bad_bpp
[16:25:42] [PASSED] res_bad_refresh
[16:25:42] [PASSED] res_bpp_refresh_force_on_off
[16:25:42] [PASSED] res_invalid_mode
[16:25:42] [PASSED] res_bpp_wrong_place_mode
[16:25:42] [PASSED] name_bpp_refresh
[16:25:42] [PASSED] name_refresh
[16:25:42] [PASSED] name_refresh_wrong_mode
[16:25:42] [PASSED] name_refresh_invalid_mode
[16:25:42] [PASSED] rotate_multiple
[16:25:42] [PASSED] rotate_invalid_val
[16:25:42] [PASSED] rotate_truncated
[16:25:42] [PASSED] invalid_option
[16:25:42] [PASSED] invalid_tv_option
[16:25:42] [PASSED] truncated_tv_option
[16:25:42] ============ [PASSED] drm_test_cmdline_invalid =============
[16:25:42] =============== drm_test_cmdline_tv_options  ===============
[16:25:42] [PASSED] NTSC
[16:25:42] [PASSED] NTSC_443
[16:25:42] [PASSED] NTSC_J
[16:25:42] [PASSED] PAL
[16:25:42] [PASSED] PAL_M
[16:25:42] [PASSED] PAL_N
[16:25:42] [PASSED] SECAM
[16:25:42] [PASSED] MONO_525
[16:25:42] [PASSED] MONO_625
[16:25:42] =========== [PASSED] drm_test_cmdline_tv_options ===========
[16:25:42] =============== [PASSED] drm_cmdline_parser ================
[16:25:42] ========== drmm_connector_hdmi_init (20 subtests) ==========
[16:25:42] [PASSED] drm_test_connector_hdmi_init_valid
[16:25:42] [PASSED] drm_test_connector_hdmi_init_bpc_8
[16:25:42] [PASSED] drm_test_connector_hdmi_init_bpc_10
[16:25:42] [PASSED] drm_test_connector_hdmi_init_bpc_12
[16:25:42] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[16:25:42] [PASSED] drm_test_connector_hdmi_init_bpc_null
[16:25:42] [PASSED] drm_test_connector_hdmi_init_formats_empty
[16:25:42] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[16:25:42] === drm_test_connector_hdmi_init_formats_yuv420_allowed  ===
[16:25:42] [PASSED] supported_formats=0x9 yuv420_allowed=1
[16:25:42] [PASSED] supported_formats=0x9 yuv420_allowed=0
[16:25:42] [PASSED] supported_formats=0x5 yuv420_allowed=1
[16:25:42] [PASSED] supported_formats=0x5 yuv420_allowed=0
[16:25:42] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[16:25:42] [PASSED] drm_test_connector_hdmi_init_null_ddc
[16:25:42] [PASSED] drm_test_connector_hdmi_init_null_product
[16:25:42] [PASSED] drm_test_connector_hdmi_init_null_vendor
[16:25:42] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[16:25:42] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[16:25:42] [PASSED] drm_test_connector_hdmi_init_product_valid
[16:25:42] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[16:25:42] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[16:25:42] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[16:25:42] ========= drm_test_connector_hdmi_init_type_valid  =========
[16:25:42] [PASSED] HDMI-A
[16:25:42] [PASSED] HDMI-B
[16:25:42] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[16:25:42] ======== drm_test_connector_hdmi_init_type_invalid  ========
[16:25:42] [PASSED] Unknown
[16:25:42] [PASSED] VGA
[16:25:42] [PASSED] DVI-I
[16:25:42] [PASSED] DVI-D
[16:25:42] [PASSED] DVI-A
[16:25:42] [PASSED] Composite
[16:25:42] [PASSED] SVIDEO
[16:25:42] [PASSED] LVDS
[16:25:42] [PASSED] Component
[16:25:42] [PASSED] DIN
[16:25:42] [PASSED] DP
[16:25:42] [PASSED] TV
[16:25:42] [PASSED] eDP
[16:25:42] [PASSED] Virtual
[16:25:42] [PASSED] DSI
[16:25:42] [PASSED] DPI
[16:25:42] [PASSED] Writeback
[16:25:42] [PASSED] SPI
[16:25:42] [PASSED] USB
[16:25:42] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[16:25:42] ============ [PASSED] drmm_connector_hdmi_init =============
[16:25:42] ============= drmm_connector_init (3 subtests) =============
[16:25:42] [PASSED] drm_test_drmm_connector_init
[16:25:42] [PASSED] drm_test_drmm_connector_init_null_ddc
[16:25:42] ========= drm_test_drmm_connector_init_type_valid  =========
[16:25:42] [PASSED] Unknown
[16:25:42] [PASSED] VGA
[16:25:42] [PASSED] DVI-I
[16:25:42] [PASSED] DVI-D
[16:25:42] [PASSED] DVI-A
[16:25:42] [PASSED] Composite
[16:25:42] [PASSED] SVIDEO
[16:25:42] [PASSED] LVDS
[16:25:42] [PASSED] Component
[16:25:42] [PASSED] DIN
[16:25:42] [PASSED] DP
[16:25:42] [PASSED] HDMI-A
[16:25:42] [PASSED] HDMI-B
[16:25:42] [PASSED] TV
[16:25:42] [PASSED] eDP
[16:25:42] [PASSED] Virtual
[16:25:42] [PASSED] DSI
[16:25:42] [PASSED] DPI
[16:25:42] [PASSED] Writeback
[16:25:42] [PASSED] SPI
[16:25:42] [PASSED] USB
[16:25:42] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[16:25:42] =============== [PASSED] drmm_connector_init ===============
[16:25:42] ========= drm_connector_dynamic_init (6 subtests) ==========
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_init
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_init_properties
[16:25:42] ===== drm_test_drm_connector_dynamic_init_type_valid  ======
[16:25:42] [PASSED] Unknown
[16:25:42] [PASSED] VGA
[16:25:42] [PASSED] DVI-I
[16:25:42] [PASSED] DVI-D
[16:25:42] [PASSED] DVI-A
[16:25:42] [PASSED] Composite
[16:25:42] [PASSED] SVIDEO
[16:25:42] [PASSED] LVDS
[16:25:42] [PASSED] Component
[16:25:42] [PASSED] DIN
[16:25:42] [PASSED] DP
[16:25:42] [PASSED] HDMI-A
[16:25:42] [PASSED] HDMI-B
[16:25:42] [PASSED] TV
[16:25:42] [PASSED] eDP
[16:25:42] [PASSED] Virtual
[16:25:42] [PASSED] DSI
[16:25:42] [PASSED] DPI
[16:25:42] [PASSED] Writeback
[16:25:42] [PASSED] SPI
[16:25:42] [PASSED] USB
[16:25:42] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[16:25:42] ======== drm_test_drm_connector_dynamic_init_name  =========
[16:25:42] [PASSED] Unknown
[16:25:42] [PASSED] VGA
[16:25:42] [PASSED] DVI-I
[16:25:42] [PASSED] DVI-D
[16:25:42] [PASSED] DVI-A
[16:25:42] [PASSED] Composite
[16:25:42] [PASSED] SVIDEO
[16:25:42] [PASSED] LVDS
[16:25:42] [PASSED] Component
[16:25:42] [PASSED] DIN
[16:25:42] [PASSED] DP
[16:25:42] [PASSED] HDMI-A
[16:25:42] [PASSED] HDMI-B
[16:25:42] [PASSED] TV
[16:25:42] [PASSED] eDP
[16:25:42] [PASSED] Virtual
[16:25:42] [PASSED] DSI
[16:25:42] [PASSED] DPI
[16:25:42] [PASSED] Writeback
[16:25:42] [PASSED] SPI
[16:25:42] [PASSED] USB
[16:25:42] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[16:25:42] =========== [PASSED] drm_connector_dynamic_init ============
[16:25:42] ==== drm_connector_dynamic_register_early (4 subtests) =====
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[16:25:42] ====== [PASSED] drm_connector_dynamic_register_early =======
[16:25:42] ======= drm_connector_dynamic_register (7 subtests) ========
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[16:25:42] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[16:25:42] ========= [PASSED] drm_connector_dynamic_register ==========
[16:25:42] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[16:25:42] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[16:25:42] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[16:25:42] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[16:25:42] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[16:25:42] ========== drm_test_get_tv_mode_from_name_valid  ===========
[16:25:42] [PASSED] NTSC
[16:25:42] [PASSED] NTSC-443
[16:25:42] [PASSED] NTSC-J
[16:25:42] [PASSED] PAL
[16:25:42] [PASSED] PAL-M
[16:25:42] [PASSED] PAL-N
[16:25:42] [PASSED] SECAM
[16:25:42] [PASSED] Mono
[16:25:42] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[16:25:42] [PASSED] drm_test_get_tv_mode_from_name_truncated
[16:25:42] ============ [PASSED] drm_get_tv_mode_from_name ============
[16:25:42] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[16:25:42] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[16:25:42] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[16:25:42] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[16:25:42] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[16:25:42] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[16:25:42] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[16:25:42] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid  =
[16:25:42] [PASSED] VIC 96
[16:25:42] [PASSED] VIC 97
[16:25:42] [PASSED] VIC 101
[16:25:42] [PASSED] VIC 102
[16:25:42] [PASSED] VIC 106
[16:25:42] [PASSED] VIC 107
[16:25:42] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[16:25:42] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[16:25:42] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[16:25:42] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[16:25:42] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[16:25:42] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[16:25:42] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[16:25:42] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[16:25:42] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name  ====
[16:25:42] [PASSED] Automatic
[16:25:42] [PASSED] Full
[16:25:42] [PASSED] Limited 16:235
[16:25:42] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[16:25:42] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[16:25:42] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[16:25:42] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[16:25:42] === drm_test_drm_hdmi_connector_get_output_format_name  ====
[16:25:42] [PASSED] RGB
[16:25:42] [PASSED] YUV 4:2:0
[16:25:42] [PASSED] YUV 4:2:2
[16:25:42] [PASSED] YUV 4:4:4
[16:25:42] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[16:25:42] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[16:25:42] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[16:25:42] ============= drm_damage_helper (21 subtests) ==============
[16:25:42] [PASSED] drm_test_damage_iter_no_damage
[16:25:42] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[16:25:42] [PASSED] drm_test_damage_iter_no_damage_src_moved
[16:25:42] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[16:25:42] [PASSED] drm_test_damage_iter_no_damage_not_visible
[16:25:42] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[16:25:42] [PASSED] drm_test_damage_iter_no_damage_no_fb
[16:25:42] [PASSED] drm_test_damage_iter_simple_damage
[16:25:42] [PASSED] drm_test_damage_iter_single_damage
[16:25:42] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[16:25:42] [PASSED] drm_test_damage_iter_single_damage_outside_src
[16:25:42] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[16:25:42] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[16:25:42] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[16:25:42] [PASSED] drm_test_damage_iter_single_damage_src_moved
[16:25:42] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[16:25:42] [PASSED] drm_test_damage_iter_damage
[16:25:42] [PASSED] drm_test_damage_iter_damage_one_intersect
[16:25:42] [PASSED] drm_test_damage_iter_damage_one_outside
[16:25:42] [PASSED] drm_test_damage_iter_damage_src_moved
[16:25:42] [PASSED] drm_test_damage_iter_damage_not_visible
[16:25:42] ================ [PASSED] drm_damage_helper ================
[16:25:42] ============== drm_dp_mst_helper (3 subtests) ==============
[16:25:42] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[16:25:42] [PASSED] Clock 154000 BPP 30 DSC disabled
[16:25:42] [PASSED] Clock 234000 BPP 30 DSC disabled
[16:25:42] [PASSED] Clock 297000 BPP 24 DSC disabled
[16:25:42] [PASSED] Clock 332880 BPP 24 DSC enabled
[16:25:42] [PASSED] Clock 324540 BPP 24 DSC enabled
[16:25:42] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[16:25:42] ============== drm_test_dp_mst_calc_pbn_div  ===============
[16:25:42] [PASSED] Link rate 2000000 lane count 4
[16:25:42] [PASSED] Link rate 2000000 lane count 2
[16:25:42] [PASSED] Link rate 2000000 lane count 1
[16:25:42] [PASSED] Link rate 1350000 lane count 4
[16:25:42] [PASSED] Link rate 1350000 lane count 2
[16:25:42] [PASSED] Link rate 1350000 lane count 1
[16:25:42] [PASSED] Link rate 1000000 lane count 4
[16:25:42] [PASSED] Link rate 1000000 lane count 2
[16:25:42] [PASSED] Link rate 1000000 lane count 1
[16:25:42] [PASSED] Link rate 810000 lane count 4
[16:25:42] [PASSED] Link rate 810000 lane count 2
[16:25:42] [PASSED] Link rate 810000 lane count 1
[16:25:42] [PASSED] Link rate 540000 lane count 4
[16:25:42] [PASSED] Link rate 540000 lane count 2
[16:25:42] [PASSED] Link rate 540000 lane count 1
[16:25:42] [PASSED] Link rate 270000 lane count 4
[16:25:42] [PASSED] Link rate 270000 lane count 2
[16:25:42] [PASSED] Link rate 270000 lane count 1
[16:25:42] [PASSED] Link rate 162000 lane count 4
[16:25:42] [PASSED] Link rate 162000 lane count 2
[16:25:42] [PASSED] Link rate 162000 lane count 1
[16:25:42] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[16:25:42] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[16:25:42] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[16:25:42] [PASSED] DP_POWER_UP_PHY with port number
[16:25:42] [PASSED] DP_POWER_DOWN_PHY with port number
[16:25:42] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[16:25:42] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[16:25:42] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[16:25:42] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[16:25:42] [PASSED] DP_QUERY_PAYLOAD with port number
[16:25:42] [PASSED] DP_QUERY_PAYLOAD with VCPI
[16:25:42] [PASSED] DP_REMOTE_DPCD_READ with port number
[16:25:42] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[16:25:42] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[16:25:42] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[16:25:42] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[16:25:42] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[16:25:42] [PASSED] DP_REMOTE_I2C_READ with port number
[16:25:42] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[16:25:42] [PASSED] DP_REMOTE_I2C_READ with transactions array
[16:25:42] [PASSED] DP_REMOTE_I2C_WRITE with port number
[16:25:42] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[16:25:42] [PASSED] DP_REMOTE_I2C_WRITE with data array
[16:25:42] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[16:25:42] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[16:25:42] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[16:25:42] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[16:25:42] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[16:25:42] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[16:25:42] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[16:25:42] ================ [PASSED] drm_dp_mst_helper ================
[16:25:42] ================== drm_exec (7 subtests) ===================
[16:25:42] [PASSED] sanitycheck
[16:25:42] [PASSED] test_lock
[16:25:42] [PASSED] test_lock_unlock
[16:25:42] [PASSED] test_duplicates
[16:25:42] [PASSED] test_prepare
[16:25:42] [PASSED] test_prepare_array
[16:25:42] [PASSED] test_multiple_loops
[16:25:42] ==================== [PASSED] drm_exec =====================
[16:25:42] =========== drm_format_helper_test (17 subtests) ===========
[16:25:42] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[16:25:42] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[16:25:42] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[16:25:42] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[16:25:42] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[16:25:42] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[16:25:42] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[16:25:42] ============= drm_test_fb_xrgb8888_to_bgr888  ==============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[16:25:42] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[16:25:42] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[16:25:42] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[16:25:42] ============== drm_test_fb_xrgb8888_to_mono  ===============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[16:25:42] ==================== drm_test_fb_swab  =====================
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ================ [PASSED] drm_test_fb_swab =================
[16:25:42] ============ drm_test_fb_xrgb8888_to_xbgr8888  =============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[16:25:42] ============ drm_test_fb_xrgb8888_to_abgr8888  =============
[16:25:42] [PASSED] single_pixel_source_buffer
[16:25:42] [PASSED] single_pixel_clip_rectangle
[16:25:42] [PASSED] well_known_colors
[16:25:42] [PASSED] destination_pitch
[16:25:42] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[16:25:42] ================= drm_test_fb_clip_offset  =================
[16:25:42] [PASSED] pass through
[16:25:42] [PASSED] horizontal offset
[16:25:42] [PASSED] vertical offset
[16:25:42] [PASSED] horizontal and vertical offset
[16:25:42] [PASSED] horizontal offset (custom pitch)
[16:25:42] [PASSED] vertical offset (custom pitch)
[16:25:42] [PASSED] horizontal and vertical offset (custom pitch)
[16:25:42] ============= [PASSED] drm_test_fb_clip_offset =============
[16:25:42] =================== drm_test_fb_memcpy  ====================
[16:25:42] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[16:25:42] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[16:25:42] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[16:25:42] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[16:25:42] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[16:25:42] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[16:25:42] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[16:25:42] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[16:25:42] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[16:25:42] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[16:25:42] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[16:25:42] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[16:25:42] =============== [PASSED] drm_test_fb_memcpy ================
[16:25:42] ============= [PASSED] drm_format_helper_test ==============
[16:25:42] ================= drm_format (18 subtests) =================
[16:25:42] [PASSED] drm_test_format_block_width_invalid
[16:25:42] [PASSED] drm_test_format_block_width_one_plane
[16:25:42] [PASSED] drm_test_format_block_width_two_plane
[16:25:42] [PASSED] drm_test_format_block_width_three_plane
[16:25:42] [PASSED] drm_test_format_block_width_tiled
[16:25:42] [PASSED] drm_test_format_block_height_invalid
[16:25:42] [PASSED] drm_test_format_block_height_one_plane
[16:25:42] [PASSED] drm_test_format_block_height_two_plane
[16:25:42] [PASSED] drm_test_format_block_height_three_plane
[16:25:42] [PASSED] drm_test_format_block_height_tiled
[16:25:42] [PASSED] drm_test_format_min_pitch_invalid
[16:25:42] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[16:25:42] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[16:25:42] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[16:25:42] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[16:25:42] [PASSED] drm_test_format_min_pitch_two_plane
[16:25:42] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[16:25:42] [PASSED] drm_test_format_min_pitch_tiled
[16:25:42] =================== [PASSED] drm_format ====================
[16:25:42] ============== drm_framebuffer (10 subtests) ===============
[16:25:42] ========== drm_test_framebuffer_check_src_coords  ==========
[16:25:42] [PASSED] Success: source fits into fb
[16:25:42] [PASSED] Fail: overflowing fb with x-axis coordinate
[16:25:42] [PASSED] Fail: overflowing fb with y-axis coordinate
[16:25:42] [PASSED] Fail: overflowing fb with source width
[16:25:42] [PASSED] Fail: overflowing fb with source height
[16:25:42] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[16:25:42] [PASSED] drm_test_framebuffer_cleanup
[16:25:42] =============== drm_test_framebuffer_create  ===============
[16:25:42] [PASSED] ABGR8888 normal sizes
[16:25:42] [PASSED] ABGR8888 max sizes
[16:25:42] [PASSED] ABGR8888 pitch greater than min required
[16:25:42] [PASSED] ABGR8888 pitch less than min required
[16:25:42] [PASSED] ABGR8888 Invalid width
[16:25:42] [PASSED] ABGR8888 Invalid buffer handle
[16:25:42] [PASSED] No pixel format
[16:25:42] [PASSED] ABGR8888 Width 0
[16:25:42] [PASSED] ABGR8888 Height 0
[16:25:42] [PASSED] ABGR8888 Out of bound height * pitch combination
[16:25:42] [PASSED] ABGR8888 Large buffer offset
[16:25:42] [PASSED] ABGR8888 Buffer offset for inexistent plane
[16:25:42] [PASSED] ABGR8888 Invalid flag
[16:25:42] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[16:25:42] [PASSED] ABGR8888 Valid buffer modifier
[16:25:42] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[16:25:42] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[16:25:42] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[16:25:42] [PASSED] NV12 Normal sizes
[16:25:42] [PASSED] NV12 Max sizes
[16:25:42] [PASSED] NV12 Invalid pitch
[16:25:42] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[16:25:42] [PASSED] NV12 different  modifier per-plane
[16:25:42] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[16:25:42] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[16:25:42] [PASSED] NV12 Modifier for inexistent plane
[16:25:42] [PASSED] NV12 Handle for inexistent plane
[16:25:42] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[16:25:42] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[16:25:42] [PASSED] YVU420 Normal sizes
[16:25:42] [PASSED] YVU420 Max sizes
[16:25:42] [PASSED] YVU420 Invalid pitch
[16:25:42] [PASSED] YVU420 Different pitches
[16:25:42] [PASSED] YVU420 Different buffer offsets/pitches
[16:25:42] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[16:25:42] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[16:25:42] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[16:25:42] [PASSED] YVU420 Valid modifier
[16:25:42] [PASSED] YVU420 Different modifiers per plane
[16:25:42] [PASSED] YVU420 Modifier for inexistent plane
[16:25:42] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[16:25:42] [PASSED] X0L2 Normal sizes
[16:25:42] [PASSED] X0L2 Max sizes
[16:25:42] [PASSED] X0L2 Invalid pitch
[16:25:42] [PASSED] X0L2 Pitch greater than minimum required
[16:25:42] [PASSED] X0L2 Handle for inexistent plane
[16:25:42] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[16:25:42] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[16:25:42] [PASSED] X0L2 Valid modifier
[16:25:42] [PASSED] X0L2 Modifier for inexistent plane
[16:25:42] =========== [PASSED] drm_test_framebuffer_create ===========
[16:25:42] [PASSED] drm_test_framebuffer_free
[16:25:42] [PASSED] drm_test_framebuffer_init
[16:25:42] [PASSED] drm_test_framebuffer_init_bad_format
[16:25:42] [PASSED] drm_test_framebuffer_init_dev_mismatch
[16:25:42] [PASSED] drm_test_framebuffer_lookup
[16:25:42] [PASSED] drm_test_framebuffer_lookup_inexistent
[16:25:42] [PASSED] drm_test_framebuffer_modifiers_not_supported
[16:25:42] ================= [PASSED] drm_framebuffer =================
[16:25:42] ================ drm_gem_shmem (8 subtests) ================
[16:25:42] [PASSED] drm_gem_shmem_test_obj_create
[16:25:42] [PASSED] drm_gem_shmem_test_obj_create_private
[16:25:42] [PASSED] drm_gem_shmem_test_pin_pages
[16:25:42] [PASSED] drm_gem_shmem_test_vmap
[16:25:42] [PASSED] drm_gem_shmem_test_get_sg_table
[16:25:42] [PASSED] drm_gem_shmem_test_get_pages_sgt
[16:25:42] [PASSED] drm_gem_shmem_test_madvise
[16:25:42] [PASSED] drm_gem_shmem_test_purge
[16:25:42] ================== [PASSED] drm_gem_shmem ==================
[16:25:42] === drm_atomic_helper_connector_hdmi_check (27 subtests) ===
[16:25:42] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[16:25:42] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[16:25:42] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[16:25:42] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[16:25:42] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[16:25:42] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[16:25:42] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420  =======
[16:25:42] [PASSED] Automatic
[16:25:42] [PASSED] Full
[16:25:42] [PASSED] Limited 16:235
[16:25:42] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[16:25:42] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[16:25:42] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[16:25:42] [PASSED] drm_test_check_disable_connector
[16:25:42] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[16:25:42] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[16:25:42] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[16:25:42] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[16:25:42] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[16:25:42] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[16:25:42] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[16:25:42] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[16:25:42] [PASSED] drm_test_check_output_bpc_dvi
[16:25:42] [PASSED] drm_test_check_output_bpc_format_vic_1
[16:25:42] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[16:25:42] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[16:25:42] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[16:25:42] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[16:25:42] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[16:25:42] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[16:25:42] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[16:25:42] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[16:25:42] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[16:25:42] [PASSED] drm_test_check_broadcast_rgb_value
[16:25:42] [PASSED] drm_test_check_bpc_8_value
[16:25:42] [PASSED] drm_test_check_bpc_10_value
[16:25:42] [PASSED] drm_test_check_bpc_12_value
[16:25:42] [PASSED] drm_test_check_format_value
[16:25:42] [PASSED] drm_test_check_tmds_char_value
[16:25:42] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[16:25:42] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) =
[16:25:42] [PASSED] drm_test_check_mode_valid
[16:25:42] [PASSED] drm_test_check_mode_valid_reject
[16:25:42] [PASSED] drm_test_check_mode_valid_reject_rate
[16:25:42] [PASSED] drm_test_check_mode_valid_reject_max_clock
[16:25:42] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[16:25:42] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) =
[16:25:42] [PASSED] drm_test_check_infoframes
[16:25:42] [PASSED] drm_test_check_reject_avi_infoframe
[16:25:42] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8
[16:25:42] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10
[16:25:42] [PASSED] drm_test_check_reject_audio_infoframe
[16:25:42] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes ===
[16:25:42] ================= drm_managed (2 subtests) =================
[16:25:42] [PASSED] drm_test_managed_release_action
[16:25:42] [PASSED] drm_test_managed_run_action
[16:25:42] =================== [PASSED] drm_managed ===================
[16:25:42] =================== drm_mm (6 subtests) ====================
[16:25:42] [PASSED] drm_test_mm_init
[16:25:42] [PASSED] drm_test_mm_debug
[16:25:42] [PASSED] drm_test_mm_align32
[16:25:42] [PASSED] drm_test_mm_align64
[16:25:42] [PASSED] drm_test_mm_lowest
[16:25:42] [PASSED] drm_test_mm_highest
[16:25:42] ===================== [PASSED] drm_mm ======================
[16:25:42] ============= drm_modes_analog_tv (5 subtests) =============
[16:25:42] [PASSED] drm_test_modes_analog_tv_mono_576i
[16:25:42] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[16:25:42] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[16:25:42] [PASSED] drm_test_modes_analog_tv_pal_576i
[16:25:42] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[16:25:42] =============== [PASSED] drm_modes_analog_tv ===============
[16:25:42] ============== drm_plane_helper (2 subtests) ===============
[16:25:42] =============== drm_test_check_plane_state  ================
[16:25:42] [PASSED] clipping_simple
[16:25:42] [PASSED] clipping_rotate_reflect
[16:25:42] [PASSED] positioning_simple
[16:25:42] [PASSED] upscaling
[16:25:42] [PASSED] downscaling
[16:25:42] [PASSED] rounding1
[16:25:42] [PASSED] rounding2
[16:25:42] [PASSED] rounding3
[16:25:42] [PASSED] rounding4
[16:25:42] =========== [PASSED] drm_test_check_plane_state ============
[16:25:42] =========== drm_test_check_invalid_plane_state  ============
[16:25:42] [PASSED] positioning_invalid
[16:25:42] [PASSED] upscaling_invalid
[16:25:42] [PASSED] downscaling_invalid
[16:25:42] ======= [PASSED] drm_test_check_invalid_plane_state ========
[16:25:42] ================ [PASSED] drm_plane_helper =================
[16:25:42] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[16:25:42] ====== drm_test_connector_helper_tv_get_modes_check  =======
[16:25:42] [PASSED] None
[16:25:42] [PASSED] PAL
[16:25:42] [PASSED] NTSC
[16:25:42] [PASSED] Both, NTSC Default
[16:25:42] [PASSED] Both, PAL Default
[16:25:42] [PASSED] Both, NTSC Default, with PAL on command-line
[16:25:42] [PASSED] Both, PAL Default, with NTSC on command-line
[16:25:42] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[16:25:42] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[16:25:42] ================== drm_rect (9 subtests) ===================
[16:25:42] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[16:25:42] [PASSED] drm_test_rect_clip_scaled_not_clipped
[16:25:42] [PASSED] drm_test_rect_clip_scaled_clipped
[16:25:42] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[16:25:42] ================= drm_test_rect_intersect  =================
[16:25:42] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[16:25:42] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[16:25:42] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[16:25:42] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[16:25:42] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[16:25:42] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[16:25:42] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[16:25:42] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[16:25:42] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[16:25:42] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[16:25:42] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[16:25:42] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[16:25:42] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[16:25:42] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[16:25:42] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[16:25:42] ============= [PASSED] drm_test_rect_intersect =============
[16:25:42] ================ drm_test_rect_calc_hscale  ================
[16:25:42] [PASSED] normal use
[16:25:42] [PASSED] out of max range
[16:25:42] [PASSED] out of min range
[16:25:42] [PASSED] zero dst
[16:25:42] [PASSED] negative src
[16:25:42] [PASSED] negative dst
[16:25:42] ============ [PASSED] drm_test_rect_calc_hscale ============
[16:25:42] ================ drm_test_rect_calc_vscale  ================
[16:25:42] [PASSED] normal use
[16:25:42] [PASSED] out of max range
[16:25:42] [PASSED] out of min range
[16:25:42] [PASSED] zero dst
[16:25:42] [PASSED] negative src
[16:25:42] [PASSED] negative dst
[16:25:42] ============ [PASSED] drm_test_rect_calc_vscale ============
[16:25:42] ================== drm_test_rect_rotate  ===================
[16:25:42] [PASSED] reflect-x
[16:25:42] [PASSED] reflect-y
[16:25:42] [PASSED] rotate-0
[16:25:42] [PASSED] rotate-90
[16:25:42] [PASSED] rotate-180
[16:25:42] [PASSED] rotate-270
[16:25:42] ============== [PASSED] drm_test_rect_rotate ===============
[16:25:42] ================ drm_test_rect_rotate_inv  =================
[16:25:42] [PASSED] reflect-x
[16:25:42] [PASSED] reflect-y
[16:25:42] [PASSED] rotate-0
[16:25:42] [PASSED] rotate-90
[16:25:42] [PASSED] rotate-180
[16:25:42] [PASSED] rotate-270
[16:25:42] ============ [PASSED] drm_test_rect_rotate_inv =============
[16:25:42] ==================== [PASSED] drm_rect =====================
[16:25:42] ============ drm_sysfb_modeset_test (1 subtest) ============
[16:25:42] ============ drm_test_sysfb_build_fourcc_list  =============
[16:25:42] [PASSED] no native formats
[16:25:42] [PASSED] XRGB8888 as native format
[16:25:42] [PASSED] remove duplicates
[16:25:42] [PASSED] convert alpha formats
[16:25:42] [PASSED] random formats
[16:25:42] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[16:25:42] ============= [PASSED] drm_sysfb_modeset_test ==============
[16:25:42] ================== drm_fixp (2 subtests) ===================
[16:25:42] [PASSED] drm_test_int2fixp
[16:25:42] [PASSED] drm_test_sm2fixp
[16:25:42] ==================== [PASSED] drm_fixp =====================
[16:25:42] ============================================================
[16:25:42] Testing complete. Ran 621 tests: passed: 621
[16:25:42] Elapsed time: 26.195s total, 1.702s configuring, 24.323s building, 0.135s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [16:25:42] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[16:25:44] 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=48
[16:25:53] Starting KUnit Kernel (1/1)...
[16:25:53] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[16:25:53] ================= ttm_device (5 subtests) ==================
[16:25:53] [PASSED] ttm_device_init_basic
[16:25:53] [PASSED] ttm_device_init_multiple
[16:25:53] [PASSED] ttm_device_fini_basic
[16:25:53] [PASSED] ttm_device_init_no_vma_man
[16:25:53] ================== ttm_device_init_pools  ==================
[16:25:53] [PASSED] No DMA allocations, no DMA32 required
[16:25:53] [PASSED] DMA allocations, DMA32 required
[16:25:53] [PASSED] No DMA allocations, DMA32 required
[16:25:53] [PASSED] DMA allocations, no DMA32 required
[16:25:53] ============== [PASSED] ttm_device_init_pools ==============
[16:25:53] =================== [PASSED] ttm_device ====================
[16:25:53] ================== ttm_pool (8 subtests) ===================
[16:25:53] ================== ttm_pool_alloc_basic  ===================
[16:25:53] [PASSED] One page
[16:25:53] [PASSED] More than one page
[16:25:53] [PASSED] Above the allocation limit
[16:25:53] [PASSED] One page, with coherent DMA mappings enabled
[16:25:53] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[16:25:53] ============== [PASSED] ttm_pool_alloc_basic ===============
[16:25:53] ============== ttm_pool_alloc_basic_dma_addr  ==============
[16:25:53] [PASSED] One page
[16:25:53] [PASSED] More than one page
[16:25:53] [PASSED] Above the allocation limit
[16:25:53] [PASSED] One page, with coherent DMA mappings enabled
[16:25:53] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[16:25:53] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[16:25:53] [PASSED] ttm_pool_alloc_order_caching_match
[16:25:53] [PASSED] ttm_pool_alloc_caching_mismatch
[16:25:53] [PASSED] ttm_pool_alloc_order_mismatch
[16:25:53] [PASSED] ttm_pool_free_dma_alloc
[16:25:53] [PASSED] ttm_pool_free_no_dma_alloc
[16:25:53] [PASSED] ttm_pool_fini_basic
[16:25:53] ==================== [PASSED] ttm_pool =====================
[16:25:53] ================ ttm_resource (8 subtests) =================
[16:25:53] ================= ttm_resource_init_basic  =================
[16:25:53] [PASSED] Init resource in TTM_PL_SYSTEM
[16:25:53] [PASSED] Init resource in TTM_PL_VRAM
[16:25:53] [PASSED] Init resource in a private placement
[16:25:53] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[16:25:53] ============= [PASSED] ttm_resource_init_basic =============
[16:25:53] [PASSED] ttm_resource_init_pinned
[16:25:53] [PASSED] ttm_resource_fini_basic
[16:25:53] [PASSED] ttm_resource_manager_init_basic
[16:25:53] [PASSED] ttm_resource_manager_usage_basic
[16:25:53] [PASSED] ttm_resource_manager_set_used_basic
[16:25:53] [PASSED] ttm_sys_man_alloc_basic
[16:25:53] [PASSED] ttm_sys_man_free_basic
[16:25:53] ================== [PASSED] ttm_resource ===================
[16:25:53] =================== ttm_tt (15 subtests) ===================
[16:25:53] ==================== ttm_tt_init_basic  ====================
[16:25:53] [PASSED] Page-aligned size
[16:25:53] [PASSED] Extra pages requested
[16:25:53] ================ [PASSED] ttm_tt_init_basic ================
[16:25:53] [PASSED] ttm_tt_init_misaligned
[16:25:53] [PASSED] ttm_tt_fini_basic
[16:25:53] [PASSED] ttm_tt_fini_sg
[16:25:53] [PASSED] ttm_tt_fini_shmem
[16:25:53] [PASSED] ttm_tt_create_basic
[16:25:53] [PASSED] ttm_tt_create_invalid_bo_type
[16:25:53] [PASSED] ttm_tt_create_ttm_exists
[16:25:53] [PASSED] ttm_tt_create_failed
[16:25:53] [PASSED] ttm_tt_destroy_basic
[16:25:53] [PASSED] ttm_tt_populate_null_ttm
[16:25:53] [PASSED] ttm_tt_populate_populated_ttm
[16:25:53] [PASSED] ttm_tt_unpopulate_basic
[16:25:53] [PASSED] ttm_tt_unpopulate_empty_ttm
[16:25:53] [PASSED] ttm_tt_swapin_basic
[16:25:53] ===================== [PASSED] ttm_tt ======================
[16:25:53] =================== ttm_bo (14 subtests) ===================
[16:25:53] =========== ttm_bo_reserve_optimistic_no_ticket  ===========
[16:25:53] [PASSED] Cannot be interrupted and sleeps
[16:25:53] [PASSED] Cannot be interrupted, locks straight away
[16:25:53] [PASSED] Can be interrupted, sleeps
[16:25:53] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[16:25:53] [PASSED] ttm_bo_reserve_locked_no_sleep
[16:25:53] [PASSED] ttm_bo_reserve_no_wait_ticket
[16:25:53] [PASSED] ttm_bo_reserve_double_resv
[16:25:53] [PASSED] ttm_bo_reserve_interrupted
[16:25:53] [PASSED] ttm_bo_reserve_deadlock
[16:25:53] [PASSED] ttm_bo_unreserve_basic
[16:25:53] [PASSED] ttm_bo_unreserve_pinned
[16:25:53] [PASSED] ttm_bo_unreserve_bulk
[16:25:53] [PASSED] ttm_bo_fini_basic
[16:25:53] [PASSED] ttm_bo_fini_shared_resv
[16:25:53] [PASSED] ttm_bo_pin_basic
[16:25:53] [PASSED] ttm_bo_pin_unpin_resource
[16:25:53] [PASSED] ttm_bo_multiple_pin_one_unpin
[16:25:53] ===================== [PASSED] ttm_bo ======================
[16:25:53] ============== ttm_bo_validate (22 subtests) ===============
[16:25:53] ============== ttm_bo_init_reserved_sys_man  ===============
[16:25:53] [PASSED] Buffer object for userspace
[16:25:53] [PASSED] Kernel buffer object
[16:25:53] [PASSED] Shared buffer object
[16:25:53] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[16:25:53] ============== ttm_bo_init_reserved_mock_man  ==============
[16:25:53] [PASSED] Buffer object for userspace
[16:25:53] [PASSED] Kernel buffer object
[16:25:53] [PASSED] Shared buffer object
[16:25:53] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[16:25:53] [PASSED] ttm_bo_init_reserved_resv
[16:25:53] ================== ttm_bo_validate_basic  ==================
[16:25:53] [PASSED] Buffer object for userspace
[16:25:53] [PASSED] Kernel buffer object
[16:25:53] [PASSED] Shared buffer object
[16:25:53] ============== [PASSED] ttm_bo_validate_basic ==============
[16:25:53] [PASSED] ttm_bo_validate_invalid_placement
[16:25:53] ============= ttm_bo_validate_same_placement  ==============
[16:25:53] [PASSED] System manager
[16:25:53] [PASSED] VRAM manager
[16:25:53] ========= [PASSED] ttm_bo_validate_same_placement ==========
[16:25:53] [PASSED] ttm_bo_validate_failed_alloc
[16:25:53] [PASSED] ttm_bo_validate_pinned
[16:25:53] [PASSED] ttm_bo_validate_busy_placement
[16:25:53] ================ ttm_bo_validate_multihop  =================
[16:25:53] [PASSED] Buffer object for userspace
[16:25:53] [PASSED] Kernel buffer object
[16:25:53] [PASSED] Shared buffer object
[16:25:53] ============ [PASSED] ttm_bo_validate_multihop =============
[16:25:53] ========== ttm_bo_validate_no_placement_signaled  ==========
[16:25:53] [PASSED] Buffer object in system domain, no page vector
[16:25:53] [PASSED] Buffer object in system domain with an existing page vector
[16:25:53] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[16:25:53] ======== ttm_bo_validate_no_placement_not_signaled  ========
[16:25:53] [PASSED] Buffer object for userspace
[16:25:53] [PASSED] Kernel buffer object
[16:25:53] [PASSED] Shared buffer object
[16:25:53] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[16:25:53] [PASSED] ttm_bo_validate_move_fence_signaled
[16:25:54] ========= ttm_bo_validate_move_fence_not_signaled  =========
[16:25:54] [PASSED] Waits for GPU
[16:25:54] [PASSED] Tries to lock straight away
[16:25:54] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[16:25:54] [PASSED] ttm_bo_validate_swapout
[16:25:54] [PASSED] ttm_bo_validate_happy_evict
[16:25:54] [PASSED] ttm_bo_validate_all_pinned_evict
[16:25:54] [PASSED] ttm_bo_validate_allowed_only_evict
[16:25:54] [PASSED] ttm_bo_validate_deleted_evict
[16:25:54] [PASSED] ttm_bo_validate_busy_domain_evict
[16:25:54] [PASSED] ttm_bo_validate_evict_gutting
[16:25:54] [PASSED] ttm_bo_validate_recrusive_evict
[16:25:54] ================= [PASSED] ttm_bo_validate =================
[16:25:54] ============================================================
[16:25:54] Testing complete. Ran 102 tests: passed: 102
[16:25:54] Elapsed time: 11.380s total, 1.693s configuring, 9.423s building, 0.234s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel