summaryrefslogtreecommitdiff
path: root/lib/igt_fb.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-07-18 17:38:07 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-09-25 16:27:39 +0300
commitc7b3e2465773f9fb30bf45976732028e4e4dc365 (patch)
tree6703d13493ffc7804e55f4f1af3dea9a50e49524 /lib/igt_fb.c
parent42359edda12e5ebf715f2a978944a18baaba6490 (diff)
lib/kms: Pass the number of planes explicitly to __kms_addfb()
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ä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'lib/igt_fb.c')
-rw-r--r--lib/igt_fb.c1
1 files changed, 1 insertions, 0 deletions
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];