Re: [igt-dev] [PATCH] tests/kms_cursor_legacy: igt_require_pipe_crc for flip_vs_cursor_crc
From: Petri Latvala <hidden>
Date: 2021-11-03 09:55:19
On Mon, Nov 01, 2021 at 12:37:30PM -0400, Mark Yacoub wrote:
quoted hunk ↗ jump to hunk
From: Mark Yacoub <redacted> [Why] test_init uses CRC in debugfs which is not supported by some drivers. [How] igt_require_pipe_crc before igt_pipe_crc_new is called. Test: igt@kms_cursor_legacy@flip-vs-cursor-crc-{atomic,legacy} on ChromeOS Jacuzzi (MTK) Signed-off-by: Mark Yacoub <redacted> --- tests/kms_cursor_legacy.c | 1 + 1 file changed, 1 insertion(+)diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c index 81362807..b006e566 100644 --- a/tests/kms_cursor_legacy.c +++ b/tests/kms_cursor_legacy.c@@ -1281,6 +1281,7 @@ static void flip_vs_cursor_crc(igt_display_t *display, bool atomic) igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY); + igt_require_pipe_crc(display->drm_fd); pipe_crc = igt_pipe_crc_new(display->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
These requirement checks should be done before doing anything to the
system state, even from the context lines of this diff I see a commit
being done. So this require call should be at the very beginning of
this function, or in the igt_subtest() block, or in an igt_fixture
preferrably.
What about flip_vs_cursor_busy_crc?
flip_vs_cursor_crc and flip_vs_cursor_busy_crc are both called in neat
subtest groups already so I suppose the most elegant solution for both
is to add
igt_fixture {
igt_require_pipe_crc(display.drm_fd);
}
to the beginning of both those groups.
--
Petri Latvala