[igt-dev] [PATCH i-g-t] tests/kms_psr: Check for available modesetting support
Mun, Gwan-gyeong
gwan-gyeong.mun at intel.com
Mon Nov 9 12:41:16 UTC 2020
Thanks you for fixing it.
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
On Mon, 2020-11-09 at 11:54 +0000, Chris Wilson wrote:
> Check that there is a valid output/mode combo before trying to
> dereference them.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2212
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> tests/kms_psr.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> index af81a259b..4b7513d7e 100644
> --- a/tests/kms_psr.c
> +++ b/tests/kms_psr.c
> @@ -411,8 +411,14 @@ static void setup_test_plane(data_t *data, int
> test_plane)
>
> static void test_setup(data_t *data)
> {
> + igt_require_f(data->output,
> + "No available output found\n");
> + igt_require_f(data->mode,
> + "No available mode found on %s\n",
> + data->output->name);
> if (data->op_psr_mode == PSR_MODE_2)
> igt_require(data->supports_psr2);
> +
> psr_enable_if_enabled(data);
> setup_test_plane(data, data->test_plane_id);
> igt_assert(psr_wait_entry_if_enabled(data));
More information about the igt-dev
mailing list