summaryrefslogtreecommitdiff
path: root/src/sna/gen6_common.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-01-17 22:31:48 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2015-01-17 22:34:33 +0000
commite351c36473e0a3d6724adc06f1e0b049d74a087d (patch)
treefedb6f981c5661b55198bf55960921b2ac2af90d /src/sna/gen6_common.h
parenta4fff8918824fba0401e9842709bbb9b6b08017c (diff)
sna/gen6+: Prefer not to switch away from active RENDER pipeline
If we don't have a good reason to switch to BLT, don't jump engines simply because the BLT is idle if our target bo is active on the RENDER pipeline. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_common.h')
-rw-r--r--src/sna/gen6_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/gen6_common.h b/src/sna/gen6_common.h
index 8ce360e5..fa450b41 100644
--- a/src/sna/gen6_common.h
+++ b/src/sna/gen6_common.h
@@ -61,6 +61,9 @@ inline static bool can_switch_to_blt(struct sna *sna,
if (sna->render_state.gt < 2)
return true;
+ if (bo && RQ_IS_RENDER(bo->rq))
+ return false;
+
return kgem_ring_is_idle(&sna->kgem, KGEM_BLT);
}