[igt-dev] [PATCH i-g-t 2/8] lib: Don't use dumb buffers for YCbCr

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Jun 5 09:51:52 UTC 2018


Op 23-05-18 om 20:31 schreef Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> We don't do the "black != zero" clearing for dumb buffers, so let's not
> use them for YCbCr framebuffers.
>
> v2: Use igt_format_is_yuv()
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  lib/igt_fb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 4f17f9945419..c89f7850ed70 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -359,7 +359,7 @@ static int create_bo_for_fb(int fd, int width, int height,
>  	if (offsets)
>  		memset(offsets, 0, ARRAY_SIZE(format->plane_bpp) * sizeof(*offsets));
>  
> -	if (tiling || size || stride || format->planes > 1) {
> +	if (tiling || size || stride || igt_format_is_yuv(format->drm_id)) {
>  		unsigned calculated_size, calculated_stride;
>  
>  		if (format->planes > 1)

I fear this will not allow us to support !i915, we should start caring at some point and either move to minigbm or roll special cases for each driver..

But for now it's ok.



More information about the igt-dev mailing list