summaryrefslogtreecommitdiff
path: root/lib/igt_fb.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@bootlin.com>2019-02-08 14:18:56 +0100
committerPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-02-11 10:53:07 +0100
commit062508c725125f2cdf49ddf23bec9f383b4326eb (patch)
tree2bfc67229ff7a5b1afdc66ec711f678bd6fa9875 /lib/igt_fb.c
parent91c9515d683a05df86bca78b086e2e68f504e10f (diff)
igt: fb: Clear YUV dumb buffers
YUV dumb buffers, just like i915 GEM buffers also need to be cleared once allocated. Make sure it happens. Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Diffstat (limited to 'lib/igt_fb.c')
-rw-r--r--lib/igt_fb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index dea390b0..6fe0d084 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -596,6 +596,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;
}