Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jonathan.cavitt@intel.com, saurabhg.gupta@intel.com,
	alex.zuo@intel.com, zbigniew.kempczynski@intel.com,
	pravalika.gurram@intel.com, daniel.stenka@intel.com
Subject: [PATCH] tests/intel/xe_drm_fdinfo: Do not end NULL xe_cork
Date: Thu,  2 Jan 2025 16:25:40 +0000	[thread overview]
Message-ID: <20250102162540.81162-1-jonathan.cavitt@intel.com> (raw)

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


             reply	other threads:[~2025-01-02 16:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 16:25 Jonathan Cavitt [this message]
2025-01-02 17:11 ` ✓ Xe.CI.BAT: success for tests/intel/xe_drm_fdinfo: Do not end NULL xe_cork 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250102162540.81162-1-jonathan.cavitt@intel.com \
    --to=jonathan.cavitt@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=daniel.stenka@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=pravalika.gurram@intel.com \
    --cc=saurabhg.gupta@intel.com \
    --cc=zbigniew.kempczynski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox