diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2019-04-02 16:54:30 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2019-05-16 14:49:23 +0200 |
commit | fddfda656fc5d6add4c83f522cb891b582202e46 (patch) | |
tree | 35bb6600a33e1730ca4c9dad5b2d3c9a4bcae284 /lib/igt_vc4.h | |
parent | 2d41b51980257a7d0a3de30a9b3ea0e95b13df91 (diff) |
lib/igt_fb: Use cairo conversion in igt_fb_convert_with_stride, v4.
Ever since commit 3fa65f4b532bd9a5b ("fb: Add support for conversions
through pixman") we can generate a valid cairo surface for any plane,
use this to avoid having to implement our own conversion routine.
Instead of duplicating this functionality in igt_fb_convert_with_stride,
we can simply convert this to a few cairo calls, because we now support
cairo calls to any of the supported framebuffer formats.
This is required to make this function more generic, and convert from any
format/modifier to any other format/modifier.
Changes since v1:
- Return fb_id in the cairo case.
Changes since v2:
- Remove the manual conversion fallback.
Changes since v3:
- Integrate VC4 conversion routines.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Diffstat (limited to 'lib/igt_vc4.h')
-rw-r--r-- | lib/igt_vc4.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/igt_vc4.h b/lib/igt_vc4.h index a17812698..f32bf398b 100644 --- a/lib/igt_vc4.h +++ b/lib/igt_vc4.h @@ -29,16 +29,14 @@ int igt_vc4_create_bo(int fd, size_t size); void *igt_vc4_mmap_bo(int fd, uint32_t handle, uint32_t size, unsigned prot); int igt_vc4_get_param(int fd, uint32_t param, uint64_t *val); bool igt_vc4_purgeable_bo(int fd, int handle, bool purgeable); +bool igt_vc4_is_tiled(uint64_t modifier); 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); -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); +void vc4_fb_convert_plane_to_tiled(struct igt_fb *dst, void *dst_buf, + struct igt_fb *src, void *src_buf); +void vc4_fb_convert_plane_from_tiled(struct igt_fb *dst, void *dst_buf, + struct igt_fb *src, void *src_buf); #endif /* IGT_VC4_H */ |