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:
parent
6924fc525d
commit
b0dfd8223a
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue