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>
bo = panfrost_create_slab(screen, &index);
}
+ panfrost_job_add_bo(batch, bo);
+
/* Remember we created this */
util_dynarray_append(&batch->transient_indices, unsigned, index);
struct panfrost_job *job = panfrost_get_job_for_fbo(ctx);
- /* TODO: Add here the transient pools */
panfrost_job_add_bo(job, ctx->scratchpad.bo);
panfrost_job_add_bo(job, ctx->tiler_heap.bo);
panfrost_job_add_bo(job, job->polygon_list);