panfrost: Keep track of active BOs
If two jobs use the same GEM object at the same time, the job that finishes first will (previous to this commit) close the GEM object, even if there's a job still referencing it.
To prevent this, have all jobs use the same panfrost_bo for a given GEM object, so it's only closed once the last job is done with it.
tomeu.vizoso@collabora.com Signed-off-by: Boris Brezillon boris.brezillon@collabora.com Cc: Nicolas Dufresne nicolas@ndufresne.ca
Signed-off-by: Tomeu VizosoChanges in v2:
- Change the subject
- Use a set instead of hash table
- Keep using pipe_reference instead of having our own refcnt logic
Edited by Boris Brezillon