summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_allocate.c
diff options
context:
space:
mode:
authorBoris Brezillon <[email protected]>2019-08-30 15:38:56 +0200
committerBoris Brezillon <[email protected]>2019-08-30 22:13:41 +0200
commit9087cf70153ebc412982dc38db3829adf27ebb39 (patch)
treea563baa64ee52a19f300579b3dde0f0592d41d3a /src/gallium/drivers/panfrost/pan_allocate.c
parentb2ff2dfc2a8797260d7b87a5cc6188d891f713ff (diff)
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 <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_allocate.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_allocate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_allocate.c b/src/gallium/drivers/panfrost/pan_allocate.c
index fb8b18fe718..78318ee1784 100644
--- a/src/gallium/drivers/panfrost/pan_allocate.c
+++ b/src/gallium/drivers/panfrost/pan_allocate.c
@@ -111,6 +111,8 @@ panfrost_allocate_transient(struct panfrost_context *ctx, size_t sz)
bo = panfrost_create_slab(screen, &index);
}
+ panfrost_job_add_bo(batch, bo);
+
/* Remember we created this */
util_dynarray_append(&batch->transient_indices, unsigned, index);