From 6493c8c65f93ad2554c2512a07ba640e966fd026 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 27 Jun 2013 10:45:13 +0100 Subject: sna: Implement memcpy_from_tiled functions (for X-tiling only atm) To provide symmetry with the ability to write into an X-tiled mapping of a bo, we add the memcpy_from_tiled to be able to read back from the same bo. Signed-off-by: Chris Wilson --- src/sna/kgem.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/sna/kgem.h') diff --git a/src/sna/kgem.h b/src/sna/kgem.h index 91a38f75..d1a391ab 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -201,6 +201,11 @@ struct kgem { int16_t src_x, int16_t src_y, int16_t dst_x, int16_t dst_y, uint16_t width, uint16_t height); + void (*memcpy_from_tiled_x)(const void *src, void *dst, int bpp, + int32_t src_stride, int32_t dst_stride, + int16_t src_x, int16_t src_y, + int16_t dst_x, int16_t dst_y, + uint16_t width, uint16_t height); uint16_t reloc__self[256]; uint32_t batch[64*1024-8] page_aligned; @@ -713,6 +718,21 @@ memcpy_to_tiled_x(struct kgem *kgem, width, height); } -void choose_memcpy_to_tiled_x(struct kgem *kgem, int swizzling); +static inline void +memcpy_from_tiled_x(struct kgem *kgem, + const void *src, void *dst, int bpp, + int32_t src_stride, int32_t dst_stride, + int16_t src_x, int16_t src_y, + int16_t dst_x, int16_t dst_y, + uint16_t width, uint16_t height) +{ + return kgem->memcpy_from_tiled_x(src, dst, bpp, + src_stride, dst_stride, + src_x, src_y, + dst_x, dst_y, + width, height); +} + +void choose_memcpy_tiled_x(struct kgem *kgem, int swizzling); #endif /* KGEM_H */ -- cgit v1.2.3