panfrost: Add transient BOs to job batches
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 30 Aug 2019 13:38:56 +0000 (15:38 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Fri, 30 Aug 2019 20:13:41 +0000 (22:13 +0200)
commit9087cf70153ebc412982dc38db3829adf27ebb39
treea563baa64ee52a19f300579b3dde0f0592d41d3a
parentb2ff2dfc2a8797260d7b87a5cc6188d891f713ff
panfrost: Add transient BOs to job batches

Memory allocated through panfrost_allocate_transient() is likely to
come from the transient pool. Let's add the BO backing the allocated
memory region to the job batch so the kernel can retain this BO while
jobs are executed.

In practice that has never been a problem because the transient pool
is never shrinked, and even if it was, we still control the lifetime of
the job, so there's no reason for this BO to be freed before the GPU is
done executing the batch. But it still make sense to add the BO for
debugging purpose.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_allocate.c
src/gallium/drivers/panfrost/pan_drm.c