From 6e227181ab57e43f058edd76368b17d8c235aeb0 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Wed, 5 Dec 2018 16:10:35 +0100 Subject: 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 Reviewed-by: Lyude Paul Reviewed-by: Maxime Ripard --- lib/igt_fb.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/igt_fb.h') 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); -- cgit v1.2.3