From: Karthik B S <karthik.b.s@intel.com>
To: <juhapekka.heikkila@gmail.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v4] tests/kms_ccs: Convert subtests to dynamic subtests
Date: Thu, 22 Feb 2024 10:00:57 +0530 [thread overview]
Message-ID: <9a8f5a3c-d656-4b99-bb97-93d86091c7a8@intel.com> (raw)
In-Reply-To: <c901ac07-fe78-4d19-9b49-30d2ddf46fc2@gmail.com>
On 2/21/2024 5:13 PM, Juha-Pekka Heikkila wrote:
> Look good!
>
> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Thanks JP for the rb. Merging this.
The selftest failure is unrelated to this patch and the
kms_ccs@.*xe2-ccs skips are expected.
>
> On 21.2.2024 5.05, Karthik B S wrote:
>> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
>> ---
>> tests/intel/kms_ccs.c | 193 +++++++++++-------------------------------
>> 1 file changed, 50 insertions(+), 143 deletions(-)
>>
>> diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
>> index 82714af93..4f8e30791 100644
>> --- a/tests/intel/kms_ccs.c
>> +++ b/tests/intel/kms_ccs.c
>> @@ -44,35 +44,16 @@
>> #include "xe/xe_query.h"
>> /**
>> - * SUBTEST: %s-%s-%s
>> - * Description: Test %arg[2] with given %arg[3] modifier
>> + * SUBTEST: %s-%s
>> + * Description: Test %arg[1] with given %arg[2] modifier
>> *
>> * arg[1]:
>> *
>> - * @pipe-A: Pipe A
>> - * @pipe-B: Pipe B
>> - * @pipe-C: Pipe C
>> - * @pipe-D: Pipe D
>> - * @pipe-E: Pipe E
>> - * @pipe-F: Pipe F
>> - * @pipe-G: Pipe G
>> - * @pipe-H: Pipe H
>> - * @pipe-I: Pipe I
>> - * @pipe-J: Pipe J
>> - * @pipe-K: Pipe K
>> - * @pipe-L: Pipe L
>> - * @pipe-M: Pipe M
>> - * @pipe-N: Pipe N
>> - * @pipe-O: Pipe O
>> - * @pipe-P: Pipe P
>> - *
>> - * arg[2]:
>> - *
>> * @bad-aux-stride: Bad AUX stride
>> * @ccs-on-another-bo: CCS with different BO
>> * @missing-ccs-buffer: Missing CCS buffer
>> *
>> - * arg[3]:
>> + * arg[2]:
>> *
>> * @y-tiled-ccs: Y tiled ccs
>> * @y-tiled-gen12-mc-ccs: Y tiled gen12 mc ccs
>> @@ -85,33 +66,14 @@
>> */
>> /**
>> - * SUBTEST: %s-%s-%s
>> - * Description: Test %arg[2] with %arg[3] modifier
>> + * SUBTEST: %s-%s
>> + * Description: Test %arg[1] with %arg[2] modifier
>> *
>> * arg[1]:
>> *
>> - * @pipe-A: Pipe A
>> - * @pipe-B: Pipe B
>> - * @pipe-C: Pipe C
>> - * @pipe-D: Pipe D
>> - * @pipe-E: Pipe E
>> - * @pipe-F: Pipe F
>> - * @pipe-G: Pipe G
>> - * @pipe-H: Pipe H
>> - * @pipe-I: Pipe I
>> - * @pipe-J: Pipe J
>> - * @pipe-K: Pipe K
>> - * @pipe-L: Pipe L
>> - * @pipe-M: Pipe M
>> - * @pipe-N: Pipe N
>> - * @pipe-O: Pipe O
>> - * @pipe-P: Pipe P
>> - *
>> - * arg[2]:
>> - *
>> * @bad-pixel-format: Bad pixel format
>> *
>> - * arg[3]:
>> + * arg[2]:
>> *
>> * @4-tiled-dg2-mc-ccs: 4 tiled mc ccs
>> * @4-tiled-dg2-rc-ccs: 4 tiled dg2 rc ccs
>> @@ -127,35 +89,16 @@
>> */
>> /**
>> - * SUBTEST: %s-%s-%s
>> - * Description: Test %arg[2] with %arg[3] modifier
>> + * SUBTEST: %s-%s
>> + * Description: Test %arg[1] with %arg[2] modifier
>> *
>> * arg[1]:
>> *
>> - * @pipe-A: Pipe A
>> - * @pipe-B: Pipe B
>> - * @pipe-C: Pipe C
>> - * @pipe-D: Pipe D
>> - * @pipe-E: Pipe E
>> - * @pipe-F: Pipe F
>> - * @pipe-G: Pipe G
>> - * @pipe-H: Pipe H
>> - * @pipe-I: Pipe I
>> - * @pipe-J: Pipe J
>> - * @pipe-K: Pipe K
>> - * @pipe-L: Pipe L
>> - * @pipe-M: Pipe M
>> - * @pipe-N: Pipe N
>> - * @pipe-O: Pipe O
>> - * @pipe-P: Pipe P
>> - *
>> - * arg[2]:
>> - *
>> * @crc-primary-basic: Primary plane CRC compatibility
>> * @crc-sprite-planes-basic: Sprite plane CRC compatability
>> * @random-ccs-data: Random CCS data
>> *
>> - * arg[3]:
>> + * arg[2]:
>> *
>> * @4-tiled-xe2-ccs: 4 tiled xe2 pat controlled ccs
>> * @4-tiled-dg2-mc-ccs: 4 tiled mc ccs
>> @@ -172,35 +115,16 @@
>> */
>> /**
>> - * SUBTEST: %s-%s-%s
>> - * Description: Test %arg[2] with %arg[3] modifier
>> + * SUBTEST: %s-%s
>> + * Description: Test %arg[1] with %arg[2] modifier
>> * Functionality: ccs, rotation, tiling
>> *
>> * arg[1]:
>> *
>> - * @pipe-A: Pipe A
>> - * @pipe-B: Pipe B
>> - * @pipe-C: Pipe C
>> - * @pipe-D: Pipe D
>> - * @pipe-E: Pipe E
>> - * @pipe-F: Pipe F
>> - * @pipe-G: Pipe G
>> - * @pipe-H: Pipe H
>> - * @pipe-I: Pipe I
>> - * @pipe-J: Pipe J
>> - * @pipe-K: Pipe K
>> - * @pipe-L: Pipe L
>> - * @pipe-M: Pipe M
>> - * @pipe-N: Pipe N
>> - * @pipe-O: Pipe O
>> - * @pipe-P: Pipe P
>> - *
>> - * arg[2]:
>> - *
>> * @bad-rotation-90: 90 degree rotation
>> * @crc-primary-rotation-180: 180 degree rotation
>> *
>> - * arg[3]:
>> + * arg[2]:
>> *
>> * @4-tiled-xe2-ccs: 4 tiled xe2 pat controlled ccs
>> * @4-tiled-dg2-mc-ccs: 4 tiled mc ccs
>> @@ -956,24 +880,10 @@ static void test_output(data_t *data, const int
>> testnum)
>> {
>> uint16_t dev_id;
>> - igt_fixture {
>> - bool found = false;
>> + igt_fixture
>> dev_id = intel_get_drm_devid(data->drm_fd);
>> - data->flags = tests[testnum].flags;
>> -
>> - for_each_valid_output_on_pipe(&data->display, data->pipe,
>> data->output) {
>> - igt_display_reset(&data->display);
>> -
>> - igt_output_set_pipe(data->output, data->pipe);
>> - if (intel_pipe_output_combo_valid(&data->display)) {
>> - found = true;
>> - break;
>> - }
>> -
>> - }
>> - igt_require_f(found, "No valid pipe/output combo found.\n");
>> - }
>> + data->flags = tests[testnum].flags;
>> for (int i = 0; i < ARRAY_SIZE(ccs_modifiers); i++) {
>> if (((ccs_modifiers[i].modifier ==
>> I915_FORMAT_MOD_4_TILED_DG2_RC_CCS ||
>> @@ -987,10 +897,7 @@ static void test_output(data_t *data, const int
>> testnum)
>> data->ccs_modifier = ccs_modifiers[i].modifier;
>> igt_describe(tests[testnum].description);
>> - igt_subtest_f("pipe-%s-%s-%s", kmstest_pipe_name(data->pipe),
>> - tests[testnum].testname, ccs_modifiers[i].str) {
>> - int valid_tests = 0;
>> -
>> + igt_subtest_with_dynamic_f("%s-%s", tests[testnum].testname,
>> ccs_modifiers[i].str) {
>> if (ccs_modifiers[i].modifier ==
>> I915_FORMAT_MOD_4_TILED) {
>> igt_require_f(AT_LEAST_GEN(dev_id, 20),
>> "Xe2 platform needed.\n");
>> @@ -999,37 +906,46 @@ static void test_output(data_t *data, const int
>> testnum)
>> "Older than Xe2 platform needed.\n");
>> }
>> - if (data->flags == TEST_RANDOM)
>> - igt_info("Testing with seed %d\n", data->seed);
>> -
>> - if (data->flags & TEST_ALL_PLANES) {
>> - igt_display_require_output_on_pipe(&data->display, data->pipe);
>> -
>> - for_each_plane_on_pipe(&data->display, data->pipe,
>> data->plane) {
>> - for (int j = 0; j < ARRAY_SIZE(formats); j++) {
>> - data->format = formats[j];
>> - valid_tests += test_ccs(data);
>> + for_each_pipe_with_valid_output(&data->display, data->pipe,
>> data->output) {
>> + igt_display_reset(&data->display);
>> +
>> + igt_output_set_pipe(data->output, data->pipe);
>> + if (!intel_pipe_output_combo_valid(&data->display))
>> + continue;
>> +
>> + igt_dynamic_f("pipe-%s-%s",
>> kmstest_pipe_name(data->pipe),
>> + data->output->name) {
>> + int valid_tests = 0;
>> +
>> + if (data->flags == TEST_RANDOM)
>> + igt_info("Testing with seed %d\n", data->seed);
>> +
>> + if (data->flags & TEST_ALL_PLANES) {
>> + igt_display_require_output_on_pipe(&data->display, data->pipe);
>> +
>> + for_each_plane_on_pipe(&data->display, data->pipe, data->plane) {
>> + for (int j = 0; j < ARRAY_SIZE(formats);
>> j++) {
>> + data->format = formats[j];
>> + valid_tests += test_ccs(data);
>> + }
>> + }
>> + } else {
>> + for (int j = 0; j < ARRAY_SIZE(formats); j++) {
>> + data->format = formats[j];
>> + valid_tests += test_ccs(data);
>> + }
>> }
>> - }
>> - } else {
>> - for (int j = 0; j < ARRAY_SIZE(formats); j++) {
>> - data->format = formats[j];
>> - valid_tests += test_ccs(data);
>> + igt_require_f(valid_tests > 0,
>> + "no valid tests for %s on pipe %s\n",
>> + ccs_modifiers[i].str,
>> + kmstest_pipe_name(data->pipe));
>> }
>> }
>> - igt_require_f(valid_tests > 0,
>> - "no valid tests for %s on pipe %s\n",
>> - ccs_modifiers[i].str,
>> - kmstest_pipe_name(data->pipe));
>> }
>> }
>> - igt_fixture {
>> - igt_output_set_pipe(data->output, PIPE_NONE);
>> - igt_display_commit2(&data->display, data->display.is_atomic ?
>> - COMMIT_ATOMIC : COMMIT_LEGACY);
>> + igt_fixture
>> data->plane = NULL;
>> - }
>> }
>> static int opt_handler(int opt, int opt_index, void *opt_data)
>> @@ -1060,8 +976,6 @@ static const char *help_str =
>> igt_main_args("cs:", NULL, help_str, opt_handler, &data)
>> {
>> - enum pipe pipe;
>> -
>> igt_fixture {
>> data.drm_fd = drm_open_driver_master(DRIVER_INTEL |
>> DRIVER_XE);
>> @@ -1076,15 +990,8 @@ igt_main_args("cs:", NULL, help_str,
>> opt_handler, &data)
>> data.seed = time(NULL);
>> }
>> - for_each_pipe_static(pipe) {
>> - data.pipe = pipe;
>> -
>> - igt_subtest_group {
>> - for (int c = 0; c < ARRAY_SIZE(tests); c++) {
>> - test_output(&data, c);
>> - }
>> - }
>> - }
>> + for (int c = 0; c < ARRAY_SIZE(tests); c++)
>> + test_output(&data, c);
>> igt_fixture {
>> igt_display_fini(&data.display);
>
prev parent reply other threads:[~2024-02-22 4:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 3:05 [PATCH i-g-t v4] tests/kms_ccs: Convert subtests to dynamic subtests Karthik B S
2024-02-21 4:21 ` ✓ CI.xeBAT: success for tests/kms_ccs: Convert subtests to dynamic subtests (rev4) Patchwork
2024-02-21 4:32 ` ✓ Fi.CI.BAT: " Patchwork
2024-02-21 7:51 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-02-21 11:43 ` [PATCH i-g-t v4] tests/kms_ccs: Convert subtests to dynamic subtests Juha-Pekka Heikkila
2024-02-22 4:30 ` Karthik B S [this message]
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=9a8f5a3c-d656-4b99-bb97-93d86091c7a8@intel.com \
--to=karthik.b.s@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.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