Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [i-g-t 00/18] Add XE suppor for display tests
@ 2023-06-19 11:58 Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 01/18] lib: Add tiling support for XE Bhanuprakash Modem
                   ` (18 more replies)
  0 siblings, 19 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Add IGT support to work kms tests on XE driver.

Bhanuprakash Modem (18):
  lib: Add tiling support for XE
  lib/igt_fb: Intel bops & ibb is mandatory for XE
  tests/kms_cursor_edge_walk: Fix intel specific checks
  tests/kms_getfb: Extended ccs tests to support XE
  tests/kms_addfb_basic: Add tiling support for XE
  tests/kms_plane: Add tiling support for XE
  tests/kms_plane_lowres: Add tiling support for XE
  tests/kms_plane_scaling: Add tiling support for XE
  tests/kms_rotation_crc: Add tiling support for XE
  tests/i915/kms_big_fb: Add tiling support for XE
  tests/i915/kms_draw_crc: Add tiling support for XE
  tests/i915/kms_flip_scaled_crc: Add tiling support for XE
  tests/i915/kms_flip_tiling: Add tiling support for XE
  tests/i915/kms_ccs: Add XE support
  tests/i915/kms_fb_coherancy: Add XE support
  tests/i915/kms_fbcon_fbt: Add XE support
  tests/kms_async_flips: Add XE support
  tests/kms_prime: Add XE support

 lib/igt_draw.c                   |   5 +-
 lib/igt_fb.c                     |  20 +--
 lib/intel_bufops.c               |  13 +-
 tests/i915/kms_big_fb.c          |  23 +---
 tests/i915/kms_ccs.c             |  42 +++---
 tests/i915/kms_draw_crc.c        |   4 -
 tests/i915/kms_fb_coherency.c    |  43 +++---
 tests/i915/kms_fbcon_fbt.c       |   2 +-
 tests/i915/kms_flip_scaled_crc.c |   6 -
 tests/i915/kms_flip_tiling.c     |   6 -
 tests/kms_addfb_basic.c          |  17 ++-
 tests/kms_async_flips.c          |  12 +-
 tests/kms_cursor_edge_walk.c     |   2 +-
 tests/kms_getfb.c                |  10 +-
 tests/kms_plane.c                |   4 -
 tests/kms_plane_lowres.c         |   3 -
 tests/kms_plane_scaling.c        |   4 -
 tests/kms_prime.c                | 230 ++++++++++++++++++++++++-------
 tests/kms_rotation_crc.c         |   8 +-
 19 files changed, 278 insertions(+), 176 deletions(-)

--
2.40.0

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

* [igt-dev] [i-g-t 01/18] lib: Add tiling support for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 02/18] lib/igt_fb: Intel bops & ibb is mandatory " Bhanuprakash Modem
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Remove the tiling restrictions in all libraries those used by
the Xe driver.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 lib/igt_draw.c     |  5 +----
 lib/igt_fb.c       | 17 ++++++++---------
 lib/intel_bufops.c | 13 +++++++++----
 3 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 6f3629949..a578560ac 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -677,14 +677,11 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 	int gen = intel_gen(devid);
 	int pitch;
 
-	if (tiling)
-		igt_require_i915(fd);
-
 	dst = create_buf(fd, cmd_data->bops, buf, tiling);
 	ibb = intel_bb_create(fd, PAGE_SIZE);
 	intel_bb_add_intel_buf(ibb, dst, true);
 
-	if (is_i915_device(fd) && HAS_4TILE(intel_get_drm_devid(fd))) {
+	if (HAS_4TILE(intel_get_drm_devid(fd))) {
 		int buf_height = buf->size / buf->stride;
 
 		switch (buf->bpp) {
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 9be312a28..579f25597 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -445,7 +445,7 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
 		*height_ret = 1;
 		break;
 	case I915_FORMAT_MOD_X_TILED:
-		igt_require_i915(fd);
+		igt_require_intel(fd);
 		if (intel_display_ver(intel_get_drm_devid(fd)) == 2) {
 			*width_ret = 128;
 			*height_ret = 16;
@@ -466,7 +466,7 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
 	case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS:
 	case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS:
 	case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC:
-		igt_require_i915(fd);
+		igt_require_intel(fd);
 		if (intel_display_ver(intel_get_drm_devid(fd)) == 2) {
 			*width_ret = 128;
 			*height_ret = 16;
@@ -480,7 +480,7 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
 		break;
 	case I915_FORMAT_MOD_Yf_TILED:
 	case I915_FORMAT_MOD_Yf_TILED_CCS:
-		igt_require_i915(fd);
+		igt_require_intel(fd);
 		switch (fb_bpp) {
 		case 8:
 			*width_ret = 64;
@@ -753,7 +753,7 @@ static uint32_t calc_plane_stride(struct igt_fb *fb, int plane)
 		(fb->plane_bpp[plane] / 8);
 
 	if (fb->modifier != DRM_FORMAT_MOD_LINEAR &&
-	    is_i915_device(fb->fd) &&
+	    is_intel_device(fb->fd) &&
 	    intel_display_ver(intel_get_drm_devid(fb->fd)) <= 3) {
 		uint32_t stride;
 
@@ -822,7 +822,7 @@ static uint32_t calc_plane_stride(struct igt_fb *fb, int plane)
 static uint64_t calc_plane_size(struct igt_fb *fb, int plane)
 {
 	if (fb->modifier != DRM_FORMAT_MOD_LINEAR &&
-	    is_i915_device(fb->fd) &&
+	    is_intel_device(fb->fd) &&
 	    intel_display_ver(intel_get_drm_devid(fb->fd)) <= 3) {
 		uint64_t size = (uint64_t) fb->strides[plane] *
 			fb->plane_height[plane];
@@ -899,7 +899,7 @@ static unsigned int get_plane_alignment(struct igt_fb *fb, int color_plane)
 	unsigned int tile_row_size;
 	unsigned int alignment;
 
-	if (!(is_i915_device(fb->fd) &&
+	if (!(is_intel_device(fb->fd) &&
 	      is_gen12_ccs_modifier(fb->modifier) &&
 	      is_yuv_semiplanar_plane(fb, color_plane)))
 		return 0;
@@ -2472,7 +2472,7 @@ static bool fast_blit_ok(const struct igt_fb *fb)
 
 static bool blitter_ok(const struct igt_fb *fb)
 {
-	if (!is_i915_device(fb->fd))
+	if (!is_intel_device(fb->fd))
 		return false;
 
 	if (is_ccs_modifier(fb->modifier))
@@ -2506,12 +2506,11 @@ static bool blitter_ok(const struct igt_fb *fb)
 
 static bool use_enginecopy(const struct igt_fb *fb)
 {
-	if (!is_xe_device(fb->fd) && blitter_ok(fb))
+	if (blitter_ok(fb))
 		return false;
 
 	return fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
 	       is_ccs_modifier(fb->modifier) ||
-	       (is_xe_device(fb->fd) && fb->modifier == DRM_FORMAT_MOD_LINEAR) ||
 	       (is_i915_device(fb->fd) && !gem_has_mappable_ggtt(fb->fd));
 }
 
diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 524757933..2c91adb88 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -927,7 +927,8 @@ static void __intel_buf_init(struct buf_ops *bops,
 	/* Store gem bo size */
 	buf->bo_size = size;
 
-	set_hw_tiled(bops, buf);
+	if (bops->driver == INTEL_DRIVER_I915)
+		set_hw_tiled(bops, buf);
 }
 
 /**
@@ -1502,14 +1503,18 @@ static struct buf_ops *__buf_ops_create(int fd, bool check_idempotency)
 		  bops->intel_gen, bops->supported_tiles,
 		  bops->driver == INTEL_DRIVER_I915 ? "i915" : "xe");
 
-	/* No tiling support in XE. */
 	if (bops->driver == INTEL_DRIVER_XE) {
-		bops->supported_hw_tiles = TILE_NONE;
-
 		bops->linear_to_x = copy_linear_to_x;
 		bops->x_to_linear = copy_x_to_linear;
 		bops->linear_to_y = copy_linear_to_y;
 		bops->y_to_linear = copy_y_to_linear;
+		bops->linear_to_tile4 = copy_linear_to_tile4;
+		bops->tile4_to_linear = copy_tile4_to_linear;
+
+		bops->linear_to_yf = NULL;
+		bops->yf_to_linear = NULL;
+		bops->linear_to_ys = NULL;
+		bops->ys_to_linear = NULL;
 
 		return bops;
 	}
-- 
2.40.0

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

* [igt-dev] [i-g-t 02/18] lib/igt_fb: Intel bops & ibb is mandatory for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 01/18] lib: Add tiling support for XE Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 03/18] tests/kms_cursor_edge_walk: Fix intel specific checks Bhanuprakash Modem
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

As XE supports rendercopy only, make sure bops & ibb is created
to use the rendercopy function.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 lib/igt_fb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 579f25597..0e23e23a9 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2847,7 +2847,8 @@ static void setup_linear_mapping(struct fb_blit_upload *blit)
 	struct igt_fb *fb = blit->fb;
 	struct fb_blit_linear *linear = &blit->linear;
 
-	if (!igt_vc4_is_tiled(fb->modifier) && use_enginecopy(fb)) {
+	if (is_xe_device(fd) ||
+	    (!igt_vc4_is_tiled(fb->modifier) && use_enginecopy(fb))) {
 		blit->bops = buf_ops_create(fd);
 		blit->ibb = intel_bb_create(fd, 4096);
 	}
-- 
2.40.0

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

* [igt-dev] [i-g-t 03/18] tests/kms_cursor_edge_walk: Fix intel specific checks
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 01/18] lib: Add tiling support for XE Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 02/18] lib/igt_fb: Intel bops & ibb is mandatory " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 04/18] tests/kms_getfb: Extended ccs tests to support XE Bhanuprakash Modem
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Use the correct helper to check for the intel hardware.
s/is_i915_device/is_intel_device/

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_cursor_edge_walk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_cursor_edge_walk.c b/tests/kms_cursor_edge_walk.c
index 5f423a18f..9ebc8d590 100644
--- a/tests/kms_cursor_edge_walk.c
+++ b/tests/kms_cursor_edge_walk.c
@@ -335,7 +335,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 
 		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
 
-		if (is_i915_device(data.drm_fd))
+		if (is_intel_device(data.drm_fd))
 			data.devid = intel_get_drm_devid(data.drm_fd);
 
 		ret = drmGetCap(data.drm_fd, DRM_CAP_CURSOR_WIDTH, &max_curw);
-- 
2.40.0

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

* [igt-dev] [i-g-t 04/18] tests/kms_getfb: Extended ccs tests to support XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (2 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 03/18] tests/kms_cursor_edge_walk: Fix intel specific checks Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 05/18] tests/kms_addfb_basic: Add tiling support for XE Bhanuprakash Modem
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Add support for ccs tests work on XE driver.

Fixes: 5fd20e72a (tests/kms_getfb: Add XE support)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_getfb.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/kms_getfb.c b/tests/kms_getfb.c
index f44f42551..00df86929 100644
--- a/tests/kms_getfb.c
+++ b/tests/kms_getfb.c
@@ -43,6 +43,7 @@
 #include "i915/gem_create.h"
 #include "igt_device.h"
 #include "xe/xe_query.h"
+#include "xe/xe_ioctl.h"
 
 IGT_TEST_DESCRIPTION("Tests GETFB and GETFB2 ioctls.");
 
@@ -140,7 +141,10 @@ static void get_ccs_fb(int fd, struct drm_mode_fb_cmd2 *ret)
 		size += add.pitches[1] * ALIGN(ALIGN(add.height, 16) / 16, 32);
 	}
 
-	add.handles[0] = gem_buffer_create_fb_obj(fd, size);
+	if (is_i915_device(fd))
+		add.handles[0] = gem_buffer_create_fb_obj(fd, size);
+	else
+		add.handles[0] = xe_bo_create_flags(fd, 0, size, vram_if_possible(fd, 0));
 	igt_require(add.handles[0] != 0);
 
 	if (!HAS_FLATCCS(devid))
@@ -270,7 +274,7 @@ static void test_duplicate_handles(int fd)
 		struct drm_mode_fb_cmd2 add_ccs = { };
 		struct drm_mode_fb_cmd get = { };
 
-		igt_require_i915(fd);
+		igt_require_intel(fd);
 		igt_require_f(!HAS_FLATCCS(intel_get_drm_devid(fd)),
 			      "skip because flat ccs has only one buffer.\n");
 
@@ -345,7 +349,7 @@ static void test_getfb2(int fd)
 		struct drm_mode_fb_cmd2 get = { };
 		int i;
 
-		igt_require_i915(fd);
+		igt_require_intel(fd);
 		get_ccs_fb(fd, &add_ccs);
 		igt_require(add_ccs.fb_id != 0);
 		get.fb_id = add_ccs.fb_id;
-- 
2.40.0

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

* [igt-dev] [i-g-t 05/18] tests/kms_addfb_basic: Add tiling support for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (3 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 04/18] tests/kms_getfb: Extended ccs tests to support XE Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 06/18] tests/kms_plane: " Bhanuprakash Modem
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Remove the tiling restrictions in Xe specific tests

8c3b02be3 (tests/kms_addfb_basic: Add XE support)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_addfb_basic.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index e375f3ad2..426e72c3c 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -391,7 +391,7 @@ static void tiling_tests(int fd)
 
 	igt_subtest_group {
 		igt_fixture {
-			igt_require_i915(fd);
+			igt_require_intel(fd);
 			tiled_x_bo = igt_create_bo_with_dimensions(fd, 1024, 1024,
 				DRM_FORMAT_XRGB8888, I915_FORMAT_MOD_X_TILED,
 				1024*4, NULL, NULL, NULL);
@@ -410,7 +410,8 @@ static void tiling_tests(int fd)
 		f.pitches[0] = 1024*4;
 		igt_describe("Check if addfb2 and rmfb call works for basic x-tiling test");
 		igt_subtest("basic-x-tiled-legacy") {
-			igt_require(gem_available_fences(fd) > 0);
+			if (is_i915_device(fd))
+				igt_require(gem_available_fences(fd) > 0);
 			f.handles[0] = tiled_x_bo;
 
 			do_ioctl(fd, DRM_IOCTL_MODE_ADDFB2, &f);
@@ -420,6 +421,7 @@ static void tiling_tests(int fd)
 
 		igt_describe("Check if addfb2 call works for x and y tiling");
 		igt_subtest("framebuffer-vs-set-tiling") {
+			igt_require_i915(fd);
 			igt_require(gem_available_fences(fd) > 0);
 			f.handles[0] = gem_bo;
 
@@ -434,6 +436,7 @@ static void tiling_tests(int fd)
 		igt_describe("Test that addfb2 call fails correctly for pitches mismatch");
 			f.pitches[0] = 512*4;
 		igt_subtest("tile-pitch-mismatch") {
+			igt_require_i915(fd);
 			igt_require(gem_available_fences(fd) > 0);
 			f.handles[0] = tiled_x_bo;
 
@@ -443,8 +446,12 @@ static void tiling_tests(int fd)
 		igt_describe("Test that addfb2 call fails correctly for basic y-tiling test");
 		f.pitches[0] = 1024*4;
 		igt_subtest("basic-y-tiled-legacy") {
-			igt_require(!gem_has_lmem(fd));
-			igt_require(gem_available_fences(fd) > 0);
+			if (is_i915_device(fd)) {
+				igt_require(!gem_has_lmem(fd));
+				igt_require(gem_available_fences(fd) > 0);
+			} else {
+				igt_require(!xe_has_vram(fd));
+			}
 			f.handles[0] = tiled_y_bo;
 
 			do_ioctl_err(fd, DRM_IOCTL_MODE_ADDFB2, &f, EINVAL);
@@ -998,7 +1005,7 @@ igt_main
 		size_tests(fd);
 
 		igt_fixture
-			igt_require_i915(fd);
+			igt_require_intel(fd);
 
 		addfb25_ytile(fd);
 
-- 
2.40.0

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

* [igt-dev] [i-g-t 06/18] tests/kms_plane: Add tiling support for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (4 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 05/18] tests/kms_addfb_basic: Add tiling support for XE Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 07/18] tests/kms_plane_lowres: " Bhanuprakash Modem
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Remove the tiling restrictions in Xe specific tests

Fixes: 2b9637086 (tests/kms_plane: Add XE support)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_plane.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index dfc6a8c57..106264306 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -1003,10 +1003,6 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
 			.modifier = plane->modifiers[i],
 		};
 
-		if (is_xe_device(data->drm_fd) &&
-		    f.modifier != DRM_FORMAT_MOD_LINEAR)
-			continue;
-
 		if (f.format == ref.format &&
 		    f.modifier == ref.modifier)
 			continue;
-- 
2.40.0

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

* [igt-dev] [i-g-t 07/18] tests/kms_plane_lowres: Add tiling support for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (5 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 06/18] tests/kms_plane: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 08/18] tests/kms_plane_scaling: " Bhanuprakash Modem
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Remove the tiling restrictions in Xe specific tests

Fixes: 129983d07 (tests/kms_plane_lowers: Add XE support)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_plane_lowres.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index db9f5a54c..e8739d91b 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -269,9 +269,6 @@ static void run_test(data_t *data, uint64_t modifier)
 	if(!igt_display_has_format_mod(&data->display, DRM_FORMAT_XRGB8888, modifier))
 		return;
 
-	if (is_xe_device(data->drm_fd) && modifier != DRM_FORMAT_MOD_LINEAR)
-		return;
-
 	for_each_pipe(&data->display, pipe) {
 		for_each_valid_output_on_pipe(&data->display, pipe, output) {
 			data->pipe = pipe;
-- 
2.40.0

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

* [igt-dev] [i-g-t 08/18] tests/kms_plane_scaling: Add tiling support for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (6 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 07/18] tests/kms_plane_lowres: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 09/18] tests/kms_rotation_crc: " Bhanuprakash Modem
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Remove the tiling restrictions in Xe specific tests

Fixes: 28bc56a8b (tests/kms_plane_scaling: Add XE support)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_plane_scaling.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 77bb905b4..1bbc1e009 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -545,10 +545,6 @@ static void test_scaler_with_modifier_pipe(data_t *d,
 		for (int i = 0; i < ARRAY_SIZE(modifiers); i++) {
 			uint64_t modifier = modifiers[i];
 
-			if (is_xe_device(d->drm_fd) &&
-			    modifier != DRM_FORMAT_MOD_LINEAR)
-				continue;
-
 			if (igt_plane_has_format_mod(plane, format, modifier))
 				check_scaling_pipe_plane_rot(d, plane,
 							     format, modifier,
-- 
2.40.0

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

* [igt-dev] [i-g-t 09/18] tests/kms_rotation_crc: Add tiling support for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (7 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 08/18] tests/kms_plane_scaling: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 10/18] tests/i915/kms_big_fb: " Bhanuprakash Modem
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Remove the tiling restrictions in Xe specific tests

Fixes: e1d5b831e (tests/kms_rotation_crc: Add XE support)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_rotation_crc.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 0a22cc225..d4a8df928 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -853,10 +853,6 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
 		igt_pipe_crc_start(data->pipe_crc);
 
 		for (i = 0; i < ARRAY_SIZE(planeconfigs); i++) {
-			if (is_xe_device(data->gfx_fd) &&
-			    planeconfigs[i].modifier != DRM_FORMAT_MOD_LINEAR)
-				continue;
-
 			p[0].fbinfo = &planeconfigs[i];
 			pointlocation(data, p, mode, 0);
 
@@ -1218,7 +1214,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 	igt_describe("Tiling and Rotation test for gen 10+ for primary plane");
 	for (reflect_x = reflect_x_subtests; reflect_x->modifier; reflect_x++) {
 		igt_fixture
-			igt_require_i915(data.gfx_fd);
+			igt_require_intel(data.gfx_fd);
 
 		igt_subtest_f("primary-%s-reflect-x-%s",
 			      modifier_test_str(reflect_x->modifier),
@@ -1279,7 +1275,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 		enum pipe pipe;
 		igt_output_t *output;
 
-		igt_require_i915(data.gfx_fd);
+		igt_require_intel(data.gfx_fd);
 		igt_display_require_output(&data.display);
 
 		for_each_pipe_with_valid_output(&data.display, pipe, output) {
-- 
2.40.0

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

* [igt-dev] [i-g-t 10/18] tests/i915/kms_big_fb: Add tiling support for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (8 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 09/18] tests/kms_rotation_crc: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 11/18] tests/i915/kms_draw_crc: " Bhanuprakash Modem
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Remove the tiling restrictions in Xe specific tests

Fixes: 34168d915 (tests/i915/kms_big_fb: Add XE support)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/i915/kms_big_fb.c | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/tests/i915/kms_big_fb.c b/tests/i915/kms_big_fb.c
index c120a14a6..34e6e9c46 100644
--- a/tests/i915/kms_big_fb.c
+++ b/tests/i915/kms_big_fb.c
@@ -928,10 +928,6 @@ igt_main
 	for (int i = 1; i < ARRAY_SIZE(modifiers); i++) {
 		igt_subtest_f("%s-addfb-size-overflow",
 			      modifiers[i].name) {
-			/* No tiling support in XE. */
-			igt_skip_on(is_xe_device(data.drm_fd) &&
-				    modifiers[i].modifier != DRM_FORMAT_MOD_LINEAR);
-
 			data.modifier = modifiers[i].modifier;
 			test_size_overflow(&data);
 		}
@@ -941,10 +937,6 @@ igt_main
 	for (int i = 1; i < ARRAY_SIZE(modifiers); i++) {
 		igt_subtest_f("%s-addfb-size-offset-overflow",
 			      modifiers[i].name) {
-			/* No tiling support in XE. */
-			igt_skip_on(is_xe_device(data.drm_fd) &&
-				    modifiers[i].modifier != DRM_FORMAT_MOD_LINEAR);
-
 			data.modifier = modifiers[i].modifier;
 			test_size_offset_overflow(&data);
 		}
@@ -953,10 +945,6 @@ igt_main
 	igt_describe("Sanity check if addfb ioctl works correctly for given size and strides of fb");
 	for (int i = 0; i < ARRAY_SIZE(modifiers); i++) {
 		igt_subtest_f("%s-addfb", modifiers[i].name) {
-			/* No tiling support in XE. */
-			igt_skip_on(is_xe_device(data.drm_fd) &&
-				    modifiers[i].modifier != DRM_FORMAT_MOD_LINEAR);
-
 			data.modifier = modifiers[i].modifier;
 			test_addfb(&data);
 		}
@@ -974,13 +962,8 @@ igt_main
 				igt_describe("Sanity check if addfb ioctl works correctly for given "
 						"combination of modifier formats and rotation");
 				igt_subtest_f("%s-%dbpp-rotate-%d", modifiers[i].name,
-					      formats[j].bpp, rotations[k].angle) {
-					/* No tiling support in XE. */
-					igt_skip_on(is_xe_device(data.drm_fd) &&
-						    data.modifier != DRM_FORMAT_MOD_LINEAR);
-
+					      formats[j].bpp, rotations[k].angle)
 					test_scanout(&data);
-				}
 			}
 
 			igt_fixture
@@ -1022,10 +1005,6 @@ igt_main
 						igt_require(intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 5);
 						data.max_hw_fb_width = min(data.hw_stride / (formats[j].bpp >> 3), data.max_fb_width);
 
-						/* No tiling support in XE. */
-						igt_skip_on(is_xe_device(data.drm_fd) &&
-							    modifiers[i].modifier != DRM_FORMAT_MOD_LINEAR);
-
 						test_scanout(&data);
 					}
 
-- 
2.40.0

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

* [igt-dev] [i-g-t 11/18] tests/i915/kms_draw_crc: Add tiling support for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (9 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 10/18] tests/i915/kms_big_fb: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 12/18] tests/i915/kms_flip_scaled_crc: " Bhanuprakash Modem
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Remove the tiling restrictions in Xe specific tests

f6d0bacc0 (tests/i915/kms_draw_crc: Add XE support)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/i915/kms_draw_crc.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/tests/i915/kms_draw_crc.c b/tests/i915/kms_draw_crc.c
index db6d71f2e..137ffeb5c 100644
--- a/tests/i915/kms_draw_crc.c
+++ b/tests/i915/kms_draw_crc.c
@@ -295,10 +295,6 @@ igt_main
 			for (modifier_idx = 0; modifier_idx < ARRAY_SIZE(modifiers); modifier_idx++) {
 				modifier = modifiers[modifier_idx];
 
-				/* No tiling support in XE. */
-				if (is_xe_device(drm_fd) && modifier != DRM_FORMAT_MOD_LINEAR)
-					continue;
-
 				for (format_idx = 0; format_idx < ARRAY_SIZE(formats); format_idx++) {
 					if (!igt_display_has_format_mod(&display, formats[format_idx], modifier))
 						continue;
-- 
2.40.0

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

* [igt-dev] [i-g-t 12/18] tests/i915/kms_flip_scaled_crc: Add tiling support for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (10 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 11/18] tests/i915/kms_draw_crc: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 13/18] tests/i915/kms_flip_tiling: " Bhanuprakash Modem
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Remove the tiling restrictions in Xe specific tests

Fixes: 113fc78d0 (tests/i915/kms_flip_scaled_crc: Add XE support)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/i915/kms_flip_scaled_crc.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tests/i915/kms_flip_scaled_crc.c b/tests/i915/kms_flip_scaled_crc.c
index f5dc430e3..63dc095e0 100644
--- a/tests/i915/kms_flip_scaled_crc.c
+++ b/tests/i915/kms_flip_scaled_crc.c
@@ -644,12 +644,6 @@ igt_main
 	for (int index = 0; index < ARRAY_SIZE(flip_scenario_test); index++) {
 		igt_describe(flip_scenario_test[index].describe);
 		igt_subtest_with_dynamic(flip_scenario_test[index].name) {
-			/* No tiling support in XE. */
-			if (is_xe_device(data.drm_fd) &&
-			    (flip_scenario_test[index].firstmodifier != DRM_FORMAT_MOD_LINEAR ||
-			     flip_scenario_test[index].secondmodifier != DRM_FORMAT_MOD_LINEAR))
-				continue;
-
 			free_fbs(&data);
 			for_each_pipe(&data.display, pipe) {
 				bool found = false;
-- 
2.40.0

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

* [igt-dev] [i-g-t 13/18] tests/i915/kms_flip_tiling: Add tiling support for XE
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (11 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 12/18] tests/i915/kms_flip_scaled_crc: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 14/18] tests/i915/kms_ccs: Add XE support Bhanuprakash Modem
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Remove the tiling restrictions in Xe specific tests

Fixes: 77e9c217f (tests/i915/kms_flip_tiling: Add XE support)
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/i915/kms_flip_tiling.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tests/i915/kms_flip_tiling.c b/tests/i915/kms_flip_tiling.c
index a22f12382..9c3d149c4 100644
--- a/tests/i915/kms_flip_tiling.c
+++ b/tests/i915/kms_flip_tiling.c
@@ -217,12 +217,6 @@ 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

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

* [igt-dev] [i-g-t 14/18] tests/i915/kms_ccs: Add XE support
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (12 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 13/18] tests/i915/kms_flip_tiling: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 15/18] tests/i915/kms_fb_coherancy: " Bhanuprakash Modem
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Add XE driver support for kms tests. This patch will add a support
to call the corresponding apis based on the driver (i915/xe)

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/i915/kms_ccs.c | 42 ++++++++++++++++++++++++++----------------
 1 file changed, 26 insertions(+), 16 deletions(-)

diff --git a/tests/i915/kms_ccs.c b/tests/i915/kms_ccs.c
index abe464b47..835752b1c 100644
--- a/tests/i915/kms_ccs.c
+++ b/tests/i915/kms_ccs.c
@@ -25,6 +25,7 @@
 #include "igt.h"
 
 #include "i915/gem_create.h"
+#include "xe/xe_ioctl.h"
 
 #define SDR_PLANE_BASE	3
 
@@ -186,17 +187,19 @@ static void check_ccs_plane(int drm_fd, igt_fb_t *fb, int plane)
 	ccs_size = fb->strides[plane] * fb->plane_height[plane];
 	igt_assert(ccs_size);
 
-	gem_set_domain(drm_fd, fb->gem_handle, I915_GEM_DOMAIN_CPU, 0);
-
-	map = gem_mmap__cpu(drm_fd, fb->gem_handle, 0, fb->size, PROT_READ);
-
+	if (is_i915_device(drm_fd)) {
+		gem_set_domain(drm_fd, fb->gem_handle, I915_GEM_DOMAIN_CPU, 0);
+		map = gem_mmap__cpu(drm_fd, fb->gem_handle, 0, fb->size, PROT_READ);
+	} else {
+		map = xe_bo_mmap_ext(drm_fd, fb->gem_handle, fb->size, PROT_READ);
+	}
 	ccs_size = fb->strides[plane] * fb->plane_height[plane];
 	ccs_p = map + fb->offsets[plane];
 	for (i = 0; i < ccs_size; i += sizeof(uint32_t))
 		if (*(uint32_t *)(ccs_p + i))
 			break;
 
-	munmap(map, fb->size);
+	igt_assert(gem_munmap(map, fb->size) == 0);
 
 	igt_assert_f(i < ccs_size,
 		     "CCS plane %d (for main plane %d) lacks compression meta-data\n",
@@ -212,9 +215,12 @@ static void check_ccs_cc_plane(int drm_fd, igt_fb_t *fb, int plane, const float
 	void *map;
 	uint32_t native_color;
 
-	gem_set_domain(drm_fd, fb->gem_handle, I915_GEM_DOMAIN_CPU, 0);
-
-	map = gem_mmap__cpu(drm_fd, fb->gem_handle, 0, fb->size, PROT_READ);
+	if (is_i915_device(drm_fd)) {
+		gem_set_domain(drm_fd, fb->gem_handle, I915_GEM_DOMAIN_CPU, 0);
+		map = gem_mmap__cpu(drm_fd, fb->gem_handle, 0, fb->size, PROT_READ);
+	} else {
+		map = xe_bo_mmap_ext(drm_fd, fb->gem_handle, fb->size, PROT_READ);
+	}
 	cc_p = map + fb->offsets[plane];
 
 	igt_assert(cc_color[0] == cc_p[0].f &&
@@ -229,7 +235,7 @@ static void check_ccs_cc_plane(int drm_fd, igt_fb_t *fb, int plane, const float
 
 	igt_assert(native_color == cc_p[4].d);
 
-	munmap(map, fb->size);
+	igt_assert(gem_munmap(map, fb->size) == 0);
 };
 
 static void check_all_ccs_planes(int drm_fd, igt_fb_t *fb, const float *cc_color, bool check_cc_plane)
@@ -251,14 +257,17 @@ static void fill_fb_random(int drm_fd, igt_fb_t *fb)
 	uint8_t *p;
 	int i;
 
-	gem_set_domain(drm_fd, fb->gem_handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
-
-	p = map = gem_mmap__cpu(drm_fd, fb->gem_handle, 0, fb->size, PROT_WRITE);
+	if (is_i915_device(drm_fd)) {
+		gem_set_domain(drm_fd, fb->gem_handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
+		p = map = gem_mmap__cpu(drm_fd, fb->gem_handle, 0, fb->size, PROT_WRITE);
+	} else {
+		p = map = xe_bo_mmap_ext(drm_fd, fb->gem_handle, fb->size, PROT_READ | PROT_WRITE);
+	}
 
 	for (i = 0; i < fb->size; i++)
 		p[i] = rand();
 
-	munmap(map, fb->size);
+	igt_assert(gem_munmap(map, fb->size) == 0);
 }
 
 static void test_bad_ccs_plane(data_t *data, int width, int height, int ccs_plane,
@@ -366,8 +375,9 @@ static void fast_clear_fb(int drm_fd, struct igt_fb *fb, const float *cc_color)
 	struct buf_ops *bops = buf_ops_create(drm_fd);
 	struct intel_buf *dst = igt_fb_create_intel_buf(drm_fd, bops, fb, "fast clear dst");
 
-	gem_set_domain(drm_fd, fb->gem_handle,
-		       I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
+	if (is_i915_device(drm_fd))
+		gem_set_domain(drm_fd, fb->gem_handle,
+			       I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
 
 	fast_clear(ibb, dst, 0, 0, fb->width, fb->height, cc_color);
 
@@ -687,7 +697,7 @@ igt_main_args("cs:", NULL, help_str, opt_handler, &data)
 	enum pipe pipe;
 
 	igt_fixture {
-		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
 
 		igt_require(intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 9);
 		kmstest_set_vt_graphics_mode();
-- 
2.40.0

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

* [igt-dev] [i-g-t 15/18] tests/i915/kms_fb_coherancy: Add XE support
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (13 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 14/18] tests/i915/kms_ccs: Add XE support Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 16/18] tests/i915/kms_fbcon_fbt: " Bhanuprakash Modem
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Add XE driver support for kms tests. This patch will add a support
to call the corresponding apis based on the driver (i915/xe)

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/i915/kms_fb_coherency.c | 43 +++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 20 deletions(-)

diff --git a/tests/i915/kms_fb_coherency.c b/tests/i915/kms_fb_coherency.c
index b530bf5dc..2bc3bb237 100644
--- a/tests/i915/kms_fb_coherency.c
+++ b/tests/i915/kms_fb_coherency.c
@@ -15,6 +15,7 @@
 #include <string.h>
 
 #include "igt.h"
+#include "xe/xe_ioctl.h"
 
 typedef struct {
 	int drm_fd;
@@ -90,7 +91,7 @@ static struct igt_fb *prepare_fb(data_t *data)
 			0, 0, fb->width, fb->height,
 			0, 0, fb->width << 16, fb->height << 16);
 
-	if (!gem_has_lmem(data->drm_fd)) {
+	if (is_i915_device(data->drm_fd) && !gem_has_lmem(data->drm_fd)) {
 		uint32_t caching;
 
 		/* make sure caching mode has become UC/WT */
@@ -159,7 +160,10 @@ static void test_mmap_offset_wc(data_t *data)
 
 	fb = prepare_fb(data);
 
-	buf = gem_mmap_offset__wc(data->drm_fd, fb->gem_handle, 0, fb->size, PROT_WRITE);
+	if (is_i915_device(data->drm_fd))
+		buf = gem_mmap_offset__wc(data->drm_fd, fb->gem_handle, 0, fb->size, PROT_WRITE);
+	else
+		buf = xe_bo_mmap_ext(data->drm_fd, fb->gem_handle, fb->size, PROT_WRITE);
 
 	check_buf_crc(data, buf, fb);
 }
@@ -225,7 +229,7 @@ igt_main
 	data_t data;
 
 	igt_fixture {
-		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
 
 		data.devid = intel_get_drm_devid(data.drm_fd);
 
@@ -245,39 +249,38 @@ igt_main
 	 *		mmapped with different mmap methods and different caching modes.
 	 */
 	igt_subtest_with_dynamic("memset-crc") {
-		if (gem_has_mappable_ggtt(data.drm_fd)) {
+		if (igt_draw_supports_method(data.drm_fd, IGT_DRAW_MMAP_GTT)) {
 			igt_dynamic("mmap-gtt")
 				test_mmap_gtt(&data);
 
 			cleanup_crtc(&data);
 		}
 
-		if (gem_mmap_offset__has_wc(data.drm_fd)) {
+		if (igt_draw_supports_method(data.drm_fd, IGT_DRAW_MMAP_WC)) {
 			igt_dynamic("mmap-offset-wc")
 				test_mmap_offset_wc(&data);
 
 			cleanup_crtc(&data);
 		}
 
-		if (gem_has_lmem(data.drm_fd)) {
-			igt_dynamic("mmap-offset-fixed")
-				test_mmap_offset_fixed(&data);
+		if (is_i915_device(data.drm_fd)) {
+			if (gem_has_lmem(data.drm_fd)) {
+				igt_dynamic("mmap-offset-fixed")
+					test_mmap_offset_fixed(&data);
+			} else if (gem_has_mmap_offset(data.drm_fd)) {
+				igt_dynamic("mmap-offset-uc")
+					test_mmap_offset_uc(&data);
+			}
 
 			cleanup_crtc(&data);
 
-		} else if (gem_has_mmap_offset(data.drm_fd)) {
-			igt_dynamic("mmap-offset-uc")
-				test_mmap_offset_uc(&data);
+			if (gem_has_legacy_mmap(data.drm_fd) &&
+			    gem_mmap__has_wc(data.drm_fd)) {
+				igt_dynamic("mmap-legacy-wc")
+					test_legacy_mmap_wc(&data);
 
-			cleanup_crtc(&data);
-		}
-
-		if (gem_has_legacy_mmap(data.drm_fd) &&
-		    gem_mmap__has_wc(data.drm_fd)) {
-			igt_dynamic("mmap-legacy-wc")
-				test_legacy_mmap_wc(&data);
-
-			cleanup_crtc(&data);
+				cleanup_crtc(&data);
+			}
 		}
 	}
 
-- 
2.40.0

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

* [igt-dev] [i-g-t 16/18] tests/i915/kms_fbcon_fbt: Add XE support
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (14 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 15/18] tests/i915/kms_fb_coherancy: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 11:58 ` [igt-dev] [i-g-t 17/18] tests/kms_async_flips: " Bhanuprakash Modem
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Add XE driver support for kms tests.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/i915/kms_fbcon_fbt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/kms_fbcon_fbt.c b/tests/i915/kms_fbcon_fbt.c
index 6c557dca7..2b8ae1763 100644
--- a/tests/i915/kms_fbcon_fbt.c
+++ b/tests/i915/kms_fbcon_fbt.c
@@ -378,7 +378,7 @@ static void setup_environment(struct drm_info *drm)
 {
 	int i;
 
-	drm->fd = drm_open_driver_master(DRIVER_INTEL);
+	drm->fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
 	igt_require(drm->fd >= 0);
 	drm->debugfs_fd = igt_debugfs_dir(drm->fd);
 	igt_require(drm->debugfs_fd >= 0);
-- 
2.40.0

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

* [igt-dev] [i-g-t 17/18] tests/kms_async_flips: Add XE support
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (15 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 16/18] tests/i915/kms_fbcon_fbt: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-07-19  3:01   ` Karthik B S
  2023-06-19 11:58 ` [igt-dev] [i-g-t 18/18] tests/kms_prime: " Bhanuprakash Modem
  2023-06-19 18:54 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add XE suppor for display tests Patchwork
  18 siblings, 1 reply; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Add XE driver support for kms tests.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_async_flips.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index 5cb797dec..9bea54027 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -229,7 +229,7 @@ static void test_async_flip(data_t *data)
 			 * in order to change the watermark levels as per the optimization. Hence the
 			 * subsequent async flips will actually do the asynchronous flips.
 			 */
-			if (is_i915_device(data->drm_fd)) {
+			if (is_intel_device(data->drm_fd)) {
 				uint32_t devid = intel_get_drm_devid(data->drm_fd);
 
 				if (IS_GEN9(devid) || IS_GEN10(devid) || AT_LEAST_GEN(devid, 12)) {
@@ -600,13 +600,7 @@ igt_main
 	int i;
 
 	igt_fixture {
-		/*
-		 * FIXME: As of now, Async flips won't work with linear buffers
-		 * on Intel hardware, hence don't run tests on XE device as XE
-		 * won't support tiling.
-		 * Once Kernel changes got landed, please update this logic.
-		 */
-		data.drm_fd = drm_open_driver_master(DRIVER_ANY & ~DRIVER_XE);
+		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
 		kmstest_set_vt_graphics_mode();
 		igt_display_require(&data.display, data.drm_fd);
 		igt_display_require_output(&data.display);
@@ -654,7 +648,7 @@ igt_main
 	igt_describe("Negative case to verify if changes in fb are rejected from kernel as expected");
 	igt_subtest_with_dynamic("invalid-async-flip") {
 		/* TODO: support more vendors */
-		igt_require(is_i915_device(data.drm_fd));
+		igt_require(is_intel_device(data.drm_fd));
 		igt_require(igt_display_has_format_mod(&data.display, DRM_FORMAT_XRGB8888,
 						       I915_FORMAT_MOD_Y_TILED));
 
-- 
2.40.0

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

* [igt-dev] [i-g-t 18/18] tests/kms_prime: Add XE support
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (16 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 17/18] tests/kms_async_flips: " Bhanuprakash Modem
@ 2023-06-19 11:58 ` Bhanuprakash Modem
  2023-06-19 18:54 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add XE suppor for display tests Patchwork
  18 siblings, 0 replies; 21+ messages in thread
From: Bhanuprakash Modem @ 2023-06-19 11:58 UTC (permalink / raw)
  To: igt-dev

Add XE driver support for kms tests.

V2: - Use rendercopy method for both i915 & xe
    - Minor cleanup
V3: - New patch for cleanup & rendercopy

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_prime.c | 230 ++++++++++++++++++++++++++++++++++++----------
 1 file changed, 182 insertions(+), 48 deletions(-)

diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index dd5ab993e..4442104a0 100644
--- a/tests/kms_prime.c
+++ b/tests/kms_prime.c
@@ -27,9 +27,12 @@
 #include "igt_sysfs.h"
 #include <fcntl.h>
 
+#include <limits.h>
 #include <sys/ioctl.h>
 #include <sys/poll.h>
 #include <time.h>
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
 
 #define KMS_HELPER "/sys/module/drm_kms_helper/parameters/"
 #define KMS_POLL_DISABLE 0
@@ -112,7 +115,29 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
 	scratch->height = mode->vdisplay;
 	scratch->bpp = 32;
 
-	if (!is_i915_device(exporter_fd)) {
+	if (is_intel_device(exporter_fd)) {
+		igt_calc_fb_size(exporter_fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888,
+				 DRM_FORMAT_MOD_LINEAR, &scratch->size, &scratch->pitch);
+
+		if (is_i915_device(exporter_fd)) {
+			if (gem_has_lmem(exporter_fd))
+				scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
+								       REGION_LMEM(0), REGION_SMEM);
+			else
+				scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
+								       REGION_SMEM);
+
+			ptr = gem_mmap__device_coherent(exporter_fd, scratch->handle, 0,
+							scratch->size, PROT_WRITE | PROT_READ);
+		} else {
+			scratch->handle = xe_bo_create_flags(exporter_fd, 0,
+							     ALIGN(scratch->size, xe_get_default_alignment(exporter_fd)),
+							     vram_if_possible(exporter_fd, 0));
+
+			ptr = xe_bo_mmap_ext(exporter_fd, scratch->handle,
+					     scratch->size, PROT_READ | PROT_WRITE);
+		}
+	} else {
 		scratch->handle = kmstest_dumb_create(exporter_fd,
 						      ALIGN(scratch->width, 256),
 						      scratch->height, scratch->bpp,
@@ -120,18 +145,6 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
 
 		ptr = kmstest_dumb_map_buffer(exporter_fd, scratch->handle,
 					      scratch->size, PROT_WRITE);
-	} else {
-		igt_calc_fb_size(exporter_fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888,
-				 DRM_FORMAT_MOD_LINEAR, &scratch->size, &scratch->pitch);
-		if (gem_has_lmem(exporter_fd))
-			scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
-								       REGION_LMEM(0), REGION_SMEM);
-		else
-			scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
-								       REGION_SMEM);
-
-		ptr = gem_mmap__device_coherent(exporter_fd, scratch->handle, 0, scratch->size,
-						PROT_WRITE | PROT_READ);
 	}
 
 	for (size_t idx = 0; idx < scratch->size / sizeof(*ptr); ++idx)
@@ -150,35 +163,71 @@ static void prepare_fb(int importer_fd, struct dumb_bo *scratch, struct igt_fb *
 		    color_encoding, color_range);
 }
 
+static struct intel_buf * create_buf(int fd, struct buf_ops *bops, int width,
+				     int height, uint64_t size, uint32_t gem_handle)
+{
+	struct intel_buf *buf;
+	uint32_t name, handle;
+	uint64_t region = (buf_ops_get_driver(bops) == INTEL_DRIVER_XE) ?
+						vram_if_possible(fd, 0) : -1;
+
+	name = gem_flink(fd, gem_handle);
+	handle = gem_open(fd, name);
+
+	buf = intel_buf_create_full(bops, handle,
+				    width, height, 32, 0,
+				    I915_TILING_NONE, 0,
+				    size, 0,
+				    region);
+
+	/* Make sure we close handle on destroy path */
+	intel_buf_set_ownership(buf, true);
+	return buf;
+}
+
 static void import_fb(int importer_fd, struct igt_fb *fb,
 		      int dmabuf_fd, uint32_t pitch)
 {
 	uint32_t offsets[4] = {}, pitches[4] = {}, handles[4] = {}, temp_buf_handle;
 	int ret;
 
-	if (is_i915_device(importer_fd)) {
-		if (gem_has_lmem(importer_fd)) {
-			uint64_t ahnd = get_reloc_ahnd(importer_fd, 0);
-			uint64_t fb_size = 0;
-
-			igt_info("Importer is dGPU\n");
-			temp_buf_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
-			igt_assert(temp_buf_handle > 0);
-			fb->gem_handle = igt_create_bo_with_dimensions(importer_fd, fb->width, fb->height,
-								       fb->drm_format, fb->modifier, pitch, &fb_size, NULL, NULL);
-			igt_assert(fb->gem_handle > 0);
-
-			igt_blitter_src_copy(importer_fd, ahnd, 0, NULL, temp_buf_handle,
-					     0, pitch, fb->modifier, 0, 0, fb_size, fb->width,
-					     fb->height, 32, fb->gem_handle, 0, pitch, fb->modifier,
-					     0, 0, fb_size);
-
-			gem_sync(importer_fd, fb->gem_handle);
-			gem_close(importer_fd, temp_buf_handle);
-			put_ahnd(ahnd);
+	if ((is_i915_device(importer_fd) && gem_has_lmem(importer_fd)) ||
+	    (is_xe_device(importer_fd) && xe_has_vram(importer_fd)))  {
+		uint32_t devid = intel_get_drm_devid(importer_fd);
+		struct buf_ops *bops = buf_ops_create(importer_fd);
+		igt_render_copyfunc_t rendercopy = igt_get_render_copyfunc(devid);
+		struct intel_bb *ibb = intel_bb_create(importer_fd, 4096);
+		struct intel_buf *src, *dst;
+		uint32_t *ptr;
+		uint64_t fb_size = 0;
+
+		igt_info("Importer is dGPU\n");
+		temp_buf_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
+		igt_assert(temp_buf_handle > 0);
+		fb->gem_handle = igt_create_bo_with_dimensions(importer_fd, fb->width, fb->height,
+							       fb->drm_format, fb->modifier, pitch, &fb_size, NULL, NULL);
+		igt_assert(fb->gem_handle > 0);
+
+		if (is_i915_device(importer_fd)) {
+			ptr = gem_mmap__device_coherent(importer_fd, temp_buf_handle, 0,
+							ALIGN(fb_size, 4096),
+							PROT_READ | PROT_WRITE);
 		} else {
-			fb->gem_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
+			ptr = xe_bo_mmap_ext(importer_fd, temp_buf_handle,
+					     ALIGN(fb_size, xe_get_default_alignment(importer_fd)),
+					     PROT_READ | PROT_WRITE);
 		}
+
+		src = create_buf(importer_fd, bops, fb->width, fb->height, fb_size, temp_buf_handle);
+		dst = create_buf(importer_fd, bops, fb->width, fb->height, fb_size, fb->gem_handle);
+		rendercopy(ibb, src, 0, 0, fb->width, fb->height, dst, 0, 0);
+
+		igt_assert(gem_munmap(ptr, fb_size) == 0);
+		intel_bb_destroy(ibb);
+		intel_buf_destroy(src);
+		intel_buf_destroy(dst);
+		buf_ops_destroy(bops);
+		gem_close(importer_fd, temp_buf_handle);
 	} else {
 		fb->gem_handle = prime_fd_to_handle(importer_fd, dmabuf_fd);
 	}
@@ -330,12 +379,6 @@ static bool has_connected_output(int drm_fd)
 	return false;
 }
 
-static void validate_d3_hot(int drm_fd)
-{
-	igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "GPU idle: yes"));
-	igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "PCI device power state: D3hot [3]"));
-}
-
 static void kms_poll_state_restore(void)
 {
 	int sysfs_fd;
@@ -357,6 +400,88 @@ static void kms_poll_disable(void)
 	close(sysfs_fd);
 }
 
+static bool runtime_usage_available(struct pci_device *pci)
+{
+	char name[PATH_MAX];
+	snprintf(name, PATH_MAX, "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/runtime_usage",
+		 pci->domain, pci->bus, pci->dev, pci->func);
+	return access(name, F_OK) == 0;
+}
+
+static bool in_d3_hot(struct pci_device *pci)
+{
+	uint16_t val;
+
+	/* We need to wait for the autosuspend to kick in before we can check */
+	if (!igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED))
+		return false;
+
+	if (runtime_usage_available(pci) &&
+	    igt_pm_get_runtime_usage(pci) != 0)
+		return false;
+
+	igt_assert_eq(pci_device_cfg_read_u16(pci, &val, 0xd4), 0);
+
+	return (val & 0x3) == 0x3;
+}
+
+static void validate_d3_hot(int drm_fd, struct pci_device *pci)
+{
+	if (is_i915_device(drm_fd)) {
+		igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "GPU idle: yes"));
+		igt_assert(igt_debugfs_search(drm_fd, "i915_runtime_pm_status", "PCI device power state: D3hot [3]"));
+	} else {
+		igt_assert(in_d3_hot(pci));
+	}
+}
+
+static int open_d3_allowed(struct pci_device *pci)
+{
+	char name[PATH_MAX];
+	int fd;
+
+	snprintf(name, PATH_MAX, "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/d3cold_allowed",
+		 pci->domain, pci->bus, pci->dev, pci->func);
+
+	fd = open(name, O_RDWR);
+	igt_assert_f(fd >= 0, "Can't open %s\n", name);
+
+	return fd;
+}
+
+static void get_d3_allowed(struct pci_device *pci, char *d3_allowed)
+{
+	int fd = open_d3_allowed(pci);
+
+	igt_assert(read(fd, d3_allowed, 2));
+	close(fd);
+}
+
+static void set_d3_allowed(struct pci_device *pci, const char *d3_allowed)
+{
+	int fd = open_d3_allowed(pci);
+
+	igt_assert(write(fd, d3_allowed, 2));
+	close(fd);
+}
+
+static void setup_d3_hot(int fd, struct pci_device *pci)
+{
+	if (is_xe_device(fd)) {
+		igt_assert(igt_setup_runtime_pm(fd));
+
+		set_d3_allowed(pci, "0\n");
+
+		igt_assert(in_d3_hot(pci));
+	} else {
+		igt_set_timeout(10, "Wait for dGPU to enter D3hot before starting the subtest");
+		while (!igt_debugfs_search(fd,
+			"i915_runtime_pm_status",
+			"PCI device power state: D3hot [3]"));
+		igt_reset_timeout();
+	}
+}
+
 igt_main
 {
 	int first_fd = -1;
@@ -410,21 +535,28 @@ igt_main
 
 		igt_describe("Validate pci state of dGPU when dGPU is idle and  scanout is on iGPU");
 		igt_subtest("D3hot") {
-			igt_require_f(is_i915_device(second_fd_hybrid), "i915 device required\n");
-			igt_require_f(gem_has_lmem(second_fd_hybrid), "Second GPU is not dGPU\n");
+			char d3_allowed[2];
+			struct pci_device *pci;
+
+			igt_require_f(is_intel_device(second_fd_hybrid), "intel device required\n");
+			if (is_i915_device(second_fd_hybrid))
+				igt_require_f(gem_has_lmem(second_fd_hybrid), "Second GPU is not dGPU\n");
+			else
+				igt_require_f(xe_has_vram(second_fd_hybrid), "Second GPU is not dGPU\n");
 			igt_require_f(first_output, "No display connected to iGPU\n");
 			igt_require_f(!second_output, "Display connected to dGPU\n");
 
 			kms_poll_disable();
 
-			igt_set_timeout(10, "Wait for dGPU to enter D3hot before starting the subtest");
-			while (!igt_debugfs_search(second_fd_hybrid,
-			       "i915_runtime_pm_status",
-			       "PCI device power state: D3hot [3]"));
-			igt_reset_timeout();
+			pci = igt_device_get_pci_device(second_fd_hybrid);
+			get_d3_allowed(pci, d3_allowed);
+
+			setup_d3_hot(second_fd_hybrid, pci);
 
 			test_basic_modeset(first_fd);
-			validate_d3_hot(second_fd_hybrid);
+			validate_d3_hot(second_fd_hybrid, pci);
+
+			set_d3_allowed(pci, d3_allowed);
 		}
 
 		igt_fixture {
@@ -442,6 +574,8 @@ igt_main
 			igt_require(second_fd_vgem >= 0);
 			if (is_i915_device(first_fd))
 				igt_require(!gem_has_lmem(first_fd));
+			if (is_xe_device(first_fd))
+				igt_require(!xe_has_vram(first_fd));
 		}
 
 		igt_describe("Make a dumb color buffer, export to another device and"
-- 
2.40.0

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

* [igt-dev] ✗ Fi.CI.BAT: failure for Add XE suppor for display tests
  2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
                   ` (17 preceding siblings ...)
  2023-06-19 11:58 ` [igt-dev] [i-g-t 18/18] tests/kms_prime: " Bhanuprakash Modem
@ 2023-06-19 18:54 ` Patchwork
  18 siblings, 0 replies; 21+ messages in thread
From: Patchwork @ 2023-06-19 18:54 UTC (permalink / raw)
  To: Bhanuprakash Modem; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 11716 bytes --]

== Series Details ==

Series: Add XE suppor for display tests
URL   : https://patchwork.freedesktop.org/series/119525/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13289 -> IGTPW_9209
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_9209 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_9209, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/index.html

Participating hosts (41 -> 42)
------------------------------

  Additional (3): fi-tgl-1115g4 bat-dg1-8 fi-pnv-d510 
  Missing    (2): fi-kbl-soraka fi-snb-2520m 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_9209:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live@hangcheck:
    - fi-skl-guc:         [PASS][1] -> [DMESG-FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13289/fi-skl-guc/igt@i915_selftest@live@hangcheck.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-skl-guc/igt@i915_selftest@live@hangcheck.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@xe_compute@compute-square:
    - {bat-dg1-8}:        NOTRUN -> [SKIP][3] +2 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-dg1-8/igt@xe_compute@compute-square.html

  
Known issues
------------

  Here are the changes found in IGTPW_9209 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@debugfs_test@basic-hwmon:
    - bat-adlp-11:        NOTRUN -> [SKIP][4] ([i915#7456])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-adlp-11/igt@debugfs_test@basic-hwmon.html
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][5] ([i915#7456])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-tgl-1115g4/igt@debugfs_test@basic-hwmon.html

  * igt@gem_huc_copy@huc-copy:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][6] ([i915#2190])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-tgl-1115g4/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@parallel-random-engines:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][7] ([i915#4613]) +3 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-tgl-1115g4/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@gem_tiled_pread_basic:
    - bat-adlp-11:        NOTRUN -> [SKIP][8] ([i915#3282])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-adlp-11/igt@gem_tiled_pread_basic.html

  * igt@i915_pm_backlight@basic-brightness:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][9] ([i915#3546] / [i915#7561])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-tgl-1115g4/igt@i915_pm_backlight@basic-brightness.html

  * igt@i915_selftest@live@migrate:
    - bat-dg2-11:         [PASS][10] -> [DMESG-WARN][11] ([i915#7699])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13289/bat-dg2-11/igt@i915_selftest@live@migrate.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-dg2-11/igt@i915_selftest@live@migrate.html

  * igt@i915_selftest@live@slpc:
    - bat-rpls-1:         [PASS][12] -> [DMESG-WARN][13] ([i915#6367])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13289/bat-rpls-1/igt@i915_selftest@live@slpc.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-rpls-1/igt@i915_selftest@live@slpc.html

  * igt@i915_selftest@live@workarounds:
    - bat-mtlp-6:         [PASS][14] -> [DMESG-FAIL][15] ([i915#6763])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13289/bat-mtlp-6/igt@i915_selftest@live@workarounds.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-mtlp-6/igt@i915_selftest@live@workarounds.html

  * igt@i915_suspend@basic-s3-without-i915:
    - fi-tgl-1115g4:      NOTRUN -> [INCOMPLETE][16] ([i915#7443] / [i915#8102])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-tgl-1115g4/igt@i915_suspend@basic-s3-without-i915.html
    - bat-atsm-1:         NOTRUN -> [SKIP][17] ([i915#6645])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-atsm-1/igt@i915_suspend@basic-s3-without-i915.html

  * igt@kms_chamelium_frames@dp-crc-fast:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][18] ([i915#7828]) +7 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-tgl-1115g4/igt@kms_chamelium_frames@dp-crc-fast.html

  * igt@kms_chamelium_frames@hdmi-crc-fast:
    - bat-adlp-11:        NOTRUN -> [SKIP][19] ([i915#7828]) +7 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-adlp-11/igt@kms_chamelium_frames@hdmi-crc-fast.html

  * igt@kms_chamelium_hpd@common-hpd-after-suspend:
    - bat-atsm-1:         NOTRUN -> [SKIP][20] ([i915#6078])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-atsm-1/igt@kms_chamelium_hpd@common-hpd-after-suspend.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][21] ([i915#4103]) +1 similar issue
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-tgl-1115g4/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - bat-adlp-11:        NOTRUN -> [SKIP][22] ([i915#4103]) +1 similar issue
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-adlp-11/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@d-dp6:
    - bat-adlp-11:        NOTRUN -> [ABORT][23] ([i915#4423])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-adlp-11/igt@kms_flip@basic-flip-vs-wf_vblank@d-dp6.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][24] ([fdo#109285])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-tgl-1115g4/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_pipe_crc_basic@suspend-read-crc:
    - bat-atsm-1:         NOTRUN -> [SKIP][25] ([i915#1836])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-atsm-1/igt@kms_pipe_crc_basic@suspend-read-crc.html

  * igt@kms_psr@primary_page_flip:
    - fi-pnv-d510:        NOTRUN -> [SKIP][26] ([fdo#109271]) +37 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-pnv-d510/igt@kms_psr@primary_page_flip.html
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][27] ([fdo#110189]) +3 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-tgl-1115g4/igt@kms_psr@primary_page_flip.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][28] ([i915#3555] / [i915#4579])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-tgl-1115g4/igt@kms_setmode@basic-clone-single-crtc.html
    - fi-pnv-d510:        NOTRUN -> [SKIP][29] ([fdo#109271] / [i915#4579])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/fi-pnv-d510/igt@kms_setmode@basic-clone-single-crtc.html

  
#### Possible fixes ####

  * igt@core_auth@basic-auth:
    - bat-adlp-11:        [ABORT][30] ([i915#4423] / [i915#8011]) -> [PASS][31]
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13289/bat-adlp-11/igt@core_auth@basic-auth.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-adlp-11/igt@core_auth@basic-auth.html

  * igt@i915_module_load@load:
    - bat-adlp-11:        [DMESG-WARN][32] ([i915#4423]) -> [PASS][33]
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13289/bat-adlp-11/igt@i915_module_load@load.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-adlp-11/igt@i915_module_load@load.html

  * igt@i915_selftest@live@requests:
    - bat-mtlp-8:         [DMESG-FAIL][34] ([i915#8497]) -> [PASS][35]
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13289/bat-mtlp-8/igt@i915_selftest@live@requests.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-mtlp-8/igt@i915_selftest@live@requests.html

  * igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1:
    - bat-dg2-8:          [FAIL][36] ([i915#7932]) -> [PASS][37]
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13289/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1836]: https://gitlab.freedesktop.org/drm/intel/issues/1836
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
  [i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#6078]: https://gitlab.freedesktop.org/drm/intel/issues/6078
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
  [i915#6763]: https://gitlab.freedesktop.org/drm/intel/issues/6763
  [i915#7443]: https://gitlab.freedesktop.org/drm/intel/issues/7443
  [i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
  [i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
  [i915#8102]: https://gitlab.freedesktop.org/drm/intel/issues/8102
  [i915#8213]: https://gitlab.freedesktop.org/drm/intel/issues/8213
  [i915#8497]: https://gitlab.freedesktop.org/drm/intel/issues/8497
  [i915#8513]: https://gitlab.freedesktop.org/drm/intel/issues/8513
  [i915#8676]: https://gitlab.freedesktop.org/drm/intel/issues/8676
  [i915#8678]: https://gitlab.freedesktop.org/drm/intel/issues/8678
  [i915#8679]: https://gitlab.freedesktop.org/drm/intel/issues/8679


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_7338 -> IGTPW_9209

  CI-20190529: 20190529
  CI_DRM_13289: 32e260cd0d16cee6f33e747679f168d63ea54bf6 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_9209: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/index.html
  IGT_7338: 4f2f4b61eafc613ec58fd07bb11be7072b41c6bf @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9209/index.html

[-- Attachment #2: Type: text/html, Size: 12843 bytes --]

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

* Re: [igt-dev] [i-g-t 17/18] tests/kms_async_flips: Add XE support
  2023-06-19 11:58 ` [igt-dev] [i-g-t 17/18] tests/kms_async_flips: " Bhanuprakash Modem
@ 2023-07-19  3:01   ` Karthik B S
  0 siblings, 0 replies; 21+ messages in thread
From: Karthik B S @ 2023-07-19  3:01 UTC (permalink / raw)
  To: Bhanuprakash Modem, igt-dev


On 6/19/2023 5:28 PM, Bhanuprakash Modem wrote:
> Add XE driver support for kms tests.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> ---
>   tests/kms_async_flips.c | 12 +++---------
>   1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index 5cb797dec..9bea54027 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -229,7 +229,7 @@ static void test_async_flip(data_t *data)
>   			 * in order to change the watermark levels as per the optimization. Hence the
>   			 * subsequent async flips will actually do the asynchronous flips.
>   			 */
> -			if (is_i915_device(data->drm_fd)) {
> +			if (is_intel_device(data->drm_fd)) {
>   				uint32_t devid = intel_get_drm_devid(data->drm_fd);
>   
>   				if (IS_GEN9(devid) || IS_GEN10(devid) || AT_LEAST_GEN(devid, 12)) {
> @@ -600,13 +600,7 @@ igt_main
>   	int i;
>   
>   	igt_fixture {
> -		/*
> -		 * FIXME: As of now, Async flips won't work with linear buffers
> -		 * on Intel hardware, hence don't run tests on XE device as XE
> -		 * won't support tiling.
> -		 * Once Kernel changes got landed, please update this logic.
> -		 */
> -		data.drm_fd = drm_open_driver_master(DRIVER_ANY & ~DRIVER_XE);
> +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
>   		kmstest_set_vt_graphics_mode();
>   		igt_display_require(&data.display, data.drm_fd);
>   		igt_display_require_output(&data.display);
> @@ -654,7 +648,7 @@ igt_main
>   	igt_describe("Negative case to verify if changes in fb are rejected from kernel as expected");
>   	igt_subtest_with_dynamic("invalid-async-flip") {
>   		/* TODO: support more vendors */
> -		igt_require(is_i915_device(data.drm_fd));
> +		igt_require(is_intel_device(data.drm_fd));
>   		igt_require(igt_display_has_format_mod(&data.display, DRM_FORMAT_XRGB8888,
>   						       I915_FORMAT_MOD_Y_TILED));
>   

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

end of thread, other threads:[~2023-07-19  3:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-19 11:58 [igt-dev] [i-g-t 00/18] Add XE suppor for display tests Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 01/18] lib: Add tiling support for XE Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 02/18] lib/igt_fb: Intel bops & ibb is mandatory " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 03/18] tests/kms_cursor_edge_walk: Fix intel specific checks Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 04/18] tests/kms_getfb: Extended ccs tests to support XE Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 05/18] tests/kms_addfb_basic: Add tiling support for XE Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 06/18] tests/kms_plane: " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 07/18] tests/kms_plane_lowres: " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 08/18] tests/kms_plane_scaling: " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 09/18] tests/kms_rotation_crc: " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 10/18] tests/i915/kms_big_fb: " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 11/18] tests/i915/kms_draw_crc: " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 12/18] tests/i915/kms_flip_scaled_crc: " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 13/18] tests/i915/kms_flip_tiling: " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 14/18] tests/i915/kms_ccs: Add XE support Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 15/18] tests/i915/kms_fb_coherancy: " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 16/18] tests/i915/kms_fbcon_fbt: " Bhanuprakash Modem
2023-06-19 11:58 ` [igt-dev] [i-g-t 17/18] tests/kms_async_flips: " Bhanuprakash Modem
2023-07-19  3:01   ` Karthik B S
2023-06-19 11:58 ` [igt-dev] [i-g-t 18/18] tests/kms_prime: " Bhanuprakash Modem
2023-06-19 18:54 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add XE suppor for display tests Patchwork

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