iris: Defer closing and freeing VMA until buffers are idle.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 4 May 2019 03:27:40 +0000 (20:27 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 2 Jul 2019 07:23:55 +0000 (07:23 +0000)
commit457a55716ea7752616bfadafce705f8a07970b9e
tree8bc9a94ff12d5cdd8559af5b34e4ac94d714f821
parent07f345566448c4defef109b315a5361266ffd2ea
iris: Defer closing and freeing VMA until buffers are idle.

There will unfortunately be circumstances where we cannot re-use a
virtual memory address until it's no longer active on the GPU.  To
facilitate this, we instead move BOs to a "dead" list, and defer
closing them and returning their VMA until they are idle.  We
periodically sweep these away in cleanup_bo_cache, which triggers
every time a new object's refcount hits zero.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/iris/iris_bufmgr.c