sna: Add DBG breadcrumbs before flushes in BLT

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-06-30 19:56:39 +01:00
parent 43176b9bfa
commit e1c3e6ce79
1 changed files with 14 additions and 4 deletions

View File

@ -89,8 +89,10 @@ static const uint8_t fill_ROP[] = {
static void nop_done(struct sna *sna, const struct sna_composite_op *op)
{
assert(sna->kgem.nbatch <= KGEM_BATCH_SIZE(&sna->kgem));
if (sna->kgem.nexec > 1 && __kgem_ring_empty(&sna->kgem))
if (sna->kgem.nexec > 1 && __kgem_ring_empty(&sna->kgem)) {
DBG(("%s: flushing BLT operation on empty ring\n", __FUNCTION__));
_kgem_submit(&sna->kgem);
}
(void)op;
}
@ -100,6 +102,7 @@ static void gen6_blt_copy_done(struct sna *sna, const struct sna_composite_op *o
assert(kgem->nbatch <= KGEM_BATCH_SIZE(kgem));
if (kgem->nexec > 1 && __kgem_ring_empty(kgem)) {
DBG(("%s: flushing BLT operation on empty ring\n", __FUNCTION__));
_kgem_submit(kgem);
return;
}
@ -2865,8 +2868,10 @@ static void convert_done(struct sna *sna, const struct sna_composite_op *op)
struct kgem *kgem = &sna->kgem;
assert(kgem->nbatch <= KGEM_BATCH_SIZE(kgem));
if (kgem->nexec > 1 && __kgem_ring_empty(kgem))
if (kgem->nexec > 1 && __kgem_ring_empty(kgem)) {
DBG(("%s: flushing BLT operation on empty ring\n", __FUNCTION__));
_kgem_submit(kgem);
}
kgem_bo_destroy(kgem, op->src.bo);
sna_render_composite_redirect_done(sna, op);
@ -3620,8 +3625,10 @@ bool sna_blt_fill_boxes(struct sna *sna, uint8_t alu,
}
} while (nbox);
if (kgem->nexec > 1 && __kgem_ring_empty(kgem))
if (kgem->nexec > 1 && __kgem_ring_empty(kgem)) {
DBG(("%s: flushing BLT operation on empty ring\n", __FUNCTION__));
_kgem_submit(kgem);
}
return true;
}
@ -3944,6 +3951,7 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
}
if (kgem->nexec > 1 && __kgem_ring_empty(kgem)) {
DBG(("%s: flushing BLT operation on empty ring\n", __FUNCTION__));
_kgem_submit(kgem);
} else if (kgem->gen >= 060 && src_bo == dst_bo && kgem_check_batch(kgem, 3)) {
uint32_t *b = kgem->batch + kgem->nbatch;
@ -4093,8 +4101,10 @@ bool sna_blt_copy_boxes__with_alpha(struct sna *sna, uint8_t alu,
box++;
}
if (kgem->nexec > 1 && __kgem_ring_empty(kgem))
if (kgem->nexec > 1 && __kgem_ring_empty(kgem)) {
DBG(("%s: flushing BLT operation on empty ring\n", __FUNCTION__));
_kgem_submit(kgem);
}
sna->blt_state.fill_bo = 0;
return true;