public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 6/8] tests/kms_frontbuffer_tracking: Skip GTT subtests on platforms w/o aperture
Date: Fri,  7 Feb 2020 21:15:22 +0200	[thread overview]
Message-ID: <20200207191524.19362-6-imre.deak@intel.com> (raw)
In-Reply-To: <20200207191524.19362-1-imre.deak@intel.com>

Subtests that draw through a GTT mapping are not relevent on a platform w/o
GTT aperture, so skip them.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 tests/kms_frontbuffer_tracking.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 724f5d16..310c8b7b 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1934,6 +1934,9 @@ 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)
@@ -2032,6 +2035,11 @@ static void multidraw_subtest(const struct test_mode *t)
 			igt_debug("Methods %s and %s\n",
 				  igt_draw_get_method_name(m1),
 				  igt_draw_get_method_name(m2));
+
+			igt_skip_on((m1 == IGT_DRAW_MMAP_GTT ||
+				     m2 == IGT_DRAW_MMAP_GTT) &&
+				    !gem_has_mappable_ggtt(drm.fd));
+
 			for (r = 0; r < pattern->n_rects; r++) {
 				used_method = (r % 2 == 0) ? m1 : m2;
 
@@ -2140,6 +2148,9 @@ static void badformat_subtest(const struct test_mode *t)
  */
 static void format_draw_subtest(const struct test_mode *t)
 {
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	if (format_is_valid(t->feature, t->format))
 		draw_subtest(t);
 	else
@@ -2276,6 +2287,9 @@ 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;
@@ -2335,6 +2349,9 @@ 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,
@@ -2383,6 +2400,9 @@ static void move_subtest(const struct test_mode *t)
 	struct fb_region *reg = pick_target(t, params);
 	bool repeat = false;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	/* Just paint the right color since we start at 0x0. */
@@ -2434,6 +2454,9 @@ static void onoff_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	struct draw_pattern_info *pattern = &pattern3;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	/* Just paint the right color since we start at 0x0. */
@@ -2493,6 +2516,9 @@ static void fullscreen_plane_subtest(const struct test_mode *t)
 	struct modeset_params *params = pick_params(t);
 	int assertions;
 
+	igt_skip_on(t->method == IGT_DRAW_MMAP_GTT &&
+		    !gem_has_mappable_ggtt(drm.fd));
+
 	prepare_subtest(t, pattern);
 
 	rect = pattern->get_rect(&params->primary, 0);
@@ -2744,6 +2770,9 @@ static void farfromfence_subtest(const struct test_mode *t)
 	int max_height, assertions = 0;
 	int gen = intel_gen(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;
@@ -3025,6 +3054,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++, r++) {
+		igt_skip_on(method == IGT_DRAW_MMAP_GTT &&
+			    !gem_has_mappable_ggtt(drm.fd));
+
 		if (r == pattern->n_rects) {
 			params->primary.fb = (params->primary.fb == fb1) ? &fb2 : fb1;
 
-- 
2.23.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2020-02-07 19:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 19:15 [igt-dev] [PATCH i-g-t 1/8] lib/igt_draw: Refactor get_tiling calls Imre Deak
2020-02-07 19:15 ` [igt-dev] [PATCH i-g-t 2/8] tests/kms_frontbuffer_tracking: Skip set tiling calls if not supported Imre Deak
2020-02-08 22:36   ` Dixit, Ashutosh
2020-02-10 22:32   ` Matt Roper
2020-02-07 19:15 ` [igt-dev] [PATCH i-g-t 3/8] tests/kms_available_modes_crc: Don't set tiling for framebuffer Imre Deak
2020-02-10 22:47   ` Matt Roper
2020-02-07 19:15 ` [igt-dev] [PATCH i-g-t 4/8] tests/kms_draw_crc: Skip GTT subtests on platforms w/o aperture Imre Deak
2020-02-10 22:51   ` Matt Roper
2020-02-07 19:15 ` [igt-dev] [PATCH i-g-t 5/8] tests/kms_draw_crc: Fix generating reference CRCs " Imre Deak
2020-02-10 22:58   ` Matt Roper
2020-02-11  0:38     ` Imre Deak
2020-02-07 19:15 ` Imre Deak [this message]
2020-02-10 23:19   ` [igt-dev] [PATCH i-g-t 6/8] tests/kms_frontbuffer_tracking: Skip GTT subtests " Matt Roper
2020-02-11  1:18     ` Imre Deak
2020-02-07 19:15 ` [igt-dev] [PATCH i-g-t 7/8] lib/igt_draw: Fix igt_draw_fill_fb() " Imre Deak
2020-02-10 23:22   ` Matt Roper
2020-02-07 19:15 ` [igt-dev] [PATCH i-g-t 8/8] lib/igt_fb: Make sure tiled YUV framebuffers are fully cleared Imre Deak
2020-02-10 23:34   ` Matt Roper
2020-02-11  1:26     ` Imre Deak
2020-02-07 19:51 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib/igt_draw: Refactor get_tiling calls Patchwork
2020-02-08 22:36 ` [igt-dev] [PATCH i-g-t 1/8] " Dixit, Ashutosh
2020-02-10 11:37   ` Imre Deak
2020-02-11 19:10     ` Dixit, Ashutosh
2020-02-11 19:18       ` Imre Deak
2020-02-12  4:17         ` Dixit, Ashutosh
2020-02-10 22:13 ` Matt Roper
2020-02-11  0:37   ` Imre Deak
2020-02-11  9:30 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] " 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=20200207191524.19362-6-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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