From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Simon Ser" <contact@emersion.fr>,
"Jonas Ådahl" <jadahl@redhat.com>,
"Daniel Stone" <daniel@fooishbar.org>,
"Sameer Lattannavar" <sameer.lattannavar@intel.com>,
"Sebastian Wick" <sebastian.wick@redhat.com>,
"Harry Wentland" <harry.wentland@amd.com>,
"Pekka Paalanen" <pekka.paalanen@collabora.com>
Subject: [PATCH i-g-t 3/5] tests/kms_cursor_crc: Make require_cursor_size() a bit more sensible
Date: Fri, 15 Mar 2024 21:15:03 +0200 [thread overview]
Message-ID: <20240315191505.27620-4-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20240315191505.27620-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Rename require_cursor_size() to cursor_size_supported() and
flip the return value so that mere mortals can undestand
what the code is doing.
Cc: Simon Ser <contact@emersion.fr>
Cc: Jonas Ådahl <jadahl@redhat.com>
Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Sameer Lattannavar <sameer.lattannavar@intel.com>
Cc: Sebastian Wick <sebastian.wick@redhat.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/kms_cursor_crc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index f747b919f45e..38b354972afd 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -676,7 +676,7 @@ static void test_cursor_opaque(data_t *data)
test_cursor_alpha(data);
}
-static bool require_cursor_size(data_t *data, int w, int h)
+static bool cursor_size_supported(data_t *data, int w, int h)
{
igt_fb_t primary_fb;
drmModeModeInfo *mode;
@@ -718,7 +718,7 @@ static bool require_cursor_size(data_t *data, int w, int h)
igt_remove_fb(data->drm_fd, &primary_fb);
igt_output_set_pipe(output, PIPE_NONE);
- return !!ret;
+ return ret == 0;
}
static void run_test(data_t *data, void (*testfunc)(data_t *), int cursor_w, int cursor_h)
@@ -875,7 +875,7 @@ static void run_size_tests(data_t *data, int w, int h)
if (!valid_pipe_output_combo(data))
continue;
- if (require_cursor_size(data, w, h)) {
+ if (!cursor_size_supported(data, w, h)) {
igt_info("Cursor size %dx%d not supported by driver\n", w, h);
continue;
}
--
2.43.2
next prev parent reply other threads:[~2024-03-15 19:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 19:15 [PATCH i-g-t 0/5] tests/kms_cursor_crc: Test SIZE_HINTS Ville Syrjala
2024-03-15 19:15 ` [PATCH i-g-t 1/5] wip: drm-uapi: add drm_plane_size_hints Ville Syrjala
2024-03-15 19:15 ` [PATCH i-g-t 2/5] lib/igt_kms: Add IGT_PLANE_SIZE_HINTS Ville Syrjala
2024-03-15 19:15 ` Ville Syrjala [this message]
2024-03-15 19:15 ` [PATCH i-g-t 4/5] tests/kms_cursor_crc: Test the SIZE_HINTS property Ville Syrjala
2024-04-04 8:51 ` Pekka Paalanen
2024-04-04 10:56 ` Ville Syrjälä
2024-04-04 12:52 ` Pekka Paalanen
2024-04-04 13:05 ` Ville Syrjälä
2024-03-15 19:15 ` [PATCH i-g-t 5/5] CI: tests/intel-ci: Run kms_cursor_crc@cursor-size-hints Ville Syrjala
2024-03-15 20:09 ` ✓ CI.xeBAT: success for tests/kms_cursor_crc: Test SIZE_HINTS Patchwork
2024-03-15 20:11 ` ✓ Fi.CI.BAT: " Patchwork
2024-03-16 21:18 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-03-18 10:45 ` [PATCH i-g-t 0/5] " Sebastian Wick
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=20240315191505.27620-4-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=contact@emersion.fr \
--cc=daniel@fooishbar.org \
--cc=harry.wentland@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jadahl@redhat.com \
--cc=pekka.paalanen@collabora.com \
--cc=sameer.lattannavar@intel.com \
--cc=sebastian.wick@redhat.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