summaryrefslogtreecommitdiff
path: root/lib/igt_fb.h
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2018-12-05 16:10:35 +0100
committerPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-02-26 09:45:54 +0100
commit6e227181ab57e43f058edd76368b17d8c235aeb0 (patch)
tree6e1ee39fa353cc04be1e62afb1cf342a3a2747b4 /lib/igt_fb.h
parent3fa1953d28350929672cf90002fcfce34bc59f35 (diff)
lib/igt_fb: Add a stride-provisioned fashion of igt_fb_convert
The current implementation of igt_fb_convert does not allow passing the destination stride, which is something we want to change for tests. Add a new fashion of this function that allocates the desintation buffer with a given stride. Since the current function does the same thing with an unspecified stride (set to zero, which will be filled later), make it call our new fashion with the stride set to zero to avoid duplication. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Diffstat (limited to 'lib/igt_fb.h')
-rw-r--r--lib/igt_fb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 8c683db5..232370bd 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -136,6 +136,9 @@ unsigned int igt_create_image_fb(int drm_fd, int width, int height,
struct igt_fb *fb /* out */);
unsigned int igt_create_stereo_fb(int drm_fd, drmModeModeInfo *mode,
uint32_t format, uint64_t tiling);
+unsigned int igt_fb_convert_with_stride(struct igt_fb *dst, struct igt_fb *src,
+ uint32_t dst_fourcc,
+ unsigned int stride);
unsigned int igt_fb_convert(struct igt_fb *dst, struct igt_fb *src,
uint32_t dst_fourcc);
void igt_remove_fb(int fd, struct igt_fb *fb);