summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}