summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-01-23 17:47:12 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-01-23 18:02:18 +0000
commitea8148b24d48db4f46205817db8a55dd6ea1a4b3 (patch)
tree049cad08931bfe1d887c4afc31fd19003bba33db /src/sna
parent3c3a87a2d4261cbd66602812637328a04787f510 (diff)
sna/dri: Prefer to use the BLT ring for vsync'ed copies on IVB+
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/gen7_render.c5
-rw-r--r--src/sna/sna_display.c2
-rw-r--r--src/sna/sna_dri.c7
3 files changed, 8 insertions, 6 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 0766075a..fa36ce65 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2564,12 +2564,11 @@ static inline bool prefer_blt_copy(struct sna *sna,
struct kgem_bo *dst_bo,
unsigned flags)
{
- if (flags & COPY_SYNC)
- return false;
-
if (sna->kgem.ring == KGEM_BLT)
return true;
+ assert((flags & COPY_SYNC) == 0);
+
if (src_bo == dst_bo && can_switch_to_blt(sna, dst_bo, flags))
return true;
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index e1c02798..69555363 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2847,7 +2847,7 @@ static bool sna_emit_wait_for_scanline_gen6(struct sna *sna,
assert(y1 >= 0);
assert(y2 > y1);
- assert(sna->kgem.mode);
+ assert(sna->kgem.mode == KGEM_RENDER);
/* Always program one less than the desired value */
if (--y1 < 0)
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index b48894e4..086332c8 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -513,8 +513,11 @@ static void sna_dri_select_mode(struct sna *sna, struct kgem_bo *dst, struct kge
return;
if (sync) {
- DBG(("%s: sync, force RENDER ring\n", __FUNCTION__));
- kgem_set_mode(&sna->kgem, KGEM_RENDER, dst);
+ DBG(("%s: sync, force %s ring\n", __FUNCTION__,
+ sna->kgem.gen >= 070 ? "BLT" : "RENDER"));
+ kgem_set_mode(&sna->kgem,
+ sna->kgem.gen >= 070 ? KGEM_BLT : KGEM_RENDER,
+ dst);
return;
}