Skip to content

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.

Signed-off-by: Tomeu Vizoso tomeu.vizoso@collabora.com Signed-off-by: Boris Brezillon boris.brezillon@collabora.com Cc: Nicolas Dufresne nicolas@ndufresne.ca

Changes in v2:

  • Change the subject
  • Use a set instead of hash table
  • Keep using pipe_reference instead of having our own refcnt logic

/cc @tomeu @alyssa @daniels

Edited by Boris Brezillon

Merge request reports