[igt-dev] [PATCH i-g-t v2 1/2] tests/kms_pipe_crc_basic: Use igt_display_require_output_on_pipe()
Jeremy Cline
jcline at redhat.com
Tue Aug 25 19:13:00 UTC 2020
On Tue, Aug 18, 2020 at 03:35:27PM -0400, Lyude wrote:
> From: Lyude Paul <lyude at redhat.com>
>
> v2: Rebase
>
> Signed-off-by: Lyude Paul <lyude at redhat.com>
> ---
It might be worth a short commit message body, something like "Refactor
tests_read_crc() to use igt_display_require_output_on_pipe() rather than
checking the validity of the pipe and output separately" maybe?
> tests/kms_pipe_crc_basic.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
> index bb66bc6c..53d76df1 100644
> --- a/tests/kms_pipe_crc_basic.c
> +++ b/tests/kms_pipe_crc_basic.c
> @@ -65,15 +65,14 @@ static void test_bad_source(data_t *data)
> 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_output_t *output;
> igt_plane_t *primary;
> drmModeModeInfo *mode;
> igt_crc_t *crcs = NULL;
> int c, j;
>
> - igt_require_pipe(display, pipe);
> - igt_require_f(output, "No connector found for pipe %s\n",
> - kmstest_pipe_name(pipe));
> + igt_display_require_output_on_pipe(display, pipe);
> + output = igt_get_single_output_for_pipe(display, pipe);
>
> igt_display_reset(display);
> igt_output_set_pipe(output, pipe);
> --
> 2.26.2
>
Looks like a good refactor to me:
Reviewed-by: Jeremy Cline <jcline at redhat.com>
More information about the igt-dev
mailing list