All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 13/14] tools/intel_display_poller: Add vrr-wrap test
Date: Thu, 17 Dec 2020 18:27:02 +0200	[thread overview]
Message-ID: <20201217162703.20779-14-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20201217162703.20779-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The VRR_STATUS2 registers contains yet anoher scanline counter.
Let's add a test to check when it wraps.

Not sure this is actually useful. A better way might be to
allow wholesale replacement of the normal scanline counter
register with the VRR STATUS2? Not sure we care about this
register at all actually.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tools/intel_display_poller.c | 43 ++++++++++++++++++++++++++++++------
 1 file changed, 36 insertions(+), 7 deletions(-)

diff --git a/tools/intel_display_poller.c b/tools/intel_display_poller.c
index 37383dc8b3ed..6c4170505650 100644
--- a/tools/intel_display_poller.c
+++ b/tools/intel_display_poller.c
@@ -59,6 +59,7 @@ enum test {
 	TEST_FLIPDONE_DEIIR,
 	TEST_SURFLIVE,
 	TEST_WRAP,
+	TEST_VRR_WRAP,
 	TEST_FIELD,
 };
 
@@ -1149,16 +1150,14 @@ static void poll_dsl_surflive(uint32_t devid, int pipe,
 	write_reg(surf, saved);
 }
 
