summaryrefslogtreecommitdiff
path: root/src/sna/sna_dri2.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-01-22 20:11:31 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-01-22 20:15:41 +0000
commitb48d4a7917ab793526be47559becc64aacd347ae (patch)
tree84e635d713ebd174eedc695fadf3467493867ece /src/sna/sna_dri2.c
parent26cc364d2eb078085ff4a6dd2968b426bf333b4f (diff)
sna/dri2: Tweak enginement placement on inherited render targets
The main motivation is try and isolate from an upcoming API change in busy-ioctl, but is also based on the observation that we now only care about write-synchronisation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri2.c')
-rw-r--r--src/sna/sna_dri2.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 0e184567..54504346 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -1110,13 +1110,12 @@ static void sna_dri2_select_mode(struct sna *sna, struct kgem_bo *dst, struct kg
* The ultimate question is whether preserving the ring outweighs
* the cost of the query.
*/
- if (popcount(busy.busy >> 16) > 1)
- mode = busy.busy & 0xffff ? KGEM_BLT : KGEM_RENDER;
- else if (busy.busy & (0xfffe << 16))
+ mode = KGEM_RENDER;
+ if ((busy.busy & 0xffff) == KGEM_BLT)
mode = KGEM_BLT;
- else
- mode = KGEM_RENDER;
- kgem_bo_mark_busy(&sna->kgem, busy.handle == src->handle ? src : dst, mode);
+ kgem_bo_mark_busy(&sna->kgem,
+ busy.handle == src->handle ? src : dst,
+ mode);
_kgem_set_mode(&sna->kgem, mode);
}