[igt-dev] [PATCH i-g-t 11/21] lib/igt_kms: Assert that active crtcs have at least one plane

Kahola, Mika mika.kahola at intel.com
Wed Jan 16 11:30:23 UTC 2019


On Wed, 2019-01-16 at 13:20 +0200, Petri Latvala wrote:

Reviewed-by: Mika Kahola <mika.kahola at intel.com>

> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
> Cc: Mika Kahola <mika.kahola at intel.com>
> Cc: Robert Foss <robert.foss at collabora.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  lib/igt_kms.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index b06acb2b..1a91791c 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1593,6 +1593,7 @@ static void kmstest_get_crtc(int device, enum
> pipe pipe, struct kmstest_crtc *cr
>  
>  				n = ftell(file);
>  				crtc->n_planes = parse_planes(file,
> NULL);
> +				igt_assert_lt(0, crtc->n_planes);
>  				crtc->planes = calloc(crtc->n_planes,
> sizeof(*crtc->planes));
>  				igt_assert_f(crtc->planes, "Failed to
> allocate memory for %d planes\n", crtc->n_planes);
>  


More information about the igt-dev mailing list