sna: Flush the batch before blocking if the GPU is idle

If we have work pending for the GPU and we believe it is idle, just
submit the batch in order to improve GPU/CPU concurrency and reduce
latency.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-05-13 08:33:23 +01:00
parent 6924fc525d
commit b0dfd8223a
1 changed files with 5 additions and 0 deletions

View File

@ -12334,6 +12334,11 @@ void sna_accel_block_handler(struct sna *sna, struct timeval **tv)
{
sna->time = GetTimeInMillis();
if (!sna->kgem.need_retire) {
kgem_submit(&sna->kgem);
sna->kgem.flush_now = 0;
}
if (sna_accel_do_flush(sna))
sna_accel_flush(sna);