-static void poll_dsl_wrap(uint32_t devid, int pipe,
-			  uint32_t *min, uint32_t *max, const int count,
-			  int vrr_push_scanline)
+static void _poll_dsl_wrap(uint32_t devid, int pipe,
+			   uint32_t *min, uint32_t *max, const int count,
+			   int vrr_push_scanline, uint32_t dsl)
 {
-	uint32_t dsl, dsl1, dsl2;
+	uint32_t dsl1, dsl2;
 	bool field1, field2;
 	int i[2] = {};
 
-	dsl = PIPE_REG(pipe, PIPEA_DSL);
-
 	while (!quit) {
 		push_vrr(devid, pipe, vrr_push_scanline);
 
@@ -1186,6 +1185,24 @@ static void poll_dsl_wrap(uint32_t devid, int pipe,
 	}
 }
 
+static void poll_dsl_wrap(uint32_t devid,
+			  int pipe, uint32_t *min, uint32_t *max, const int count,
+			  int vrr_push_scanline)
+{
+	return _poll_dsl_wrap(devid, pipe, min, max, count,
+			      vrr_push_scanline,
+			      PIPE_REG(pipe, PIPEA_DSL));
+}
+
+static void poll_vrr_wrap(uint32_t devid,
+			  int pipe, uint32_t *min, uint32_t *max, const int count,
+			  int vrr_push_scanline)
+{
+	return _poll_dsl_wrap(devid, pipe, min, max, count,
+			      vrr_push_scanline,
+			      trans_reg(devid, pipe, TRANS_VRR_STATUS2_A));
+}
+
 static void poll_dsl_field(int pipe, uint32_t *min, uint32_t *max, const int count)
 {
 	uint32_t dsl, dsl1, dsl2;
@@ -1267,6 +1284,9 @@ static const char *test_name(enum test test, int pipe, int bit, bool test_pixel_
 	case TEST_FIELD:
 		snprintf(str, sizeof str, "%s / pipe %c / Field", type, pipe_name(pipe));
 		return str;
+	case TEST_VRR_WRAP:
+		snprintf(str, sizeof str, "%s / pipe %c / VRR wrap", type, pipe_name(pipe));
+		return str;
 	default:
 		return "";
 	}
@@ -1275,7 +1295,7 @@ static const char *test_name(enum test test, int pipe, int bit, bool test_pixel_
 static void __attribute__((noreturn)) usage(const char *name)
 {
 	fprintf(stderr, "Usage: %s [options]\n"
-		" -t,--test <pipestat|iir|framecount|flipcount|frametimestamp|timestamp|pan|flip|flipdone|surflive|wrap|field>\n"
+		" -t,--test <pipestat|iir|framecount|flipcount|frametimestamp|timestamp|pan|flip|flipdone|surflive|wrap|field|vrr-wrap>\n"
 		" -p,--pipe <pipe>\n"
 		" -b,--bit <bit>\n"
 		" -l,--line <target scanline/pixel>\n"
@@ -1345,6 +1365,8 @@ int main(int argc, char *argv[])
 				test = TEST_WRAP;
 			else if (!strcmp(optarg, "field"))
 				test = TEST_FIELD;
+			else if (!strcmp(optarg, "vrr-wrap"))
+				test = TEST_VRR_WRAP;
 			else
 				usage(argv[0]);
 			break;
@@ -1527,6 +1549,10 @@ int main(int argc, char *argv[])
 		case TEST_FLIPDONE:
 			test = TEST_FLIPDONE_DEIIR;
 			break;
+		case TEST_VRR_WRAP:
+			if (intel_gen(devid) < 11)
+				usage(argv[0]);
+			break;
 		case TEST_FLIPCOUNT:
 		case TEST_PAN:
 		case TEST_FLIP:
@@ -1638,6 +1664,9 @@ int main(int argc, char *argv[])
 	case TEST_FIELD:
 		poll_dsl_field(pipe, min, max, count);
 		break;
+	case TEST_VRR_WRAP:
+		poll_vrr_wrap(devid, pipe, min, max, count, vrr_push_scanline);
+		break;
 	default:
 		assert(0);
 	}
-- 
2.26.2

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

  parent reply	other threads:[~2020-12-17 16:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 16:26 [igt-dev] [PATCH i-g-t 00/14] tools/intel_display_poller: async flip and vrr Ville Syrjala
2020-12-17 16:26 ` [igt-dev] [PATCH i-g-t 01/14] tools/intel_display_poller: Fix TILEOFF vs. LINOFF for skl+ Ville Syrjala
2020-12-17 16:26 ` [igt-dev] [PATCH i-g-t 02/14] tools/intel_display_poller: Unify ilk+ and bdw+ codepaths Ville Syrjala
2020-12-17 16:26 ` [igt-dev] [PATCH i-g-t 03/14] tools/intel_display_poller: Use intel_gen() Ville Syrjala
2020-12-17 16:26 ` [igt-dev] [PATCH i-g-t 04/14] tools/intel_display_poller: Add pipe D support Ville Syrjala
2020-12-17 16:26 ` [igt-dev] [PATCH i-g-t 05/14] tools/intel_display_poller: Add flipdone tests Ville Syrjala
2020-12-17 16:26 ` [igt-dev] [PATCH i-g-t 06/14] tools/intel_display_poller: Add async flip test mode Ville Syrjala
2020-12-17 16:26 ` [igt-dev] [PATCH i-g-t 07/14] lib: Add transcoder VRR registers Ville Syrjala
2020-12-17 16:26 ` [igt-dev] [PATCH i-g-t 08/14] lib: Add timestmap registers Ville Syrjala
2020-12-17 16:26 ` [igt-dev] [PATCH i-g-t 09/14] tools/intel_display_poller: Extract wait_scanline() Ville Syrjala
2020-12-17 16:26 ` [igt-dev] [PATCH i-g-t 10/14] tools/intel_display_poller: Add frame timestamp tests Ville Syrjala
2020-12-17 16:27 ` [igt-dev] [PATCH i-g-t 11/14] tools/intel_display_poller: Rework some loops Ville Syrjala
2020-12-17 16:27 ` [igt-dev] [PATCH i-g-t 12/14] tools/intel_display_poller: Add VRR push support Ville Syrjala
2020-12-17 16:27 ` Ville Syrjala [this message]
2020-12-17 16:27 ` [igt-dev] [PATCH i-g-t 14/14] tools/intel_display_poller: Add vrr-push test Ville Syrjala
2020-12-17 18:10 ` [igt-dev] ✗ Fi.CI.BAT: failure for tools/intel_display_poller: async flip and vrr Patchwork
2021-03-01 20:37 [igt-dev] [PATCH i-g-t 00/14] " Manasi Navare
2021-03-01 20:37 ` [igt-dev] [PATCH i-g-t 13/14] tools/intel_display_poller: Add vrr-wrap test Manasi Navare
2021-04-08 18:03   ` Navare, Manasi
2021-10-11 13:01     ` Ville Syrjälä

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=20201217162703.20779-14-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.