public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Juha-Pekka Heikkila via igt-dev <igt-dev@lists.freedesktop.org>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/2] HACK tests/kms_rotation_crc: use igt_pipe_crc_get_current_with_reference()
Date: Thu, 14 Feb 2019 15:57:13 +0200	[thread overview]
Message-ID: <1550152633-31291-2-git-send-email-juhapekka.heikkila@gmail.com> (raw)
In-Reply-To: <1550152633-31291-1-git-send-email-juhapekka.heikkila@gmail.com>

use igt_pipe_crc_get_current_with_reference() to see if failed
crcs happen only at first frames or if they're static.
---
 tests/kms_rotation_crc.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index fc995d0..69507ec 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -336,7 +336,7 @@ static void test_single_case(data_t *data, enum pipe pipe,
 	igt_assert_eq(ret, 0);
 
 	/* Check CRC */
-	igt_pipe_crc_get_current(display->drm_fd, data->pipe_crc, &crc_output);
+	igt_pipe_crc_get_current_with_reference(display->drm_fd, data->pipe_crc, &crc_output, &data->ref_crc);
 	igt_assert_crc_equal(&data->ref_crc, &crc_output);
 
 	/*
@@ -359,7 +359,7 @@ static void test_single_case(data_t *data, enum pipe pipe,
 			igt_assert_eq(ret, 0);
 		}
 		kmstest_wait_for_pageflip(data->gfx_fd);
-		igt_pipe_crc_get_current(display->drm_fd, data->pipe_crc, &crc_output);
+		igt_pipe_crc_get_current_with_reference(display->drm_fd, data->pipe_crc, &crc_output, &data->flip_crc);
 		igt_assert_crc_equal(&data->flip_crc,
 				     &crc_output);
 	}
@@ -428,7 +428,7 @@ typedef struct {
 
 static bool get_multiplane_crc(data_t *data, igt_output_t *output,
 			       igt_crc_t *crc_output, planeinfos *planeinfo,
-			       int numplanes)
+			       int numplanes, igt_crc_t *refcrc)
 {
 	uint32_t w, h;
 	igt_display_t *display = &data->display;
@@ -473,7 +473,8 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
 	ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
 	igt_assert_eq(ret, 0);
 
-	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, crc_output);
+	igt_pipe_crc_get_current_with_reference(data->gfx_fd, data->pipe_crc,
+						crc_output, refcrc);
 
 	for (c = 0; c < numplanes && oldplanes; c++)
 		igt_remove_fb(data->gfx_fd, &oldplanes[c].fb);
@@ -606,13 +607,13 @@ static void test_multi_plane_rotation(data_t *data, enum pipe pipe)
 						p[1].rotation_sw = planeconfigs[j].rotation;
 						p[1].rotation_hw = IGT_ROTATION_0;
 						if (!get_multiplane_crc(data, output, &retcrc_sw,
-								   (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+								   (planeinfos *)&p, MAXMULTIPLANESAMOUNT, NULL))
 							continue;
 
 						igt_swap(p[0].rotation_sw, p[0].rotation_hw);
 						igt_swap(p[1].rotation_sw, p[1].rotation_hw);
 						if (!get_multiplane_crc(data, output, &retcrc_hw,
-								   (planeinfos *)&p, MAXMULTIPLANESAMOUNT))
+								   (planeinfos *)&p, MAXMULTIPLANESAMOUNT, &retcrc_sw))
 							continue;
 
 						igt_assert_crc_equal(&retcrc_sw, &retcrc_hw);
-- 
2.7.4

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

  reply	other threads:[~2019-02-14 13:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14 13:57 [igt-dev] [PATCH i-g-t 1/2] HACK lib/igt_debugfs: add igt_pipe_crc_get_current_with_reference Juha-Pekka Heikkila via igt-dev
2019-02-14 13:57 ` Juha-Pekka Heikkila via igt-dev [this message]
2019-02-14 14:19 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
2019-02-14 19:08 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-14 22:10 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] HACK lib/igt_debugfs: add igt_pipe_crc_get_current_with_reference (rev2) Patchwork
2019-02-15  7:55 ` [igt-dev] ✗ 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=1550152633-31291-2-git-send-email-juhapekka.heikkila@gmail.com \
    --to=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.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