diff options
Diffstat (limited to 'lib/ioctl_wrappers.c')
-rw-r--r-- | lib/ioctl_wrappers.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index a3485726..d992e015 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -1674,7 +1674,7 @@ int __kms_addfb(int fd, uint32_t handle, uint32_t width, uint32_t height, uint32_t pixel_format, uint64_t modifier, uint32_t strides[4], uint32_t offsets[4], - uint32_t flags, uint32_t *buf_id) + int num_planes, uint32_t flags, uint32_t *buf_id) { struct drm_mode_fb_cmd2 f; int ret, i; @@ -1687,14 +1687,11 @@ int __kms_addfb(int fd, uint32_t handle, f.height = height; f.pixel_format = pixel_format; f.flags = flags; - f.handles[0] = handle; - f.pitches[0] = strides[0]; - f.modifier[0] = modifier; - for (i = 1; i < 4 && offsets && offsets[i]; i++) { + for (i = 0; i < num_planes; i++) { f.handles[i] = handle; - f.pitches[i] = strides[i]; f.modifier[i] = modifier; + f.pitches[i] = strides[i]; f.offsets[i] = offsets[i]; } |