From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t 3/5] tests/kms_plane_multiple: Describe the test
Date: Mon, 1 Jul 2019 15:21:51 +0300 [thread overview]
Message-ID: <20190701122153.11569-3-arkadiusz.hiler@intel.com> (raw)
In-Reply-To: <20190701122153.11569-1-arkadiusz.hiler@intel.com>
In this test all the subtest are doing the same exact thing but with
different tiling / on a different pipe. Tiling/pipe is in the test name
so no need to elaborate on them.
We can have just one igt_describe() on top of the group to describe all
the subtests in one go, no copy-and-paste necessary.
The description is short and explains the spirit of the test (verifying
atomicity of plane updates) without delving into the implementation
details (holes, colors, etc.)
Other changes:
* The function used for grabbing reference CRC is now under a more
descriptive name.
* Comment explaining test implementation in more detail is moved to the
top of the function actually implementing those steps.
* Minor formatting touch ups.
Cc: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
---
tests/kms_plane_multiple.c | 39 ++++++++++++++++++++------------------
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 0d3ba4ff..81ed45dd 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -30,7 +30,7 @@
#include <string.h>
#include <time.h>
-IGT_TEST_DESCRIPTION("Test atomic mode setting with multiple planes ");
+IGT_TEST_DESCRIPTION("Test atomic mode setting with multiple planes.");
#define SIZE_PLANE 256
#define SIZE_CURSOR 128
@@ -96,7 +96,7 @@ static void test_fini(data_t *data, igt_output_t *output, int n_planes)
}
static void
-test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe,
+get_reference_crc(data_t *data, igt_output_t *output, enum pipe pipe,
color_t *color, uint64_t tiling)
{
drmModeModeInfo *mode;
@@ -125,17 +125,6 @@ test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe,
igt_pipe_crc_get_single(data->pipe_crc, &data->ref_crc);
}
-/*
- * Multiple plane position test.
- * - We start by grabbing a reference CRC of a full blue fb being scanned
- * out on the primary plane
- * - Then we scannout number of planes:
- * * the primary plane uses a blue fb with a black rectangle hole
- * * planes, on top of the primary plane, with a blue fb that is set-up
- * to cover the black rectangles of the primary plane fb
- * The resulting CRC should be identical to the reference CRC
- */
-
static void
create_fb_for_mode_position(data_t *data, igt_output_t *output, drmModeModeInfo *mode,
color_t *color, int *rect_x, int *rect_y,
@@ -281,6 +270,17 @@ prepare_planes(data_t *data, enum pipe pipe_id, color_t *color,
free((void*)suffle);
}
+/*
+ * Multiple plane position test.
+ * - We start by grabbing a reference CRC of a full blue fb being scanned
+ * out on the primary plane
+ * - Then we scannout number of planes:
+ * * the primary plane uses a blue fb with a black rectangle holes
+ * * planes, on top of the primary plane, with a blue fb that is set-up
+ * to cover the black rectangles of the primary plane
+ * The resulting CRC should be identical to the reference CRC
+ */
+
static void
test_plane_position_with_output(data_t *data, enum pipe pipe,
igt_output_t *output, int n_planes,
@@ -306,11 +306,9 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
test_init(data, pipe, n_planes);
- test_grab_crc(data, output, pipe, &blue, tiling);
+ get_reference_crc(data, output, pipe, &blue, tiling);
- /*
- * Find out how many planes are allowed simultaneously
- */
+ /* Find out how many planes are allowed simultaneously */
do {
c++;
prepare_planes(data, pipe, &blue, tiling, c, output);
@@ -323,7 +321,7 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
igt_remove_fb(data->drm_fd, &data->fb[x]);
} while (!err && c < n_planes);
- if(err)
+ if (err)
c--;
igt_info("Testing connector %s using pipe %s with %d planes %s with seed %d\n",
@@ -332,6 +330,7 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
i = 0;
while (i < iterations || loop_forever) {
+ /* randomize planes and set up the holes */
prepare_planes(data, pipe, &blue, tiling, c, output);
igt_display_commit2(&data->display, COMMIT_ATOMIC);
@@ -441,6 +440,10 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
}
for_each_pipe_static(pipe) {
+ igt_describe("Check that the kernel handles atomic updates of "
+ "multiple planes correctly by changing their "
+ "geometry and making sure the changes are "
+ "reflected immediately after each commit.");
igt_subtest_group
run_tests_for_pipe(&data, pipe);
}
--
2.21.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-07-01 12:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 12:21 [igt-dev] [PATCH i-g-t 1/5] lib/igt_core: Add support for subtest descriptions Arkadiusz Hiler
2019-07-01 12:21 ` [igt-dev] [PATCH i-g-t 2/5] tests/kms_hdmi_inject: Provide igt_descriptions Arkadiusz Hiler
2019-07-01 12:21 ` Arkadiusz Hiler [this message]
2019-07-01 12:21 ` [igt-dev] [PATCH i-g-t 4/5] CONTRIBUTING: Rework a bit and update Arkadiusz Hiler
2019-07-01 13:02 ` Ser, Simon
2019-07-01 12:21 ` [igt-dev] [PATCH i-g-t 5/5] docs: Embed subtest descriptions in the documentation Arkadiusz Hiler
2019-07-03 7:18 ` Ser, Simon
2019-07-01 13:01 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] lib/igt_core: Add support for subtest descriptions Patchwork
2019-07-02 16:41 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-07-03 13:08 ` [igt-dev] [PATCH i-g-t 1/5] " Ser, Simon
2019-07-04 11:22 ` Arkadiusz Hiler
2019-07-04 11:33 ` Ser, Simon
2019-07-04 11:55 ` [igt-dev] [PATCH 1/5 v2 i-g-t] " Arkadiusz Hiler
2019-07-04 13:02 ` Ser, Simon
2019-07-04 12:48 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [1/5,v2,i-g-t] lib/igt_core: Add support for subtest descriptions (rev2) Patchwork
2019-07-05 17:06 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2019-06-17 10:54 [igt-dev] [PATCH i-g-t 1/5] lib/igt_core: Add support for subtest descriptions Arkadiusz Hiler
2019-06-17 10:54 ` [igt-dev] [PATCH i-g-t 3/5] tests/kms_plane_multiple: Describe the test Arkadiusz Hiler
2019-06-18 9:36 ` Kahola, Mika
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=20190701122153.11569-3-arkadiusz.hiler@intel.com \
--to=arkadiusz.hiler@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.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