Skip to contentSkip to conversation

Disconnect fences from Xe module

RFC PATCH New Matthew Brost 4 participants 20 messages Oct 23, 2025 – Oct 24, 2025

Subsystems (11)
lore
Share & tools
lore

Matthew Brost

author maintainer
#0 lore raw

cover Disconnect fences from Xe module

Mainly for CI and as a proof concept, built on top of Christian's work [1].

Matt

[1] https://patchwork.freedesktop.org/series/155836/

Christian König (9):
dma-buf: cleanup dma_fence_describe
dma-buf: rework stub fence initialisation
dma-buf: protected fence ops by RCU
dma-buf: detach fence ops on signal
dma-buf: inline spinlock for fence protection
dma-buf: use inline lock for the stub fence
dma-buf: use inline lock for the dma-fence-array
dma-buf: use inline lock for the dma-fence-chain drm/sched: use inline locks for the drm-sched-fence

Matthew Brost (5):
dma-fence: Fix selftest
drm/xe: Disconnect the low hanging fences from Xe module drm/xe: Drop HW fence slab
drm/xe: Promote xe_hw_fence_irq to an ref counted object drm/xe: Finish disconnect HW fences from module

 drivers/dma-buf/dma-fence-array.c           |   5 +-
 drivers/dma-buf/dma-fence-chain.c           |   3 +-
 drivers/dma-buf/dma-fence.c                 | 178 +++++++++++---------
 drivers/dma-buf/st-dma-fence.c              |   4 +-
 drivers/dma-buf/sw_sync.c                   |  14 +-
 drivers/dma-buf/sync_debug.h                |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c    |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c      |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h      |  12 +-
 drivers/gpu/drm/drm_crtc.c                  |   2 +-
 drivers/gpu/drm/drm_writeback.c             |   2 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c       |   5 +-
 drivers/gpu/drm/nouveau/nouveau_fence.c     |   3 +-
 drivers/gpu/drm/qxl/qxl_release.c           |   3 +-
 drivers/gpu/drm/scheduler/sched_fence.c     |  11 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c       |   3 +-
 drivers/gpu/drm/xe/xe_exec_queue.c          |   2 +-
 drivers/gpu/drm/xe/xe_gt.c                  |   7 +-
 drivers/gpu/drm/xe/xe_gt_types.h            |   2 +-
 drivers/gpu/drm/xe/xe_hw_engine.c           |   2 +-
 drivers/gpu/drm/xe/xe_hw_fence.c            |  62 ++++---
 drivers/gpu/drm/xe/xe_hw_fence.h            |   5 +-
 drivers/gpu/drm/xe/xe_hw_fence_types.h      |   4 +
 drivers/gpu/drm/xe/xe_module.c              |   5 -
 drivers/gpu/drm/xe/xe_oa.c                  |   5 +-
 drivers/gpu/drm/xe/xe_preempt_fence.c       |   3 +-
 drivers/gpu/drm/xe/xe_preempt_fence_types.h |   2 -
 drivers/gpu/drm/xe/xe_sched_job.c           |   4 +-
 drivers/gpu/drm/xe/xe_tlb_inval.c           |   5 +-
 drivers/gpu/drm/xe/xe_tlb_inval_types.h     |   2 -
 include/drm/gpu_scheduler.h                 |   4 -
 include/linux/dma-fence-array.h             |   1 -
 include/linux/dma-fence-chain.h             |   1 -
 include/linux/dma-fence.h                   |  60 ++++++-
 34 files changed, 249 insertions(+), 182 deletions(-)
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

RFC PATCH 1/14 dma-buf: cleanup dma_fence_describe

From: Christian König <[email protected]>

The driver and timeline name are meaningless for signaled fences.

Drop them and also print the context number.

---
 drivers/dma-buf/dma-fence.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/dma-buf/dma-fence.c +6 -5
index 3f78c56b58dc..f0539c73ed57 100644
@@ -1001,17 +1001,18 @@ void dma_fence_describe(struct dma_fence *fence, struct seq_file *seq)
 {
 	const char __rcu *timeline;
 	const char __rcu *driver;
+	const char *signaled = "un";
 
 	rcu_read_lock();
 
 	timeline = dma_fence_timeline_name(fence);
 	driver = dma_fence_driver_name(fence);
 
-	seq_printf(seq, "%s %s seq %llu %ssignalled\n",
-		   rcu_dereference(driver),
-		   rcu_dereference(timeline),
-		   fence->seqno,
-		   dma_fence_is_signaled(fence) ? "" : "un");
+	if (dma_fence_is_signaled(fence))
+		timeline = driver = signaled = "";
+
+	seq_printf(seq, "%llu %s %s seq %llu %ssignalled\n", fence->context,
+		   timeline, driver, fence->seqno, signaled);
 
 	rcu_read_unlock();
 }
Signature · 1 line
2.34.1
author maintainer
#2 lore raw

RFC PATCH 2/14 dma-buf: rework stub fence initialisation

In reply to Matthew Brost

From: Christian König <[email protected]>

Instead of doing this on the first call of the function just initialize the stub fence during kernel load.

This has the clear advantage of lower overhead and also doesn't rely on the ops to not be NULL any more.

---
 drivers/dma-buf/dma-fence.c | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)
drivers/dma-buf/dma-fence.c +15 -17
index f0539c73ed57..51ee13d005bc 100644
@@ -121,29 +121,27 @@ static const struct dma_fence_ops dma_fence_stub_ops = {
 	.get_timeline_name = dma_fence_stub_get_name,
 };
 
+static int __init dma_fence_init_stub(void)
+{
+	dma_fence_init(&dma_fence_stub, &dma_fence_stub_ops,
+		       &dma_fence_stub_lock, 0, 0);
+
+	set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
+		&dma_fence_stub.flags);
+
+	dma_fence_signal_locked(&dma_fence_stub);
+	return 0;
+}
+subsys_initcall(dma_fence_init_stub);
+
 /**
  * dma_fence_get_stub - return a signaled fence
  *
- * Return a stub fence which is already signaled. The fence's
- * timestamp corresponds to the first time after boot this
- * function is called.
+ * Return a stub fence which is already signaled. The fence's timestamp
+ * corresponds to the initialisation time of the linux kernel.
  */
 struct dma_fence *dma_fence_get_stub(void)
 {
-	spin_lock(&dma_fence_stub_lock);
-	if (!dma_fence_stub.ops) {
-		dma_fence_init(&dma_fence_stub,
-			       &dma_fence_stub_ops,
-			       &dma_fence_stub_lock,
-			       0, 0);
-
-		set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-			&dma_fence_stub.flags);
-
-		dma_fence_signal_locked(&dma_fence_stub);
-	}
-	spin_unlock(&dma_fence_stub_lock);
-
 	return dma_fence_get(&dma_fence_stub);
 }
 EXPORT_SYMBOL(dma_fence_get_stub);
Signature · 1 line
2.34.1
#3 lore raw

Re: [RFC PATCH 02/14] dma-buf: rework stub fence initialisation

kernel test robot noticed "WARNING:at_drivers/dma-buf/dma-fence.c:#dma_fence_signal_timestamp_locked" on:

Hello,

kernel test robot noticed "WARNING:at_drivers/dma-buf/dma-fence.c:#dma_fence_signal_timestamp_locked" on:

commit: 7f65345d34375a305c1e1f69729ddb35671cd73d ("[RFC PATCH 02/14] dma-buf: rework stub fence initialisation")
url: https://github.com/intel-lab-lkp/linux/commits/Matthew-Brost/dma-buf-cleanup-dma_fence_describe/20251023-121819
base: https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link: https://lore.kernel.org/all/[email protected]/
patch subject: [RFC PATCH 02/14] dma-buf: rework stub fence initialisation

in testcase: boot

config: i386-randconfig-141-20251024
compiler: gcc-14
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(please refer to attached dmesg/kmsg for entire log/backtrace)

+---------------------------------------------------------------------------+------------+------------+
|                                                                           | 4de95329f8 | 7f65345d34 |
+---------------------------------------------------------------------------+------------+------------+
| WARNING:at_drivers/dma-buf/dma-fence.c:#dma_fence_signal_timestamp_locked | 0          | 6          |
| EIP:dma_fence_signal_timestamp_locked                                     | 0          | 6          |
+---------------------------------------------------------------------------+------------+------------+

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-lkp/[email protected]

[    1.961011][    T1] ------------[ cut here ]------------
[    1.961690][    T1] WARNING: CPU: 0 PID: 1 at drivers/dma-buf/dma-fence.c:371 dma_fence_signal_timestamp_locked (drivers/dma-buf/dma-fence.c:371)
[    1.963022][    T1] Modules linked in:
[    1.963541][    T1] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.18.0-rc1-00195-g7f65345d3437 #1 PREEMPT(lazy)  e8d4534976345a3814ee47c66e13234d1d55a625
[    1.965248][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[    1.966289][    T1] EIP: dma_fence_signal_timestamp_locked (drivers/dma-buf/dma-fence.c:371)
[    1.967087][    T1] Code: ff ff 83 c0 10 e8 71 f5 91 00 31 d2 6a 00 85 c0 89 c6 b8 78 02 55 dc 0f 94 c2 31 c9 e8 6a 07 2a ff 58 85 f6 0f 85 ee fe ff ff <0f> 0b ba 01 00 00 00 e9 e4 fe ff ff 2e 8d 74 26 00 8d 65 f4 b8 ea
All code
========
   0:	ff                   	(bad)
   1:	ff 83 c0 10 e8 71    	incl   0x71e810c0(%rbx)
   7:	f5                   	cmc
   8:	91                   	xchg   %eax,%ecx
   9:	00 31                	add    %dh,(%rcx)
   b:	d2 6a 00             	shrb   %cl,0x0(%rdx)
   e:	85 c0                	test   %eax,%eax
  10:	89 c6                	mov    %eax,%esi
  12:	b8 78 02 55 dc       	mov    $0xdc550278,%eax
  17:	0f 94 c2             	sete   %dl
  1a:	31 c9                	xor    %ecx,%ecx
  1c:	e8 6a 07 2a ff       	call   0xffffffffff2a078b
  21:	58                   	pop    %rax
  22:	85 f6                	test   %esi,%esi
  24:	0f 85 ee fe ff ff    	jne    0xffffffffffffff18
  2a:*	0f 0b                	ud2		<-- trapping instruction
  2c:	ba 01 00 00 00       	mov    $0x1,%edx
  31:	e9 e4 fe ff ff       	jmp    0xffffffffffffff1a
  36:	2e 8d 74 26 00       	cs lea 0x0(%rsi,%riz,1),%esi
  3b:	8d 65 f4             	lea    -0xc(%rbp),%esp
  3e:	b8                   	.byte 0xb8
  3f:	ea                   	(bad)

Code starting with the faulting instruction
===========================================

   0:	0f 0b                	ud2
   2:	ba 01 00 00 00       	mov    $0x1,%edx
   7:	e9 e4 fe ff ff       	jmp    0xfffffffffffffef0
   c:	2e 8d 74 26 00       	cs lea 0x0(%rsi,%riz,1),%esi
  11:	8d 65 f4             	lea    -0xc(%rbp),%esp
  14:	b8                   	.byte 0xb8
  15:	ea                   	(bad)
[    1.969313][    T1] EAX: 00000000 EBX: dced86c0 ECX: 00000000 EDX: 00000001
[    1.970150][    T1] ESI: 00000000 EDI: dc674abc EBP: c1187ec8 ESP: c1187eac
[    1.970984][    T1] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010246
[    1.971931][    T1] CR0: 80050033 CR2: ffbff000 CR3: 1c751000 CR4: 000406f0
[    1.972766][    T1] Call Trace:
[    1.973210][    T1]  ? dma_buf_init (drivers/dma-buf/dma-fence.c:125)
[    1.976054][    T1]  dma_fence_signal_locked (drivers/dma-buf/dma-fence.c:443)
[    1.976512][    T1]  dma_fence_init_stub (drivers/dma-buf/dma-fence.c:134)
[    1.977133][    T1]  do_one_initcall (init/main.c:1283)
[    1.977739][    T1]  do_initcalls (init/main.c:1344 (discriminator 3) init/main.c:1361 (discriminator 3))
[    1.978324][    T1]  kernel_init_freeable (init/main.c:1595)
[    1.978958][    T1]  ? rest_init (init/main.c:1475)
[    1.979516][    T1]  kernel_init (init/main.c:1485)
[    1.980063][    T1]  ret_from_fork (arch/x86/kernel/process.c:164)
[    1.980639][    T1]  ? rest_init (init/main.c:1475)
[    1.981198][    T1]  ret_from_fork_asm (arch/x86/entry/entry_32.S:737)
[    1.981790][    T1]  entry_INT80_32 (arch/x86/entry/entry_32.S:945)
[    1.982397][    T1] irq event stamp: 68917
[    1.982933][    T1] hardirqs last  enabled at (68927): __up_console_sem (arch/x86/include/asm/irqflags.h:42 arch/x86/include/asm/irqflags.h:119 arch/x86/include/asm/irqflags.h:159 kernel/printk/printk.c:345)
[    1.983988][    T1] hardirqs last disabled at (68936): __up_console_sem (kernel/printk/printk.c:343 (discriminator 3))
[    1.985064][    T1] softirqs last  enabled at (68414): release_sock (net/core/sock.c:3745)
[    1.986103][    T1] softirqs last disabled at (68412): release_sock (net/core/sock.c:3734)
[    1.986631][    T1] ---[ end trace 0000000000000000 ]---

The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20251024/[email protected]

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
author maintainer
#4 lore raw

RFC PATCH 3/14 dma-buf: protected fence ops by RCU

In reply to Matthew Brost

From: Christian König <[email protected]>

At first glance it is counter intuitive to protect a constant function pointer table by RCU, but this allows modules providing the function table to unload by waiting for an RCU grace period.

---
 drivers/dma-buf/dma-fence.c | 65 +++++++++++++++++++++++++++----------
 include/linux/dma-fence.h   | 18 ++++++++--
 2 files changed, 62 insertions(+), 21 deletions(-)
drivers/dma-buf/dma-fence.c +47 -18
index 51ee13d005bc..982f2b2a62c0 100644
@@ -498,6 +498,7 @@ EXPORT_SYMBOL(dma_fence_signal);
 signed long
 dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)
 {
+	const struct dma_fence_ops *ops;
 	signed long ret;
 
 	if (WARN_ON(timeout < 0))
@@ -509,15 +510,21 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)
 
 	dma_fence_enable_sw_signaling(fence);
 
