summaryrefslogtreecommitdiff
path: root/src/sna/kgem.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-05-07 15:24:28 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-05-07 15:58:43 +0100
commit08865b0af288e0460c38c2e3ca20a7f9d0311f27 (patch)
tree2a4fc95d29416fa507d916eddd38501e9ad6a085 /src/sna/kgem.h
parentb89f203b0d65b607bc906b9a1ac184ebef7b41df (diff)
sna: Add a special case for fast DRI2CopyRegion and NoAccel
Enable copying onto a scanout buffer using a WC mmap - so long as it is X-tiled and no swizzling. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.h')
-rw-r--r--src/sna/kgem.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index cd077561..ded8f78f 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -113,6 +113,12 @@ enum {
NUM_MAP_TYPES,
};
+typedef void (*memcpy_box_func)(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);
+
struct kgem {
unsigned wedged;
int fd;
@@ -212,16 +218,9 @@ struct kgem {
void (*retire)(struct kgem *kgem);
void (*expire)(struct kgem *kgem);
- void (*memcpy_to_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);
- 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);
+ memcpy_box_func memcpy_to_tiled_x;
+ memcpy_box_func memcpy_from_tiled_x;
+ memcpy_box_func memcpy_between_tiled_x;
struct kgem_bo *batch_bo;