From 2d44800079f0846ac521fa5904835a93ff140160 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 15 Nov 2023 11:48:36 +0100 Subject: [PATCH] panfrost: Don't allocate a tiler heap buffer on v10+ Heap management is completely different on CSF hardware, and the heap buffer remain unused in that case. Make the tiler heap BO creation conditional to reflect that. Signed-off-by: Boris Brezillon Reviewed-by: Antonino Maniscalco Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/panfrost/pan_device.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_device.c b/src/gallium/drivers/panfrost/pan_device.c index e264686137f..580ae7ac5af 100644 --- a/src/gallium/drivers/panfrost/pan_device.c +++ b/src/gallium/drivers/panfrost/pan_device.c @@ -117,10 +117,16 @@ panfrost_open_device(void *memctx, int fd, struct panfrost_device *dev) /* Tiler heap is internally required by the tiler, which can only be * active for a single job chain at once, so a single heap can be - * shared across batches/contextes */ + * shared across batches/contextes. + * + * Heap management is completely different on CSF HW, don't allocate the + * heap BO in that case. + */ - dev->tiler_heap = panfrost_bo_create( - dev, 128 * 1024 * 1024, PAN_BO_INVISIBLE | PAN_BO_GROWABLE, "Tiler heap"); + if (dev->arch < 10) { + dev->tiler_heap = panfrost_bo_create( + dev, 128 * 1024 * 1024, PAN_BO_INVISIBLE | PAN_BO_GROWABLE, "Tiler heap"); + } pthread_mutex_init(&dev->submit_lock, NULL);