From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/3] tests/kms_pipe_crc_basic: Only test a single output per pipe.
Date: Mon, 25 Feb 2019 12:12:52 +0100 [thread overview]
Message-ID: <20190225111253.29086-2-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20190225111253.29086-1-maarten.lankhorst@linux.intel.com>
Instead of iterating over all outputs, use igt_get_single_output_for_pipe
to only test a single output.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
tests/kms_pipe_crc_basic.c | 39 +++++++++-----------------------------
1 file changed, 9 insertions(+), 30 deletions(-)
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 5ff7123814d3..36ce624e4e9e 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -62,22 +62,26 @@ static void test_bad_source(data_t *data)
#define TEST_SEQUENCE (1<<0)
#define TEST_NONBLOCK (1<<1)
-static void
-test_read_crc_for_output(data_t *data, int pipe, igt_output_t *output,
- unsigned flags)
+static void test_read_crc(data_t *data, enum pipe pipe, unsigned flags)
{
igt_display_t *display = &data->display;
+ igt_output_t *output = igt_get_single_output_for_pipe(display, pipe);
igt_plane_t *primary;
drmModeModeInfo *mode;
igt_crc_t *crcs = NULL;
int c, j;
+ igt_skip_on(pipe >= data->display.n_pipes);
+ igt_require_f(output, "No connector found for pipe %s\n",
+ kmstest_pipe_name(pipe));
+
+ igt_display_reset(display);
+ igt_output_set_pipe(output, pipe);
+
for (c = 0; c < ARRAY_SIZE(colors); c++) {
char *crc_str;
int n_crcs;
- igt_output_set_pipe(output, pipe);
-
igt_debug("Clearing the fb with color (%.02lf,%.02lf,%.02lf)\n",
colors[c].r, colors[c].g, colors[c].b);
@@ -146,32 +150,7 @@ test_read_crc_for_output(data_t *data, int pipe, igt_output_t *output,
free(crcs);
igt_remove_fb(data->drm_fd, &data->fb);
- igt_plane_set_fb(primary, NULL);
-
- igt_output_set_pipe(output, PIPE_ANY);
- }
-}
-
-static void test_read_crc(data_t *data, enum pipe pipe, unsigned flags)
-{
- igt_display_t *display = &data->display;
- int valid_connectors = 0;
- igt_output_t *output;
-
- igt_skip_on(pipe >= data->display.n_pipes);
-
- for_each_valid_output_on_pipe(display, pipe, output) {
-
- igt_info("%s: Testing connector %s using pipe %s\n",
- igt_subtest_name(), igt_output_name(output),
- kmstest_pipe_name(pipe));
-
- test_read_crc_for_output(data, pipe, output, flags);
- valid_connectors ++;
}
-
- igt_require_f(valid_connectors, "No connector found for pipe %s\n",
- kmstest_pipe_name(pipe));
}
data_t data = {0, };
--
2.20.1
_______________________________________________
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 11:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 11:12 [igt-dev] [PATCH i-g-t 1/3] tests/kms_pipe_crc_basic: Use for_each_pipe_static() Maarten Lankhorst
2019-02-25 11:12 ` Maarten Lankhorst [this message]
2019-02-25 11:12 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_pipe_crc_basic: Add flip tests to ensure basic CRC sanity checking Maarten Lankhorst
2019-02-25 11:48 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tests/kms_pipe_crc_basic: Use for_each_pipe_static() Patchwork
2019-02-25 14:27 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20190225111253.29086-2-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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