From: Rob Clark <robdclark@gmail.com>
To: igt-dev@lists.freedesktop.org
Cc: Rob Clark <robdclark@chromium.org>,
Helen Koike <helen.koike@collabora.com>,
Emma Anholt <emma@anholt.net>
Subject: [igt-dev] [PATCH] tests/kms_plane: Fix skips/fails vs CRC cleanup
Date: Wed, 11 Oct 2023 14:03:52 -0700 [thread overview]
Message-ID: <20231011210352.671199-1-robdclark@gmail.com> (raw)
From: Rob Clark <robdclark@chromium.org>
test_fini() isn't necessarily called if a subtest skips/fails, leaving
the kernel drm_crtc_crc still in the open state, causing further
attempts to open/configure the crc to fail.
Signed-off-by: Rob Clark <robdclark@chromium.org>
---
tests/kms_plane.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 9a515559c9b0..b3d6043496b1 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -84,6 +84,8 @@ static color_t blue = { 0.0f, 0.0f, 1.0f };
static void test_init(data_t *data, enum pipe pipe)
{
igt_require(data->display.pipes[pipe].n_planes > 0);
+ if (data->pipe_crc)
+ igt_pipe_crc_free(data->pipe_crc);
data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
IGT_PIPE_CRC_SOURCE_AUTO);
igt_display_reset(&data->display);
@@ -92,6 +94,7 @@ static void test_init(data_t *data, enum pipe pipe)
static void test_fini(data_t *data)
{
igt_pipe_crc_free(data->pipe_crc);
+ data->pipe_crc = NULL;
}
enum {
--
2.41.0
next reply other threads:[~2023-10-11 21:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 21:03 Rob Clark [this message]
2023-10-12 0:41 ` [igt-dev] [PATCH] tests/kms_plane: Fix skips/fails vs CRC cleanup Jessica Zhang
2023-10-12 2:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-10-12 2:41 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-10-12 19:21 ` [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=20231011210352.671199-1-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=emma@anholt.net \
--cc=helen.koike@collabora.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=robdclark@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox