public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] tests/intel/xe_configfs: Skip ctx-restore subtests on platforms without RCS
@ 2026-04-16  8:30 Nitin Gote
  2026-04-16 13:28 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Nitin Gote @ 2026-04-16  8:30 UTC (permalink / raw)
  To: igt-dev; +Cc: kamil.konieczny, nitin.r.gote

The ctx-restore-post-bb and ctx-restore-mid-bb subtests inject a batch
buffer via configfs using the "rcs" (render) engine class. However,
platforms like CRI, PVC don't have render. The BB is stored via configfs
but never injected into any engine's LRC, causing the subsequent register
readback to fail.

Fix by adding runtime detection of the render engine using
xe_for_each_engine() and skip the ctx-restore subtests with
igt_require_f(has_rcs) on platforms without a render engine instead
of failing silently.

Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Fixes: b6abdc26e01b ("tests/intel/xe_configfs: Check ctx_restore_post_bb")
Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
---
 tests/intel/xe_configfs.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/intel/xe_configfs.c b/tests/intel/xe_configfs.c
index 755524e7c..445f35431 100644
--- a/tests/intel/xe_configfs.c
+++ b/tests/intel/xe_configfs.c
@@ -364,12 +364,22 @@ int igt_main()
 	int fd, configfs_fd, configfs_device_fd;
 	uint32_t devid;
 	bool is_vf_device;
+	bool has_rcs = false;
 
 	igt_fixture() {
+		struct drm_xe_engine_class_instance *hwe;
+
 		fd = drm_open_driver(DRIVER_XE);
 		devid = intel_get_drm_devid(fd);
 		is_vf_device = intel_is_vf_device(fd);
 		set_bus_addr(fd);
+
+		xe_for_each_engine(fd, hwe)
+			if (hwe->engine_class == DRM_XE_ENGINE_CLASS_RENDER) {
+				has_rcs = true;
+				break;
+			}
+
 		drm_close_driver(fd);
 
 		configfs_fd = igt_configfs_open("xe");
@@ -418,6 +428,7 @@ int igt_main()
 	igt_describe("Validate ctx_restore_post_bb");
 	igt_subtest("ctx-restore-post-bb") {
 		igt_skip_on_f(is_vf_device, "MMIO register readback not possible on VF\n");
+		igt_require_f(has_rcs, "Platform has no render engine\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_ctx_restore(configfs_device_fd, "post");
 		close_configfs_group(configfs_fd, configfs_device_fd);
@@ -434,6 +445,7 @@ int igt_main()
 	igt_describe("Validate ctx_restore_mid_bb");
 	igt_subtest("ctx-restore-mid-bb") {
 		igt_skip_on_f(is_vf_device, "MMIO register readback not possible on VF\n");
+		igt_require_f(has_rcs, "Platform has no render engine\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_ctx_restore(configfs_device_fd, "mid");
 		close_configfs_group(configfs_fd, configfs_device_fd);
-- 
2.50.1


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

end of thread, other threads:[~2026-04-17  9:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16  8:30 [PATCH] tests/intel/xe_configfs: Skip ctx-restore subtests on platforms without RCS Nitin Gote
2026-04-16 13:28 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-04-16 14:21 ` ✓ i915.CI.BAT: " Patchwork
2026-04-16 14:27 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-17  4:27   ` Gote, Nitin R
2026-04-17  9:55     ` Ravali, JupallyX
2026-04-17  0:41 ` ✓ i915.CI.Full: success " Patchwork
2026-04-17  7:21 ` [PATCH] " Bernatowicz, Marcin
2026-04-17  8:49   ` Gote, Nitin R

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