sna: Skip the CPU synchronization when marking a pixmap as inactive
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
74fd55a96b
commit
1541f1afca
|
|
@ -442,6 +442,7 @@ struct kgem_bo *sna_pixmap_change_tiling(PixmapPtr pixmap, uint32_t tiling);
|
|||
#define MOVE_WRITE 0x1
|
||||
#define MOVE_READ 0x2
|
||||
#define MOVE_INPLACE_HINT 0x4
|
||||
#define MOVE_ASYNC_HINT 0x8
|
||||
bool must_check _sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned flags);
|
||||
static inline bool must_check sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned flags)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1058,7 +1058,7 @@ skip_inplace_map:
|
|||
}
|
||||
|
||||
done:
|
||||
if (priv->cpu_bo) {
|
||||
if ((flags & MOVE_ASYNC_HINT) == 0 && priv->cpu_bo) {
|
||||
DBG(("%s: syncing CPU bo\n", __FUNCTION__));
|
||||
kgem_bo_sync__cpu(&sna->kgem, priv->cpu_bo);
|
||||
}
|
||||
|
|
@ -11763,7 +11763,7 @@ static void sna_accel_inactive(struct sna *sna)
|
|||
DBG(("%s: discarding inactive GPU bo handle=%d\n",
|
||||
__FUNCTION__, priv->gpu_bo->handle));
|
||||
if (!sna_pixmap_move_to_cpu(priv->pixmap,
|
||||
MOVE_READ | MOVE_WRITE))
|
||||
MOVE_READ | MOVE_WRITE | MOVE_ASYNC_HINT))
|
||||
list_add(&priv->inactive, &preserve);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue