diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-07-17 18:50:13 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-09-25 16:27:00 +0300 |
commit | 42359edda12e5ebf715f2a978944a18baaba6490 (patch) | |
tree | ce77e77c37ef48be4baa77e9e27b5779724695ea /lib/ioctl_wrappers.c | |
parent | b7298a71744fa5a07acdcdd804f4876153d3c977 (diff) |
lib/kms: Pass strides[] to __kms_addfb
Make __kms_addfb() usable with planar formats by passing in the
stride for each plane.
v2: Handle strides[1] for planar formats in kms_available_modes_crc
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'lib/ioctl_wrappers.c')
-rw-r--r-- | lib/ioctl_wrappers.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index d5d2a4e4..a3485726 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -1670,9 +1670,11 @@ void igt_require_fb_modifiers(int fd) igt_require(has_modifiers); } -int __kms_addfb(int fd, uint32_t handle, uint32_t width, uint32_t height, - uint32_t stride, uint32_t pixel_format, uint64_t modifier, - uint32_t *offsets, uint32_t flags, uint32_t *buf_id) +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) { struct drm_mode_fb_cmd2 f; int ret, i; @@ -1686,12 +1688,12 @@ int __kms_addfb(int fd, uint32_t handle, uint32_t width, uint32_t height, f.pixel_format = pixel_format; f.flags = flags; f.handles[0] = handle; - f.pitches[0] = stride; + f.pitches[0] = strides[0]; f.modifier[0] = modifier; for (i = 1; i < 4 && offsets && offsets[i]; i++) { f.handles[i] = handle; - f.pitches[i] = stride; + f.pitches[i] = strides[i]; f.modifier[i] = modifier; f.offsets[i] = offsets[i]; } |