sna: Add DBG to use_shm_bo()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
af63fab504
commit
7f968c8c99
|
|
@ -2617,8 +2617,8 @@ gen7_render_copy_boxes(struct sna *sna, uint8_t alu,
|
|||
struct sna_composite_op tmp;
|
||||
BoxRec extents;
|
||||
|
||||
DBG(("%s (%d, %d)->(%d, %d) x %d, alu=%x, self-copy=%d, overlaps? %d\n",
|
||||
__FUNCTION__, src_dx, src_dy, dst_dx, dst_dy, n, alu,
|
||||
DBG(("%s (%d, %d)->(%d, %d) x %d, alu=%x, flags=%x, self-copy=%d, overlaps? %d\n",
|
||||
__FUNCTION__, src_dx, src_dy, dst_dx, dst_dy, n, alu, flags,
|
||||
src_bo == dst_bo,
|
||||
overlaps(sna,
|
||||
src_bo, src_dx, src_dy,
|
||||
|
|
|
|||
|
|
@ -4134,19 +4134,36 @@ static bool use_shm_bo(struct sna *sna,
|
|||
struct sna_pixmap *priv,
|
||||
int alu)
|
||||
{
|
||||
if (priv == NULL || priv->cpu_bo == NULL)
|
||||
if (priv == NULL || priv->cpu_bo == NULL) {
|
||||
DBG(("%s: no, not attached\n", __FUNCTION__));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!priv->shm)
|
||||
if (!priv->shm) {
|
||||
DBG(("%s: yes, ordinary CPU bo\n", __FUNCTION__));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (alu != GXcopy)
|
||||
if (alu != GXcopy) {
|
||||
DBG(("%s: yes, complex alu=%d\n", __FUNCTION__, alu));
|
||||
return true;
|
||||
|
||||
if (kgem_bo_is_busy(bo))
|
||||
}
|
||||
if (bo->tiling) {
|
||||
DBG(("%s:, yes, dst tiled=%d\n", __FUNCTION__, bo->tiling));
|
||||
return true;
|
||||
}
|
||||
|
||||
return bo->tiling || __kgem_bo_is_busy(&sna->kgem, priv->cpu_bo);
|
||||
if (__kgem_bo_is_busy(&sna->kgem, bo)) {
|
||||
DBG(("%s: yes, dst is busy\n", __FUNCTION__));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (__kgem_bo_is_busy(&sna->kgem, priv->cpu_bo)) {
|
||||
DBG(("%s: yes, src is busy\n", __FUNCTION__));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -4335,8 +4352,8 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
|
|||
if (use_shm_bo(sna, bo, src_priv, alu)) {
|
||||
bool ret;
|
||||
|
||||
DBG(("%s: region overlaps CPU damage, copy from CPU bo\n",
|
||||
__FUNCTION__));
|
||||
DBG(("%s: region overlaps CPU damage, copy from CPU bo (shm? %d)\n",
|
||||
__FUNCTION__, src_priv->shm));
|
||||
|
||||
assert(bo != dst_priv->cpu_bo);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue