[Intel-gfx] [PATCH igt 8/8] test/kms_addfb_basic: tolerate absence of 8-bit format

Daniel Vetter daniel at ffwll.ch
Fri Mar 16 08:49:00 UTC 2018


On Thu, Mar 15, 2018 at 03:45:44PM +0100, Ulrich Hecht wrote:
> Ignores failure to add DRM_FORMAT_C8 frame buffer; some devices do not
> support any 8-bit format.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas at gmail.com>

I think the proper fix for this would be to split it out into a new
subtest, and then check that you have universal planes (all modern planes
have that) and skip the test if no plane advertises C8.
-Daniel

> ---
>  tests/kms_addfb_basic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> index d1da718..db79827 100644
> --- a/tests/kms_addfb_basic.c
> +++ b/tests/kms_addfb_basic.c
> @@ -273,8 +273,8 @@ static void size_tests(int fd)
>  		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f_16) == 0);
>  		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f_16.fb_id) == 0);
>  		f.fb_id = 0;
> -		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f_8) == 0);
> -		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f_8.fb_id) == 0);
> +		if (drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f_8) == 0)
> +			igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f_8.fb_id) == 0);
>  		f.fb_id = 0;
>  	}
>  
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list