summaryrefslogtreecommitdiff
path: root/src/sna/sna_io.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-25 09:40:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-25 11:20:40 +0000
commitf7593a995a829978ce81397dde5c9ea6f9bb7681 (patch)
treece4b4d05805804fc0d219e440c598f725aab234b /src/sna/sna_io.c
parentaff32e3e08fce3c7b8dab3a25c96d69c409471fc (diff)
sna: Move the is-mappable check into the callers of region_inplace()
As they slightly differ in their requirements. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_io.c')
-rw-r--r--src/sna/sna_io.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index 15fe42c1..489c1ccd 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -82,17 +82,6 @@ static void read_boxes_inplace(struct kgem *kgem,
} while (--n);
}
-static bool map_will_stall(struct kgem *kgem, struct kgem_bo *bo)
-{
- if (kgem_bo_is_busy(bo))
- return true;
-
- if (!kgem_bo_is_mappable(kgem, bo))
- return true;
-
- return false;
-}
-
void sna_read_boxes(struct sna *sna,
struct kgem_bo *src_bo, int16_t src_dx, int16_t src_dy,
PixmapPtr dst, int16_t dst_dx, int16_t dst_dy,
@@ -119,7 +108,8 @@ void sna_read_boxes(struct sna *sna,
return;
}
- if (src_bo->tiling != I915_TILING_X && !map_will_stall(kgem, src_bo)){
+ if (src_bo->tiling != I915_TILING_X &&
+ !kgem_bo_map_will_stall(kgem, src_bo)) {
read_boxes_inplace(kgem,
src_bo, src_dx, src_dy,
dst, dst_dx, dst_dy,
@@ -314,7 +304,7 @@ void sna_write_boxes(struct sna *sna,
DBG(("%s x %d\n", __FUNCTION__, nbox));
if (DEBUG_NO_IO || kgem->wedged || dst_bo->tiling == I915_TILING_Y ||
- !map_will_stall(kgem, dst_bo)) {
+ !kgem_bo_map_will_stall(kgem, dst_bo)) {
write_boxes_inplace(kgem,
src, stride, bpp, src_dx, src_dy,
dst_bo, dst_dx, dst_dy,