Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE
@ 2023-06-01 11:48 Kunal Joshi
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 1/5] RFC tests/i915/kms_frontbuffer_tracking: Add xe support Kunal Joshi
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Kunal Joshi @ 2023-06-01 11:48 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

This series is intended to extend kms_frontbuffer_tracking
test to be supported on xe driver

Kunal Joshi (5):
  RFC tests/i915/kms_frontbuffer_tracking: Add xe support
  RFC tests/i915/kms_frontbuffer_tracking: xe doesn't support tiling as
    of now
  tests/i915/kms_frontbuffer_tracking: all gem ioctls are not supported
    for xe as of now
  RFC lib/ioctl_wrappers: GEM_SET_DOMAIN ioctl not supported on xe
  RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC,
    BLT, RENDER

 lib/ioctl_wrappers.c                  |  7 ++-
 tests/i915/kms_frontbuffer_tracking.c | 83 +++++++++++++++++++--------
 2 files changed, 64 insertions(+), 26 deletions(-)

-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t 1/5] RFC tests/i915/kms_frontbuffer_tracking: Add xe support
  2023-06-01 11:48 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
@ 2023-06-01 11:48 ` Kunal Joshi
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 2/5] RFC tests/i915/kms_frontbuffer_tracking: xe doesn't support tiling as of now Kunal Joshi
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Kunal Joshi @ 2023-06-01 11:48 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

Add support for DRIVER_XE

Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/i915/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
index 650e14a7..c2b99670 100644
--- a/tests/i915/kms_frontbuffer_tracking.c
+++ b/tests/i915/kms_frontbuffer_tracking.c
@@ -1338,7 +1338,7 @@ static void init_crcs(enum pixel_format format, enum tiling_type tiling,
 
 static void setup_drm(void)
 {
-	drm.fd = drm_open_driver_master(DRIVER_INTEL);
+	drm.fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
 	drm.debugfs = igt_debugfs_dir(drm.fd);
 
 	kmstest_set_vt_graphics_mode();
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t 2/5] RFC tests/i915/kms_frontbuffer_tracking: xe doesn't support tiling as of now
  2023-06-01 11:48 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 1/5] RFC tests/i915/kms_frontbuffer_tracking: Add xe support Kunal Joshi
@ 2023-06-01 11:48 ` Kunal Joshi
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 3/5] tests/i915/kms_frontbuffer_tracking: all gem ioctls are not supported for xe " Kunal Joshi
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Kunal Joshi @ 2023-06-01 11:48 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

v2: use is_xe_device() instead of static variable (Jouni)
    assert if xe device and unsupported tiling method specified
    in opt handler (Jouni)

Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/i915/kms_frontbuffer_tracking.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
index c2b99670..9b4c6e59 100644
--- a/tests/i915/kms_frontbuffer_tracking.c
+++ b/tests/i915/kms_frontbuffer_tracking.c
@@ -1340,6 +1340,19 @@ static void setup_drm(void)
 {
 	drm.fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
 	drm.debugfs = igt_debugfs_dir(drm.fd);
+	
+	/*
+	 * Assert if xe device and tiling method specified
+	 * in opt_handler
+	 */
+	igt_assert(is_xe_device(drm.fd) && (opt.tiling == TILING_DEFAULT ||
+		   opt.tiling == TILING_LINEAR));
+
+	/*
+	 * XE only support linear tiling
+	 */
+	if (is_xe_device(drm.fd))
+		opt.tiling = TILING_LINEAR;
 
 	kmstest_set_vt_graphics_mode();
 	igt_display_require(&drm.display, drm.fd);
@@ -3634,6 +3647,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 
 			for (t.tiling = TILING_LINEAR; t.tiling < TILING_COUNT;
 			     t.tiling++) {
+				if (is_xe_device(drm.fd) && t.tiling != TILING_LINEAR)
+					continue;
+
 				if (t.tiling == TILING_X)
 					continue;
 
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t 3/5] tests/i915/kms_frontbuffer_tracking: all gem ioctls are not supported for xe as of now
  2023-06-01 11:48 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 1/5] RFC tests/i915/kms_frontbuffer_tracking: Add xe support Kunal Joshi
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 2/5] RFC tests/i915/kms_frontbuffer_tracking: xe doesn't support tiling as of now Kunal Joshi
@ 2023-06-01 11:48 ` Kunal Joshi
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 4/5] RFC lib/ioctl_wrappers: GEM_SET_DOMAIN ioctl not supported on xe Kunal Joshi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Kunal Joshi @ 2023-06-01 11:48 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/i915/kms_frontbuffer_tracking.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
index 9b4c6e59..e31918e8 100644
--- a/tests/i915/kms_frontbuffer_tracking.c
+++ b/tests/i915/kms_frontbuffer_tracking.c
@@ -3700,7 +3700,8 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 	t.flip = FLIP_PAGEFLIP;
 	t.tiling = opt.tiling;
 	igt_subtest("basic") {
-		igt_require_gem(drm.fd);
+		if (!is_xe_device(drm.fd))
+			igt_require_gem(drm.fd);
 		basic_subtest(&t);
 	}
 
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t 4/5] RFC lib/ioctl_wrappers: GEM_SET_DOMAIN ioctl not supported on xe
  2023-06-01 11:48 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
                   ` (2 preceding siblings ...)
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 3/5] tests/i915/kms_frontbuffer_tracking: all gem ioctls are not supported for xe " Kunal Joshi
@ 2023-06-01 11:48 ` Kunal Joshi
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER Kunal Joshi
  2023-06-01 14:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for RFC Enable kms_frontbuffer_tracking on XE (rev3) Patchwork
  5 siblings, 0 replies; 12+ messages in thread
From: Kunal Joshi @ 2023-06-01 11:48 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

xe doesn't support GEM_SET_DOMAIN ioctl

Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/ioctl_wrappers.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index ebd8a2f3..1180d4c6 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -534,7 +534,12 @@ int __gem_set_domain(int fd, uint32_t handle, uint32_t read, uint32_t write)
  */
 void gem_set_domain(int fd, uint32_t handle, uint32_t read, uint32_t write)
 {
-	int ret = __gem_set_domain(fd, handle, read, write);
+	int ret;
+
+	if (is_xe_device(fd))
+		return;
+
+	ret = __gem_set_domain(fd, handle, read, write);
 
 	if (ret == -ENODEV && gem_has_lmem(fd))
 		igt_assert_eq(gem_wait(fd, handle, 0), 0);
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER
  2023-06-01 11:48 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
                   ` (3 preceding siblings ...)
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 4/5] RFC lib/ioctl_wrappers: GEM_SET_DOMAIN ioctl not supported on xe Kunal Joshi
@ 2023-06-01 11:48 ` Kunal Joshi
  2023-06-01 14:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for RFC Enable kms_frontbuffer_tracking on XE (rev3) Patchwork
  5 siblings, 0 replies; 12+ messages in thread
From: Kunal Joshi @ 2023-06-01 11:48 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

xe only supports MMAP_WC, BLT and RENDER methods,

Open :- does draw method give guarantee for fb to be rendered
on return, if not how to assure, ex for RENDER we have intel_bb_sync

Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/i915/kms_frontbuffer_tracking.c | 62 +++++++++++++++++----------
 1 file changed, 39 insertions(+), 23 deletions(-)

diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
index e31918e8..49260626 100644
--- a/tests/i915/kms_frontbuffer_tracking.c
+++ b/tests/i915/kms_frontbuffer_tracking.c
@@ -309,6 +309,16 @@ struct {
 	.stop = true,
 };
 
+/*
+ * returns true if draw method is supported on XE
+ * Currently xe supports on MMAP_WC, BLT and RENDER
+ */
+static bool supported_xe_draw_method(enum igt_draw_method method)
+{
+	return method == IGT_DRAW_MMAP_WC || method == IGT_DRAW_BLT
+			 || method == IGT_DRAW_RENDER;
+}
+
 static drmModeModeInfo *get_connector_smallest_mode(igt_output_t *output)
 {
 	drmModeConnector *c = output->config.connector;
@@ -1307,10 +1317,12 @@ static void init_crcs(enum pixel_format format, enum tiling_type tiling,
 		for (r = 0; r < pattern->n_rects; r++)
 			for (r_ = 0; r_ <= r; r_++)
 				draw_rect_igt_fb(pattern, &tmp_fbs[r],
-						 IGT_DRAW_PWRITE, r_);
+						 is_xe_device(drm.fd)?IGT_DRAW_RENDER:IGT_DRAW_PWRITE,
+						 r_);
 	} else {
 		for (r = 0; r < pattern->n_rects; r++)
-			draw_rect_igt_fb(pattern, &tmp_fbs[r], IGT_DRAW_PWRITE,
+			draw_rect_igt_fb(pattern, &tmp_fbs[r],
+					 is_xe_device(drm.fd)?IGT_DRAW_RENDER:IGT_DRAW_PWRITE,
 					 r);
 	}
 
@@ -3180,6 +3192,9 @@ static void basic_subtest(const struct test_mode *t)
 	fb1 = params->primary.fb;
 
 	for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
+		if (is_xe_device(drm.fd) && !supported_xe_draw_method(method))
+			continue;
+
 		if (method == IGT_DRAW_MMAP_GTT &&
 		    !gem_has_mappable_ggtt(drm.fd))
 			continue;
@@ -3413,29 +3428,30 @@ static const char *tiling_str(enum tiling_type tiling)
 }
 
 #define TEST_MODE_ITER_BEGIN(t) \
-	t.format = FORMAT_DEFAULT;					   \
-	t.flip = FLIP_PAGEFLIP;						   \
-	t.tiling = opt.tiling;;						   \
-	for (t.feature = 0; t.feature < FEATURE_COUNT; t.feature++) {	   \
-	for (t.pipes = 0; t.pipes < PIPE_COUNT; t.pipes++) {		   \
-	for (t.screen = 0; t.screen < SCREEN_COUNT; t.screen++) {	   \
-	for (t.plane = 0; t.plane < PLANE_COUNT; t.plane++) {		   \
-	for (t.fbs = 0; t.fbs < FBS_COUNT; t.fbs++) {			   \
-	for (t.method = 0; t.method < IGT_DRAW_METHOD_COUNT; t.method++) { \
-		if (t.pipes == PIPE_SINGLE && t.screen == SCREEN_SCND)	   \
-			continue;					   \
-		if (t.screen == SCREEN_OFFSCREEN && t.plane != PLANE_PRI)  \
-			continue;					   \
-		if (!opt.show_hidden && t.pipes == PIPE_DUAL &&		   \
-		    t.screen == SCREEN_OFFSCREEN)			   \
-			continue;					   \
-		if (!opt.show_hidden && t.feature == FEATURE_NONE)	   \
-			continue;					   \
-		if (!opt.show_hidden && t.fbs == FBS_SHARED &&		   \
-		    (t.plane == PLANE_CUR || t.plane == PLANE_SPR))	   \
+       t.format = FORMAT_DEFAULT;                                               \
+       t.flip = FLIP_PAGEFLIP;                                                  \
+       t.tiling = opt.tiling;;                                                  \
+       for (t.feature = 0; t.feature < FEATURE_COUNT; t.feature++) {            \
+       for (t.pipes = 0; t.pipes < PIPE_COUNT; t.pipes++) {                     \
+       for (t.screen = 0; t.screen < SCREEN_COUNT; t.screen++) {                \
+       for (t.plane = 0; t.plane < PLANE_COUNT; t.plane++) {                    \
+       for (t.fbs = 0; t.fbs < FBS_COUNT; t.fbs++) {                            \
+       for (t.method = 0; t.method < IGT_DRAW_METHOD_COUNT; t.method++) {       \
+	if (is_xe_device(drm.fd) && !supported_xe_draw_method(t.method))        \
+		continue;                                                       \
+	if (t.pipes == PIPE_SINGLE && t.screen == SCREEN_SCND)                  \
+		continue;                                                       \
+	if (t.screen == SCREEN_OFFSCREEN && t.plane != PLANE_PRI)               \
+		continue;                                                       \
+	if (!opt.show_hidden && t.pipes == PIPE_DUAL &&                         \
+		   t.screen == SCREEN_OFFSCREEN)                                \
+		continue;                                                       \
+	if (!opt.show_hidden && t.feature == FEATURE_NONE)                      \
+		continue;                                                       \
+	if (!opt.show_hidden && t.fbs == FBS_SHARED &&                          \
+		   (t.plane == PLANE_CUR || t.plane == PLANE_SPR))              \
 			continue;
 
-
 #define TEST_MODE_ITER_END } } } } } }
 
 struct option long_options[] = {
-- 
2.25.1

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

* [igt-dev] ✗ Fi.CI.BAT: failure for RFC Enable kms_frontbuffer_tracking on XE (rev3)
  2023-06-01 11:48 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
                   ` (4 preceding siblings ...)
  2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER Kunal Joshi
