[igt-dev] [i-g-t V5 26/47] tests/i915/kms_flip_tiling: Add XE support

Bhanuprakash Modem bhanuprakash.modem at intel.com
Fri Apr 28 07:13:29 UTC 2023


Add XE driver support for kms tests.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
 tests/i915/kms_flip_tiling.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/i915/kms_flip_tiling.c b/tests/i915/kms_flip_tiling.c
index 4cc063f63..a22f12382 100644
--- a/tests/i915/kms_flip_tiling.c
+++ b/tests/i915/kms_flip_tiling.c
@@ -177,7 +177,7 @@ igt_output_t *output;
 igt_main
 {
 	igt_fixture {
-		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
 		data.gen = intel_display_ver(intel_get_drm_devid(data.drm_fd));
 
 		data.testformat = DRM_FORMAT_XRGB8888;
@@ -217,6 +217,12 @@ igt_main
 					if (plane->formats[j] != data.testformat)
 						continue;
 
+					/* No tiling support in XE. */
+					if (is_xe_device(data.drm_fd) &&
+					    (plane->modifiers[i] != DRM_FORMAT_MOD_LINEAR ||
+					     plane->modifiers[j] != DRM_FORMAT_MOD_LINEAR))
+						continue;
+
 					igt_dynamic_f("%s-pipe-%s-%s-to-%s",
 						      igt_output_name(output),
 						      kmstest_pipe_name(pipe),
-- 
2.40.0



More information about the igt-dev mailing list