diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-28 14:24:33 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-28 14:52:22 +0100 |
commit | f22d7f68b8b1bd5caf5ae831fca63eb1e6957520 (patch) | |
tree | 3ab9d8b9c0e1326b12bce1098559d8976c5c9f0c /src/sna/gen7_render.c | |
parent | c451a471fbe1553c0273f3bd12f3c1a42f7ce193 (diff) |
sna/gen6+: Improve ring stickyness for BLT composite ops
Rearrange the tests so that we check both src/dst for which rings they
are currently on.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen7_render.c')
-rw-r--r-- | src/sna/gen7_render.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index ff2ddb7c..ad8e2b7e 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2197,14 +2197,7 @@ try_blt(struct sna *sna, { struct kgem_bo *bo; - bo = __sna_drawable_peek_bo(dst->pDrawable); - if (bo == NULL) - return true; - - if (bo->rq) - return RQ_IS_BLT(bo->rq); - - if (sna->kgem.ring == KGEM_BLT) { + if (sna->kgem.mode == KGEM_BLT) { DBG(("%s: already performing BLT\n", __FUNCTION__)); return true; } @@ -2215,9 +2208,24 @@ try_blt(struct sna *sna, return true; } + bo = __sna_drawable_peek_bo(dst->pDrawable); + if (bo && bo->rq) + return RQ_IS_BLT(bo->rq); + if (sna_picture_is_solid(src, NULL) && can_switch_to_blt(sna, NULL, 0)) return true; + if (src->pDrawable) { + bo = __sna_drawable_peek_bo(src->pDrawable); + if (bo && bo->rq) + return RQ_IS_BLT(bo->rq); + } + + if (sna->kgem.ring == KGEM_BLT) { + DBG(("%s: already performing BLT\n", __FUNCTION__)); + return true; + } + return false; } |