summaryrefslogtreecommitdiff
path: root/lib/igt_vc4.h
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-01-10 09:23:50 +0100
committerPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-02-26 09:45:54 +0100
commit0f4aff46d2aab7a3172a89c32c2abab6e2dc7c06 (patch)
treea4af60ce36b9b6ad1148b975642ec81ed4fdb0cc /lib/igt_vc4.h
parentc4ca364c776c7943388d1ed0b645ed8894b9a7e1 (diff)
lib/igt_vc4: Add helpers for converting linear to SAND-tiled buffers
In order to test buffers with SAND tiling, it is useful to convert linear buffers to SAND tiling mode. Introduce helpers to assist in that direction, one that calculates the memory offset in the SAND-tiled buffer for a given pixel position and one that makes use of the latter for framebuffer conversion. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Acked-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Diffstat (limited to 'lib/igt_vc4.h')
-rw-r--r--lib/igt_vc4.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/igt_vc4.h b/lib/igt_vc4.h
index d5c529bb..a1781269 100644
--- a/lib/igt_vc4.h
+++ b/lib/igt_vc4.h
@@ -36,5 +36,9 @@ uint64_t igt_vc4_get_tiling(int fd, uint32_t handle);
unsigned int igt_vc4_fb_t_tiled_convert(struct igt_fb *dst, struct igt_fb *src);
size_t igt_vc4_t_tiled_offset(size_t stride, size_t height, size_t bpp,
size_t x, size_t y);
+unsigned int vc4_fb_sand_tiled_convert(struct igt_fb *dst, struct igt_fb *src,
+ uint64_t modifier);
+size_t vc4_sand_tiled_offset(size_t column_width, size_t column_size, size_t x,
+ size_t y, size_t bpp);
#endif /* IGT_VC4_H */