From c7b3e2465773f9fb30bf45976732028e4e4dc365 Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Wed, 18 Jul 2018 17:38:07 +0300 Subject: lib/kms: Pass the number of planes explicitly to __kms_addfb() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently __kms_addfb() assumes that only the first plane can be at offset 0. I don't particularly like such assumptions so let's just pass in the number of planes explicitly. We'll also require offsets[] to be passed in always. Nothing really to gain by making it optional. Signed-off-by: Ville Syrjälä Reviewed-by: Paulo Zanoni --- lib/igt_fb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/igt_fb.c') diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 13fce9f0..b7d70edc 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -876,6 +876,7 @@ igt_create_fb_with_bo_size(int fd, int width, int height, do_or_die(__kms_addfb(fd, fb->gem_handle, width, height, format, tiling, pitches, fb->offsets, + fb_num_planes(f), LOCAL_DRM_MODE_FB_MODIFIERS, &fb_id)); } else { uint32_t handles[4]; -- cgit v1.2.3