[PATCH i-g-t 1/8] tests/intel/xe_drm_fdinfo: Do not end cork not started
Lucas De Marchi
lucas.demarchi at intel.com
Sat Jan 4 07:15:41 UTC 2025
If cork was not started, do not try to end it. Similar fix to commit
598c268686f4 ("tests/intel/xe_drm_fdinfo: Do not destroy NULL xe_cork").
Cc: Jonathan Cavitt <jonathan.cavitt at intel.com>
Cc: Pravalika Gurram <pravalika.gurram at intel.com>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3869
Fixes: 2feb1d6718a1 ("lib/xe/xe_spin: move the spinner related functions to lib")
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
tests/intel/xe_drm_fdinfo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_drm_fdinfo.c b/tests/intel/xe_drm_fdinfo.c
index e83c55c64..6549629b4 100644
--- a/tests/intel/xe_drm_fdinfo.c
+++ b/tests/intel/xe_drm_fdinfo.c
@@ -533,7 +533,9 @@ 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]);
+ if (ctx[class])
+ xe_cork_sync_end(fd, ctx[class]);
+
read_engine_cycles(fd, pceu2);
xe_for_each_engine_class(class) {
--
2.47.0
More information about the igt-dev
mailing list