Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
	"Karolina Stolarek" <karolina.stolarek@intel.com>,
	"Juha-Pekka Heikkila" <juhapekka.heikkila@gmail.com>
Subject: [PATCH i-g-t v6 9/9] tests/xe_intel_bb: Use supported tilings instead hardcoded ones
Date: Wed, 15 May 2024 14:19:49 +0200	[thread overview]
Message-ID: <20240515121949.245280-10-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20240515121949.245280-1-zbigniew.kempczynski@intel.com>

Use introduced render tilings in cmds-info to select appropriate one
on which render subtest is executed.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reviewed-by: Karolina Stolarek <karolina.stolarek@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/intel/xe_intel_bb.c | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/tests/intel/xe_intel_bb.c b/tests/intel/xe_intel_bb.c
index 6905765863..c712d04ba7 100644
--- a/tests/intel/xe_intel_bb.c
+++ b/tests/intel/xe_intel_bb.c
@@ -18,6 +18,7 @@
 
 #include "igt.h"
 #include "igt_crc.h"
+#include "intel_blt.h"
 #include "intel_bufops.h"
 #include "intel_mocs.h"
 #include "intel_pat.h"
@@ -979,19 +980,10 @@ const char *help_str =
 
 igt_main_args("dpib", NULL, help_str, opt_handler, NULL)
 {
-	int xe, i;
+	int xe;
 	struct buf_ops *bops;
 	uint32_t width;
 
-	struct test {
-		uint32_t tiling;
-		const char *tiling_name;
-	} tests[] = {
-		{ I915_TILING_NONE, "none" },
-		{ I915_TILING_X, "x" },
-		{ I915_TILING_4, "4" },
-	};
-
 	igt_fixture {
 		xe = drm_open_driver(DRIVER_XE);
 		bops = buf_ops_create(xe);
@@ -1054,14 +1046,19 @@ igt_main_args("dpib", NULL, help_str, opt_handler, NULL)
 		delta_check(bops);
 
 	igt_subtest_with_dynamic("render") {
+		int tiling;
+
 		igt_require(xe_has_engine_class(xe, DRM_XE_ENGINE_CLASS_RENDER));
 
-		for (i = 0; i < ARRAY_SIZE(tests); i++) {
-			const struct test *t = &tests[i];
+		for_each_tiling(tiling) {
+			if (!render_supports_tiling(xe, tiling, false))
+				continue;
 
 			for (width = 512; width <= 1024; width += 512)
-				igt_dynamic_f("render-%s-%u", t->tiling_name, width)
-					render(bops, t->tiling, width, width);
+				igt_dynamic_f("render-%s-%u",
+					      blt_tiling_name(tiling), width)
+					render(bops, blt_tile_to_i915_tile(tiling),
+					       width, width);
 		}
 	}
 
-- 
2.34.1


  parent reply	other threads:[~2024-05-15 12:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15 12:19 [PATCH i-g-t v6 0/9] Add render-copy compression on Xe+ Zbigniew Kempczyński
2024-05-15 12:19 ` [PATCH i-g-t v6 1/9] lib/intel_bufops: Store devid on buffer ops creation Zbigniew Kempczyński
2024-05-15 12:19 ` [PATCH i-g-t v6 2/9] lib/intel_bufops: Restrict tilings on non-flatccs platforms Zbigniew Kempczyński
2024-05-15 12:19 ` [PATCH i-g-t v6 3/9] lib/intel_bufops: Start supporting compression on Xe2+ Zbigniew Kempczyński
2024-05-15 12:19 ` [PATCH i-g-t v6 4/9] lib/rendercopy_gen9: Separate xe and xe2 compression format Zbigniew Kempczyński
2024-05-15 12:19 ` [PATCH i-g-t v6 5/9] lib/intel_cmds_info: Define tiling macros Zbigniew Kempczyński
2024-05-15 12:19 ` [PATCH i-g-t v6 6/9] lib/intel_cmds_info: Introduce render tilings Zbigniew Kempczyński
2024-05-15 13:20   ` Juha-Pekka Heikkila
2024-05-15 12:19 ` [PATCH i-g-t v6 7/9] lib/intel_blt: Add render tilings and compression support helper Zbigniew Kempczyński
2024-05-15 12:19 ` [PATCH i-g-t v6 8/9] tests/xe_render_copy: Add subtest which exercises compression Zbigniew Kempczyński
2024-05-15 12:19 ` Zbigniew Kempczyński [this message]
2024-05-15 14:58 ` ✓ CI.xeBAT: success for Add render-copy compression on Xe+ (rev6) Patchwork
2024-05-15 15:07 ` ✓ Fi.CI.BAT: " Patchwork
2024-05-15 16:53 ` ✓ CI.xeFULL: " Patchwork
2024-05-16  4:29 ` ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240515121949.245280-10-zbigniew.kempczynski@intel.com \
    --to=zbigniew.kempczynski@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=karolina.stolarek@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox