[igt-dev] [i-g-t V2 2/5] tests/kms_vblank: Allow hang tests to run on XE

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue Sep 5 16:42:27 UTC 2023


As hang tests supports both i915 & XE, update the intel specific
checks to allow them to run on XE.

Cc: Kunal Joshi <kunal1.joshi at intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Reviewed-by: Kunal Joshi <kunal1.joshi at intel.com>
---
 tests/kms_vblank.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index 0cc21bb5f..6753dc918 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -289,7 +289,10 @@ static void run_test(data_t *data, void (*testfunc)(data_t *, int, int))
 		 igt_output_name(output));
 
 	if (!(data->flags & NOHANG)) {
-		ahnd = get_reloc_ahnd(fd, 0);
+		ahnd = is_i915_device(fd) ?
+			get_reloc_ahnd(fd, 0) :
+			intel_allocator_open(fd, 0, INTEL_ALLOCATOR_RELOC);
+
 		hang = igt_hang_ring_with_ahnd(fd, I915_EXEC_DEFAULT, ahnd);
 	}
 
-- 
2.40.0



More information about the igt-dev mailing list