panfrost: Keep track of active BOs
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Wed, 9 Oct 2019 08:10:44 +0000 (10:10 +0200)
committerDaniel Stone <daniels@collabora.com>
Thu, 17 Oct 2019 12:33:59 +0000 (14:33 +0200)
commit82f18b713aceecf5ebf73d68e0cdd61be8aa2c59
tree62f9e93aae12abb86ae0f20d290feda1003968fb
parent730f06a44d3a64980177b4b61a196831fdbbd51e
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>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_bo.c
src/gallium/drivers/panfrost/pan_screen.c
src/gallium/drivers/panfrost/pan_screen.h