[igt-dev] [PATCH v5 2/2] tests/i915/kms_mmap_write_crc: Test Cleanup
Modem, Bhanuprakash
bhanuprakash.modem at intel.com
Thu Jul 14 09:41:04 UTC 2022
On Thu-14-07-2022 10:56 am, Mohammed Thasleem wrote:
> Sanitize the system state before starting the subtest.
>
> v2: Minor changes.
> v3: Moved cleanup_crtc in igt_dynamic_f.
>
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
> ---
> tests/i915/kms_mmap_write_crc.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/i915/kms_mmap_write_crc.c
> index c732308c..3face2df 100644
> --- a/tests/i915/kms_mmap_write_crc.c
> +++ b/tests/i915/kms_mmap_write_crc.c
> @@ -169,6 +169,8 @@ static void prepare_crtc(data_t *data)
> igt_output_t *output = data->output;
> drmModeModeInfo *mode;
>
> + igt_display_reset(display);
> +
> /* select the pipe we want to use */
> igt_output_set_pipe(output, data->pipe);
>
> @@ -204,7 +206,7 @@ static void cleanup_crtc(data_t *data)
>
> igt_plane_set_fb(data->primary, NULL);
>
> - igt_output_set_pipe(output, PIPE_ANY);
> + igt_output_set_pipe(output, PIPE_NONE);
> igt_display_commit(display);
>
> igt_remove_fb(data->drm_fd, &data->fb[0]);
> @@ -262,6 +264,7 @@ igt_main_args("n", NULL, NULL, opt_handler, NULL)
> igt_require_pipe_crc(data.drm_fd);
>
> igt_display_require(&data.display, data.drm_fd);
> + igt_display_require_output(&data.display);
>
> fork_cpuhog_helper();
> }
> @@ -278,8 +281,8 @@ igt_main_args("n", NULL, NULL, opt_handler, NULL)
> prepare_crtc(&data);
> for (i = 0; i < ROUNDS; i++)
> test(&data);
> + cleanup_crtc(&data);
> }
> - cleanup_crtc(&data);
Looks, this is introduced by patch [1/2] in this series. Please fix it.
> /* once is enough */
> break;
> }
> @@ -287,6 +290,7 @@ igt_main_args("n", NULL, NULL, opt_handler, NULL)
>
> igt_fixture {
> igt_display_fini(&data.display);
> + close(data.drm_fd);
>
> igt_stop_helper(&hog);
> }
More information about the igt-dev
mailing list