public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 2/2] kms_flip: Run basic tests only on one pipe
Date: Fri, 22 Apr 2016 16:16:16 +0100	[thread overview]
Message-ID: <1461338176-17711-2-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1461338176-17711-1-git-send-email-tvrtko.ursulin@linux.intel.com>

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

It brings enough value for the basic test set to check
one connector with one pipe only, rather every connector
with all possible pipes.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 tests/kms_flip.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 1e7336e1ba95..992c59b53fb9 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1283,7 +1283,7 @@ static void free_test_output(struct test_output *o)
 	}
 }
 
-static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
+static bool run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
 				 int crtc_count, int duration_ms)
 {
 	char test_name[128];
@@ -1296,7 +1296,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
 	case 1:
 		connector_find_preferred_mode(o->_connector[0], crtc_idxs[0], o);
 		if (!o->mode_valid)
-			return;
+			return false;
 		snprintf(test_name, sizeof(test_name),
 			 "%s on pipe %s, connector %s-%d",
 			 igt_subtest_name(),
@@ -1307,7 +1307,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
 	case 2:
 		connector_find_compatible_mode(crtc_idxs[0], crtc_idxs[1], o);
 		if (!o->mode_valid)
-			return;
+			return false;
 		snprintf(test_name, sizeof(test_name),
 			 "%s on pipe %s:%s, connector %s-%d:%s-%d",
 			 igt_subtest_name(),
@@ -1422,6 +1422,8 @@ out:
 	last_connector = NULL;
 
 	free_test_output(o);
+
+	return true;
 }
 
 static int run_test(int duration, int flags)
@@ -1454,6 +1456,9 @@ static int run_test(int duration, int flags)
 				modes++;
 
 			free_test_output(&o);
+
+			if ((flags & TEST_BASIC) && modes > 0)
+				break;
 		}
 	}
 
@@ -1462,6 +1467,7 @@ static int run_test(int duration, int flags)
 	duration = max(500, duration);
 
 	/* Find any connected displays */
+	modes = 0;
 	for (i = 0; i < resources->count_connectors; i++) {
 		for (n = 0; n < resources->count_crtcs; n++) {
 			int crtc_idx;
@@ -1476,7 +1482,11 @@ static int run_test(int duration, int flags)
 			o.depth = 24;
 
 			crtc_idx = n;
-			run_test_on_crtc_set(&o, &crtc_idx, 1, duration);
+			if (run_test_on_crtc_set(&o, &crtc_idx, 1, duration))
+				modes++;
+
+			if ((flags & TEST_BASIC) && modes > 0)
+				break;
 		}
 	}
 
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-04-22 15:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 15:16 [PATCH i-g-t 1/2] kms_flip: Shorten basic tests a bit Tvrtko Ursulin
2016-04-22 15:16 ` Tvrtko Ursulin [this message]
2016-04-25  8:54   ` [PATCH i-g-t 2/2] kms_flip: Run basic tests only on one pipe Daniel Vetter
2016-04-25  8:52 ` [PATCH i-g-t 1/2] kms_flip: Shorten basic tests a bit Daniel Vetter
2016-04-25 10:22 ` Marius Vlad

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=1461338176-17711-2-git-send-email-tvrtko.ursulin@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@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