Skip to contentSkip to conversation

tests/intel: Enable survivability tests on discrete platforms >= BMG

PATCH Superseded [email protected] 2 participants 2 messages Jun 18

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/intel: Enable survivability tests on discrete platforms >= BMG

From: Himanshu Girotra <[email protected]>

The survivability mode tests in xe_survivability and xe_configfs were initially developed for Battlemage (BMG) and gated with IS_BATTLEMAGE. Survivability mode is, however, supported by the KMD on all discrete platforms from BMG onwards.

Mirror this on the IGT side by replacing the BMG-only check with a runtime discrete check combined with a graphics version check of at least BMG (IP_VER(20, 1)).

---
 tests/intel/xe_configfs.c      | 4 +++-
 tests/intel/xe_survivability.c | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
tests/intel/xe_configfs.c +3 -1
index e7c797eb7..3ae5d7ee4 100644
@@ -379,6 +379,7 @@ int igt_main()
 	int fd, configfs_fd, configfs_device_fd;
 	uint32_t devid;
 	bool is_vf_device;
+	bool is_dgfx;
 	const char *engine = NULL;
 
 	igt_fixture() {
@@ -387,6 +388,7 @@ int igt_main()
 		fd = drm_open_driver(DRIVER_XE);
 		devid = intel_get_drm_devid(fd);
 		is_vf_device = intel_is_vf_device(fd);
+		is_dgfx = xe_has_vram(fd);
 		set_bus_addr(fd);
 
 		xe_for_each_engine(fd, hwe) {
@@ -410,7 +412,7 @@ int igt_main()
 
 	igt_describe("Validate survivability mode");
 	igt_subtest("survivability-mode") {
-		igt_require(IS_BATTLEMAGE(devid));
+		igt_require(is_dgfx && intel_graphics_ver(devid) >= IP_VER(20, 1));
 		igt_require_f(!is_vf_device, "survivability mode not supported in VF\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_survivability_mode(configfs_device_fd);
tests/intel/xe_survivability.c +2 -1
index d5d7e048c..65814edc6 100644
@@ -217,7 +217,8 @@ int igt_main()
 
 	igt_fixture() {
 		fd = drm_open_driver(DRIVER_XE);
-		igt_require(IS_BATTLEMAGE(intel_get_drm_devid(fd)));
+		igt_require(xe_has_vram(fd) &&
+			    intel_graphics_ver(intel_get_drm_devid(fd)) >= IP_VER(20, 1));
 		vf_device = intel_is_vf_device(fd);
 		igt_require_f(!vf_device, "survivability mode not supported in VF\n");
 		pci_xe = igt_device_get_pci_device(fd);
Signature · 1 line
2.50.1
#1 lore raw
Quoted 30 lines · On Thu, 18 Jun 2026, [email protected] wrote:

From: Himanshu Girotra <[email protected]>

The survivability mode tests in xe_survivability and xe_configfs were initially developed for Battlemage (BMG) and gated with IS_BATTLEMAGE. Survivability mode is, however, supported by the KMD on all discrete platforms from BMG onwards.

Mirror this on the IGT side by replacing the BMG-only check with a runtime discrete check combined with a graphics version check of at least BMG (IP_VER(20, 1)).

---
 tests/intel/xe_configfs.c      | 4 +++-
 tests/intel/xe_survivability.c | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
tests/intel/xe_configfs.c +1 -0
index e7c797eb7..3ae5d7ee4 100644
@@ -379,6 +379,7 @@ int igt_main()
 	int fd, configfs_fd, configfs_device_fd;
 	uint32_t devid;
 	bool is_vf_device;
+	bool is_dgfx;
 	const char *engine = NULL;
 
 	igt_fixture() {

tests/intel/xe_configfs.c int igt_main() · line 391

Quoted 4 lines
tests/intel/xe_configfs.c +1 -0
@@ -387,6 +388,7 @@ int igt_main()
 		fd = drm_open_driver(DRIVER_XE);
 		devid = intel_get_drm_devid(fd);
 		is_vf_device = intel_is_vf_device(fd);
+		is_dgfx = xe_has_vram(fd);

If you mean is_intel_dgfx(), please use that instead of a different check, even if they turn out to be the same thing.

BR,
Jani.

Quoted 26 lines
tests/intel/xe_configfs.c +1 -1
 		set_bus_addr(fd);
 
 		xe_for_each_engine(fd, hwe) {
@@ -410,7 +412,7 @@ int igt_main()
 
 	igt_describe("Validate survivability mode");
 	igt_subtest("survivability-mode") {
-		igt_require(IS_BATTLEMAGE(devid));
+		igt_require(is_dgfx && intel_graphics_ver(devid) >= IP_VER(20, 1));
 		igt_require_f(!is_vf_device, "survivability mode not supported in VF\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_survivability_mode(configfs_device_fd);
tests/intel/xe_survivability.c +2 -1
index d5d7e048c..65814edc6 100644
@@ -217,7 +217,8 @@ int igt_main()
 
 	igt_fixture() {
 		fd = drm_open_driver(DRIVER_XE);
-		igt_require(IS_BATTLEMAGE(intel_get_drm_devid(fd)));
+		igt_require(xe_has_vram(fd) &&
+			    intel_graphics_ver(intel_get_drm_devid(fd)) >= IP_VER(20, 1));
 		vf_device = intel_is_vf_device(fd);
 		igt_require_f(!vf_device, "survivability mode not supported in VF\n");
 		pci_xe = igt_device_get_pci_device(fd);
Signature · 1 line
Jani Nikula, Intel