summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-14 16:53:38 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-14 22:06:33 +0000
commitf7e4799687d5010ea0b56aeb6fbbb2e854b1b363 (patch)
tree91cd9bb003e3c88122671e2253a71ba742451b70
parentc1ce34d4509a3f3e963d82ac0569a21706892f8e (diff)
sna/gen6: Allow greater use of BLT
Typically we will be bound to the RENDER ring as once engaged we try not to switch. However, with semaphores enabled we may switch more freely and there it is advantageous to use as much of the faster BLT as is feasible. The most contentious point here is the choice of whether to use BLT for copies by default. microbenchmarks (compwinwin) benefit from the coallescing performed in the render batch, but the more complex traces seem to prefer utilizing the blitter. The debate will continue... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen6_render.c13
-rw-r--r--src/sna/sna_dri.c3
2 files changed, 2 insertions, 14 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index d1dd1ba4..d25ece16 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -412,14 +412,6 @@ gen6_choose_composite_kernel(int op, Bool has_mask, Bool is_ca, Bool is_affine)
}
static void
-gen6_emit_sip(struct sna *sna)
-{
- /* Set system instruction pointer */
- OUT_BATCH(GEN6_STATE_SIP | 0);
- OUT_BATCH(0);
-}
-
-static void
gen6_emit_urb(struct sna *sna)
{
OUT_BATCH(GEN6_3DSTATE_URB | (3 - 2));
@@ -555,7 +547,6 @@ gen6_emit_invariant(struct sna *sna)
OUT_BATCH(GEN6_3DSTATE_SAMPLE_MASK | (2 - 2));
OUT_BATCH(1);
- gen6_emit_sip(sna);
gen6_emit_urb(sna);
gen6_emit_state_base_address(sna);
@@ -2185,7 +2176,7 @@ try_blt(struct sna *sna,
PicturePtr dst, PicturePtr src,
int width, int height)
{
- if (sna->kgem.ring == KGEM_BLT) {
+ if (sna->kgem.ring != KGEM_RENDER) {
DBG(("%s: already performing BLT\n", __FUNCTION__));
return TRUE;
}
@@ -3002,7 +2993,7 @@ static inline bool prefer_blt_copy(struct sna *sna,
struct kgem_bo *src_bo,
struct kgem_bo *dst_bo)
{
- return (sna->kgem.ring == KGEM_BLT ||
+ return (sna->kgem.ring != KGEM_RENDER ||
untiled_tlb_miss(src_bo) ||
untiled_tlb_miss(dst_bo));
}
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 7334dfbd..9de7faae 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -440,9 +440,6 @@ sna_dri_copy(struct sna *sna, DrawablePtr draw, RegionPtr region,
* as well).
*/
kgem_set_mode(&sna->kgem, KGEM_RENDER);
- } else if (sna->kgem.mode == KGEM_NONE) {
- /* Otherwise employ the BLT unless it means a context switch */
- _kgem_set_mode(&sna->kgem, KGEM_BLT);
}
damage(pixmap, region);