summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2024-05-15 14:19:49 +0200
committerZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2024-05-16 06:14:58 +0200
commit133c90d6aabcd90871e36946317c90ee83c2f847 (patch)
tree9c8a2a4accb143d81e8078faa7f038371a83f5b6 /tests
parentea7df40d7b993993737c17ad273beef4befac6c6 (diff)
tests/xe_intel_bb: Use supported tilings instead hardcoded ones
Use introduced render tilings in cmds-info to select appropriate one on which render subtest is executed. Reviewed-by: Karolina Stolarek <karolina.stolarek@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Link: https://lore.kernel.org/r/20240515121949.245280-10-zbigniew.kempczynski@intel.com Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/intel/xe_intel_bb.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/tests/intel/xe_intel_bb.c b/tests/intel/xe_intel_bb.c
index 690576586..c712d04ba 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);
}
}