diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-03-31 11:58:26 +0100 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-03-31 22:44:21 +0100 |
| commit | ef24cb1b223486d7dfe57f33c28d8692f9857c98 (patch) | |
| tree | f6fe46a7ca65ce66e086cccda214ad244194acff | |
| parent | 5a872056de61ca8724d5d476783c4dcc8c1a6af7 (diff) | |
sna/gen6+: Prefer the BLT for small copies
Even on GT3, it is preferrential to use the blitter if the copy is small
(due to the latency in execution).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
| -rw-r--r-- | src/sna/sna_accel.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 750881a1..b6510e75 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -6544,7 +6544,7 @@ discard_cow: if (!sna->render.copy_boxes(sna, alu, &src_pixmap->drawable, src_priv->gpu_bo, src_dx, src_dy, &dst_pixmap->drawable, bo, 0, 0, - box, n, 0)) { + box, n, small_copy(region))) { DBG(("%s: fallback - accelerated copy boxes failed\n", __FUNCTION__)); goto fallback; @@ -6581,7 +6581,7 @@ discard_cow: if (!sna->render.copy_boxes(sna, alu, &src_pixmap->drawable, src_priv->gpu_bo, src_dx, src_dy, &dst_pixmap->drawable, bo, 0, 0, - box, n, 0)) { + box, n, small_copy(region))) { DBG(("%s: fallback - accelerated copy boxes failed\n", __FUNCTION__)); goto fallback; @@ -6624,7 +6624,7 @@ discard_cow: if (!sna->render.copy_boxes(sna, alu, &src_pixmap->drawable, src_priv->cpu_bo, src_dx, src_dy, &dst_pixmap->drawable, bo, 0, 0, - box, n, src_priv->shm ? COPY_LAST : 0)) { + box, n, small_copy(region) | (src_priv->shm ? COPY_LAST : 0))) { DBG(("%s: fallback - accelerated copy boxes failed\n", __FUNCTION__)); goto fallback; @@ -6676,8 +6676,7 @@ discard_cow: ok = sna->render.copy_boxes(sna, alu, &src_pixmap->drawable, src_bo, src_dx, src_dy, &dst_pixmap->drawable, bo, 0, 0, - box, n, COPY_LAST); - + box, n, small_copy(region) | COPY_LAST); kgem_bo_sync__cpu(&sna->kgem, src_bo); assert(src_bo->rq == NULL); kgem_bo_destroy(&sna->kgem, src_bo); |
