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/igt_fb.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/igt_fb.c')
-rw-r--r-- | lib/igt_fb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c index ab223865..13fce9f0 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -869,8 +869,13 @@ igt_create_fb_with_bo_size(int fd, int width, int height, if (tiling != LOCAL_DRM_FORMAT_MOD_NONE && tiling != LOCAL_I915_FORMAT_MOD_X_TILED) { + uint32_t pitches[4]; + + for (i = 0; i < fb_num_planes(f); i++) + pitches[i] = fb->stride; + do_or_die(__kms_addfb(fd, fb->gem_handle, width, height, - fb->stride, format, tiling, fb->offsets, + format, tiling, pitches, fb->offsets, LOCAL_DRM_MODE_FB_MODIFIERS, &fb_id)); } else { uint32_t handles[4]; |