diff --git a/src/sna/kgem.h b/src/sna/kgem.h index 2931f8ab..0c266300 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -445,7 +445,8 @@ static inline bool kgem_bo_is_mappable(struct kgem *kgem, static inline bool kgem_bo_mapped(struct kgem_bo *bo) { - DBG_HDR(("%s: map=%p, tiling=%d\n", __FUNCTION__, bo->map, bo->tiling)); + DBG_HDR(("%s: map=%p, tiling=%d, domain=%d\n", + __FUNCTION__, bo->map, bo->tiling, bo->domain)); if (bo->map == NULL) return bo->tiling == I915_TILING_NONE && bo->domain == DOMAIN_CPU; 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;