-	if (trace_dma_fence_wait_start_enabled()) {
-		rcu_read_lock();
-		trace_dma_fence_wait_start(fence);
+	rcu_read_lock();
+	ops = rcu_dereference(fence->ops);
+	trace_dma_fence_wait_start(fence);
+	if (ops->wait) {
+		/*
+		 * Implementing the wait ops is deprecated and not supported for
+		 * issuer independent fences, so it is ok to use the ops outside
+		 * the RCU protected section.
+		 */
+		rcu_read_unlock();
+		ret = ops->wait(fence, intr, timeout);
+	} else {
 		rcu_read_unlock();
-	}
-	if (fence->ops->wait)
-		ret = fence->ops->wait(fence, intr, timeout);
-	else
 		ret = dma_fence_default_wait(fence, intr, timeout);
+	}
 	if (trace_dma_fence_wait_end_enabled()) {
 		rcu_read_lock();
 		trace_dma_fence_wait_end(fence);
@@ -538,6 +545,7 @@ void dma_fence_release(struct kref *kref)
 {
 	struct dma_fence *fence =
 		container_of(kref, struct dma_fence, refcount);
+	const struct dma_fence_ops *ops;
 
 	rcu_read_lock();
 	trace_dma_fence_destroy(fence);
@@ -569,12 +577,12 @@ void dma_fence_release(struct kref *kref)
 		spin_unlock_irqrestore(fence->lock, flags);
 	}
 
-	rcu_read_unlock();
-
-	if (fence->ops->release)
-		fence->ops->release(fence);
+	ops = rcu_dereference(fence->ops);
+	if (ops->release)
+		ops->release(fence);
 	else
 		dma_fence_free(fence);
+	rcu_read_unlock();
 }
 EXPORT_SYMBOL(dma_fence_release);
 
@@ -593,6 +601,7 @@ EXPORT_SYMBOL(dma_fence_free);
 
 static bool __dma_fence_enable_signaling(struct dma_fence *fence)
 {
+	const struct dma_fence_ops *ops;
 	bool was_set;
 
 	lockdep_assert_held(fence->lock);
@@ -603,14 +612,18 @@ static bool __dma_fence_enable_signaling(struct dma_fence *fence)
 	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
 		return false;
 
-	if (!was_set && fence->ops->enable_signaling) {
+	rcu_read_lock();
+	ops = rcu_dereference(fence->ops);
+	if (!was_set && ops->enable_signaling) {
 		trace_dma_fence_enable_signal(fence);
 
-		if (!fence->ops->enable_signaling(fence)) {
+		if (!ops->enable_signaling(fence)) {
+			rcu_read_unlock();
 			dma_fence_signal_locked(fence);
 			return false;
 		}
 	}
+	rcu_read_unlock();
 
 	return true;
 }
@@ -983,8 +996,13 @@ EXPORT_SYMBOL(dma_fence_wait_any_timeout);
  */
 void dma_fence_set_deadline(struct dma_fence *fence, ktime_t deadline)
 {
-	if (fence->ops->set_deadline && !dma_fence_is_signaled(fence))
-		fence->ops->set_deadline(fence, deadline);
+	const struct dma_fence_ops *ops;
+
+	rcu_read_lock();
+	ops = rcu_dereference(fence->ops);
+	if (ops->set_deadline && !dma_fence_is_signaled(fence))
+		ops->set_deadline(fence, deadline);
+	rcu_read_unlock();
 }
 EXPORT_SYMBOL(dma_fence_set_deadline);
 
@@ -1024,7 +1042,12 @@ __dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops,
 	BUG_ON(!ops || !ops->get_driver_name || !ops->get_timeline_name);
 
 	kref_init(&fence->refcount);
-	fence->ops = ops;
+	/*
+	 * At first glance it is counter intuitive to protect a constant
+	 * function pointer table by RCU, but this allows modules providing the
+	 * function table to unload by waiting for an RCU grace period.
+	 */
+	RCU_INIT_POINTER(fence->ops, ops);
 	INIT_LIST_HEAD(&fence->cb_list);
 	fence->lock = lock;
 	fence->context = context;
@@ -1104,11 +1127,14 @@ EXPORT_SYMBOL(dma_fence_init64);
  */
 const char __rcu *dma_fence_driver_name(struct dma_fence *fence)
 {
+	const struct dma_fence_ops *ops;
+
 	RCU_LOCKDEP_WARN(!rcu_read_lock_held(),
 			 "RCU protection is required for safe access to returned string");
 
+	ops = rcu_dereference(fence->ops);
 	if (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
-		return fence->ops->get_driver_name(fence);
+		return ops->get_driver_name(fence);
 	else
 		return "detached-driver";
 }
@@ -1136,11 +1162,14 @@ EXPORT_SYMBOL(dma_fence_driver_name);
  */
 const char __rcu *dma_fence_timeline_name(struct dma_fence *fence)
 {
+	const struct dma_fence_ops *ops;
+
 	RCU_LOCKDEP_WARN(!rcu_read_lock_held(),
 			 "RCU protection is required for safe access to returned string");
 
+	ops = rcu_dereference(fence->ops);
 	if (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
-		return fence->ops->get_driver_name(fence);
+		return ops->get_driver_name(fence);
 	else
 		return "signaled-timeline";
 }
include/linux/dma-fence.h +15 -3
index 64639e104110..38421a0c7c5b 100644
@@ -66,7 +66,7 @@ struct seq_file;
  */
 struct dma_fence {
 	spinlock_t *lock;
-	const struct dma_fence_ops *ops;
+	const struct dma_fence_ops __rcu *ops;
 	/*
 	 * We clear the callback list on kref_put so that by the time we
 	 * release the fence it is unused. No one should be adding to the
@@ -418,13 +418,19 @@ const char __rcu *dma_fence_timeline_name(struct dma_fence *fence);
 static inline bool
 dma_fence_is_signaled_locked(struct dma_fence *fence)
 {
+	const struct dma_fence_ops *ops;
+
 	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
 		return true;
 
-	if (fence->ops->signaled && fence->ops->signaled(fence)) {
+	rcu_read_lock();
+	ops = rcu_dereference(fence->ops);
+	if (ops->signaled && ops->signaled(fence)) {
+		rcu_read_unlock();
 		dma_fence_signal_locked(fence);
 		return true;
 	}
+	rcu_read_unlock();
 
 	return false;
 }
@@ -448,13 +454,19 @@ dma_fence_is_signaled_locked(struct dma_fence *fence)
 static inline bool
 dma_fence_is_signaled(struct dma_fence *fence)
 {
+	const struct dma_fence_ops *ops;
+
 	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
 		return true;
 
-	if (fence->ops->signaled && fence->ops->signaled(fence)) {
+	rcu_read_lock();
+	ops = rcu_dereference(fence->ops);
+	if (ops->signaled && ops->signaled(fence)) {
+		rcu_read_unlock();
 		dma_fence_signal(fence);
 		return true;
 	}
+	rcu_read_unlock();
 
 	return false;
 }
Signature · 1 line
2.34.1
author maintainer
#5 lore raw

RFC PATCH 4/14 dma-buf: detach fence ops on signal

In reply to Matthew Brost

From: Christian König <[email protected]>

When neither a release nor a wait operation is specified it is possible to let the dma_fence live on independent of the module who issued it.

This makes it possible to unload drivers and only wait for all their fences to signal.

---
 drivers/dma-buf/dma-fence.c | 16 ++++++++++++----
 include/linux/dma-fence.h   |  4 ++--
 2 files changed, 14 insertions(+), 6 deletions(-)
drivers/dma-buf/dma-fence.c +12 -4
index 982f2b2a62c0..39f73edf3a33 100644
@@ -374,6 +374,14 @@ int dma_fence_signal_timestamp_locked(struct dma_fence *fence,
 				      &fence->flags)))
 		return -EINVAL;
 
+	/*
+	 * When neither a release nor a wait operation is specified set the ops
+	 * pointer to NULL to allow the fence structure to become independent
+	 * who originally issued it.
+	 */
+	if (!fence->ops->release && !fence->ops->wait)
+		RCU_INIT_POINTER(fence->ops, NULL);
+
 	/* Stash the cb_list before replacing it with the timestamp */
 	list_replace(&fence->cb_list, &cb_list);
 
@@ -513,7 +521,7 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)
 	rcu_read_lock();
 	ops = rcu_dereference(fence->ops);
 	trace_dma_fence_wait_start(fence);
-	if (ops->wait) {
+	if (ops && ops->wait) {
 		/*
 		 * Implementing the wait ops is deprecated and not supported for
 		 * issuer independent fences, so it is ok to use the ops outside
@@ -578,7 +586,7 @@ void dma_fence_release(struct kref *kref)
 	}
 
 	ops = rcu_dereference(fence->ops);
-	if (ops->release)
+	if (ops && ops->release)
 		ops->release(fence);
 	else
 		dma_fence_free(fence);
@@ -614,7 +622,7 @@ static bool __dma_fence_enable_signaling(struct dma_fence *fence)
 
 	rcu_read_lock();
 	ops = rcu_dereference(fence->ops);
-	if (!was_set && ops->enable_signaling) {
+	if (!was_set && ops && ops->enable_signaling) {
 		trace_dma_fence_enable_signal(fence);
 
 		if (!ops->enable_signaling(fence)) {
@@ -1000,7 +1008,7 @@ void dma_fence_set_deadline(struct dma_fence *fence, ktime_t deadline)
 
 	rcu_read_lock();
 	ops = rcu_dereference(fence->ops);
-	if (ops->set_deadline && !dma_fence_is_signaled(fence))
+	if (ops && ops->set_deadline && !dma_fence_is_signaled(fence))
 		ops->set_deadline(fence, deadline);
 	rcu_read_unlock();
 }
include/linux/dma-fence.h +2 -2
index 38421a0c7c5b..e1ba1d53de88 100644
@@ -425,7 +425,7 @@ dma_fence_is_signaled_locked(struct dma_fence *fence)
 
 	rcu_read_lock();
 	ops = rcu_dereference(fence->ops);
-	if (ops->signaled && ops->signaled(fence)) {
+	if (ops && ops->signaled && ops->signaled(fence)) {
 		rcu_read_unlock();
 		dma_fence_signal_locked(fence);
 		return true;
@@ -461,7 +461,7 @@ dma_fence_is_signaled(struct dma_fence *fence)
 
 	rcu_read_lock();
 	ops = rcu_dereference(fence->ops);
-	if (ops->signaled && ops->signaled(fence)) {
+	if (ops && ops->signaled && ops->signaled(fence)) {
 		rcu_read_unlock();
 		dma_fence_signal(fence);
 		return true;
Signature · 1 line
2.34.1
author maintainer
#6 lore raw

RFC PATCH 5/14 dma-buf: inline spinlock for fence protection

In reply to Matthew Brost

From: Christian König <[email protected]>

Allow implementations to not give a spinlock to protect the fence internal state, instead a spinlock embedded into the fence structure itself is used in this case.

Apart from simplifying the handling for containers and the stub fence this has the advantage of allowing implementations to issue fences without caring about theit spinlock lifetime.

That in turn is necessary for independent fences who outlive the module who originally issued them.

---
 drivers/dma-buf/dma-fence.c              | 54 ++++++++++++------------
 drivers/dma-buf/sw_sync.c                | 14 +++---
 drivers/dma-buf/sync_debug.h             |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c |  4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c   |  4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h   | 12 +++---
 drivers/gpu/drm/drm_crtc.c               |  2 +-
 drivers/gpu/drm/drm_writeback.c          |  2 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c    |  5 ++-
 drivers/gpu/drm/nouveau/nouveau_fence.c  |  3 +-
 drivers/gpu/drm/qxl/qxl_release.c        |  3 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c    |  3 +-
 drivers/gpu/drm/xe/xe_hw_fence.c         |  3 +-
 drivers/gpu/drm/xe/xe_sched_job.c        |  4 +-
 include/linux/dma-fence.h                | 42 +++++++++++++++++-
 15 files changed, 99 insertions(+), 58 deletions(-)
drivers/dma-buf/dma-fence.c +26 -28
index 39f73edf3a33..a0b328fdd90d 100644
@@ -343,7 +343,6 @@ void __dma_fence_might_wait(void)
 }
 #endif
 
-
 /**
  * dma_fence_signal_timestamp_locked - signal completion of a fence
  * @fence: the fence to signal
@@ -368,7 +367,7 @@ int dma_fence_signal_timestamp_locked(struct dma_fence *fence,
 	struct dma_fence_cb *cur, *tmp;
 	struct list_head cb_list;
 
-	lockdep_assert_held(fence->lock);
+	lockdep_assert_held(dma_fence_spinlock(fence));
 
 	if (unlikely(test_and_set_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
 				      &fence->flags)))
@@ -421,9 +420,9 @@ int dma_fence_signal_timestamp(struct dma_fence *fence, ktime_t timestamp)
 	if (WARN_ON(!fence))
 		return -EINVAL;
 
-	spin_lock_irqsave(fence->lock, flags);
+	dma_fence_lock(fence, flags);
 	ret = dma_fence_signal_timestamp_locked(fence, timestamp);
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 
 	return ret;
 }
@@ -475,9 +474,9 @@ int dma_fence_signal(struct dma_fence *fence)
 
 	tmp = dma_fence_begin_signalling();
 
-	spin_lock_irqsave(fence->lock, flags);
+	dma_fence_lock(fence, flags);
 	ret = dma_fence_signal_timestamp_locked(fence, ktime_get());
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 
 	dma_fence_end_signalling(tmp);
 
@@ -579,10 +578,10 @@ void dma_fence_release(struct kref *kref)
 		 * don't leave chains dangling. We set the error flag first
 		 * so that the callbacks know this signal is due to an error.
 		 */
-		spin_lock_irqsave(fence->lock, flags);
+		dma_fence_lock(fence, flags);
 		fence->error = -EDEADLK;
 		dma_fence_signal_locked(fence);
-		spin_unlock_irqrestore(fence->lock, flags);
+		dma_fence_unlock(fence, flags);
 	}
 
 	ops = rcu_dereference(fence->ops);
@@ -612,7 +611,7 @@ static bool __dma_fence_enable_signaling(struct dma_fence *fence)
 	const struct dma_fence_ops *ops;
 	bool was_set;
 
-	lockdep_assert_held(fence->lock);
+	lockdep_assert_held(dma_fence_spinlock(fence));
 
 	was_set = test_and_set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
 				   &fence->flags);
@@ -648,9 +647,9 @@ void dma_fence_enable_sw_signaling(struct dma_fence *fence)
 {
 	unsigned long flags;
 
-	spin_lock_irqsave(fence->lock, flags);
+	dma_fence_lock(fence, flags);
 	__dma_fence_enable_signaling(fence);
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 }
 EXPORT_SYMBOL(dma_fence_enable_sw_signaling);
 
@@ -690,8 +689,7 @@ int dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
 		return -ENOENT;
 	}
 
-	spin_lock_irqsave(fence->lock, flags);
-
+	dma_fence_lock(fence, flags);
 	if (__dma_fence_enable_signaling(fence)) {
 		cb->func = func;
 		list_add_tail(&cb->node, &fence->cb_list);
@@ -699,8 +697,7 @@ int dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
 		INIT_LIST_HEAD(&cb->node);
 		ret = -ENOENT;
 	}
-
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 
 	return ret;
 }
@@ -723,9 +720,9 @@ int dma_fence_get_status(struct dma_fence *fence)
 	unsigned long flags;
 	int status;
 
-	spin_lock_irqsave(fence->lock, flags);
+	dma_fence_lock(fence, flags);
 	status = dma_fence_get_status_locked(fence);
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 
 	return status;
 }
@@ -755,13 +752,11 @@ dma_fence_remove_callback(struct dma_fence *fence, struct dma_fence_cb *cb)
 	unsigned long flags;
 	bool ret;
 
-	spin_lock_irqsave(fence->lock, flags);
-
+	dma_fence_lock(fence, flags);
 	ret = !list_empty(&cb->node);
 	if (ret)
 		list_del_init(&cb->node);
-
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 
 	return ret;
 }
