diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-27 11:58:05 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-27 11:58:05 +0100 |
commit | 3c6758fc4a50ecfce9ed317fec669cc48addedcf (patch) | |
tree | c825b1089c1a96b4cbc7bece829c5147bc62fcbe /src/sna/sna_accel.c | |
parent | f21079bad6e8316baf5d0295d6e7a809041bce06 (diff) |
sna: Flush the batch if it references a ShmPixmap and the GPU is idle
This helps minimise the stall when syncing with the GPU before sending
the next reply to the Client.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_accel.c')
-rw-r--r-- | src/sna/sna_accel.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index fd9728c9..02d4b13c 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1025,10 +1025,8 @@ void sna_add_flush_pixmap(struct sna *sna, assert(bo); list_move(&priv->list, &sna->flush_pixmaps); - if (bo->exec == NULL && sna->kgem.need_retire) - kgem_retire(&sna->kgem); - if (bo->exec == NULL || !sna->kgem.need_retire) { - DBG(("%s: flush bo idle, flushing\n", __FUNCTION__)); + if (bo->exec == NULL) { + DBG(("%s: new flush bo, flushin before\n", __FUNCTION__)); kgem_submit(&sna->kgem); } } |