From 543ad77e6fbd53420f302c40c3de8ad15bae32c7 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Sat, 21 Nov 2020 15:44:10 +0100 Subject: [PATCH] panfrost: Expose panfrost_block_dim() So we can use it from pan_resource.c to retrieve the tile size based on a modifier. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/pan_texture.c | 2 +- src/panfrost/lib/pan_texture.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c index 64ad00fbda4..d42ea501cae 100644 --- a/src/panfrost/lib/pan_texture.c +++ b/src/panfrost/lib/pan_texture.c @@ -206,7 +206,7 @@ panfrost_estimate_texture_payload_size( * line stride as such. */ -static unsigned +unsigned panfrost_block_dim(uint64_t modifier, bool width, unsigned plane) { if (!drm_is_afbc(modifier)) { diff --git a/src/panfrost/lib/pan_texture.h b/src/panfrost/lib/pan_texture.h index 1a270e3e1a9..b4032f849b2 100644 --- a/src/panfrost/lib/pan_texture.h +++ b/src/panfrost/lib/pan_texture.h @@ -88,6 +88,9 @@ panfrost_afbc_header_size(unsigned width, unsigned height); bool panfrost_afbc_can_ytr(enum pipe_format format); +unsigned +panfrost_block_dim(uint64_t modifier, bool width, unsigned plane); + unsigned panfrost_estimate_texture_payload_size( unsigned first_level, unsigned last_level,