Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/intel/xe_drm_fdinfo: Do not end NULL xe_cork
@ 2025-01-02 16:25 Jonathan Cavitt
  2025-01-02 17:11 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jonathan Cavitt @ 2025-01-02 16:25 UTC (permalink / raw)
  To: igt-dev
  Cc: jonathan.cavitt, saurabhg.gupta, alex.zuo, zbigniew.kempczynski,
	pravalika.gurram, daniel.stenka

An earlier commit prevented the execution of the xe_cork_destroy
function when the xe_cork is not initialized via xe_cork_create in
xe_drm_fdinfo.  This must also be done with the xe_cork_sync_end
function in some places.

Fixes: 2feb1d67 ("lib/xe/xe_spin: move the spinner related functions to lib")
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3869
CC: Pravalika Gurram <pravalika.gurram@intel.com>
CC: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
CC: Daniel Stenka <daniel.stenka@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
 tests/intel/xe_drm_fdinfo.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tests/intel/xe_drm_fdinfo.c b/tests/intel/xe_drm_fdinfo.c
index e83c55c646..0d1cbfe59e 100644
--- a/tests/intel/xe_drm_fdinfo.c
+++ b/tests/intel/xe_drm_fdinfo.c
@@ -532,8 +532,11 @@ utilization_others_full_load(int fd, struct drm_xe_engine_class_instance *hwe)
 
 	read_engine_cycles(fd, pceu1);
 	usleep(batch_duration_usec);
-	xe_for_each_engine_class(class)
-		xe_cork_sync_end(fd, ctx[class]);
+	xe_for_each_engine_class(class) {
+		if (ctx[class])
+			xe_cork_sync_end(fd, ctx[class]);
+	}
+
 	read_engine_cycles(fd, pceu2);
 
 	xe_for_each_engine_class(class) {
@@ -573,8 +576,11 @@ utilization_all_full_load(int fd)
 
 	read_engine_cycles(fd, pceu1);
 	usleep(batch_duration_usec);
-	xe_for_each_engine_class(class)
-		xe_cork_sync_end(fd, ctx[class]);
+	xe_for_each_engine_class(class) {
+		if (ctx[class])
+			xe_cork_sync_end(fd, ctx[class]);
+	}
+
 	read_engine_cycles(fd, pceu2);
 
 	xe_for_each_engine_class(class) {
-- 
2.43.0


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

end of thread, other threads:[~2025-01-06 17:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-02 16:25 [PATCH] tests/intel/xe_drm_fdinfo: Do not end NULL xe_cork Jonathan Cavitt
2025-01-02 17:11 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-01-02 17:15 ` ✗ i915.CI.BAT: failure " Patchwork
2025-01-02 17:59   ` Cavitt, Jonathan
2025-01-02 18:32 ` ✗ Xe.CI.Full: " Patchwork
2025-01-02 18:53   ` Cavitt, Jonathan
2025-01-06 17:20 ` [PATCH] " Lucas De Marchi

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