[igt-dev] [PATCH i-g-t 1/2] kms_ccs: Require a connected output
Matthew Auld
matthew.william.auld at gmail.com
Thu Aug 19 15:50:13 UTC 2021
On Thu, 19 Aug 2021 at 16:22, Petri Latvala <petri.latvala at intel.com> wrote:
>
> From: Chris Wilson <chris.p.wilson at intel.com>
>
> Check that the output exists before dereferencing, as it may be NULL if
> there are no displays connected.
>
> Signed-off-by: Chris Wilson <chris.p.wilson at intel.com>
> Cc: Matthew Auld <matthew.auld at intel.com>
> Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/3678
For both patches:
Reviewed-by: Matthew Auld <matthew.auld at intel.com>
> ---
> tests/kms_ccs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
> index e60a6a77..238c245c 100644
> --- a/tests/kms_ccs.c
> +++ b/tests/kms_ccs.c
> @@ -513,6 +513,7 @@ static void test_output(data_t *data, const char* testformatstring)
> igt_fixture {
> data->output = igt_get_single_output_for_pipe(&data->display,
> data->pipe);
> + igt_require(data->output);
> igt_output_set_pipe(data->output, data->pipe);
> }
>
> @@ -611,6 +612,7 @@ igt_main_args("cs:", NULL, help_str, opt_handler, &data)
> igt_require_pipe_crc(data.drm_fd);
>
> igt_display_require(&data.display, data.drm_fd);
> + igt_display_require_output(&data.display);
>
> if (!data.user_seed)
> data.seed = time(NULL);
> --
> 2.29.2
>
More information about the igt-dev
mailing list