[PATCH i-g-t 3/5] tests/kms_cursor_crc: Make require_cursor_size() a bit more sensible
Ville Syrjala
ville.syrjala at linux.intel.com
Fri Mar 15 19:15:03 UTC 2024
From: Ville Syrjälä <ville.syrjala at 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 at emersion.fr>
Cc: Jonas Ådahl <jadahl at redhat.com>
Cc: Daniel Stone <daniel at fooishbar.org>
Cc: Sameer Lattannavar <sameer.lattannavar at intel.com>
Cc: Sebastian Wick <sebastian.wick at redhat.com>
Cc: Harry Wentland <harry.wentland at amd.com>
Cc: Pekka Paalanen <pekka.paalanen at collabora.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at 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
More information about the igt-dev
mailing list