@@ -800,8 +795,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
 	unsigned long flags;
 	signed long ret = timeout ? timeout : 1;
 
-	spin_lock_irqsave(fence->lock, flags);
-
+	dma_fence_lock(fence, flags);
 	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
 		goto out;
 
@@ -824,11 +818,11 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
 			__set_current_state(TASK_INTERRUPTIBLE);
 		else
 			__set_current_state(TASK_UNINTERRUPTIBLE);
-		spin_unlock_irqrestore(fence->lock, flags);
+		dma_fence_unlock(fence, flags);
 
 		ret = schedule_timeout(ret);
 
-		spin_lock_irqsave(fence->lock, flags);
+		dma_fence_lock(fence, flags);
 		if (ret > 0 && intr && signal_pending(current))
 			ret = -ERESTARTSYS;
 	}
@@ -838,7 +832,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
 	__set_current_state(TASK_RUNNING);
 
 out:
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 	return ret;
 }
 EXPORT_SYMBOL(dma_fence_default_wait);
@@ -1046,7 +1040,6 @@ static void
 __dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops,
 	         spinlock_t *lock, u64 context, u64 seqno, unsigned long flags)
 {
-	BUG_ON(!lock);
 	BUG_ON(!ops || !ops->get_driver_name || !ops->get_timeline_name);
 
 	kref_init(&fence->refcount);
@@ -1057,10 +1050,15 @@ __dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops,
 	 */
 	RCU_INIT_POINTER(fence->ops, ops);
 	INIT_LIST_HEAD(&fence->cb_list);
-	fence->lock = lock;
 	fence->context = context;
 	fence->seqno = seqno;
 	fence->flags = flags;
+	if (lock) {
+		fence->extern_lock = lock;
+	} else {
+		spin_lock_init(&fence->inline_lock);
+		fence->flags |= BIT(DMA_FENCE_FLAG_INLINE_LOCK_BIT);
+	}
 	fence->error = 0;
 
 	trace_dma_fence_init(fence);
drivers/dma-buf/sw_sync.c +7 -7
index 3c20f1d31cf5..8f48529214a4 100644
@@ -155,12 +155,12 @@ static void timeline_fence_release(struct dma_fence *fence)
 	struct sync_timeline *parent = dma_fence_parent(fence);
 	unsigned long flags;
 
-	spin_lock_irqsave(fence->lock, flags);
+	dma_fence_lock(fence, flags);
 	if (!list_empty(&pt->link)) {
 		list_del(&pt->link);
 		rb_erase(&pt->node, &parent->pt_tree);
 	}
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 
 	sync_timeline_put(parent);
 	dma_fence_free(fence);
@@ -178,7 +178,7 @@ static void timeline_fence_set_deadline(struct dma_fence *fence, ktime_t deadlin
 	struct sync_pt *pt = dma_fence_to_sync_pt(fence);
 	unsigned long flags;
 
-	spin_lock_irqsave(fence->lock, flags);
+	dma_fence_lock(fence, flags);
 	if (test_bit(SW_SYNC_HAS_DEADLINE_BIT, &fence->flags)) {
 		if (ktime_before(deadline, pt->deadline))
 			pt->deadline = deadline;
@@ -186,7 +186,7 @@ static void timeline_fence_set_deadline(struct dma_fence *fence, ktime_t deadlin
 		pt->deadline = deadline;
 		__set_bit(SW_SYNC_HAS_DEADLINE_BIT, &fence->flags);
 	}
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 }
 
 static const struct dma_fence_ops timeline_fence_ops = {
@@ -427,13 +427,13 @@ static int sw_sync_ioctl_get_deadline(struct sync_timeline *obj, unsigned long a
 		goto put_fence;
 	}
 
-	spin_lock_irqsave(fence->lock, flags);
+	dma_fence_lock(fence, flags);
 	if (!test_bit(SW_SYNC_HAS_DEADLINE_BIT, &fence->flags)) {
 		ret = -ENOENT;
 		goto unlock;
 	}
 	data.deadline_ns = ktime_to_ns(pt->deadline);
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 
 	dma_fence_put(fence);
 
@@ -446,7 +446,7 @@ static int sw_sync_ioctl_get_deadline(struct sync_timeline *obj, unsigned long a
 	return 0;
 
 unlock:
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 put_fence:
 	dma_fence_put(fence);
 
drivers/dma-buf/sync_debug.h +1 -1
index 02af347293d0..c49324505b20 100644
@@ -47,7 +47,7 @@ struct sync_timeline {
 
 static inline struct sync_timeline *dma_fence_parent(struct dma_fence *fence)
 {
-	return container_of(fence->lock, struct sync_timeline, lock);
+	return container_of(fence->extern_lock, struct sync_timeline, lock);
 }
 
 /**
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +2 -2
index 5ec5c3ff22bb..fcc7a3fb93b3 100644
@@ -468,10 +468,10 @@ bool amdgpu_ring_soft_recovery(struct amdgpu_ring *ring, unsigned int vmid,
 	if (amdgpu_sriov_vf(ring->adev) || !ring->funcs->soft_recovery || !fence)
 		return false;
 
-	spin_lock_irqsave(fence->lock, flags);
+	dma_fence_lock(fence, flags);
 	if (!dma_fence_is_signaled_locked(fence))
 		dma_fence_set_error(fence, -ENODATA);
-	spin_unlock_irqrestore(fence->lock, flags);
+	dma_fence_unlock(fence, flags);
 
 	while (!dma_fence_is_signaled(fence) &&
 	       ktime_to_ns(ktime_sub(deadline, ktime_get())) > 0)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2 -2
index c1a801203949..61adba6ed071 100644
@@ -2767,8 +2767,8 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)
 	dma_fence_put(vm->last_unlocked);
 	dma_fence_wait(vm->last_tlb_flush, false);
 	/* Make sure that all fence callbacks have completed */
-	spin_lock_irqsave(vm->last_tlb_flush->lock, flags);
-	spin_unlock_irqrestore(vm->last_tlb_flush->lock, flags);
+	dma_fence_lock(vm->last_tlb_flush, flags);
+	dma_fence_unlock(vm->last_tlb_flush, flags);
 	dma_fence_put(vm->last_tlb_flush);
 
 	list_for_each_entry_safe(mapping, tmp, &vm->freed, list) {
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +6 -6
index cf0ec94e8a07..d41511f59d15 100644
@@ -631,20 +631,20 @@ bool amdgpu_vm_is_bo_always_valid(struct amdgpu_vm *vm, struct amdgpu_bo *bo);
  */
 static inline uint64_t amdgpu_vm_tlb_seq(struct amdgpu_vm *vm)
 {
+	struct dma_fence *fence;
 	unsigned long flags;
-	spinlock_t *lock;
 
 	/*
 	 * Workaround to stop racing between the fence signaling and handling
-	 * the cb. The lock is static after initially setting it up, just make
-	 * sure that the dma_fence structure isn't freed up.
+	 * the cb.
 	 */
 	rcu_read_lock();
-	lock = vm->last_tlb_flush->lock;
+	fence = dma_fence_get_rcu(vm->last_tlb_flush);
 	rcu_read_unlock();
 
-	spin_lock_irqsave(lock, flags);
-	spin_unlock_irqrestore(lock, flags);
+	dma_fence_lock(fence, flags);
+	dma_fence_unlock(fence, flags);
+	dma_fence_put(fence);
 
 	return atomic64_read(&vm->tlb_seq);
 }
drivers/gpu/drm/drm_crtc.c +1 -1
index 46655339003d..ad47f58cd159 100644
@@ -159,7 +159,7 @@ static const struct dma_fence_ops drm_crtc_fence_ops;
 static struct drm_crtc *fence_to_crtc(struct dma_fence *fence)
 {
 	BUG_ON(fence->ops != &drm_crtc_fence_ops);
-	return container_of(fence->lock, struct drm_crtc, fence_lock);
+	return container_of(fence->extern_lock, struct drm_crtc, fence_lock);
 }
 
 static const char *drm_crtc_fence_get_driver_name(struct dma_fence *fence)
drivers/gpu/drm/drm_writeback.c +1 -1
index 95b8a2e4bda6..624a4e8b6c99 100644
@@ -81,7 +81,7 @@
  *	From userspace, this property will always read as zero.
  */
 
-#define fence_to_wb_connector(x) container_of(x->lock, \
+#define fence_to_wb_connector(x) container_of(x->extern_lock, \
 					      struct drm_writeback_connector, \
 					      fence_lock)
 
drivers/gpu/drm/nouveau/nouveau_drm.c +3 -2
index 1527b801f013..2956ed2ec073 100644
@@ -156,12 +156,13 @@ nouveau_name(struct drm_device *dev)
 static inline bool
 nouveau_cli_work_ready(struct dma_fence *fence)
 {
+	unsigned long flags;
 	bool ret = true;
 
-	spin_lock_irq(fence->lock);
+	dma_fence_lock(fence, flags);
 	if (!dma_fence_is_signaled_locked(fence))
 		ret = false;
-	spin_unlock_irq(fence->lock);
+	dma_fence_unlock(fence, flags);
 
 	if (ret == true)
 		dma_fence_put(fence);
drivers/gpu/drm/nouveau/nouveau_fence.c +2 -1
index 869d4335c0f4..a7512c22c85f 100644
@@ -41,7 +41,8 @@ static const struct dma_fence_ops nouveau_fence_ops_legacy;
 static inline struct nouveau_fence_chan *
 nouveau_fctx(struct nouveau_fence *fence)
 {
-	return container_of(fence->base.lock, struct nouveau_fence_chan, lock);
+	return container_of(fence->base.extern_lock, struct nouveau_fence_chan,
+			    lock);
 }
 
 static bool
drivers/gpu/drm/qxl/qxl_release.c +2 -1
index 05204a6a3fa8..1d346822c1f7 100644
@@ -60,7 +60,8 @@ static long qxl_fence_wait(struct dma_fence *fence, bool intr,
 	struct qxl_device *qdev;
 	unsigned long cur, end = jiffies + timeout;
 
-	qdev = container_of(fence->lock, struct qxl_device, release_lock);
+	qdev = container_of(fence->extern_lock, struct qxl_device,
+			    release_lock);
 
 	if (!wait_event_timeout(qdev->release_event,
 				(dma_fence_is_signaled(fence) ||
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +2 -1
index 00be92da5509..621aa0aa8406 100644
@@ -47,7 +47,8 @@ struct vmw_event_fence_action {
 static struct vmw_fence_manager *
 fman_from_fence(struct vmw_fence_obj *fence)
 {
-	return container_of(fence->base.lock, struct vmw_fence_manager, lock);
+	return container_of(fence->base.extern_lock, struct vmw_fence_manager,
+			    lock);
 }
 
 static void vmw_fence_obj_destroy(struct dma_fence *f)
drivers/gpu/drm/xe/xe_hw_fence.c +2 -1
index b2a0c46dfcd4..3456bec93c70 100644
@@ -144,7 +144,8 @@ static struct xe_hw_fence *to_xe_hw_fence(struct dma_fence *fence);
 
 static struct xe_hw_fence_irq *xe_hw_fence_irq(struct xe_hw_fence *fence)
 {
-	return container_of(fence->dma.lock, struct xe_hw_fence_irq, lock);
+	return container_of(fence->dma.extern_lock, struct xe_hw_fence_irq,
+			    lock);
 }
 
 static const char *xe_hw_fence_get_driver_name(struct dma_fence *dma_fence)
drivers/gpu/drm/xe/xe_sched_job.c +2 -2
index d21bf8f26964..ea7038475b4b 100644
@@ -187,11 +187,11 @@ static bool xe_fence_set_error(struct dma_fence *fence, int error)
 	unsigned long irq_flags;
 	bool signaled;
 
-	spin_lock_irqsave(fence->lock, irq_flags);
+	dma_fence_lock(fence, irq_flags);
 	signaled = test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags);
 	if (!signaled)
 		dma_fence_set_error(fence, error);
-	spin_unlock_irqrestore(fence->lock, irq_flags);
+	dma_fence_unlock(fence, irq_flags);
 
 	return signaled;
 }
include/linux/dma-fence.h +40 -2

72 lines not on this page · raw message

Signature · 1 line
2.34.1
#7 lore raw

Re: [RFC PATCH 05/14] dma-buf: inline spinlock for fence protection

kernel test robot noticed the following build errors:

Hi Matthew,

[This is a private test report for your RFC patch.] kernel test robot noticed the following build errors:

[auto build test ERROR on drm-xe/drm-xe-next]
[also build test ERROR on drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.18-rc2 next-20251023] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Matthew-Brost/dma-buf-cleanup-dma_fence_describe/20251023-121819
base:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link:    https://lore.kernel.org/r/20251023040800.970283-6-matthew.brost%40intel.com
patch subject: [RFC PATCH 05/14] dma-buf: inline spinlock for fence protection
config: x86_64-buildonly-randconfig-004-20251023 (https://download.01.org/0day-ci/archive/20251023/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251023/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from arch/x86/include/asm/bug.h:108,

                    from arch/x86/include/asm/alternative.h:9,
                    from arch/x86/include/asm/segment.h:6,
                    from arch/x86/include/asm/ptrace.h:5,
                    from arch/x86/include/asm/math_emu.h:5,
                    from arch/x86/include/asm/processor.h:13,
                    from include/linux/sched.h:13,
                    from include/linux/kthread.h:6,
                    from drivers/gpu/drm/i915/gt/intel_breadcrumbs.c:6:
   drivers/gpu/drm/i915/gt/intel_breadcrumbs.c: In function '__dma_fence_signal__notify':
>> drivers/gpu/drm/i915/gt/intel_breadcrumbs.c:149:34: error: 'struct dma_fence' has no member named 'lock'
     149 |         lockdep_assert_held(fence->lock);
         |                                  ^~
   include/asm-generic/bug.h:123:32: note: in definition of macro 'WARN_ON'
     123 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   include/linux/lockdep.h:285:9: note: in expansion of macro 'lockdep_assert'
     285 |         lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
         |         ^~~~~~~~~~~~~~
   include/linux/lockdep.h:285:24: note: in expansion of macro 'lockdep_is_held'
     285 |         lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
         |                        ^~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/gt/intel_breadcrumbs.c:149:9: note: in expansion of macro 'lockdep_assert_held'
     149 |         lockdep_assert_held(fence->lock);
         |         ^~~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/debugobjects.h:6,
                    from drivers/gpu/drm/i915/i915_active.c:7:
   drivers/gpu/drm/i915/i915_active.c: In function '__i915_active_fence_set':
>> drivers/gpu/drm/i915/i915_active.c:1048:32: error: 'struct dma_fence' has no member named 'lock'
    1048 |         spin_lock_irqsave(fence->lock, flags);
         |                                ^~
   include/linux/spinlock.h:244:48: note: in definition of macro 'raw_spin_lock_irqsave'
     244 |                 flags = _raw_spin_lock_irqsave(lock);   \
         |                                                ^~~~
   drivers/gpu/drm/i915/i915_active.c:1048:9: note: in expansion of macro 'spin_lock_irqsave'
    1048 |         spin_lock_irqsave(fence->lock, flags);
         |         ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_active.c:1050:38: error: 'struct dma_fence' has no member named 'lock'
    1050 |                 spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
         |                                      ^~
   include/linux/spinlock.h:221:31: note: in definition of macro 'raw_spin_lock_nested'
     221 |         _raw_spin_lock_nested(lock, subclass)
         |                               ^~~~
   drivers/gpu/drm/i915/i915_active.c:1050:17: note: in expansion of macro 'spin_lock_nested'
    1050 |                 spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
         |                 ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_active.c:1064:41: error: 'struct dma_fence' has no member named 'lock'
    1064 |                         spin_unlock(prev->lock);
         |                                         ^~
   drivers/gpu/drm/i915/i915_active.c:1067:45: error: 'struct dma_fence' has no member named 'lock'
    1067 |                 spin_unlock_irqrestore(fence->lock, flags);
         |                                             ^~
   drivers/gpu/drm/i915/i915_active.c:1072:40: error: 'struct dma_fence' has no member named 'lock'
    1072 |                 spin_lock_irqsave(fence->lock, flags);
         |                                        ^~
   include/linux/spinlock.h:244:48: note: in definition of macro 'raw_spin_lock_irqsave'
     244 |                 flags = _raw_spin_lock_irqsave(lock);   \
         |                                                ^~~~
   drivers/gpu/drm/i915/i915_active.c:1072:17: note: in expansion of macro 'spin_lock_irqsave'
    1072 |                 spin_lock_irqsave(fence->lock, flags);
         |                 ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_active.c:1074:46: error: 'struct dma_fence' has no member named 'lock'
    1074 |                         spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
         |                                              ^~
   include/linux/spinlock.h:221:31: note: in definition of macro 'raw_spin_lock_nested'
     221 |         _raw_spin_lock_nested(lock, subclass)
         |                               ^~~~
   drivers/gpu/drm/i915/i915_active.c:1074:25: note: in expansion of macro 'spin_lock_nested'
    1074 |                         spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
         |                         ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_active.c:1091:33: error: 'struct dma_fence' has no member named 'lock'
    1091 |                 spin_unlock(prev->lock); /* serialise with prev->cb_list */
         |                                 ^~
   drivers/gpu/drm/i915/i915_active.c:1094:37: error: 'struct dma_fence' has no member named 'lock'
    1094 |         spin_unlock_irqrestore(fence->lock, flags);
         |                                     ^~

vim +149 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c

0152b3b3f49b36 Chris Wilson 2019-05-08  142  
0152b3b3f49b36 Chris Wilson 2019-05-08  143  static void
f2cb60e9a3881e Chris Wilson 2019-08-17  144  __dma_fence_signal__notify(struct dma_fence *fence,
f2cb60e9a3881e Chris Wilson 2019-08-17  145  			   const struct list_head *list)
0152b3b3f49b36 Chris Wilson 2019-05-08  146  {
0152b3b3f49b36 Chris Wilson 2019-05-08  147  	struct dma_fence_cb *cur, *tmp;
0152b3b3f49b36 Chris Wilson 2019-05-08  148  
0152b3b3f49b36 Chris Wilson 2019-05-08 @149  	lockdep_assert_held(fence->lock);
0152b3b3f49b36 Chris Wilson 2019-05-08  150  
f2cb60e9a3881e Chris Wilson 2019-08-17  151  	list_for_each_entry_safe(cur, tmp, list, node) {
0152b3b3f49b36 Chris Wilson 2019-05-08  152  		INIT_LIST_HEAD(&cur->node);
0152b3b3f49b36 Chris Wilson 2019-05-08  153  		cur->func(fence, cur);
0152b3b3f49b36 Chris Wilson 2019-05-08  154  	}
0152b3b3f49b36 Chris Wilson 2019-05-08  155  }
0152b3b3f49b36 Chris Wilson 2019-05-08  156  
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#8 lore raw

Re: [RFC PATCH 05/14] dma-buf: inline spinlock for fence protection

In reply to Matthew Brost
kernel test robot noticed the following build errors:

Hi Matthew,

[This is a private test report for your RFC patch.] kernel test robot noticed the following build errors:

[auto build test ERROR on drm-xe/drm-xe-next]
[also build test ERROR on drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.18-rc2 next-20251023] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Matthew-Brost/dma-buf-cleanup-dma_fence_describe/20251023-121819
base:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link:    https://lore.kernel.org/r/20251023040800.970283-6-matthew.brost%40intel.com
patch subject: [RFC PATCH 05/14] dma-buf: inline spinlock for fence protection
config: i386-buildonly-randconfig-002-20251023 (https://download.01.org/0day-ci/archive/20251023/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251023/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/i915_active.c:1048:27: error: no member named 'lock' in 'struct dma_fence'
    1048 |         spin_lock_irqsave(fence->lock, flags);
         |                           ~~~~~  ^
   include/linux/spinlock.h:381:39: note: expanded from macro 'spin_lock_irqsave'
     381 |         raw_spin_lock_irqsave(spinlock_check(lock), flags);     \
         |                                              ^~~~
   include/linux/spinlock.h:244:34: note: expanded from macro 'raw_spin_lock_irqsave'
     244 |                 flags = _raw_spin_lock_irqsave(lock);   \
         |                                                ^~~~
   drivers/gpu/drm/i915/i915_active.c:1050:26: error: no member named 'lock' in 'struct dma_fence'
    1050 |                 spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
         |                                  ~~~~  ^
   include/linux/spinlock.h:366:38: note: expanded from macro 'spin_lock_nested'
     366 |         raw_spin_lock_nested(spinlock_check(lock), subclass);   \
         |                                             ^~~~
   include/linux/spinlock.h:221:24: note: expanded from macro 'raw_spin_lock_nested'
     221 |         _raw_spin_lock_nested(lock, subclass)
         |                               ^~~~
   drivers/gpu/drm/i915/i915_active.c:1064:22: error: no member named 'lock' in 'struct dma_fence'
    1064 |                         spin_unlock(prev->lock);
         |                                     ~~~~  ^
   drivers/gpu/drm/i915/i915_active.c:1067:33: error: no member named 'lock' in 'struct dma_fence'
    1067 |                 spin_unlock_irqrestore(fence->lock, flags);
         |                                        ~~~~~  ^
   drivers/gpu/drm/i915/i915_active.c:1072:28: error: no member named 'lock' in 'struct dma_fence'
    1072 |                 spin_lock_irqsave(fence->lock, flags);
         |                                   ~~~~~  ^
   include/linux/spinlock.h:381:39: note: expanded from macro 'spin_lock_irqsave'
     381 |         raw_spin_lock_irqsave(spinlock_check(lock), flags);     \
         |                                              ^~~~
   include/linux/spinlock.h:244:34: note: expanded from macro 'raw_spin_lock_irqsave'
     244 |                 flags = _raw_spin_lock_irqsave(lock);   \
         |                                                ^~~~
   drivers/gpu/drm/i915/i915_active.c:1074:27: error: no member named 'lock' in 'struct dma_fence'
    1074 |                         spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
         |                                          ~~~~  ^
   include/linux/spinlock.h:366:38: note: expanded from macro 'spin_lock_nested'
     366 |         raw_spin_lock_nested(spinlock_check(lock), subclass);   \
         |                                             ^~~~

include/linux/spinlock.h:221:24: note: expanded from macro 'raw_spin_lock_nested'
221 | _raw_spin_lock_nested(lock, subclass)
| ^~~~
drivers/gpu/drm/i915/i915_active.c:1091:21: error: no member named 'lock' in 'struct dma_fence'
1091 | spin_unlock(prev->lock); /* serialise with prev->cb_list */
| ~~~~ ^
drivers/gpu/drm/i915/i915_active.c:1094:32: error: no member named 'lock' in 'struct dma_fence'
1094 | spin_unlock_irqrestore(fence->lock, flags);
| ~~~~~ ^
8 errors generated.
--

>> drivers/gpu/drm/i915/gt/intel_breadcrumbs.c:149:29: error: no member named 'lock' in 'struct dma_fence'
     149 |         lockdep_assert_held(fence->lock);
         |                             ~~~~~  ^
   include/linux/lockdep.h:285:33: note: expanded from macro 'lockdep_assert_held'
     285 |         lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
         |                                        ^
   include/linux/lockdep.h:252:47: note: expanded from macro 'lockdep_is_held'
     252 | #define lockdep_is_held(lock)           lock_is_held(&(lock)->dep_map)
         |                                                        ^~~~
   include/linux/lockdep.h:279:32: note: expanded from macro 'lockdep_assert'
     279 |         do { WARN_ON(debug_locks && !(cond)); } while (0)
         |                                       ^~~~
   include/asm-generic/bug.h:171:25: note: expanded from macro 'WARN_ON'
     171 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~

1 error generated.

vim +1048 drivers/gpu/drm/i915/i915_active.c

ce476c80b8bfa8 Chris Wilson       2019-06-14   994  
b1e3177bd1d8f4 Chris Wilson       2019-10-04   995  /*
b1e3177bd1d8f4 Chris Wilson       2019-10-04   996   * __i915_active_fence_set: Update the last active fence along its timeline
b1e3177bd1d8f4 Chris Wilson       2019-10-04   997   * @active: the active tracker
b1e3177bd1d8f4 Chris Wilson       2019-10-04   998   * @fence: the new fence (under construction)
b1e3177bd1d8f4 Chris Wilson       2019-10-04   999   *
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1000   * Records the new @fence as the last active fence along its timeline in
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1001   * this active tracker, moving the tracking callbacks from the previous
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1002   * fence onto this one. Gets and returns a reference to the previous fence
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1003   * (if not already completed), which the caller must put after making sure
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1004   * that it is executed before the new fence. To ensure that the order of
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1005   * fences within the timeline of the i915_active_fence is understood, it
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1006   * should be locked by the caller.
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1007   */
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1008  struct dma_fence *
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1009  __i915_active_fence_set(struct i915_active_fence *active,
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1010  			struct dma_fence *fence)
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1011  {
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1012  	struct dma_fence *prev;
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1013  	unsigned long flags;
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1014  
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1015  	/*
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1016  	 * In case of fences embedded in i915_requests, their memory is
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1017  	 * SLAB_FAILSAFE_BY_RCU, then it can be reused right after release
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1018  	 * by new requests.  Then, there is a risk of passing back a pointer
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1019  	 * to a new, completely unrelated fence that reuses the same memory
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1020  	 * while tracked under a different active tracker.  Combined with i915
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1021  	 * perf open/close operations that build await dependencies between
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1022  	 * engine kernel context requests and user requests from different
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1023  	 * timelines, this can lead to dependency loops and infinite waits.
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1024  	 *
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1025  	 * As a countermeasure, we try to get a reference to the active->fence
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1026  	 * first, so if we succeed and pass it back to our user then it is not
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1027  	 * released and potentially reused by an unrelated request before the
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1028  	 * user has a chance to set up an await dependency on it.
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1029  	 */
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1030  	prev = i915_active_fence_get(active);
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1031  	if (fence == prev)
df9f85d8582ebd Chris Wilson       2019-11-27  1032  		return fence;
df9f85d8582ebd Chris Wilson       2019-11-27  1033  
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1034  	GEM_BUG_ON(test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags));
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1035  
df9f85d8582ebd Chris Wilson       2019-11-27  1036  	/*
df9f85d8582ebd Chris Wilson       2019-11-27  1037  	 * Consider that we have two threads arriving (A and B), with
df9f85d8582ebd Chris Wilson       2019-11-27  1038  	 * C already resident as the active->fence.
df9f85d8582ebd Chris Wilson       2019-11-27  1039  	 *
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1040  	 * Both A and B have got a reference to C or NULL, depending on the
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1041  	 * timing of the interrupt handler.  Let's assume that if A has got C
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1042  	 * then it has locked C first (before B).
df9f85d8582ebd Chris Wilson       2019-11-27  1043  	 *
df9f85d8582ebd Chris Wilson       2019-11-27  1044  	 * Note the strong ordering of the timeline also provides consistent
df9f85d8582ebd Chris Wilson       2019-11-27  1045  	 * nesting rules for the fence->lock; the inner lock is always the
df9f85d8582ebd Chris Wilson       2019-11-27  1046  	 * older lock.
df9f85d8582ebd Chris Wilson       2019-11-27  1047  	 */
df9f85d8582ebd Chris Wilson       2019-11-27 @1048  	spin_lock_irqsave(fence->lock, flags);
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1049  	if (prev)
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1050  		spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1051  
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1052  	/*
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1053  	 * A does the cmpxchg first, and so it sees C or NULL, as before, or
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1054  	 * something else, depending on the timing of other threads and/or
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1055  	 * interrupt handler.  If not the same as before then A unlocks C if
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1056  	 * applicable and retries, starting from an attempt to get a new
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1057  	 * active->fence.  Meanwhile, B follows the same path as A.
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1058  	 * Once A succeeds with cmpxch, B fails again, retires, gets A from
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1059  	 * active->fence, locks it as soon as A completes, and possibly
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1060  	 * succeeds with cmpxchg.
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1061  	 */
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1062  	while (cmpxchg(__active_fence_slot(active), prev, fence) != prev) {
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1063  		if (prev) {
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1064  			spin_unlock(prev->lock);
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1065  			dma_fence_put(prev);
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1066  		}
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1067  		spin_unlock_irqrestore(fence->lock, flags);
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1068  
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1069  		prev = i915_active_fence_get(active);
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1070  		GEM_BUG_ON(prev == fence);
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1071  
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1072  		spin_lock_irqsave(fence->lock, flags);
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1073  		if (prev)
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1074  			spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1075  	}
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1076  
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1077  	/*
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1078  	 * If prev is NULL then the previous fence must have been signaled
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1079  	 * and we know that we are first on the timeline.  If it is still
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1080  	 * present then, having the lock on that fence already acquired, we
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1081  	 * serialise with the interrupt handler, in the process of removing it
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1082  	 * from any future interrupt callback.  A will then wait on C before
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1083  	 * executing (if present).
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1084  	 *
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1085  	 * As B is second, it sees A as the previous fence and so waits for
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1086  	 * it to complete its transition and takes over the occupancy for
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1087  	 * itself -- remembering that it needs to wait on A before executing.
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1088  	 */
946e047a3d88d4 Janusz Krzysztofik 2023-07-20  1089  	if (prev) {
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1090  		__list_del_entry(&active->cb.node);
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1091  		spin_unlock(prev->lock); /* serialise with prev->cb_list */
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1092  	}
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1093  	list_add_tail(&active->cb.node, &fence->cb_list);
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1094  	spin_unlock_irqrestore(fence->lock, flags);
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1095  
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1096  	return prev;
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1097  }
b1e3177bd1d8f4 Chris Wilson       2019-10-04  1098  
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
author maintainer
#9 lore raw

RFC PATCH 6/14 dma-buf: use inline lock for the stub fence

In reply to Matthew Brost

From: Christian König <[email protected]>

Just as proof of concept and minor cleanup.

---
 drivers/dma-buf/dma-fence.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)
drivers/dma-buf/dma-fence.c +4 -16
index a0b328fdd90d..a41ff8e8cd25 100644
@@ -24,7 +24,6 @@ EXPORT_TRACEPOINT_SYMBOL(dma_fence_emit);
 EXPORT_TRACEPOINT_SYMBOL(dma_fence_enable_signal);
 EXPORT_TRACEPOINT_SYMBOL(dma_fence_signaled);
 
-static DEFINE_SPINLOCK(dma_fence_stub_lock);
 static struct dma_fence dma_fence_stub;
 
 /*
@@ -123,12 +122,8 @@ static const struct dma_fence_ops dma_fence_stub_ops = {
 
 static int __init dma_fence_init_stub(void)
 {
-	dma_fence_init(&dma_fence_stub, &dma_fence_stub_ops,
-		       &dma_fence_stub_lock, 0, 0);
-
-	set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-		&dma_fence_stub.flags);
-
+	dma_fence_init(&dma_fence_stub, &dma_fence_stub_ops, NULL, 0, 0);
+	set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &dma_fence_stub.flags);
 	dma_fence_signal_locked(&dma_fence_stub);
 	return 0;
 }
@@ -160,16 +155,9 @@ struct dma_fence *dma_fence_allocate_private_stub(ktime_t timestamp)
 	if (fence == NULL)
 		return NULL;
 
-	dma_fence_init(fence,
-		       &dma_fence_stub_ops,
-		       &dma_fence_stub_lock,
-		       0, 0);
-
-	set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-		&fence->flags);
-
+	dma_fence_init(fence, &dma_fence_stub_ops, NULL, 0, 0);
+	set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &fence->flags);
 	dma_fence_signal_timestamp(fence, timestamp);
-
 	return fence;
 }
 EXPORT_SYMBOL(dma_fence_allocate_private_stub);
Signature · 1 line
2.34.1
author maintainer
#10 lore raw

RFC PATCH 7/14 dma-buf: use inline lock for the dma-fence-array

In reply to Matthew Brost

From: Christian König <[email protected]>

Just as proof of concept and minor cleanup.

---
 drivers/dma-buf/dma-fence-array.c | 5 ++---
 include/linux/dma-fence-array.h   | 1 -
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/dma-buf/dma-fence-array.c +2 -3
index 6657d4b30af9..c2119a8049fe 100644
@@ -204,9 +204,8 @@ void dma_fence_array_init(struct dma_fence_array *array,
 
 	array->num_fences = num_fences;
 
-	spin_lock_init(&array->lock);
-	dma_fence_init(&array->base, &dma_fence_array_ops, &array->lock,
-		       context, seqno);
+	dma_fence_init(&array->base, &dma_fence_array_ops, NULL, context,
+		       seqno);
 	init_irq_work(&array->work, irq_dma_fence_array_work);
 
 	atomic_set(&array->num_pending, signal_on_any ? 1 : num_fences);
include/linux/dma-fence-array.h +0 -1
index 079b3dec0a16..370b3d2bba37 100644
@@ -38,7 +38,6 @@ struct dma_fence_array_cb {
 struct dma_fence_array {
 	struct dma_fence base;
 
-	spinlock_t lock;
 	unsigned num_fences;
 	atomic_t num_pending;
 	struct dma_fence **fences;
Signature · 1 line
2.34.1
author maintainer
#11 lore raw

RFC PATCH 8/14 dma-buf: use inline lock for the dma-fence-chain

In reply to Matthew Brost

From: Christian König <[email protected]>

Just as proof of concept and minor cleanup.

---
 drivers/dma-buf/dma-fence-chain.c | 3 +--
 include/linux/dma-fence-chain.h   | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/dma-buf/dma-fence-chain.c +1 -2
index a8a90acf4f34..a707792b6025 100644
@@ -245,7 +245,6 @@ void dma_fence_chain_init(struct dma_fence_chain *chain,
 	struct dma_fence_chain *prev_chain = to_dma_fence_chain(prev);
 	uint64_t context;
 
-	spin_lock_init(&chain->lock);
 	rcu_assign_pointer(chain->prev, prev);
 	chain->fence = fence;
 	chain->prev_seqno = 0;
@@ -261,7 +260,7 @@ void dma_fence_chain_init(struct dma_fence_chain *chain,
 			seqno = max(prev->seqno, seqno);
 	}
 
-	dma_fence_init64(&chain->base, &dma_fence_chain_ops, &chain->lock,
+	dma_fence_init64(&chain->base, &dma_fence_chain_ops, NULL,
 			 context, seqno);
 
 	/*
include/linux/dma-fence-chain.h +0 -1
index 68c3c1e41014..d39ce7a2e599 100644
@@ -46,7 +46,6 @@ struct dma_fence_chain {
 		 */
 		struct irq_work work;
 	};
-	spinlock_t lock;
 };
 
 
Signature · 1 line
2.34.1
author maintainer
#12 lore raw

RFC PATCH 9/14 drm/sched: use inline locks for the drm-sched-fence

In reply to Matthew Brost

From: Christian König <[email protected]>

Just as proof of concept and minor cleanup.

---
 drivers/gpu/drm/scheduler/sched_fence.c | 11 +++++------
 include/drm/gpu_scheduler.h             |  4 ----
 2 files changed, 5 insertions(+), 10 deletions(-)
drivers/gpu/drm/scheduler/sched_fence.c +5 -6
index 9391d6f0dc01..7a94e03341cb 100644
@@ -156,19 +156,19 @@ static void drm_sched_fence_set_deadline_finished(struct dma_fence *f,
 	struct dma_fence *parent;
 	unsigned long flags;
 
-	spin_lock_irqsave(&fence->lock, flags);
+	dma_fence_lock(f, flags);
 
 	/* If we already have an earlier deadline, keep it: */
 	if (test_bit(DRM_SCHED_FENCE_FLAG_HAS_DEADLINE_BIT, &f->flags) &&
 	    ktime_before(fence->deadline, deadline)) {
-		spin_unlock_irqrestore(&fence->lock, flags);
+		dma_fence_unlock(f, flags);
 		return;
 	}
 
 	fence->deadline = deadline;
 	set_bit(DRM_SCHED_FENCE_FLAG_HAS_DEADLINE_BIT, &f->flags);
 
-	spin_unlock_irqrestore(&fence->lock, flags);
+	dma_fence_unlock(f, flags);
 
 	/*
 	 * smp_load_aquire() to ensure that if we are racing another
@@ -217,7 +217,6 @@ struct drm_sched_fence *drm_sched_fence_alloc(struct drm_sched_entity *entity,
 
 	fence->owner = owner;
 	fence->drm_client_id = drm_client_id;
-	spin_lock_init(&fence->lock);
 
 	return fence;
 }
@@ -230,9 +229,9 @@ void drm_sched_fence_init(struct drm_sched_fence *fence,
 	fence->sched = entity->rq->sched;
 	seq = atomic_inc_return(&entity->fence_seq);
 	dma_fence_init(&fence->scheduled, &drm_sched_fence_ops_scheduled,
-		       &fence->lock, entity->fence_context, seq);
+		       NULL, entity->fence_context, seq);
 	dma_fence_init(&fence->finished, &drm_sched_fence_ops_finished,
-		       &fence->lock, entity->fence_context + 1, seq);
+		       NULL, entity->fence_context + 1, seq);
 }
 
 module_init(drm_sched_fence_slab_init);
include/drm/gpu_scheduler.h +0 -4
index fb88301b3c45..b77f24a783e3 100644
@@ -297,10 +297,6 @@ struct drm_sched_fence {
          * belongs to.
          */
 	struct drm_gpu_scheduler	*sched;
-        /**
-         * @lock: the lock used by the scheduled and the finished fences.
-         */
-	spinlock_t			lock;
         /**
          * @owner: job owner for debugging
          */
Signature · 1 line
2.34.1
author maintainer
#13 lore raw

RFC PATCH 10/14 dma-fence: Fix selftest

In reply to Matthew Brost

Fix compile error.

---
 drivers/dma-buf/st-dma-fence.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma-buf/st-dma-fence.c +2 -2
index 27a36045410b..bf82981f4259 100644
@@ -451,8 +451,8 @@ struct race_thread {
 
 static void __wait_for_callbacks(struct dma_fence *f)
 {
-	spin_lock_irq(f->lock);
-	spin_unlock_irq(f->lock);
+	spin_lock_irq(f->extern_lock);
+	spin_unlock_irq(f->extern_lock);
 }
 
 static int thread_signal_callback(void *arg)
Signature · 1 line
2.34.1
author maintainer
#14 lore raw

RFC PATCH 11/14 drm/xe: Disconnect the low hanging fences from Xe module

In reply to Matthew Brost

Preempt, tlb invalidation, and OA fences now use embedded fence lock.

---
 drivers/gpu/drm/xe/xe_oa.c                  | 5 +----
 drivers/gpu/drm/xe/xe_preempt_fence.c       | 3 +--
 drivers/gpu/drm/xe/xe_preempt_fence_types.h | 2 --
 drivers/gpu/drm/xe/xe_tlb_inval.c           | 5 +----
 drivers/gpu/drm/xe/xe_tlb_inval_types.h     | 2 --
 5 files changed, 3 insertions(+), 14 deletions(-)
drivers/gpu/drm/xe/xe_oa.c +1 -4
index f901ba52b403..c8613bafb8db 100644
@@ -111,8 +111,6 @@ struct xe_oa_config_bo {
 struct xe_oa_fence {
 	/* @base: dma fence base */
 	struct dma_fence base;
-	/* @lock: lock for the fence */
-	spinlock_t lock;
 	/* @work: work to signal @base */
 	struct delayed_work work;
 	/* @cb: callback to schedule @work */
@@ -1016,8 +1014,7 @@ static int xe_oa_emit_oa_config(struct xe_oa_stream *stream, struct xe_oa_config
 	}
 
 	/* Point of no return: initialize and set fence to signal */
-	spin_lock_init(&ofence->lock);
-	dma_fence_init(&ofence->base, &xe_oa_fence_ops, &ofence->lock, 0, 0);
+	dma_fence_init(&ofence->base, &xe_oa_fence_ops, NULL, 0, 0);
 
 	for (i = 0; i < stream->num_syncs; i++) {
 		if (stream->syncs[i].flags & DRM_XE_SYNC_FLAG_SIGNAL)
drivers/gpu/drm/xe/xe_preempt_fence.c +1 -2
index 7f587ca3947d..75f433aee747 100644
@@ -145,9 +145,8 @@ xe_preempt_fence_arm(struct xe_preempt_fence *pfence, struct xe_exec_queue *q,
 {
 	list_del_init(&pfence->link);
 	pfence->q = xe_exec_queue_get(q);
-	spin_lock_init(&pfence->lock);
 	dma_fence_init(&pfence->base, &preempt_fence_ops,
-		      &pfence->lock, context, seqno);
+		       NULL, context, seqno);
 
 	return &pfence->base;
 }
drivers/gpu/drm/xe/xe_preempt_fence_types.h +0 -2
index 312c3372a49f..b54b5c29b533 100644
@@ -25,8 +25,6 @@ struct xe_preempt_fence {
 	struct xe_exec_queue *q;
 	/** @preempt_work: work struct which issues preemption */
 	struct work_struct preempt_work;
-	/** @lock: dma-fence fence lock */
-	spinlock_t lock;
 	/** @error: preempt fence is in error state */
 	int error;
 };
drivers/gpu/drm/xe/xe_tlb_inval.c +1 -4
index 918a59e686ea..5c23e76b0241 100644
@@ -133,7 +133,6 @@ int xe_gt_tlb_inval_init_early(struct xe_gt *gt)
 	tlb_inval->seqno = 1;
 	INIT_LIST_HEAD(&tlb_inval->pending_fences);
 	spin_lock_init(&tlb_inval->pending_lock);
-	spin_lock_init(&tlb_inval->lock);
 	INIT_DELAYED_WORK(&tlb_inval->fence_tdr, xe_tlb_inval_fence_timeout);
 
 	err = drmm_mutex_init(&xe->drm, &tlb_inval->seqno_lock);
@@ -420,10 +419,8 @@ void xe_tlb_inval_fence_init(struct xe_tlb_inval *tlb_inval,
 {
 	xe_pm_runtime_get_noresume(tlb_inval->xe);
 
-	spin_lock_irq(&tlb_inval->lock);
-	dma_fence_init(&fence->base, &inval_fence_ops, &tlb_inval->lock,
+	dma_fence_init(&fence->base, &inval_fence_ops, NULL,
 		       dma_fence_context_alloc(1), 1);
-	spin_unlock_irq(&tlb_inval->lock);
 	INIT_LIST_HEAD(&fence->link);
 	if (stack)
 		set_bit(FENCE_STACK_BIT, &fence->base.flags);
drivers/gpu/drm/xe/xe_tlb_inval_types.h +0 -2
index 8f8b060e9005..80e893950099 100644
@@ -104,8 +104,6 @@ struct xe_tlb_inval {
 	struct delayed_work fence_tdr;
 	/** @job_wq: schedules TLB invalidation jobs */
 	struct workqueue_struct *job_wq;
-	/** @tlb_inval.lock: protects TLB invalidation fences */
-	spinlock_t lock;
 };
 
 /**
Signature · 1 line
2.34.1
author maintainer
#15 lore raw

RFC PATCH 12/14 drm/xe: Drop HW fence slab

In reply to Matthew Brost

Helps with disconnecting fences from Xe module.

---
 drivers/gpu/drm/xe/xe_hw_fence.c | 25 ++-----------------------
 drivers/gpu/drm/xe/xe_hw_fence.h |  3 ---
 drivers/gpu/drm/xe/xe_module.c   |  5 -----
 3 files changed, 2 insertions(+), 31 deletions(-)
drivers/gpu/drm/xe/xe_hw_fence.c +2 -23
index 3456bec93c70..5edcf057aceb 100644
@@ -6,7 +6,6 @@
 #include "xe_hw_fence.h"
 
 #include <linux/device.h>
-#include <linux/slab.h>
 
 #include "xe_bo.h"
 #include "xe_device.h"
@@ -16,28 +15,9 @@
 #include "xe_map.h"
 #include "xe_trace.h"
 
-static struct kmem_cache *xe_hw_fence_slab;
-
-int __init xe_hw_fence_module_init(void)
-{
-	xe_hw_fence_slab = kmem_cache_create("xe_hw_fence",
-					     sizeof(struct xe_hw_fence), 0,
-					     SLAB_HWCACHE_ALIGN, NULL);
-	if (!xe_hw_fence_slab)
-		return -ENOMEM;
-
-	return 0;
-}
-
-void xe_hw_fence_module_exit(void)
-{
-	rcu_barrier();
-	kmem_cache_destroy(xe_hw_fence_slab);
-}
-
 static struct xe_hw_fence *fence_alloc(void)
 {
-	return kmem_cache_zalloc(xe_hw_fence_slab, GFP_KERNEL);
+	return kzalloc(sizeof(struct xe_hw_fence), GFP_KERNEL);
 }
 
 static void fence_free(struct rcu_head *rcu)
@@ -45,8 +25,7 @@ static void fence_free(struct rcu_head *rcu)
 	struct xe_hw_fence *fence =
 		container_of(rcu, struct xe_hw_fence, dma.rcu);
 
-	if (!WARN_ON_ONCE(!fence))
-		kmem_cache_free(xe_hw_fence_slab, fence);
+	kfree(fence);
 }
 
 static void hw_fence_irq_run_cb(struct irq_work *work)
drivers/gpu/drm/xe/xe_hw_fence.h +0 -3
index f13a1c4982c7..96f34332fd8d 100644
@@ -11,9 +11,6 @@
 /* Cause an early wrap to catch wrapping errors */
 #define XE_FENCE_INITIAL_SEQNO (-127)
 
-int xe_hw_fence_module_init(void);
-void xe_hw_fence_module_exit(void);
-
 void xe_hw_fence_irq_init(struct xe_hw_fence_irq *irq);
 void xe_hw_fence_irq_finish(struct xe_hw_fence_irq *irq);
 void xe_hw_fence_irq_run(struct xe_hw_fence_irq *irq);
drivers/gpu/drm/xe/xe_module.c +0 -5
index d08338fc3bc1..32517bcd533c 100644
@@ -12,7 +12,6 @@
 
 #include "xe_drv.h"
 #include "xe_configfs.h"
-#include "xe_hw_fence.h"
 #include "xe_pci.h"
 #include "xe_pm.h"
 #include "xe_observation.h"
@@ -114,10 +113,6 @@ static const struct init_funcs init_funcs[] = {
 		.init = xe_configfs_init,
 		.exit = xe_configfs_exit,
 	},
-	{
-		.init = xe_hw_fence_module_init,
-		.exit = xe_hw_fence_module_exit,
-	},
 	{
 		.init = xe_sched_job_module_init,
 		.exit = xe_sched_job_module_exit,
Signature · 1 line
2.34.1
author maintainer
#16 lore raw

RFC PATCH 13/14 drm/xe: Promote xe_hw_fence_irq to an ref counted object

In reply to Matthew Brost

Help disconnect fences from the Xe module.

---
 drivers/gpu/drm/xe/xe_exec_queue.c     |  2 +-
 drivers/gpu/drm/xe/xe_gt.c             |  7 ++++--
 drivers/gpu/drm/xe/xe_gt_types.h       |  2 +-
 drivers/gpu/drm/xe/xe_hw_engine.c      |  2 +-
 drivers/gpu/drm/xe/xe_hw_fence.c       | 35 ++++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_hw_fence.h       |  2 +-
 drivers/gpu/drm/xe/xe_hw_fence_types.h |  4 +++
 7 files changed, 46 insertions(+), 8 deletions(-)
drivers/gpu/drm/xe/xe_exec_queue.c +1 -1
index 90cbc95f8e2e..4ba33fdd34ad 100644
@@ -139,7 +139,7 @@ static struct xe_exec_queue *__xe_exec_queue_alloc(struct xe_device *xe,
 	q->width = width;
 	q->msix_vec = XE_IRQ_DEFAULT_MSIX;
 	q->logical_mask = logical_mask;
-	q->fence_irq = &gt->fence_irq[hwe->class];
+	q->fence_irq = gt->fence_irq[hwe->class];
 	q->ring_ops = gt->ring_ops[hwe->class];
 	q->ops = gt->exec_queue_ops;
 	INIT_LIST_HEAD(&q->lr.link);
drivers/gpu/drm/xe/xe_gt.c +5 -2
index 89808b33d0a8..d12b4669ebb6 100644
@@ -608,7 +608,8 @@ static void xe_gt_fini(void *arg)
 	int i;
 
 	for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
-		xe_hw_fence_irq_finish(&gt->fence_irq[i]);
+		if (gt->fence_irq[i])
+			xe_hw_fence_irq_finish(gt->fence_irq[i]);
 
 	xe_gt_disable_host_l2_vram(gt);
 }
@@ -622,7 +623,9 @@ int xe_gt_init(struct xe_gt *gt)
 
 	for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i) {
 		gt->ring_ops[i] = xe_ring_ops_get(gt, i);
-		xe_hw_fence_irq_init(&gt->fence_irq[i]);
+		gt->fence_irq[i] = xe_hw_fence_irq_init();
+		if (!gt->fence_irq[i])
+			return -ENOMEM;
 	}
 
 	err = devm_add_action_or_reset(gt_to_xe(gt)->drm.dev, xe_gt_fini, gt);
drivers/gpu/drm/xe/xe_gt_types.h +1 -1
index d93faa1eedef..132b4fdbed49 100644
@@ -312,7 +312,7 @@ struct xe_gt {
 	const struct xe_ring_ops *ring_ops[XE_ENGINE_CLASS_MAX];
 
 	/** @fence_irq: fence IRQs (1 per engine class) */
-	struct xe_hw_fence_irq fence_irq[XE_ENGINE_CLASS_MAX];
+	struct xe_hw_fence_irq *fence_irq[XE_ENGINE_CLASS_MAX];
 
 	/** @default_lrc: default LRC state */
 	void *default_lrc[XE_ENGINE_CLASS_MAX];
drivers/gpu/drm/xe/xe_hw_engine.c +1 -1
index 6a9e2a4272dd..480972c3da84 100644
@@ -524,7 +524,7 @@ static void hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe,
 		info->irq_offset;
 	hwe->domain = info->domain;
 	hwe->name = info->name;
-	hwe->fence_irq = &gt->fence_irq[info->class];
+	hwe->fence_irq = gt->fence_irq[info->class];
 	hwe->engine_id = id;
 
 	hwe->eclass = &gt->eclass[hwe->class];
drivers/gpu/drm/xe/xe_hw_fence.c +33 -2
index 5edcf057aceb..f5fad4426729 100644
@@ -15,6 +15,25 @@
 #include "xe_map.h"
 #include "xe_trace.h"
 
+static void xe_hw_fence_irq_destroy(struct kref *ref)
+{
+	struct xe_hw_fence_irq *irq = container_of(ref, typeof(*irq), refcount);
+
+	kfree(irq);
+}
+
+static void xe_hw_fence_irq_put(struct xe_hw_fence_irq *irq)
+{
+	if (irq)
+		kref_put(&irq->refcount, xe_hw_fence_irq_destroy);
+}
+
+static struct xe_hw_fence_irq *xe_hw_fence_irq_get(struct xe_hw_fence_irq *irq)
+{
+	kref_get(&irq->refcount);
+	return irq;
+}
+
 static struct xe_hw_fence *fence_alloc(void)
 {
 	return kzalloc(sizeof(struct xe_hw_fence), GFP_KERNEL);
@@ -25,6 +44,7 @@ static void fence_free(struct rcu_head *rcu)
 	struct xe_hw_fence *fence =
 		container_of(rcu, struct xe_hw_fence, dma.rcu);
 
+	xe_hw_fence_irq_put(fence->irq);
 	kfree(fence);
 }
 
@@ -52,12 +72,20 @@ static void hw_fence_irq_run_cb(struct irq_work *work)
 	dma_fence_end_signalling(tmp);
 }
 
-void xe_hw_fence_irq_init(struct xe_hw_fence_irq *irq)
+struct xe_hw_fence_irq *xe_hw_fence_irq_init(void)
 {
+	struct xe_hw_fence_irq *irq = kzalloc(sizeof(*irq), GFP_KERNEL);
+
+	if (!irq)
+		return NULL;
+
+	kref_init(&irq->refcount);
 	spin_lock_init(&irq->lock);
 	init_irq_work(&irq->work, hw_fence_irq_run_cb);
 	INIT_LIST_HEAD(&irq->pending);
 	irq->enabled = true;
+
+	return irq;
 }
 
 void xe_hw_fence_irq_finish(struct xe_hw_fence_irq *irq)
@@ -82,6 +110,8 @@ void xe_hw_fence_irq_finish(struct xe_hw_fence_irq *irq)
 
 	/* Safe release of the irq->lock used in dma_fence_init. */
 	synchronize_rcu();
+
+	xe_hw_fence_irq_put(irq);
 }
 
 void xe_hw_fence_irq_run(struct xe_hw_fence_irq *irq)
@@ -233,13 +263,14 @@ void xe_hw_fence_free(struct dma_fence *fence)
 void xe_hw_fence_init(struct dma_fence *fence, struct xe_hw_fence_ctx *ctx,
 		      struct iosys_map seqno_map)
 {
-	struct  xe_hw_fence *hw_fence =
+	struct xe_hw_fence *hw_fence =
 		container_of(fence, typeof(*hw_fence), dma);
 
 	hw_fence->xe = gt_to_xe(ctx->gt);
 	snprintf(hw_fence->name, sizeof(hw_fence->name), "%s", ctx->name);
 	hw_fence->seqno_map = seqno_map;
 	INIT_LIST_HEAD(&hw_fence->irq_link);
+	hw_fence->irq = xe_hw_fence_irq_get(ctx->irq);
 
 	dma_fence_init(fence, &xe_hw_fence_ops, &ctx->irq->lock,
 		       ctx->dma_fence_ctx, ctx->next_seqno++);
drivers/gpu/drm/xe/xe_hw_fence.h +1 -1
index 96f34332fd8d..fa1620203b90 100644
@@ -11,7 +11,7 @@
 /* Cause an early wrap to catch wrapping errors */
 #define XE_FENCE_INITIAL_SEQNO (-127)
 
-void xe_hw_fence_irq_init(struct xe_hw_fence_irq *irq);
+struct xe_hw_fence_irq *xe_hw_fence_irq_init(void);
 void xe_hw_fence_irq_finish(struct xe_hw_fence_irq *irq);
 void xe_hw_fence_irq_run(struct xe_hw_fence_irq *irq);
 void xe_hw_fence_irq_stop(struct xe_hw_fence_irq *irq);
drivers/gpu/drm/xe/xe_hw_fence_types.h +4 -0
index 58a8d09afe5c..0682c12520e9 100644
@@ -28,6 +28,8 @@ struct xe_hw_fence_irq {
 	struct irq_work work;
 	/** @pending: list of pending xe_hw_fences */
 	struct list_head pending;
+	/** @refcount: ref count of this exec queue */
+	struct kref refcount;
 	/** @enabled: fence signaling enabled */
 	bool enabled;
 };
@@ -62,6 +64,8 @@ struct xe_hw_fence_ctx {
 struct xe_hw_fence {
 	/** @dma: base dma fence for hardware fence context */
 	struct dma_fence dma;
+	/** @irq: fence irq handler */
+	struct xe_hw_fence_irq *irq;
 	/** @xe: Xe device for hw fence driver name */
 	struct xe_device *xe;
 	/** @name: name of hardware fence context */
Signature · 1 line
2.34.1
author maintainer
#17 lore raw

RFC PATCH 14/14 drm/xe: Finish disconnect HW fences from module

In reply to Matthew Brost

Be safe when dereferencing fence->xe.

---
 drivers/gpu/drm/xe/xe_hw_fence.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/xe/xe_hw_fence.c +7 -6
index f5fad4426729..8181dfc628e4 100644
@@ -159,9 +159,7 @@ static struct xe_hw_fence_irq *xe_hw_fence_irq(struct xe_hw_fence *fence)
 
 static const char *xe_hw_fence_get_driver_name(struct dma_fence *dma_fence)
 {
-	struct xe_hw_fence *fence = to_xe_hw_fence(dma_fence);
-
-	return dev_name(fence->xe->drm.dev);
+	return "xe";
 }
 
 static const char *xe_hw_fence_get_timeline_name(struct dma_fence *dma_fence)
@@ -175,10 +173,13 @@ static bool xe_hw_fence_signaled(struct dma_fence *dma_fence)
 {
 	struct xe_hw_fence *fence = to_xe_hw_fence(dma_fence);
 	struct xe_device *xe = fence->xe;
-	u32 seqno = xe_map_rd(xe, &fence->seqno_map, 0, u32);
+	u32 seqno;
+
+	if (dma_fence->error)
+		return true;
 
-	return dma_fence->error ||
-		!__dma_fence_is_later(dma_fence, dma_fence->seqno, seqno);
+	seqno = xe_map_rd(xe, &fence->seqno_map, 0, u32);
+	return !__dma_fence_is_later(dma_fence, dma_fence->seqno, seqno);
 }
 
 static bool xe_hw_fence_enable_signaling(struct dma_fence *dma_fence)
Signature · 1 line
2.34.1
#18 lore raw

✗ CI.checkpatch: warning for Disconnect fences from Xe module

In reply to Matthew Brost
== Series Details ==

== Series Details ==

Series: Disconnect fences from Xe module
URL : https://patchwork.freedesktop.org/series/156388/
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 8677d3b99d5fd579c143b22605d99121e2482e8a
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit ca367c85e8be9500c3c0940213ac1a2312765511

Author: Matthew Brost <[email protected]>
Date:   Wed Oct 22 21:08:00 2025 -0700

drm/xe: Finish disconnect HW fences from module

Be safe when dereferencing fence->xe.

+ /mt/dim checkpatch 71929a54e8bb5da291d41a931d80c6c9160073dd drm-intel b2b012945751 dma-buf: cleanup dma_fence_describe
-:36: CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided #36: FILE: drivers/dma-buf/dma-fence.c:1012:
+ timeline = driver = signaled = "";

-:42: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <[email protected]>' != 'Signed-off-by: Christian König <[email protected]>'

total: 0 errors, 1 warnings, 1 checks, 23 lines checked
2dd59cef8cce dma-buf: rework stub fence initialisation
-:66: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <[email protected]>' != 'Signed-off-by: Christian König <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 44 lines checked
c557a09594ef dma-buf: protected fence ops by RCU
-:226: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <[email protected]>' != 'Signed-off-by: Christian König <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 191 lines checked
7180963aa207 dma-buf: detach fence ops on signal
-:93: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <[email protected]>' != 'Signed-off-by: Christian König <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 62 lines checked
73a03300d224 dma-buf: inline spinlock for fence protection
-:367: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'x' may be better as '(x)' to avoid precedence issues #367: FILE: drivers/gpu/drm/drm_writeback.c:84:
+#define fence_to_wb_connector(x) container_of(x->extern_lock, \
struct drm_writeback_connector, \
fence_lock)

-:493: CHECK:UNCOMMENTED_DEFINITION: spinlock_t definition without comment #493: FILE: include/linux/dma-fence.h:71:
+ spinlock_t *extern_lock;

-:494: CHECK:UNCOMMENTED_DEFINITION: spinlock_t definition without comment #494: FILE: include/linux/dma-fence.h:72:
+ spinlock_t inline_lock;

-:545: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <[email protected]>' != 'Signed-off-by: Christian König <[email protected]>'

total: 0 errors, 1 warnings, 3 checks, 426 lines checked
b77a69f9700f dma-buf: use inline lock for the stub fence
-:58: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <[email protected]>' != 'Signed-off-by: Christian König <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 39 lines checked
86033617896a dma-buf: use inline lock for the dma-fence-array
-:40: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <[email protected]>' != 'Signed-off-by: Christian König <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 18 lines checked
b3adab78a864 dma-buf: use inline lock for the dma-fence-chain
-:45: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <[email protected]>' != 'Signed-off-by: Christian König <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 22 lines checked
3eeefe7be7e9 drm/sched: use inline locks for the drm-sched-fence
-:74: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <[email protected]>' != 'Signed-off-by: Christian König <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 50 lines checked 66d6e4279f4f dma-fence: Fix selftest
248c9a9ad49f drm/xe: Disconnect the low hanging fences from Xe module 5965479537ce drm/xe: Drop HW fence slab
1934694ddb0b drm/xe: Promote xe_hw_fence_irq to an ref counted object ca367c85e8be drm/xe: Finish disconnect HW fences from module

#19 lore raw

✓ CI.KUnit: success for Disconnect fences from Xe module

In reply to Matthew Brost
== Series Details ==

== Series Details ==

Series: Disconnect fences from Xe module
URL : https://patchwork.freedesktop.org/series/156388/
State : success

== Summary ==

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

$ make ARCH=um O=.kunit olddefconfig
[04:18:33] 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
[04:19:04] Starting KUnit Kernel (1/1)...
[04:19:04] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[04:19:04] ================== guc_buf (11 subtests) ===================
[04:19:04] [PASSED] test_smallest
[04:19:04] [PASSED] test_largest
[04:19:04] [PASSED] test_granular
[04:19:04] [PASSED] test_unique
[04:19:04] [PASSED] test_overlap
[04:19:04] [PASSED] test_reusable
[04:19:04] [PASSED] test_too_big
[04:19:04] [PASSED] test_flush
[04:19:04] [PASSED] test_lookup
[04:19:04] [PASSED] test_data
[04:19:04] [PASSED] test_class
[04:19:04] ===================== [PASSED] guc_buf =====================
[04:19:04] =================== guc_dbm (7 subtests) ===================
[04:19:04] [PASSED] test_empty
[04:19:04] [PASSED] test_default
[04:19:04] ======================== test_size  ========================
[04:19:04] [PASSED] 4
[04:19:04] [PASSED] 8
[04:19:04] [PASSED] 32
[04:19:04] [PASSED] 256
[04:19:04] ==================== [PASSED] test_size ====================
[04:19:04] ======================= test_reuse  ========================
[04:19:04] [PASSED] 4
[04:19:04] [PASSED] 8
[04:19:04] [PASSED] 32
[04:19:04] [PASSED] 256
[04:19:04] =================== [PASSED] test_reuse ====================
[04:19:04] =================== test_range_overlap  ====================
[04:19:04] [PASSED] 4
[04:19:04] [PASSED] 8
[04:19:04] [PASSED] 32
[04:19:04] [PASSED] 256
[04:19:04] =============== [PASSED] test_range_overlap ================
[04:19:04] =================== test_range_compact  ====================
[04:19:04] [PASSED] 4
[04:19:04] [PASSED] 8
[04:19:04] [PASSED] 32
[04:19:04] [PASSED] 256
[04:19:04] =============== [PASSED] test_range_compact ================
[04:19:04] ==================== test_range_spare  =====================
[04:19:04] [PASSED] 4
[04:19:04] [PASSED] 8
[04:19:04] [PASSED] 32
[04:19:04] [PASSED] 256
[04:19:04] ================ [PASSED] test_range_spare =================
[04:19:04] ===================== [PASSED] guc_dbm =====================
[04:19:04] =================== guc_idm (6 subtests) ===================
[04:19:04] [PASSED] bad_init
[04:19:04] [PASSED] no_init
[04:19:04] [PASSED] init_fini
[04:19:04] [PASSED] check_used
[04:19:04] [PASSED] check_quota
[04:19:04] [PASSED] check_all
[04:19:04] ===================== [PASSED] guc_idm =====================
[04:19:04] ================== no_relay (3 subtests) ===================
[04:19:04] [PASSED] xe_drops_guc2pf_if_not_ready
[04:19:04] [PASSED] xe_drops_guc2vf_if_not_ready
[04:19:04] [PASSED] xe_rejects_send_if_not_ready
[04:19:04] ==================== [PASSED] no_relay =====================
[04:19:04] ================== pf_relay (14 subtests) ==================
[04:19:04] [PASSED] pf_rejects_guc2pf_too_short
[04:19:04] [PASSED] pf_rejects_guc2pf_too_long
[04:19:04] [PASSED] pf_rejects_guc2pf_no_payload
[04:19:04] [PASSED] pf_fails_no_payload
[04:19:04] [PASSED] pf_fails_bad_origin
[04:19:04] [PASSED] pf_fails_bad_type
[04:19:04] [PASSED] pf_txn_reports_error
[04:19:04] [PASSED] pf_txn_sends_pf2guc
[04:19:04] [PASSED] pf_sends_pf2guc
[04:19:04] [SKIPPED] pf_loopback_nop
[04:19:04] [SKIPPED] pf_loopback_echo
[04:19:04] [SKIPPED] pf_loopback_fail
[04:19:04] [SKIPPED] pf_loopback_busy
[04:19:04] [SKIPPED] pf_loopback_retry
[04:19:04] ==================== [PASSED] pf_relay =====================
[04:19:04] ================== vf_relay (3 subtests) ===================
[04:19:04] [PASSED] vf_rejects_guc2vf_too_short
[04:19:04] [PASSED] vf_rejects_guc2vf_too_long
[04:19:04] [PASSED] vf_rejects_guc2vf_no_payload
[04:19:04] ==================== [PASSED] vf_relay =====================
[04:19:04] ===================== lmtt (1 subtest) =====================
[04:19:04] ======================== test_ops  =========================
[04:19:04] [PASSED] 2-level
[04:19:04] [PASSED] multi-level
[04:19:04] ==================== [PASSED] test_ops =====================
[04:19:04] ====================== [PASSED] lmtt =======================
[04:19:04] ================= pf_service (11 subtests) =================
[04:19:04] [PASSED] pf_negotiate_any
[04:19:04] [PASSED] pf_negotiate_base_match
[04:19:04] [PASSED] pf_negotiate_base_newer
[04:19:04] [PASSED] pf_negotiate_base_next
[04:19:04] [SKIPPED] pf_negotiate_base_older
[04:19:04] [PASSED] pf_negotiate_base_prev
[04:19:04] [PASSED] pf_negotiate_latest_match
[04:19:04] [PASSED] pf_negotiate_latest_newer
[04:19:04] [PASSED] pf_negotiate_latest_next
[04:19:04] [SKIPPED] pf_negotiate_latest_older
[04:19:04] [SKIPPED] pf_negotiate_latest_prev
[04:19:04] =================== [PASSED] pf_service ====================
[04:19:04] ================= xe_guc_g2g (2 subtests) ==================
[04:19:04] ============== xe_live_guc_g2g_kunit_default  ==============
[04:19:04] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[04:19:04] ============== xe_live_guc_g2g_kunit_allmem  ===============
[04:19:04] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[04:19:04] =================== [SKIPPED] xe_guc_g2g ===================
[04:19:04] =================== xe_mocs (2 subtests) ===================
[04:19:04] ================ xe_live_mocs_kernel_kunit  ================
[04:19:04] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[04:19:04] ================ xe_live_mocs_reset_kunit  =================
[04:19:04] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[04:19:04] ==================== [SKIPPED] xe_mocs =====================
[04:19:04] ================= xe_migrate (2 subtests) ==================
[04:19:04] ================= xe_migrate_sanity_kunit  =================
[04:19:04] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[04:19:04] ================== xe_validate_ccs_kunit  ==================
[04:19:04] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[04:19:04] =================== [SKIPPED] xe_migrate ===================
[04:19:04] ================== xe_dma_buf (1 subtest) ==================
[04:19:04] ==================== xe_dma_buf_kunit  =====================
[04:19:04] ================ [SKIPPED] xe_dma_buf_kunit ================
[04:19:04] =================== [SKIPPED] xe_dma_buf ===================
[04:19:04] ================= xe_bo_shrink (1 subtest) =================
[04:19:04] =================== xe_bo_shrink_kunit  ====================
[04:19:04] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[04:19:04] ================== [SKIPPED] xe_bo_shrink ==================
[04:19:04] ==================== xe_bo (2 subtests) ====================
[04:19:04] ================== xe_ccs_migrate_kunit  ===================
[04:19:04] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[04:19:04] ==================== xe_bo_evict_kunit  ====================
[04:19:04] =============== [SKIPPED] xe_bo_evict_kunit ================
[04:19:04] ===================== [SKIPPED] xe_bo ======================
[04:19:04] ==================== args (11 subtests) ====================
[04:19:04] [PASSED] count_args_test
[04:19:04] [PASSED] call_args_example
[04:19:04] [PASSED] call_args_test
[04:19:04] [PASSED] drop_first_arg_example
[04:19:04] [PASSED] drop_first_arg_test
[04:19:04] [PASSED] first_arg_example
[04:19:04] [PASSED] first_arg_test
[04:19:04] [PASSED] last_arg_example
[04:19:04] [PASSED] last_arg_test
[04:19:04] [PASSED] pick_arg_example
[04:19:04] [PASSED] sep_comma_example
[04:19:04] ====================== [PASSED] args =======================
[04:19:04] =================== xe_pci (3 subtests) ====================
[04:19:04] ==================== check_graphics_ip  ====================
[04:19:04] [PASSED] 12.00 Xe_LP
[04:19:04] [PASSED] 12.10 Xe_LP+
[04:19:04] [PASSED] 12.55 Xe_HPG
[04:19:04] [PASSED] 12.60 Xe_HPC
[04:19:04] [PASSED] 12.70 Xe_LPG
[04:19:04] [PASSED] 12.71 Xe_LPG
[04:19:04] [PASSED] 12.74 Xe_LPG+
[04:19:04] [PASSED] 20.01 Xe2_HPG
[04:19:04] [PASSED] 20.02 Xe2_HPG
[04:19:04] [PASSED] 20.04 Xe2_LPG
[04:19:04] [PASSED] 30.00 Xe3_LPG
[04:19:04] [PASSED] 30.01 Xe3_LPG
[04:19:04] [PASSED] 30.03 Xe3_LPG
[04:19:04] [PASSED] 30.04 Xe3_LPG
[04:19:04] [PASSED] 30.05 Xe3_LPG
[04:19:04] [PASSED] 35.11 Xe3p_XPC
[04:19:04] ================ [PASSED] check_graphics_ip ================
[04:19:04] ===================== check_media_ip  ======================
[04:19:04] [PASSED] 12.00 Xe_M
[04:19:04] [PASSED] 12.55 Xe_HPM
[04:19:04] [PASSED] 13.00 Xe_LPM+
[04:19:04] [PASSED] 13.01 Xe2_HPM
[04:19:04] [PASSED] 20.00 Xe2_LPM
[04:19:04] [PASSED] 30.00 Xe3_LPM
[04:19:04] [PASSED] 30.02 Xe3_LPM
[04:19:04] [PASSED] 35.00 Xe3p_LPM
[04:19:04] [PASSED] 35.03 Xe3p_HPM
[04:19:04] ================= [PASSED] check_media_ip ==================
[04:19:04] =================== check_platform_desc  ===================
[04:19:04] [PASSED] 0x9A60 (TIGERLAKE)
[04:19:04] [PASSED] 0x9A68 (TIGERLAKE)
[04:19:04] [PASSED] 0x9A70 (TIGERLAKE)
[04:19:04] [PASSED] 0x9A40 (TIGERLAKE)
[04:19:04] [PASSED] 0x9A49 (TIGERLAKE)
[04:19:04] [PASSED] 0x9A59 (TIGERLAKE)
[04:19:04] [PASSED] 0x9A78 (TIGERLAKE)
[04:19:04] [PASSED] 0x9AC0 (TIGERLAKE)
[04:19:04] [PASSED] 0x9AC9 (TIGERLAKE)
[04:19:04] [PASSED] 0x9AD9 (TIGERLAKE)
[04:19:04] [PASSED] 0x9AF8 (TIGERLAKE)
[04:19:04] [PASSED] 0x4C80 (ROCKETLAKE)
[04:19:04] [PASSED] 0x4C8A (ROCKETLAKE)
[04:19:04] [PASSED] 0x4C8B (ROCKETLAKE)
[04:19:04] [PASSED] 0x4C8C (ROCKETLAKE)
[04:19:04] [PASSED] 0x4C90 (ROCKETLAKE)
[04:19:04] [PASSED] 0x4C9A (ROCKETLAKE)
[04:19:04] [PASSED] 0x4680 (ALDERLAKE_S)
[04:19:04] [PASSED] 0x4682 (ALDERLAKE_S)
[04:19:04] [PASSED] 0x4688 (ALDERLAKE_S)
[04:19:04] [PASSED] 0x468A (ALDERLAKE_S)
[04:19:04] [PASSED] 0x468B (ALDERLAKE_S)
[04:19:04] [PASSED] 0x4690 (ALDERLAKE_S)
[04:19:04] [PASSED] 0x4692 (ALDERLAKE_S)
[04:19:04] [PASSED] 0x4693 (ALDERLAKE_S)
[04:19:04] [PASSED] 0x46A0 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46A1 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46A2 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46A3 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46A6 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46A8 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46AA (ALDERLAKE_P)
[04:19:04] [PASSED] 0x462A (ALDERLAKE_P)
[04:19:04] [PASSED] 0x4626 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x4628 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46B0 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46B1 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46B2 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46B3 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46C0 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46C1 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46C2 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46C3 (ALDERLAKE_P)
[04:19:04] [PASSED] 0x46D0 (ALDERLAKE_N)
[04:19:04] [PASSED] 0x46D1 (ALDERLAKE_N)
[04:19:04] [PASSED] 0x46D2 (ALDERLAKE_N)
[04:19:04] [PASSED] 0x46D3 (ALDERLAKE_N)
[04:19:04] [PASSED] 0x46D4 (ALDERLAKE_N)
[04:19:04] [PASSED] 0xA721 (ALDERLAKE_P)
[04:19:04] [PASSED] 0xA7A1 (ALDERLAKE_P)
[04:19:04] [PASSED] 0xA7A9 (ALDERLAKE_P)
[04:19:04] [PASSED] 0xA7AC (ALDERLAKE_P)
[04:19:04] [PASSED] 0xA7AD (ALDERLAKE_P)
[04:19:04] [PASSED] 0xA720 (ALDERLAKE_P)
[04:19:04] [PASSED] 0xA7A0 (ALDERLAKE_P)
[04:19:04] [PASSED] 0xA7A8 (ALDERLAKE_P)
[04:19:04] [PASSED] 0xA7AA (ALDERLAKE_P)
[04:19:04] [PASSED] 0xA7AB (ALDERLAKE_P)
[04:19:04] [PASSED] 0xA780 (ALDERLAKE_S)
[04:19:04] [PASSED] 0xA781 (ALDERLAKE_S)
[04:19:04] [PASSED] 0xA782 (ALDERLAKE_S)
[04:19:04] [PASSED] 0xA783 (ALDERLAKE_S)
[04:19:04] [PASSED] 0xA788 (ALDERLAKE_S)
[04:19:04] [PASSED] 0xA789 (ALDERLAKE_S)
[04:19:04] [PASSED] 0xA78A (ALDERLAKE_S)
[04:19:04] [PASSED] 0xA78B (ALDERLAKE_S)
[04:19:04] [PASSED] 0x4905 (DG1)
[04:19:04] [PASSED] 0x4906 (DG1)
[04:19:04] [PASSED] 0x4907 (DG1)
[04:19:04] [PASSED] 0x4908 (DG1)
[04:19:04] [PASSED] 0x4909 (DG1)
[04:19:04] [PASSED] 0x56C0 (DG2)
[04:19:04] [PASSED] 0x56C2 (DG2)
[04:19:04] [PASSED] 0x56C1 (DG2)
[04:19:04] [PASSED] 0x7D51 (METEORLAKE)
[04:19:04] [PASSED] 0x7DD1 (METEORLAKE)
[04:19:04] [PASSED] 0x7D41 (METEORLAKE)
[04:19:04] [PASSED] 0x7D67 (METEORLAKE)
[04:19:04] [PASSED] 0xB640 (METEORLAKE)
[04:19:04] [PASSED] 0x56A0 (DG2)
[04:19:04] [PASSED] 0x56A1 (DG2)
[04:19:04] [PASSED] 0x56A2 (DG2)
[04:19:04] [PASSED] 0x56BE (DG2)
[04:19:04] [PASSED] 0x56BF (DG2)
[04:19:04] [PASSED] 0x5690 (DG2)
[04:19:04] [PASSED] 0x5691 (DG2)
[04:19:04] [PASSED] 0x5692 (DG2)
[04:19:04] [PASSED] 0x56A5 (DG2)
[04:19:04] [PASSED] 0x56A6 (DG2)
[04:19:04] [PASSED] 0x56B0 (DG2)
[04:19:04] [PASSED] 0x56B1 (DG2)
[04:19:04] [PASSED] 0x56BA (DG2)
[04:19:04] [PASSED] 0x56BB (DG2)
[04:19:04] [PASSED] 0x56BC (DG2)
[04:19:04] [PASSED] 0x56BD (DG2)
[04:19:04] [PASSED] 0x5693 (DG2)
[04:19:04] [PASSED] 0x5694 (DG2)
[04:19:04] [PASSED] 0x5695 (DG2)
[04:19:04] [PASSED] 0x56A3 (DG2)
[04:19:04] [PASSED] 0x56A4 (DG2)
[04:19:04] [PASSED] 0x56B2 (DG2)
[04:19:04] [PASSED] 0x56B3 (DG2)
[04:19:04] [PASSED] 0x5696 (DG2)
[04:19:04] [PASSED] 0x5697 (DG2)
[04:19:04] [PASSED] 0xB69 (PVC)
[04:19:04] [PASSED] 0xB6E (PVC)
[04:19:04] [PASSED] 0xBD4 (PVC)
[04:19:04] [PASSED] 0xBD5 (PVC)
[04:19:04] [PASSED] 0xBD6 (PVC)
[04:19:04] [PASSED] 0xBD7 (PVC)
[04:19:04] [PASSED] 0xBD8 (PVC)
[04:19:04] [PASSED] 0xBD9 (PVC)
[04:19:04] [PASSED] 0xBDA (PVC)
[04:19:04] [PASSED] 0xBDB (PVC)
[04:19:04] [PASSED] 0xBE0 (PVC)
[04:19:04] [PASSED] 0xBE1 (PVC)
[04:19:04] [PASSED] 0xBE5 (PVC)
[04:19:04] [PASSED] 0x7D40 (METEORLAKE)
[04:19:04] [PASSED] 0x7D45 (METEORLAKE)
[04:19:04] [PASSED] 0x7D55 (METEORLAKE)
[04:19:04] [PASSED] 0x7D60 (METEORLAKE)
[04:19:04] [PASSED] 0x7DD5 (METEORLAKE)
[04:19:04] [PASSED] 0x6420 (LUNARLAKE)
[04:19:04] [PASSED] 0x64A0 (LUNARLAKE)
[04:19:04] [PASSED] 0x64B0 (LUNARLAKE)
[04:19:04] [PASSED] 0xE202 (BATTLEMAGE)
[04:19:04] [PASSED] 0xE209 (BATTLEMAGE)
[04:19:04] [PASSED] 0xE20B (BATTLEMAGE)
[04:19:04] [PASSED] 0xE20C (BATTLEMAGE)
[04:19:04] [PASSED] 0xE20D (BATTLEMAGE)
[04:19:04] [PASSED] 0xE210 (BATTLEMAGE)
[04:19:04] [PASSED] 0xE211 (BATTLEMAGE)
[04:19:04] [PASSED] 0xE212 (BATTLEMAGE)
[04:19:04] [PASSED] 0xE216 (BATTLEMAGE)
[04:19:04] [PASSED] 0xE220 (BATTLEMAGE)
[04:19:04] [PASSED] 0xE221 (BATTLEMAGE)
[04:19:04] [PASSED] 0xE222 (BATTLEMAGE)
[04:19:04] [PASSED] 0xE223 (BATTLEMAGE)
[04:19:04] [PASSED] 0xB080 (PANTHERLAKE)
[04:19:04] [PASSED] 0xB081 (PANTHERLAKE)
[04:19:04] [PASSED] 0xB082 (PANTHERLAKE)
[04:19:04] [PASSED] 0xB083 (PANTHERLAKE)
[04:19:04] [PASSED] 0xB084 (PANTHERLAKE)
[04:19:04] [PASSED] 0xB085 (PANTHERLAKE)
[04:19:04] [PASSED] 0xB086 (PANTHERLAKE)
[04:19:04] [PASSED] 0xB087 (PANTHERLAKE)
[04:19:04] [PASSED] 0xB08F (PANTHERLAKE)
[04:19:04] [PASSED] 0xB090 (PANTHERLAKE)
[04:19:04] [PASSED] 0xB0A0 (PANTHERLAKE)
[04:19:04] [PASSED] 0xB0B0 (PANTHERLAKE)
[04:19:04] [PASSED] 0xFD80 (PANTHERLAKE)
[04:19:04] [PASSED] 0xFD81 (PANTHERLAKE)
[04:19:04] [PASSED] 0xD740 (NOVALAKE_S)
[04:19:04] [PASSED] 0xD741 (NOVALAKE_S)
[04:19:04] [PASSED] 0xD742 (NOVALAKE_S)
[04:19:04] [PASSED] 0xD743 (NOVALAKE_S)
[04:19:04] [PASSED] 0xD744 (NOVALAKE_S)
[04:19:04] [PASSED] 0xD745 (NOVALAKE_S)
[04:19:04] =============== [PASSED] check_platform_desc ===============
[04:19:04] ===================== [PASSED] xe_pci ======================
[04:19:04] =================== xe_rtp (2 subtests) ====================
[04:19:04] =============== xe_rtp_process_to_sr_tests  ================
[04:19:04] [PASSED] coalesce-same-reg
[04:19:04] [PASSED] no-match-no-add
[04:19:04] [PASSED] match-or
[04:19:04] [PASSED] match-or-xfail
[04:19:04] [PASSED] no-match-no-add-multiple-rules
[04:19:04] [PASSED] two-regs-two-entries
[04:19:04] [PASSED] clr-one-set-other
[04:19:04] [PASSED] set-field
[04:19:04] [PASSED] conflict-duplicate
[04:19:04] [PASSED] conflict-not-disjoint
[04:19:04] [PASSED] conflict-reg-type
[04:19:04] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[04:19:04] ================== xe_rtp_process_tests  ===================
[04:19:04] [PASSED] active1
[04:19:04] [PASSED] active2
[04:19:04] [PASSED] active-inactive
[04:19:04] [PASSED] inactive-active
[04:19:04] [PASSED] inactive-1st_or_active-inactive
[04:19:04] [PASSED] inactive-2nd_or_active-inactive
[04:19:04] [PASSED] inactive-last_or_active-inactive
[04:19:04] [PASSED] inactive-no_or_active-inactive
stty: 'standard input': Inappropriate ioctl for device
[04:19:04] ============== [PASSED] xe_rtp_process_tests ===============
[04:19:04] ===================== [PASSED] xe_rtp ======================
[04:19:04] ==================== xe_wa (1 subtest) =====================
[04:19:04] ======================== xe_wa_gt  =========================
[04:19:04] [PASSED] TIGERLAKE B0
[04:19:04] [PASSED] DG1 A0
[04:19:04] [PASSED] DG1 B0
[04:19:04] [PASSED] ALDERLAKE_S A0
[04:19:04] [PASSED] ALDERLAKE_S B0
[04:19:04] [PASSED] ALDERLAKE_S C0
[04:19:04] [PASSED] ALDERLAKE_S D0
[04:19:04] [PASSED] ALDERLAKE_P A0
[04:19:04] [PASSED] ALDERLAKE_P B0
[04:19:04] [PASSED] ALDERLAKE_P C0
[04:19:04] [PASSED] ALDERLAKE_S RPLS D0
[04:19:04] [PASSED] ALDERLAKE_P RPLU E0
[04:19:04] [PASSED] DG2 G10 C0
[04:19:04] [PASSED] DG2 G11 B1
[04:19:04] [PASSED] DG2 G12 A1
[04:19:04] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[04:19:04] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[04:19:04] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[04:19:04] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[04:19:04] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[04:19:04] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[04:19:04] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[04:19:04] ==================== [PASSED] xe_wa_gt =====================
[04:19:04] ====================== [PASSED] xe_wa ======================
[04:19:04] ============================================================
[04:19:04] Testing complete. Ran 317 tests: passed: 299, skipped: 18
[04:19:04] Elapsed time: 35.232s total, 4.283s configuring, 30.582s building, 0.340s running

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

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

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

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

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