[igt-dev] [PATCH i-g-t] tests/kms_psr: Check for available modesetting support

Petri Latvala petri.latvala at intel.com
Mon Nov 9 06:59:02 UTC 2020


On Sat, Nov 07, 2020 at 11:15:44AM +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 | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> index af81a259b..bb18e563a 100644
> --- a/tests/kms_psr.c
> +++ b/tests/kms_psr.c
> @@ -411,8 +411,11 @@ static void setup_test_plane(data_t *data, int test_plane)
>  
>  static void test_setup(data_t *data)
>  {
> +	igt_require(data->mode);
> +	igt_require(data->output);


"Requirement failed: data->mode" is slightly less than useful. Please
use igt_require_f here with whatever explanation is appropriate for
these situations. "No valid modes available", is that just lacking
appropriate resolutions from the GPU side? "No outputs connected" for
the latter?


-- 
Petri Latvala


More information about the igt-dev mailing list