Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] Revert "tests/kms_async_flips: Make the crc test faster"
@ 2022-03-18  8:17 Karthik B S
  2022-03-18 10:08 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Karthik B S @ 2022-03-18  8:17 UTC (permalink / raw)
  To: igt-dev

This reverts commit 9cb64a757d2ff1e180b1648e611439d94afd697d.

This patch was added to speed up the test and get better results with
shard-skls. But even with this we're still seeing failure on shard-skl.

Signed-off-by: Karthik B S <karthik.b.s@intel.com>
---
 tests/kms_async_flips.c | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index c658630c..5e11cd43 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -472,28 +472,19 @@ static unsigned int clock_ms(void)
 	return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
 }
 
-static void paint_fb(int fd, struct igt_fb *fb, uint32_t color, int height)
+static void paint_fb(int fd, struct igt_fb *fb, uint32_t color)
 {
 	igt_draw_rect_fb(fd, NULL, 0, fb,
 			 gem_has_mappable_ggtt(fd) ?
 			 IGT_DRAW_MMAP_GTT : IGT_DRAW_MMAP_WC,
-			 0, 0, 1, height, color);
+			 0, 0, 1, fb->height, color);
 }
 
 static void test_crc(data_t *data)
 {
 	unsigned int frame = 0;
 	unsigned int start;
-	int ret, height;
-	drmModeModeInfoPtr mode;
-
-	/* make things faster by using a smallish mode */
-	mode = &data->connector->modes[0];
-	if (mode->hdisplay > 1024 && mode->vdisplay > 786)
-		mode = igt_std_1024_mode_get(data->refresh_rate);
-	else
-		mode = igt_memdup(mode, sizeof(*mode));
-	height = mode->vdisplay;
+	int ret;
 
 	data->flip_count = 0;
 	data->frame_count = 0;
@@ -503,8 +494,7 @@ static void test_crc(data_t *data)
 	igt_draw_fill_fb(data->drm_fd, &data->bufs[!frame], 0xff0000ff);
 
 	ret = drmModeSetCrtc(data->drm_fd, data->crtc_id, data->bufs[frame].fb_id, 0, 0,
-			     &data->connector->connector_id, 1, mode);
-	free(mode);
+			     &data->connector->connector_id, 1, &data->connector->modes[0]);
 	igt_assert_eq(ret, 0);
 
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd,
@@ -520,7 +510,7 @@ static void test_crc(data_t *data)
 
 	while (clock_ms() - start < 2000) {
 		/* fill the next fb with the expected color */
-		paint_fb(data->drm_fd, &data->bufs[frame], 0xff0000ff, height);
+		paint_fb(data->drm_fd, &data->bufs[frame], 0xff0000ff);
 
 		data->flip_pending = true;
 		ret = drmModePageFlip(data->drm_fd, data->crtc_id, data->bufs[frame].fb_id,
@@ -531,7 +521,7 @@ static void test_crc(data_t *data)
 
 		/* clobber the previous fb which should no longer be scanned out */
 		frame = !frame;
-		paint_fb(data->drm_fd, &data->bufs[frame], rand(), height);
+		paint_fb(data->drm_fd, &data->bufs[frame], rand());
 	}
 
 	igt_pipe_crc_stop(data->pipe_crc);
-- 
2.22.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-24  4:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-18  8:17 [igt-dev] [PATCH i-g-t] Revert "tests/kms_async_flips: Make the crc test faster" Karthik B S
2022-03-18 10:08 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-03-18 11:39 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-03-18 13:58 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
2022-03-24  4:38   ` Karthik B S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox