Re: [igt-dev] [PATCH i-g-t v4 09/14] igt: fb: Clear YUV dumb buffers

Paul Kocialkowski
2019-01-22T15:48:37Z

Hi,

On Tue, 2019-01-22 at 15:28 +0100, Maxime Ripard wrote:
> YUV dumb buffers, just like i915 GEM buffers also need to be cleared once
> allocated. Make sure it happens.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Cheers,

Paul

> ---
> lib/igt_fb.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 490563c0ea4b..4becbb4dbc08 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -582,6 +582,9 @@ static int create_bo_for_fb(struct igt_fb *fb)
> fb->gem_handle = kmstest_dumb_create(fd, fb->width, fb->height,
> bpp, strides, &fb->size);
>
> + if (igt_format_is_yuv(fb->drm_format))
> + clear_yuv_buffer(fb);
> +
> return fb->gem_handle;
> }
>
--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering