From c4ca364c776c7943388d1ed0b645ed8894b9a7e1 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Wed, 5 Dec 2018 11:33:39 +0100 Subject: lib/igt_vc4: Add helpers for converting linear to T-tiled RGB buffers In order to integrate testing of T-tiled buffers, the easiest path is to generate patterns (with the already-existing functions) in linear buffers and convert them to T-tiled subsequently. Add helpers to do that conversion, with a first helper that returns the memory offset for a given position in a T-tiled buffer and a second helper that uses it for converting between framebuffers. Signed-off-by: Paul Kocialkowski Acked-by: Lyude Paul Reviewed-by: Maxime Ripard --- lib/igt_vc4.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/igt_vc4.h') diff --git a/lib/igt_vc4.h b/lib/igt_vc4.h index ebc8a388..d5c529bb 100644 --- a/lib/igt_vc4.h +++ b/lib/igt_vc4.h @@ -33,4 +33,8 @@ bool igt_vc4_purgeable_bo(int fd, int handle, bool purgeable); void igt_vc4_set_tiling(int fd, uint32_t handle, uint64_t modifier); 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); + #endif /* IGT_VC4_H */ -- cgit v1.2.3