sna/gen6+: On small GT avoid the intermediate copy for overlaps
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Jun 2014 15:41:22 +0000 (16:41 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Jun 2014 15:57:14 +0000 (16:57 +0100)
If the memory bw is constrained on the GPU avoid doing the 2-pass copy
for overlaps on the render ring, and do the single pass slower BLT copy
instead - as since it has to transfer less data it will be faster.

Reported-by: Ildar Nurislamov <absorbb@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/gen6_common.h

index 0dddeb5..8b60ef6 100644 (file)
@@ -58,6 +58,9 @@ inline static bool can_switch_to_blt(struct sna *sna,
        if (bo && RQ_IS_BLT(bo->rq))
                return true;
 
+       if (sna->render_state.gt < 2)
+               return true;
+
        return kgem_ring_is_idle(&sna->kgem, KGEM_BLT);
 }