Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel: Enable survivability tests on discrete platforms >= BMG
@ 2026-06-18 14:24 himanshu.girotra
  2026-06-18 14:49 ` Jani Nikula
  0 siblings, 1 reply; 2+ messages in thread
From: himanshu.girotra @ 2026-06-18 14:24 UTC (permalink / raw)
  To: igt-dev, riana.tauro

From: Himanshu Girotra <himanshu.girotra@intel.com>

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)).

Signed-off-by: Himanshu Girotra <himanshu.girotra@intel.com>
---
 tests/intel/xe_configfs.c      | 4 +++-
 tests/intel/xe_survivability.c | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/intel/xe_configfs.c b/tests/intel/xe_configfs.c
index e7c797eb7..3ae5d7ee4 100644
--- a/tests/intel/xe_configfs.c
+++ b/tests/intel/xe_configfs.c
@@ -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);
diff --git a/tests/intel/xe_survivability.c b/tests/intel/xe_survivability.c
index d5d7e048c..65814edc6 100644
--- a/tests/intel/xe_survivability.c
+++ b/tests/intel/xe_survivability.c
@@ -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);
-- 
2.50.1


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

* Re: [PATCH i-g-t] tests/intel: Enable survivability tests on discrete platforms >= BMG
  2026-06-18 14:24 [PATCH i-g-t] tests/intel: Enable survivability tests on discrete platforms >= BMG himanshu.girotra
@ 2026-06-18 14:49 ` Jani Nikula
  0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2026-06-18 14:49 UTC (permalink / raw)
  To: himanshu.girotra, igt-dev, riana.tauro

On Thu, 18 Jun 2026, himanshu.girotra@intel.com wrote:
> From: Himanshu Girotra <himanshu.girotra@intel.com>
>
> 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)).
>
> Signed-off-by: Himanshu Girotra <himanshu.girotra@intel.com>
> ---
>  tests/intel/xe_configfs.c      | 4 +++-
>  tests/intel/xe_survivability.c | 3 ++-
>  2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tests/intel/xe_configfs.c b/tests/intel/xe_configfs.c
> index e7c797eb7..3ae5d7ee4 100644
> --- a/tests/intel/xe_configfs.c
> +++ b/tests/intel/xe_configfs.c
> @@ -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);

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.


>  		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);
> diff --git a/tests/intel/xe_survivability.c b/tests/intel/xe_survivability.c
> index d5d7e048c..65814edc6 100644
> --- a/tests/intel/xe_survivability.c
> +++ b/tests/intel/xe_survivability.c
> @@ -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);

-- 
Jani Nikula, Intel

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

end of thread, other threads:[~2026-06-18 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 14:24 [PATCH i-g-t] tests/intel: Enable survivability tests on discrete platforms >= BMG himanshu.girotra
2026-06-18 14:49 ` Jani Nikula

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