From b378cfbc484f679e81b84dddfb68dfab14872cac Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Mon, 13 Nov 2023 16:50:16 +0100 Subject: [PATCH] panfrost: Inline pan_emit_tiler_heap() Tiler heap emission will differ on v10. Since pan_emit_tiler_heap() is only used by the gallium driver, and it's simple enough to be inlined, move the code to panfrost_batch_get_bifrost_tiler(). Signed-off-by: Boris Brezillon Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/panfrost/pan_cmdstream.c | 7 ++++++- src/panfrost/lib/pan_cs.c | 11 ----------- src/panfrost/lib/pan_cs.h | 2 -- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 50d18b70f96..f8754a62cd8 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -2962,7 +2962,12 @@ panfrost_batch_get_bifrost_tiler(struct panfrost_batch *batch, struct panfrost_ptr t = pan_pool_alloc_desc(&batch->pool.base, TILER_HEAP); - GENX(pan_emit_tiler_heap)(dev, t.cpu); + pan_pack(t.cpu, TILER_HEAP, heap) { + heap.size = dev->tiler_heap->size; + heap.base = dev->tiler_heap->ptr.gpu; + heap.bottom = dev->tiler_heap->ptr.gpu; + heap.top = dev->tiler_heap->ptr.gpu + dev->tiler_heap->size; + } mali_ptr heap = t.gpu; diff --git a/src/panfrost/lib/pan_cs.c b/src/panfrost/lib/pan_cs.c index 7e1a116555c..25140ce20d6 100644 --- a/src/panfrost/lib/pan_cs.c +++ b/src/panfrost/lib/pan_cs.c @@ -964,17 +964,6 @@ GENX(pan_emit_fbd)(const struct panfrost_device *dev, #endif #if PAN_ARCH >= 6 -void -GENX(pan_emit_tiler_heap)(const struct panfrost_device *dev, void *out) -{ - pan_pack(out, TILER_HEAP, heap) { - heap.size = dev->tiler_heap->size; - heap.base = dev->tiler_heap->ptr.gpu; - heap.bottom = dev->tiler_heap->ptr.gpu; - heap.top = dev->tiler_heap->ptr.gpu + dev->tiler_heap->size; - } -} - void GENX(pan_emit_tiler_ctx)(const struct panfrost_device *dev, unsigned fb_width, unsigned fb_height, unsigned nr_samples, diff --git a/src/panfrost/lib/pan_cs.h b/src/panfrost/lib/pan_cs.h index e2d343188f0..d690b904134 100644 --- a/src/panfrost/lib/pan_cs.h +++ b/src/panfrost/lib/pan_cs.h @@ -163,8 +163,6 @@ unsigned GENX(pan_emit_fbd)(const struct panfrost_device *dev, void *out); #if PAN_ARCH >= 6 -void GENX(pan_emit_tiler_heap)(const struct panfrost_device *dev, void *out); - void GENX(pan_emit_tiler_ctx)(const struct panfrost_device *dev, unsigned fb_width, unsigned fb_height, unsigned nr_samples, bool first_provoking_vertex,