@ 2023-06-01 14:27 ` Patchwork
  5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2023-06-01 14:27 UTC (permalink / raw)
  To: Kunal Joshi; +Cc: igt-dev

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

== Series Details ==

Series: RFC Enable kms_frontbuffer_tracking on XE (rev3)
URL   : https://patchwork.freedesktop.org/series/118648/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13214 -> IGTPW_9092
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_9092 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_9092, 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_9092/index.html

Participating hosts (37 -> 36)
------------------------------

  Missing    (1): bat-dg1-5 

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@kms_frontbuffer_tracking@basic:
    - fi-hsw-4770:        [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-hsw-4770/igt@kms_frontbuffer_tracking@basic.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-hsw-4770/igt@kms_frontbuffer_tracking@basic.html
    - fi-cfl-8109u:       [PASS][3] -> [FAIL][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-cfl-8109u/igt@kms_frontbuffer_tracking@basic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-cfl-8109u/igt@kms_frontbuffer_tracking@basic.html
    - bat-adln-1:         [PASS][5] -> [FAIL][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-adln-1/igt@kms_frontbuffer_tracking@basic.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-adln-1/igt@kms_frontbuffer_tracking@basic.html
    - bat-dg2-8:          [PASS][7] -> [FAIL][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-dg2-8/igt@kms_frontbuffer_tracking@basic.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-dg2-8/igt@kms_frontbuffer_tracking@basic.html
    - bat-jsl-1:          [PASS][9] -> [FAIL][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-jsl-1/igt@kms_frontbuffer_tracking@basic.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-jsl-1/igt@kms_frontbuffer_tracking@basic.html
    - fi-tgl-1115g4:      [PASS][11] -> [FAIL][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-tgl-1115g4/igt@kms_frontbuffer_tracking@basic.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-tgl-1115g4/igt@kms_frontbuffer_tracking@basic.html
    - fi-bsw-n3050:       [PASS][13] -> [FAIL][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-bsw-n3050/igt@kms_frontbuffer_tracking@basic.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-bsw-n3050/igt@kms_frontbuffer_tracking@basic.html
    - bat-adlp-6:         [PASS][15] -> [FAIL][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-adlp-6/igt@kms_frontbuffer_tracking@basic.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-adlp-6/igt@kms_frontbuffer_tracking@basic.html
    - fi-skl-6600u:       [PASS][17] -> [FAIL][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-skl-6600u/igt@kms_frontbuffer_tracking@basic.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-skl-6600u/igt@kms_frontbuffer_tracking@basic.html
    - fi-apl-guc:         [PASS][19] -> [FAIL][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-apl-guc/igt@kms_frontbuffer_tracking@basic.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-apl-guc/igt@kms_frontbuffer_tracking@basic.html
    - fi-glk-j4005:       [PASS][21] -> [FAIL][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-glk-j4005/igt@kms_frontbuffer_tracking@basic.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-glk-j4005/igt@kms_frontbuffer_tracking@basic.html
    - bat-adlp-9:         [PASS][23] -> [FAIL][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-adlp-9/igt@kms_frontbuffer_tracking@basic.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-adlp-9/igt@kms_frontbuffer_tracking@basic.html
    - fi-skl-guc:         [PASS][25] -> [FAIL][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-skl-guc/igt@kms_frontbuffer_tracking@basic.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-skl-guc/igt@kms_frontbuffer_tracking@basic.html
    - bat-dg2-11:         [PASS][27] -> [FAIL][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-dg2-11/igt@kms_frontbuffer_tracking@basic.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-dg2-11/igt@kms_frontbuffer_tracking@basic.html
    - fi-kbl-7567u:       [PASS][29] -> [FAIL][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-kbl-7567u/igt@kms_frontbuffer_tracking@basic.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-kbl-7567u/igt@kms_frontbuffer_tracking@basic.html
    - fi-cfl-8700k:       [PASS][31] -> [FAIL][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-cfl-8700k/igt@kms_frontbuffer_tracking@basic.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-cfl-8700k/igt@kms_frontbuffer_tracking@basic.html
    - bat-rplp-1:         [PASS][33] -> [FAIL][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-rplp-1/igt@kms_frontbuffer_tracking@basic.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-rplp-1/igt@kms_frontbuffer_tracking@basic.html
    - fi-rkl-11600:       [PASS][35] -> [FAIL][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-rkl-11600/igt@kms_frontbuffer_tracking@basic.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-rkl-11600/igt@kms_frontbuffer_tracking@basic.html
    - fi-cfl-guc:         [PASS][37] -> [FAIL][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-cfl-guc/igt@kms_frontbuffer_tracking@basic.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-cfl-guc/igt@kms_frontbuffer_tracking@basic.html
    - bat-jsl-3:          [PASS][39] -> [FAIL][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-jsl-3/igt@kms_frontbuffer_tracking@basic.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-jsl-3/igt@kms_frontbuffer_tracking@basic.html
    - bat-dg2-9:          [PASS][41] -> [FAIL][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-dg2-9/igt@kms_frontbuffer_tracking@basic.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-dg2-9/igt@kms_frontbuffer_tracking@basic.html

  
#### Warnings ####

  * igt@kms_frontbuffer_tracking@basic:
    - fi-kbl-x1275:       [SKIP][43] ([fdo#109271]) -> [FAIL][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-kbl-x1275/igt@kms_frontbuffer_tracking@basic.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-kbl-x1275/igt@kms_frontbuffer_tracking@basic.html
    - fi-kbl-8809g:       [SKIP][45] ([fdo#109271]) -> [FAIL][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-kbl-8809g/igt@kms_frontbuffer_tracking@basic.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-kbl-8809g/igt@kms_frontbuffer_tracking@basic.html
    - bat-rpls-2:         [SKIP][47] ([i915#1849]) -> [FAIL][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-rpls-2/igt@kms_frontbuffer_tracking@basic.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-rpls-2/igt@kms_frontbuffer_tracking@basic.html
    - fi-elk-e7500:       [SKIP][49] ([fdo#109271]) -> [FAIL][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-elk-e7500/igt@kms_frontbuffer_tracking@basic.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-elk-e7500/igt@kms_frontbuffer_tracking@basic.html
    - fi-kbl-guc:         [SKIP][51] ([fdo#109271]) -> [FAIL][52]
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-kbl-guc/igt@kms_frontbuffer_tracking@basic.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-kbl-guc/igt@kms_frontbuffer_tracking@basic.html
    - bat-adlm-1:         [SKIP][53] ([i915#1849]) -> [FAIL][54]
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-adlm-1/igt@kms_frontbuffer_tracking@basic.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-adlm-1/igt@kms_frontbuffer_tracking@basic.html
    - fi-blb-e6850:       [SKIP][55] ([fdo#109271]) -> [FAIL][56]
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-blb-e6850/igt@kms_frontbuffer_tracking@basic.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-blb-e6850/igt@kms_frontbuffer_tracking@basic.html
    - bat-rpls-1:         [SKIP][57] ([i915#1849]) -> [FAIL][58]
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-rpls-1/igt@kms_frontbuffer_tracking@basic.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-rpls-1/igt@kms_frontbuffer_tracking@basic.html
    - bat-dg1-7:          [SKIP][59] ([i915#4078] / [i915#4342]) -> [FAIL][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-dg1-7/igt@kms_frontbuffer_tracking@basic.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-dg1-7/igt@kms_frontbuffer_tracking@basic.html
    - fi-bsw-nick:        [SKIP][61] ([fdo#109271]) -> [FAIL][62]
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-bsw-nick/igt@kms_frontbuffer_tracking@basic.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-bsw-nick/igt@kms_frontbuffer_tracking@basic.html
    - bat-adls-5:         [SKIP][63] ([i915#1849]) -> [FAIL][64]
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-adls-5/igt@kms_frontbuffer_tracking@basic.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-adls-5/igt@kms_frontbuffer_tracking@basic.html

  
#### Suppressed ####

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

  * igt@kms_frontbuffer_tracking@basic:
    - {bat-mtlp-8}:       [PASS][65] -> [FAIL][66]
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-mtlp-8/igt@kms_frontbuffer_tracking@basic.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-mtlp-8/igt@kms_frontbuffer_tracking@basic.html
    - {bat-mtlp-6}:       [SKIP][67] ([i915#4342]) -> [FAIL][68]
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-mtlp-6/igt@kms_frontbuffer_tracking@basic.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-mtlp-6/igt@kms_frontbuffer_tracking@basic.html
    - {bat-kbl-2}:        [SKIP][69] ([fdo#109271]) -> [FAIL][70]
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-kbl-2/igt@kms_frontbuffer_tracking@basic.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-kbl-2/igt@kms_frontbuffer_tracking@basic.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-hsw-4770:        [PASS][71] -> [SKIP][72] ([fdo#109271])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-hsw-4770/igt@i915_pm_rpm@basic-pci-d3-state.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-hsw-4770/igt@i915_pm_rpm@basic-pci-d3-state.html

  * igt@i915_pm_rpm@basic-rte:
    - fi-hsw-4770:        [PASS][73] -> [FAIL][74] ([i915#7364])
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-hsw-4770/igt@i915_pm_rpm@basic-rte.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-hsw-4770/igt@i915_pm_rpm@basic-rte.html

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-apl-guc:         [PASS][75] -> [DMESG-FAIL][76] ([i915#5334])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@mman:
    - bat-rpls-2:         [PASS][77] -> [TIMEOUT][78] ([i915#6794] / [i915#7392])
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-rpls-2/igt@i915_selftest@live@mman.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-rpls-2/igt@i915_selftest@live@mman.html

  * igt@i915_selftest@live@reset:
    - bat-rpls-1:         [PASS][79] -> [ABORT][80] ([i915#4983] / [i915#7461] / [i915#7981] / [i915#8347] / [i915#8384])
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-rpls-1/igt@i915_selftest@live@reset.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-rpls-1/igt@i915_selftest@live@reset.html

  * igt@i915_suspend@basic-s2idle-without-i915:
    - bat-rpls-2:         NOTRUN -> [ABORT][81] ([i915#6687])
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-rpls-2/igt@i915_suspend@basic-s2idle-without-i915.html

  * igt@kms_pipe_crc_basic@read-crc:
    - bat-adlp-9:         NOTRUN -> [SKIP][82] ([i915#3546]) +1 similar issue
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-adlp-9/igt@kms_pipe_crc_basic@read-crc.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@migrate:
    - bat-rpls-2:         [DMESG-FAIL][83] ([i915#7699] / [i915#7913]) -> [PASS][84]
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-rpls-2/igt@i915_selftest@live@migrate.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-rpls-2/igt@i915_selftest@live@migrate.html

  
#### Warnings ####

  * igt@kms_psr@sprite_plane_onoff:
    - bat-rplp-1:         [SKIP][85] ([i915#1072]) -> [ABORT][86] ([i915#8442])
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13214/bat-rplp-1/igt@kms_psr@sprite_plane_onoff.html
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/bat-rplp-1/igt@kms_psr@sprite_plane_onoff.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
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4342]: https://gitlab.freedesktop.org/drm/intel/issues/4342
  [i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
  [i915#6794]: https://gitlab.freedesktop.org/drm/intel/issues/6794
  [i915#6868]: https://gitlab.freedesktop.org/drm/intel/issues/6868
  [i915#7364]: https://gitlab.freedesktop.org/drm/intel/issues/7364
  [i915#7392]: https://gitlab.freedesktop.org/drm/intel/issues/7392
  [i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
  [i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
  [i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
  [i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
  [i915#8384]: https://gitlab.freedesktop.org/drm/intel/issues/8384
  [i915#8442]: https://gitlab.freedesktop.org/drm/intel/issues/8442


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7317 -> IGTPW_9092

  CI-20190529: 20190529
  CI_DRM_13214: 24c0a75b9a4f481ed5a06e4441701651305f0290 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_9092: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9092/index.html
  IGT_7317: c902b72df45aa49faa38205bc5be3c748d33a3e0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

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

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

* [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER
  2023-06-06  8:02 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
@ 2023-06-06  8:02 ` Kunal Joshi
  2023-06-08 11:46   ` Modem, Bhanuprakash
  0 siblings, 1 reply; 12+ messages in thread
From: Kunal Joshi @ 2023-06-06  8:02 UTC (permalink / raw)
  To: igt-dev; +Cc: kunal1.joshi

xe only supports MMAP_WC, BLT and RENDER methods,

Open :- does draw method give guarantee for fb to be rendered
on return, if not how to assure, ex for RENDER we have intel_bb_sync

Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/i915/kms_frontbuffer_tracking.c | 62 +++++++++++++++++----------
 1 file changed, 39 insertions(+), 23 deletions(-)

diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
index 9561abef..17aed191 100644
--- a/tests/i915/kms_frontbuffer_tracking.c
+++ b/tests/i915/kms_frontbuffer_tracking.c
@@ -309,6 +309,16 @@ struct {
 	.stop = true,
 };
 
+/*
+ * returns true if draw method is supported on XE
+ * Currently xe supports on MMAP_WC, BLT and RENDER
+ */
+static bool supported_xe_draw_method(enum igt_draw_method method)
+{
+	return method == IGT_DRAW_MMAP_WC || method == IGT_DRAW_BLT
+			 || method == IGT_DRAW_RENDER;
+}
+
 static drmModeModeInfo *get_connector_smallest_mode(igt_output_t *output)
 {
 	drmModeConnector *c = output->config.connector;
@@ -1307,10 +1317,12 @@ static void init_crcs(enum pixel_format format, enum tiling_type tiling,
 		for (r = 0; r < pattern->n_rects; r++)
 			for (r_ = 0; r_ <= r; r_++)
 				draw_rect_igt_fb(pattern, &tmp_fbs[r],
-						 IGT_DRAW_PWRITE, r_);
+						 is_xe_device(drm.fd)?IGT_DRAW_RENDER:IGT_DRAW_PWRITE,
+						 r_);
 	} else {
 		for (r = 0; r < pattern->n_rects; r++)
-			draw_rect_igt_fb(pattern, &tmp_fbs[r], IGT_DRAW_PWRITE,
+			draw_rect_igt_fb(pattern, &tmp_fbs[r],
+					 is_xe_device(drm.fd)?IGT_DRAW_RENDER:IGT_DRAW_PWRITE,
 					 r);
 	}
 
@@ -3180,6 +3192,9 @@ static void basic_subtest(const struct test_mode *t)
 	fb1 = params->primary.fb;
 
 	for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
+		if (is_xe_device(drm.fd) && !supported_xe_draw_method(method))
+			continue;
+
 		if (method == IGT_DRAW_MMAP_GTT &&
 		    !gem_has_mappable_ggtt(drm.fd))
 			continue;
@@ -3413,29 +3428,30 @@ static const char *tiling_str(enum tiling_type tiling)
 }
 
 #define TEST_MODE_ITER_BEGIN(t) \
-	t.format = FORMAT_DEFAULT;					   \
-	t.flip = FLIP_PAGEFLIP;						   \
-	t.tiling = opt.tiling;;						   \
-	for (t.feature = 0; t.feature < FEATURE_COUNT; t.feature++) {	   \
-	for (t.pipes = 0; t.pipes < PIPE_COUNT; t.pipes++) {		   \
-	for (t.screen = 0; t.screen < SCREEN_COUNT; t.screen++) {	   \
-	for (t.plane = 0; t.plane < PLANE_COUNT; t.plane++) {		   \
-	for (t.fbs = 0; t.fbs < FBS_COUNT; t.fbs++) {			   \
-	for (t.method = 0; t.method < IGT_DRAW_METHOD_COUNT; t.method++) { \
-		if (t.pipes == PIPE_SINGLE && t.screen == SCREEN_SCND)	   \
-			continue;					   \
-		if (t.screen == SCREEN_OFFSCREEN && t.plane != PLANE_PRI)  \
-			continue;					   \
-		if (!opt.show_hidden && t.pipes == PIPE_DUAL &&		   \
-		    t.screen == SCREEN_OFFSCREEN)			   \
-			continue;					   \
-		if (!opt.show_hidden && t.feature == FEATURE_NONE)	   \
-			continue;					   \
-		if (!opt.show_hidden && t.fbs == FBS_SHARED &&		   \
-		    (t.plane == PLANE_CUR || t.plane == PLANE_SPR))	   \
+       t.format = FORMAT_DEFAULT;                                               \
+       t.flip = FLIP_PAGEFLIP;                                                  \
+       t.tiling = opt.tiling;;                                                  \
+       for (t.feature = 0; t.feature < FEATURE_COUNT; t.feature++) {            \
+       for (t.pipes = 0; t.pipes < PIPE_COUNT; t.pipes++) {                     \
+       for (t.screen = 0; t.screen < SCREEN_COUNT; t.screen++) {                \
+       for (t.plane = 0; t.plane < PLANE_COUNT; t.plane++) {                    \
+       for (t.fbs = 0; t.fbs < FBS_COUNT; t.fbs++) {                            \
+       for (t.method = 0; t.method < IGT_DRAW_METHOD_COUNT; t.method++) {       \
+	if (is_xe_device(drm.fd) && !supported_xe_draw_method(t.method))        \
+		continue;                                                       \
+	if (t.pipes == PIPE_SINGLE && t.screen == SCREEN_SCND)                  \
+		continue;                                                       \
+	if (t.screen == SCREEN_OFFSCREEN && t.plane != PLANE_PRI)               \
+		continue;                                                       \
+	if (!opt.show_hidden && t.pipes == PIPE_DUAL &&                         \
+		   t.screen == SCREEN_OFFSCREEN)                                \
+		continue;                                                       \
+	if (!opt.show_hidden && t.feature == FEATURE_NONE)                      \
+		continue;                                                       \
+	if (!opt.show_hidden && t.fbs == FBS_SHARED &&                          \
+		   (t.plane == PLANE_CUR || t.plane == PLANE_SPR))              \
 			continue;
 
-
 #define TEST_MODE_ITER_END } } } } } }
 
 struct option long_options[] = {
-- 
2.34.1

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

* Re: [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER
  2023-06-06  8:02 ` [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER Kunal Joshi
@ 2023-06-08 11:46   ` Modem, Bhanuprakash
  2023-06-09  5:47     ` Joshi, Kunal1
  0 siblings, 1 reply; 12+ messages in thread
From: Modem, Bhanuprakash @ 2023-06-08 11:46 UTC (permalink / raw)
  To: Kunal Joshi, igt-dev



On Tue-06-06-2023 01:32 pm, Kunal Joshi wrote:
> xe only supports MMAP_WC, BLT and RENDER methods,
> 
> Open :- does draw method give guarantee for fb to be rendered
> on return, if not how to assure, ex for RENDER we have intel_bb_sync
> 
> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
> ---
>   tests/i915/kms_frontbuffer_tracking.c | 62 +++++++++++++++++----------
>   1 file changed, 39 insertions(+), 23 deletions(-)
> 
> diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
> index 9561abef..17aed191 100644
> --- a/tests/i915/kms_frontbuffer_tracking.c
> +++ b/tests/i915/kms_frontbuffer_tracking.c
> @@ -309,6 +309,16 @@ struct {
>   	.stop = true,
>   };
>   
> +/*
> + * returns true if draw method is supported on XE
> + * Currently xe supports on MMAP_WC, BLT and RENDER
> + */
> +static bool supported_xe_draw_method(enum igt_draw_method method)
> +{
> +	return method == IGT_DRAW_MMAP_WC || method == IGT_DRAW_BLT
> +			 || method == IGT_DRAW_RENDER;
> +}

Please use igt_draw_supports_method() instead of writing your own wrapper.

> +
>   static drmModeModeInfo *get_connector_smallest_mode(igt_output_t *output)
>   {
>   	drmModeConnector *c = output->config.connector;
> @@ -1307,10 +1317,12 @@ static void init_crcs(enum pixel_format format, enum tiling_type tiling,
>   		for (r = 0; r < pattern->n_rects; r++)
>   			for (r_ = 0; r_ <= r; r_++)
>   				draw_rect_igt_fb(pattern, &tmp_fbs[r],
> -						 IGT_DRAW_PWRITE, r_);
> +						 is_xe_device(drm.fd)?IGT_DRAW_RENDER:IGT_DRAW_PWRITE,
> +						 r_);
>   	} else {
>   		for (r = 0; r < pattern->n_rects; r++)
> -			draw_rect_igt_fb(pattern, &tmp_fbs[r], IGT_DRAW_PWRITE,
> +			draw_rect_igt_fb(pattern, &tmp_fbs[r],
> +					 is_xe_device(drm.fd)?IGT_DRAW_RENDER:IGT_DRAW_PWRITE,
>   					 r);
>   	}
>   
> @@ -3180,6 +3192,9 @@ static void basic_subtest(const struct test_mode *t)
>   	fb1 = params->primary.fb;
>   
>   	for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
> +		if (is_xe_device(drm.fd) && !supported_xe_draw_method(method))
> +			continue;
> +
>   		if (method == IGT_DRAW_MMAP_GTT &&
>   		    !gem_has_mappable_ggtt(drm.fd))
>   			continue;
> @@ -3413,29 +3428,30 @@ static const char *tiling_str(enum tiling_type tiling)
>   }
>   
>   #define TEST_MODE_ITER_BEGIN(t) \
> -	t.format = FORMAT_DEFAULT;					   \
> -	t.flip = FLIP_PAGEFLIP;						   \
> -	t.tiling = opt.tiling;;						   \
> -	for (t.feature = 0; t.feature < FEATURE_COUNT; t.feature++) {	   \
> -	for (t.pipes = 0; t.pipes < PIPE_COUNT; t.pipes++) {		   \
> -	for (t.screen = 0; t.screen < SCREEN_COUNT; t.screen++) {	   \
> -	for (t.plane = 0; t.plane < PLANE_COUNT; t.plane++) {		   \
> -	for (t.fbs = 0; t.fbs < FBS_COUNT; t.fbs++) {			   \
> -	for (t.method = 0; t.method < IGT_DRAW_METHOD_COUNT; t.method++) { \
> -		if (t.pipes == PIPE_SINGLE && t.screen == SCREEN_SCND)	   \
> -			continue;					   \
> -		if (t.screen == SCREEN_OFFSCREEN && t.plane != PLANE_PRI)  \
> -			continue;					   \
> -		if (!opt.show_hidden && t.pipes == PIPE_DUAL &&		   \
> -		    t.screen == SCREEN_OFFSCREEN)			   \
> -			continue;					   \
> -		if (!opt.show_hidden && t.feature == FEATURE_NONE)	   \
> -			continue;					   \
> -		if (!opt.show_hidden && t.fbs == FBS_SHARED &&		   \
> -		    (t.plane == PLANE_CUR || t.plane == PLANE_SPR))	   \
> +       t.format = FORMAT_DEFAULT;                                               \
> +       t.flip = FLIP_PAGEFLIP;                                                  \
> +       t.tiling = opt.tiling;;                                                  \
> +       for (t.feature = 0; t.feature < FEATURE_COUNT; t.feature++) {            \
> +       for (t.pipes = 0; t.pipes < PIPE_COUNT; t.pipes++) {                     \
> +       for (t.screen = 0; t.screen < SCREEN_COUNT; t.screen++) {                \
> +       for (t.plane = 0; t.plane < PLANE_COUNT; t.plane++) {                    \
> +       for (t.fbs = 0; t.fbs < FBS_COUNT; t.fbs++) {                            \
> +       for (t.method = 0; t.method < IGT_DRAW_METHOD_COUNT; t.method++) {       \
> +	if (is_xe_device(drm.fd) && !supported_xe_draw_method(t.method))        \
> +		continue; 

Changes in this macro are irrelevant except above 2 lines.

- Bhanu
                                                       \
> +	if (t.pipes == PIPE_SINGLE && t.screen == SCREEN_SCND)                  \
> +		continue;                                                       \
> +	if (t.screen == SCREEN_OFFSCREEN && t.plane != PLANE_PRI)               \
> +		continue;                                                       \
> +	if (!opt.show_hidden && t.pipes == PIPE_DUAL &&                         \
> +		   t.screen == SCREEN_OFFSCREEN)                                \
> +		continue;                                                       \
> +	if (!opt.show_hidden && t.feature == FEATURE_NONE)                      \
> +		continue;                                                       \
> +	if (!opt.show_hidden && t.fbs == FBS_SHARED &&                          \
> +		   (t.plane == PLANE_CUR || t.plane == PLANE_SPR))              \
>   			continue;
>   
> -
>   #define TEST_MODE_ITER_END } } } } } }
>   
>   struct option long_options[] = {

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

* Re: [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER
  2023-06-08 11:46   ` Modem, Bhanuprakash
@ 2023-06-09  5:47     ` Joshi, Kunal1
  0 siblings, 0 replies; 12+ messages in thread
From: Joshi, Kunal1 @ 2023-06-09  5:47 UTC (permalink / raw)
  To: Modem, Bhanuprakash, igt-dev

Hello Bhanu,

On 6/8/2023 5:16 PM, Modem, Bhanuprakash wrote:
>
>
> On Tue-06-06-2023 01:32 pm, Kunal Joshi wrote:
>> xe only supports MMAP_WC, BLT and RENDER methods,
>>
>> Open :- does draw method give guarantee for fb to be rendered
>> on return, if not how to assure, ex for RENDER we have intel_bb_sync
>>
>> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
>>
>> +static bool supported_xe_draw_method(enum igt_draw_method method)
>> +{
>> +    return method == IGT_DRAW_MMAP_WC || method == IGT_DRAW_BLT
>> +             || method == IGT_DRAW_RENDER;
>> +}
>
> Please use igt_draw_supports_method() instead of writing your own 
> wrapper.
Sure bhanu, thanks for pointing it out, will float next revision with 
this change
>
>> +
>>   static drmModeModeInfo *get_connector_smallest_mode(igt_output_t 
>> *output)
>>   {
>>       drmModeConnector *c = output->config.connector;
>> @@ -1307,10 +1317,12 @@ static void init_crcs(enum pixel_format 
>> format, enum tiling_type tiling,
>>           for (r = 0; r < pattern->n_rects; r++)
>>               for (r_ = 0; r_ <= r; r_++)
>>                   draw_rect_igt_fb(pattern, &tmp_fbs[r],
>> -                         IGT_DRAW_PWRITE, r_);
>> + is_xe_device(drm.fd)?IGT_DRAW_RENDER:IGT_DRAW_PWRITE,
>> +                         r_);
>>       } else {
>>           for (r = 0; r < pattern->n_rects; r++)
>> -            draw_rect_igt_fb(pattern, &tmp_fbs[r], IGT_DRAW_PWRITE,
>> +            draw_rect_igt_fb(pattern, &tmp_fbs[r],
>> + is_xe_device(drm.fd)?IGT_DRAW_RENDER:IGT_DRAW_PWRITE,
>>                        r);
>>       }
>>   @@ -3180,6 +3192,9 @@ static void basic_subtest(const struct 
>> test_mode *t)
>>       fb1 = params->primary.fb;
>>         for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; 
>> method++) {
>> +        if (is_xe_device(drm.fd) && !supported_xe_draw_method(method))
>> +            continue;
>> +
>>           if (method == IGT_DRAW_MMAP_GTT &&
>>               !gem_has_mappable_ggtt(drm.fd))
>>               continue;
>> @@ -3413,29 +3428,30 @@ static const char *tiling_str(enum 
>> tiling_type tiling)
>>   }
>>     #define TEST_MODE_ITER_BEGIN(t) \
>> -    t.format = FORMAT_DEFAULT;                       \
>> -    t.flip = FLIP_PAGEFLIP;                           \
>> -    t.tiling = opt.tiling;;                           \
>> -    for (t.feature = 0; t.feature < FEATURE_COUNT; t.feature++) 
>> {       \
>> -    for (t.pipes = 0; t.pipes < PIPE_COUNT; t.pipes++) {           \
>> -    for (t.screen = 0; t.screen < SCREEN_COUNT; t.screen++) {       \
>> -    for (t.plane = 0; t.plane < PLANE_COUNT; t.plane++) {           \
>> -    for (t.fbs = 0; t.fbs < FBS_COUNT; t.fbs++) {               \
>> -    for (t.method = 0; t.method < IGT_DRAW_METHOD_COUNT; t.method++) 
>> { \
>> -        if (t.pipes == PIPE_SINGLE && t.screen == SCREEN_SCND)       \
>> -            continue;                       \
>> -        if (t.screen == SCREEN_OFFSCREEN && t.plane != PLANE_PRI)  \
>> -            continue;                       \
>> -        if (!opt.show_hidden && t.pipes == PIPE_DUAL &&           \
>> -            t.screen == SCREEN_OFFSCREEN)               \
>> -            continue;                       \
>> -        if (!opt.show_hidden && t.feature == FEATURE_NONE)       \
>> -            continue;                       \
>> -        if (!opt.show_hidden && t.fbs == FBS_SHARED &&           \
>> -            (t.plane == PLANE_CUR || t.plane == PLANE_SPR))       \
>> +       t.format = 
>> FORMAT_DEFAULT;                                               \
>> +       t.flip = FLIP_PAGEFLIP; \
>> +       t.tiling = 
>> opt.tiling;;                                                  \
>> +       for (t.feature = 0; t.feature < FEATURE_COUNT; t.feature++) 
>> {            \
>> +       for (t.pipes = 0; t.pipes < PIPE_COUNT; t.pipes++) 
>> {                     \
>> +       for (t.screen = 0; t.screen < SCREEN_COUNT; t.screen++) 
>> {                \
>> +       for (t.plane = 0; t.plane < PLANE_COUNT; t.plane++) 
>> {                    \
>> +       for (t.fbs = 0; t.fbs < FBS_COUNT; t.fbs++) 
>> {                            \
>> +       for (t.method = 0; t.method < IGT_DRAW_METHOD_COUNT; 
>> t.method++) {       \
>> +    if (is_xe_device(drm.fd) && 
>> !supported_xe_draw_method(t.method))        \
>> +        continue; 
>
> Changes in this macro are irrelevant except above 2 lines.

Bhanu for the other line i have placed the \ at the end of the line
So it looks nice, let me know if its not required

>
> - Bhanu
>                                                       \
>> +    if (t.pipes == PIPE_SINGLE && t.screen == 
>> SCREEN_SCND)                  \
>> + continue; \
>> +    if (t.screen == SCREEN_OFFSCREEN && t.plane != 
>> PLANE_PRI)               \
>> + continue; \
>> +    if (!opt.show_hidden && t.pipes == PIPE_DUAL 
>> &&                         \
>> +           t.screen == 
>> SCREEN_OFFSCREEN)                                \
>> + continue; \
>> +    if (!opt.show_hidden && t.feature == 
>> FEATURE_NONE)                      \
>> + continue; \
>> +    if (!opt.show_hidden && t.fbs == FBS_SHARED 
>> &&                          \
>> +           (t.plane == PLANE_CUR || t.plane == 
>> PLANE_SPR))              \
>>               continue;
>>   -
>>   #define TEST_MODE_ITER_END } } } } } }
>>     struct option long_options[] = {
Thanks and Regards
Kunal Joshi

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

* [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER
  2023-06-09 10:12 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
@ 2023-06-09 10:12 ` Kunal Joshi
  2023-06-12  5:40   ` Modem, Bhanuprakash
  0 siblings, 1 reply; 12+ messages in thread
From: Kunal Joshi @ 2023-06-09 10:12 UTC (permalink / raw)
  To: igt-dev; +Cc: kunal1.joshi

xe only supports MMAP_WC, BLT and RENDER methods,

Open :- does draw method give guarantee for fb to be rendered
on return, if not how to assure, ex for RENDER we have intel_bb_sync

v2: use igt_draw_supports_method (Bhanu)
    Remove check from macro and put it in igt_require at test level
    (Bhanu)

Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/i915/kms_frontbuffer_tracking.c | 59 ++++++++++++++++++---------
 1 file changed, 39 insertions(+), 20 deletions(-)

diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
index 7159cd37..b8dd5cd5 100644
--- a/tests/i915/kms_frontbuffer_tracking.c
+++ b/tests/i915/kms_frontbuffer_tracking.c
@@ -1307,11 +1307,13 @@ static void init_crcs(enum pixel_format format, enum tiling_type tiling,
 		for (r = 0; r < pattern->n_rects; r++)
 			for (r_ = 0; r_ <= r; r_++)
 				draw_rect_igt_fb(pattern, &tmp_fbs[r],
-						 IGT_DRAW_PWRITE, r_);
+						 igt_draw_supports_method(drm.fd, IGT_DRAW_PWRITE) ?
+						 IGT_DRAW_PWRITE : IGT_DRAW_RENDER,
+						 r_);
 	} else {
 		for (r = 0; r < pattern->n_rects; r++)
-			draw_rect_igt_fb(pattern, &tmp_fbs[r], IGT_DRAW_PWRITE,
-					 r);
+			draw_rect_igt_fb(pattern, &tmp_fbs[r], igt_draw_supports_method(drm.fd, IGT_DRAW_PWRITE) ?
+					 IGT_DRAW_PWRITE : IGT_DRAW_RENDER, r);
 	}
 
 	igt_output_set_pipe(prim_mode_params.output, prim_mode_params.pipe);
@@ -2048,9 +2050,6 @@ static void draw_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	struct fb_region *target;
 
-	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
-		    !gem_has_mappable_ggtt(drm.fd));
-
 	switch (t->screen) {
 	case SCREEN_PRIM:
 		if (t->method != IGT_DRAW_MMAP_GTT && t->plane == PLANE_PRI)
@@ -2150,9 +2149,8 @@ static void multidraw_subtest(const struct test_mode *t)
 				  igt_draw_get_method_name(m1),
 				  igt_draw_get_method_name(m2));
 
-			if ((m1 == IGT_DRAW_MMAP_GTT ||
-			     m2 == IGT_DRAW_MMAP_GTT) &&
-			    !gem_has_mappable_ggtt(drm.fd))
+			if (!igt_draw_supports_method(drm.fd, m1) ||
+			    !igt_draw_supports_method(drm.fd, m2))
 				continue;
 
 			for (r = 0; r < pattern->n_rects; r++) {
@@ -2421,9 +2419,6 @@ static void flip_subtest(const struct test_mode *t)
 	struct draw_pattern_info *pattern = &pattern1;
 	enum color bg_color;
 
-	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
-		    !gem_has_mappable_ggtt(drm.fd));
-
 	switch (t->screen) {
 	case SCREEN_PRIM:
 		assertions |= ASSERT_LAST_ACTION_CHANGED;
@@ -2483,9 +2478,6 @@ static void fliptrack_subtest(const struct test_mode *t, enum flip_type type)
 	struct modeset_params *params = pick_params(t);
 	struct draw_pattern_info *pattern = &pattern1;
 
-	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
-		    !gem_has_mappable_ggtt(drm.fd));
-
 	prepare_subtest(t, pattern);
 
 	create_fb(t->format, params->primary.fb->width, params->primary.fb->height,
@@ -2895,9 +2887,6 @@ static void farfromfence_subtest(const struct test_mode *t)
 	int max_height, assertions = 0;
 	int gen = intel_display_ver(intel_get_drm_devid(drm.fd));
 
-	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
-		    !gem_has_mappable_ggtt(drm.fd));
-
 	switch (gen) {
 	case 2:
 		max_height = 2048;
@@ -3181,8 +3170,7 @@ static void basic_subtest(const struct test_mode *t)
 	fb1 = params->primary.fb;
 
 	for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
-		if (method == IGT_DRAW_MMAP_GTT &&
-		    !gem_has_mappable_ggtt(drm.fd))
+		if (!igt_draw_supports_method(drm.fd, method))
 			continue;
 
 		if (r == pattern->n_rects) {
@@ -3487,6 +3475,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 	}
 
 	TEST_MODE_ITER_BEGIN(t)
+		igt_fixture
+			igt_require(igt_draw_supports_method(drm.fd, t.method));
+
 		igt_subtest_f("%s-%s-%s-%s-%s-draw-%s",
 			      feature_str(t.feature),
 			      pipes_str(t.pipes),
@@ -3503,6 +3494,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		    (!opt.show_hidden && t.method != IGT_DRAW_BLT))
 			continue;
 
+		igt_fixture
+			igt_require(igt_draw_supports_method(drm.fd, t.method));
+
 		for (t.flip = 0; t.flip < FLIP_COUNT; t.flip++)
 			igt_subtest_f("%s-%s-%s-%s-%sflip-%s",
 				      feature_str(t.feature),
@@ -3521,6 +3515,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		    (t.feature & FEATURE_FBC) == 0)
 			continue;
 
+		igt_fixture
+			igt_require(igt_draw_supports_method(drm.fd, t.method));
+
 		igt_subtest_f("%s-%s-%s-fliptrack-%s",
 			      feature_str(t.feature),
 			      pipes_str(t.pipes),
@@ -3535,6 +3532,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		    t.plane == PLANE_PRI)
 			continue;
 
+		igt_fixture
+			igt_require(igt_draw_supports_method(drm.fd, t.method));
+
 		igt_subtest_f("%s-%s-%s-%s-%s-move",
 			      feature_str(t.feature),
 			      pipes_str(t.pipes),
@@ -3558,6 +3558,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		    t.plane != PLANE_SPR)
 			continue;
 
+		igt_fixture
+			igt_require(igt_draw_supports_method(drm.fd, t.method));
+
 		igt_subtest_f("%s-%s-%s-%s-%s-fullscreen",
 			      feature_str(t.feature),
 			      pipes_str(t.pipes),
@@ -3574,6 +3577,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		    (!opt.show_hidden && t.fbs != FBS_INDIVIDUAL))
 			continue;
 
+		igt_fixture
+			igt_require(igt_draw_supports_method(drm.fd, t.method));
+
 		igt_subtest_f("%s-%s-%s-%s-multidraw",
 			      feature_str(t.feature),
 			      pipes_str(t.pipes),
@@ -3590,6 +3596,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		    t.method != IGT_DRAW_MMAP_GTT)
 			continue;
 
+		igt_fixture
+			igt_require(igt_draw_supports_method(drm.fd, t.method));
+
 		igt_subtest_f("%s-farfromfence-%s",
 			      feature_str(t.feature),
 			      igt_draw_get_method_name(t.method))
@@ -3603,6 +3612,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		    t.fbs != FBS_INDIVIDUAL)
 			continue;
 
+		igt_fixture
+			igt_require(igt_draw_supports_method(drm.fd, t.method));
+
 		for (t.format = 0; t.format < FORMAT_COUNT; t.format++) {
 			/* Skip what we already tested. */
 			if (t.format == FORMAT_DEFAULT)
@@ -3622,6 +3634,10 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		    t.plane != PLANE_PRI ||
 		    t.method != IGT_DRAW_BLT)
 			continue;
+
+		igt_fixture
+			igt_require(igt_draw_supports_method(drm.fd, t.method));
+
 		igt_subtest_f("%s-%s-scaledprimary",
 			      feature_str(t.feature),
 			      fbs_str(t.fbs))
@@ -3636,6 +3652,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		    t.method != IGT_DRAW_BLT)
 			continue;
 
+		igt_fixture
+			igt_require(igt_draw_supports_method(drm.fd, t.method));
+
 		igt_subtest_f("%s-modesetfrombusy", feature_str(t.feature))
 			modesetfrombusy_subtest(&t);
 
-- 
2.34.1

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

* Re: [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER
  2023-06-09 10:12 ` [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER Kunal Joshi
@ 2023-06-12  5:40   ` Modem, Bhanuprakash
  0 siblings, 0 replies; 12+ messages in thread
From: Modem, Bhanuprakash @ 2023-06-12  5:40 UTC (permalink / raw)
  To: Kunal Joshi, igt-dev

Hi Kunal,

Please check the comments in Patch 3/5 in this series.
Otherwise this patch LGTM.

- Bhanu

On Fri-09-06-2023 03:42 pm, Kunal Joshi wrote:
> xe only supports MMAP_WC, BLT and RENDER methods,
> 
> Open :- does draw method give guarantee for fb to be rendered
> on return, if not how to assure, ex for RENDER we have intel_bb_sync
> 
> v2: use igt_draw_supports_method (Bhanu)
>      Remove check from macro and put it in igt_require at test level
>      (Bhanu)
> 
> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
> ---
>   tests/i915/kms_frontbuffer_tracking.c | 59 ++++++++++++++++++---------
>   1 file changed, 39 insertions(+), 20 deletions(-)
> 
> diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
> index 7159cd37..b8dd5cd5 100644
> --- a/tests/i915/kms_frontbuffer_tracking.c
> +++ b/tests/i915/kms_frontbuffer_tracking.c
> @@ -1307,11 +1307,13 @@ static void init_crcs(enum pixel_format format, enum tiling_type tiling,
>   		for (r = 0; r < pattern->n_rects; r++)
>   			for (r_ = 0; r_ <= r; r_++)
>   				draw_rect_igt_fb(pattern, &tmp_fbs[r],
> -						 IGT_DRAW_PWRITE, r_);
> +						 igt_draw_supports_method(drm.fd, IGT_DRAW_PWRITE) ?
> +						 IGT_DRAW_PWRITE : IGT_DRAW_RENDER,
> +						 r_);
>   	} else {
>   		for (r = 0; r < pattern->n_rects; r++)
> -			draw_rect_igt_fb(pattern, &tmp_fbs[r], IGT_DRAW_PWRITE,
> -					 r);
> +			draw_rect_igt_fb(pattern, &tmp_fbs[r], igt_draw_supports_method(drm.fd, IGT_DRAW_PWRITE) ?
> +					 IGT_DRAW_PWRITE : IGT_DRAW_RENDER, r);
>   	}
>   
>   	igt_output_set_pipe(prim_mode_params.output, prim_mode_params.pipe);
> @@ -2048,9 +2050,6 @@ static void draw_subtest(const struct test_mode *t)
>   	struct modeset_params *params = pick_params(t);
>   	struct fb_region *target;
>   
> -	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
> -		    !gem_has_mappable_ggtt(drm.fd));
> -
>   	switch (t->screen) {
>   	case SCREEN_PRIM:
>   		if (t->method != IGT_DRAW_MMAP_GTT && t->plane == PLANE_PRI)
> @@ -2150,9 +2149,8 @@ static void multidraw_subtest(const struct test_mode *t)
>   				  igt_draw_get_method_name(m1),
>   				  igt_draw_get_method_name(m2));
>   
> -			if ((m1 == IGT_DRAW_MMAP_GTT ||
> -			     m2 == IGT_DRAW_MMAP_GTT) &&
> -			    !gem_has_mappable_ggtt(drm.fd))
> +			if (!igt_draw_supports_method(drm.fd, m1) ||
> +			    !igt_draw_supports_method(drm.fd, m2))
>   				continue;
>   
>   			for (r = 0; r < pattern->n_rects; r++) {
> @@ -2421,9 +2419,6 @@ static void flip_subtest(const struct test_mode *t)
>   	struct draw_pattern_info *pattern = &pattern1;
>   	enum color bg_color;
>   
> -	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
> -		    !gem_has_mappable_ggtt(drm.fd));
> -
>   	switch (t->screen) {
>   	case SCREEN_PRIM:
>   		assertions |= ASSERT_LAST_ACTION_CHANGED;
> @@ -2483,9 +2478,6 @@ static void fliptrack_subtest(const struct test_mode *t, enum flip_type type)
>   	struct modeset_params *params = pick_params(t);
>   	struct draw_pattern_info *pattern = &pattern1;
>   
> -	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
> -		    !gem_has_mappable_ggtt(drm.fd));
> -
>   	prepare_subtest(t, pattern);
>   
>   	create_fb(t->format, params->primary.fb->width, params->primary.fb->height,
> @@ -2895,9 +2887,6 @@ static void farfromfence_subtest(const struct test_mode *t)
>   	int max_height, assertions = 0;
>   	int gen = intel_display_ver(intel_get_drm_devid(drm.fd));
>   
> -	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
> -		    !gem_has_mappable_ggtt(drm.fd));
> -
>   	switch (gen) {
>   	case 2:
>   		max_height = 2048;
> @@ -3181,8 +3170,7 @@ static void basic_subtest(const struct test_mode *t)
>   	fb1 = params->primary.fb;
>   
>   	for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
> -		if (method == IGT_DRAW_MMAP_GTT &&
> -		    !gem_has_mappable_ggtt(drm.fd))
> +		if (!igt_draw_supports_method(drm.fd, method))
>   			continue;
>   
>   		if (r == pattern->n_rects) {
> @@ -3487,6 +3475,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>   	}
>   
>   	TEST_MODE_ITER_BEGIN(t)
> +		igt_fixture
> +			igt_require(igt_draw_supports_method(drm.fd, t.method));
> +
>   		igt_subtest_f("%s-%s-%s-%s-%s-draw-%s",
>   			      feature_str(t.feature),
>   			      pipes_str(t.pipes),
> @@ -3503,6 +3494,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>   		    (!opt.show_hidden && t.method != IGT_DRAW_BLT))
>   			continue;
>   
> +		igt_fixture
> +			igt_require(igt_draw_supports_method(drm.fd, t.method));
> +
>   		for (t.flip = 0; t.flip < FLIP_COUNT; t.flip++)
>   			igt_subtest_f("%s-%s-%s-%s-%sflip-%s",
>   				      feature_str(t.feature),
> @@ -3521,6 +3515,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>   		    (t.feature & FEATURE_FBC) == 0)
>   			continue;
>   
> +		igt_fixture
> +			igt_require(igt_draw_supports_method(drm.fd, t.method));
> +
>   		igt_subtest_f("%s-%s-%s-fliptrack-%s",
>   			      feature_str(t.feature),
>   			      pipes_str(t.pipes),
> @@ -3535,6 +3532,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>   		    t.plane == PLANE_PRI)
>   			continue;
>   
> +		igt_fixture
> +			igt_require(igt_draw_supports_method(drm.fd, t.method));
> +
>   		igt_subtest_f("%s-%s-%s-%s-%s-move",
>   			      feature_str(t.feature),
>   			      pipes_str(t.pipes),
> @@ -3558,6 +3558,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>   		    t.plane != PLANE_SPR)
>   			continue;
>   
> +		igt_fixture
> +			igt_require(igt_draw_supports_method(drm.fd, t.method));
> +
>   		igt_subtest_f("%s-%s-%s-%s-%s-fullscreen",
>   			      feature_str(t.feature),
>   			      pipes_str(t.pipes),
> @@ -3574,6 +3577,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>   		    (!opt.show_hidden && t.fbs != FBS_INDIVIDUAL))
>   			continue;
>   
> +		igt_fixture
> +			igt_require(igt_draw_supports_method(drm.fd, t.method));
> +
>   		igt_subtest_f("%s-%s-%s-%s-multidraw",
>   			      feature_str(t.feature),
>   			      pipes_str(t.pipes),
> @@ -3590,6 +3596,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>   		    t.method != IGT_DRAW_MMAP_GTT)
>   			continue;
>   
> +		igt_fixture
> +			igt_require(igt_draw_supports_method(drm.fd, t.method));
> +
>   		igt_subtest_f("%s-farfromfence-%s",
>   			      feature_str(t.feature),
>   			      igt_draw_get_method_name(t.method))
> @@ -3603,6 +3612,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>   		    t.fbs != FBS_INDIVIDUAL)
>   			continue;
>   
> +		igt_fixture
> +			igt_require(igt_draw_supports_method(drm.fd, t.method));
> +
>   		for (t.format = 0; t.format < FORMAT_COUNT; t.format++) {
>   			/* Skip what we already tested. */
>   			if (t.format == FORMAT_DEFAULT)
> @@ -3622,6 +3634,10 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>   		    t.plane != PLANE_PRI ||
>   		    t.method != IGT_DRAW_BLT)
>   			continue;
> +
> +		igt_fixture
> +			igt_require(igt_draw_supports_method(drm.fd, t.method));
> +
>   		igt_subtest_f("%s-%s-scaledprimary",
>   			      feature_str(t.feature),
>   			      fbs_str(t.fbs))
> @@ -3636,6 +3652,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>   		    t.method != IGT_DRAW_BLT)
>   			continue;
>   
> +		igt_fixture
> +			igt_require(igt_draw_supports_method(drm.fd, t.method));
> +
>   		igt_subtest_f("%s-modesetfrombusy", feature_str(t.feature))
>   			modesetfrombusy_subtest(&t);
>   

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

end of thread, other threads:[~2023-06-12  5:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-01 11:48 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 1/5] RFC tests/i915/kms_frontbuffer_tracking: Add xe support Kunal Joshi
2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 2/5] RFC tests/i915/kms_frontbuffer_tracking: xe doesn't support tiling as of now Kunal Joshi
2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 3/5] tests/i915/kms_frontbuffer_tracking: all gem ioctls are not supported for xe " Kunal Joshi
2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 4/5] RFC lib/ioctl_wrappers: GEM_SET_DOMAIN ioctl not supported on xe Kunal Joshi
2023-06-01 11:48 ` [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER Kunal Joshi
2023-06-01 14:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for RFC Enable kms_frontbuffer_tracking on XE (rev3) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-06-06  8:02 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
2023-06-06  8:02 ` [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER Kunal Joshi
2023-06-08 11:46   ` Modem, Bhanuprakash
2023-06-09  5:47     ` Joshi, Kunal1
2023-06-09 10:12 [igt-dev] [PATCH i-g-t 0/5] RFC Enable kms_frontbuffer_tracking on XE Kunal Joshi
2023-06-09 10:12 ` [igt-dev] [PATCH i-g-t 5/5] RFC tests/i915/kms_frontbuffer_tracking: xe only supports MMAP_WC, BLT, RENDER Kunal Joshi
2023-06-12  5:40   ` Modem, Bhanuprakash

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