[igt-dev] [PATCH igt] tests/kms_cursor_crc: Actually wait an extra vblank

Rob Clark robdclark at gmail.com
Wed Jul 6 21:59:24 UTC 2022


From: Rob Clark <robdclark at chromium.org>

Fulfill the comment that rightly predicts an extra vblank is needed
before attempting to read the CRC after a legacy cursor update.

On the driver side, if the cursor update comes too close to vblank,
it could end up being scheduled for the *following* vblank to avoid
blocking.  Hence needing to vblanks to be sure the CRC reflects the
cursor update.

Fixes flakey results on msm.

Signed-off-by: Rob Clark <robdclark at chromium.org>
---
 tests/kms_cursor_crc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 5c90537b..ac16135c 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -204,6 +204,8 @@ static void do_single_test(data_t *data, int x, int y, bool hw_test,
 		/* Extra vblank wait is because nonblocking cursor ioctl */
 		igt_wait_for_vblank(data->drm_fd,
 				display->pipes[data->pipe].crtc_offset);
+		igt_wait_for_vblank(data->drm_fd,
+				display->pipes[data->pipe].crtc_offset);
 
 		igt_pipe_crc_get_current(data->drm_fd, pipe_crc, hwcrc);
 
-- 
2.36.1



More information about the igt-dev mailing list