diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-13 19:29:44 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-13 19:31:13 +0100 |
commit | effb0b9ec579624e38f0007cd7096e7da04048ca (patch) | |
tree | 8a689a4d440cf1dee647c36996c135092c0709fb /src/sna/sna_io.c | |
parent | 37aa1e1291127ff4d27407fac936af64d0e353a8 (diff) |
sna: Tweak usage of kgem_bo_can_map vs kgem_bo_mapped
More often than not we only want to consider whether we can map the bo
and decide whether doing so is the better option. Whether the bo is
already mapped is not such an issue any more with the throttling.
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c index c39b1f11..b4e59d9a 100644 --- a/src/sna/sna_io.c +++ b/src/sna/sna_io.c @@ -531,7 +531,7 @@ static bool upload_inplace(struct kgem *kgem, * able to almagamate a series of small writes into a single * operation. */ - if (!kgem_bo_mapped(bo) || kgem_bo_is_busy(bo)) { + if (kgem_bo_is_busy(bo)) { unsigned int bytes = 0; while (n--) { bytes += (box->x2 - box->x1) * (box->y2 - box->y1); @@ -1148,7 +1148,7 @@ bool sna_replace(struct sna *sna, pixmap->drawable.bitsPerPixel, bo->tiling)); - if ((!kgem_bo_mapped(bo) || kgem_bo_is_busy(bo)) && + if ((!kgem_bo_can_map(kgem, bo) || kgem_bo_is_busy(bo)) && indirect_replace(sna, pixmap, bo, src, stride)) return true; |