Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/tests: Wait for clear fence operation to complete
@ 2024-12-05 11:47 Nirmoy Das
  2024-12-05 11:49 ` Matthew Auld
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Nirmoy Das @ 2024-12-05 11:47 UTC (permalink / raw)
  To: intel-xe; +Cc: Nirmoy Das, Matthew Auld, Thomas Hellström

Ensure the clear operation completes before proceeding, as the clear
fence is not attached to the BO's dma-resv object.

Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/xe/tests/xe_bo.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index 3e0ae40ebbd2..c9ec7a313c6b 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -49,6 +49,13 @@ static int ccs_test_migrate(struct xe_tile *tile, struct xe_bo *bo,
 			KUNIT_FAIL(test, "Failed to submit bo clear.\n");
 			return PTR_ERR(fence);
 		}
+
+		if (dma_fence_wait_timeout(fence, false, 5 * HZ) <= 0) {
+			dma_fence_put(fence);
+			KUNIT_FAIL(test, "Timeout while clearing bo.\n");
+			return  -ETIME;
+		}
+
 		dma_fence_put(fence);
 	}
 
-- 
2.46.0


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

end of thread, other threads:[~2024-12-09  8:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 11:47 [PATCH] drm/xe/tests: Wait for clear fence operation to complete Nirmoy Das
2024-12-05 11:49 ` Matthew Auld
2024-12-05 14:35   ` Nirmoy Das
2024-12-05 14:05 ` ✓ CI.Patch_applied: success for " Patchwork
2024-12-05 14:05 ` ✓ CI.checkpatch: " Patchwork
2024-12-05 14:06 ` ✓ CI.KUnit: " Patchwork
2024-12-05 14:25 ` ✓ CI.Build: " Patchwork
2024-12-05 14:27 ` ✓ CI.Hooks: " Patchwork
2024-12-05 14:28 ` ✓ CI.checksparse: " Patchwork
2024-12-05 14:58 ` ✗ Xe.CI.BAT: failure " Patchwork
2024-12-09  8:37   ` Nirmoy Das
2024-12-05 15:56 ` ✗ Xe.CI.Full: " Patchwork

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