From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/4] tests/kms_pipe_crc_basic: Use for_each_pipe_static().
Date: Mon, 25 Feb 2019 19:18:54 +0200 [thread overview]
Message-ID: <20190225171854.GF20097@intel.com> (raw)
In-Reply-To: <20190225130237.31592-1-maarten.lankhorst@linux.intel.com>
On Mon, Feb 25, 2019 at 02:02:34PM +0100, Maarten Lankhorst wrote:
> Instead of duplicating for_each_pipe_static functionality, use the actual macro,
> and the same for kmstest_pipe_name.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> tests/kms_pipe_crc_basic.c | 36 +++++++++++++++++++-----------------
> 1 file changed, 19 insertions(+), 17 deletions(-)
>
> diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
> index 60802848d3ee..5ff7123814d3 100644
> --- a/tests/kms_pipe_crc_basic.c
> +++ b/tests/kms_pipe_crc_basic.c
> @@ -152,7 +152,7 @@ test_read_crc_for_output(data_t *data, int pipe, igt_output_t *output,
> }
> }
>
> -static void test_read_crc(data_t *data, int pipe, unsigned flags)
> +static void test_read_crc(data_t *data, enum pipe pipe, unsigned flags)
> {
> igt_display_t *display = &data->display;
> int valid_connectors = 0;
> @@ -178,6 +178,8 @@ data_t data = {0, };
>
> igt_main
> {
> + enum pipe pipe;
> +
> igt_fixture {
> data.drm_fd = drm_open_driver_master(DRIVER_ANY);
>
> @@ -194,38 +196,38 @@ igt_main
>
> igt_skip_on_simulation();
>
> - for (int i = 0; i < 3; i++) {
> - igt_subtest_f("read-crc-pipe-%c", 'A'+i)
> - test_read_crc(&data, i, 0);
> + for_each_pipe_static(pipe) {
> + igt_subtest_f("read-crc-pipe-%s", kmstest_pipe_name(pipe))
> + test_read_crc(&data, pipe, 0);
>
> - igt_subtest_f("read-crc-pipe-%c-frame-sequence", 'A'+i)
> - test_read_crc(&data, i, TEST_SEQUENCE);
> + igt_subtest_f("read-crc-pipe-%s-frame-sequence", kmstest_pipe_name(pipe))
> + test_read_crc(&data, pipe, TEST_SEQUENCE);
>
> - igt_subtest_f("nonblocking-crc-pipe-%c", 'A'+i)
> - test_read_crc(&data, i, TEST_NONBLOCK);
> + igt_subtest_f("nonblocking-crc-pipe-%s", kmstest_pipe_name(pipe))
> + test_read_crc(&data, pipe, TEST_NONBLOCK);
>
> - igt_subtest_f("nonblocking-crc-pipe-%c-frame-sequence", 'A'+i)
> - test_read_crc(&data, i, TEST_SEQUENCE | TEST_NONBLOCK);
> + igt_subtest_f("nonblocking-crc-pipe-%s-frame-sequence", kmstest_pipe_name(pipe))
> + test_read_crc(&data, pipe, TEST_SEQUENCE | TEST_NONBLOCK);
>
> - igt_subtest_f("suspend-read-crc-pipe-%c", 'A'+i) {
> - igt_skip_on(i >= data.display.n_pipes);
> + igt_subtest_f("suspend-read-crc-pipe-%s", kmstest_pipe_name(pipe)) {
> + igt_skip_on(pipe >= data.display.n_pipes);
>
> - test_read_crc(&data, i, 0);
> + test_read_crc(&data, pipe, 0);
>
> igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> SUSPEND_TEST_NONE);
>
> - test_read_crc(&data, i, 0);
> + test_read_crc(&data, pipe, 0);
> }
>
> - igt_subtest_f("hang-read-crc-pipe-%c", 'A'+i) {
> + igt_subtest_f("hang-read-crc-pipe-%s", kmstest_pipe_name(pipe)) {
> igt_hang_t hang = igt_allow_hang(data.drm_fd, 0, 0);
>
> - test_read_crc(&data, i, 0);
> + test_read_crc(&data, pipe, 0);
>
> igt_force_gpu_reset(data.drm_fd);
>
> - test_read_crc(&data, i, 0);
> + test_read_crc(&data, pipe, 0);
>
> igt_disallow_hang(data.drm_fd, hang);
> }
> --
> 2.20.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-02-25 17:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 13:02 [igt-dev] [PATCH i-g-t 1/4] tests/kms_pipe_crc_basic: Use for_each_pipe_static() Maarten Lankhorst
2019-02-25 13:02 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_pipe_crc_basic: Only test a single output per pipe Maarten Lankhorst
2019-02-25 17:21 ` Ville Syrjälä
2019-02-27 14:30 ` Maarten Lankhorst
2019-02-25 13:02 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_pipe_crc_basic: Add flip tests to ensure basic CRC sanity checking Maarten Lankhorst
2019-02-25 15:13 ` [igt-dev] [PATCH i-g-t] tests/kms_pipe_crc_basic: Add flip tests to ensure basic CRC sanity checking, v2 Maarten Lankhorst
2019-02-25 17:25 ` Ville Syrjälä
2019-02-25 13:02 ` [igt-dev] [PATCH i-g-t 4/4] HACK: Add pipe_crc_basic to ff Maarten Lankhorst
2019-02-25 14:29 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] tests/kms_pipe_crc_basic: Use for_each_pipe_static() Patchwork
2019-02-25 15:46 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] tests/kms_pipe_crc_basic: Use for_each_pipe_static(). (rev2) Patchwork
2019-02-25 17:18 ` Ville Syrjälä [this message]
2019-02-25 17:32 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/4] tests/kms_pipe_crc_basic: Use for_each_pipe_static() Patchwork
2019-02-25 21:09 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/4] tests/kms_pipe_crc_basic: Use for_each_pipe_static(). (rev2) 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=20190225171854.GF20097@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.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