sna/dri: Prefer to use the BLT ring for vsync'ed copies on IVB+

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-01-23 17:47:12 +00:00
parent 3c3a87a2d4
commit ea8148b24d
3 changed files with 8 additions and 6 deletions

View File

@ -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;

View File

@ -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)

View File

@ -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;
}