From 654b0dd54873f82eb643a814a9907db64585e144 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 6 Nov 2025 15:43:21 -0800 Subject: [PATCH] freedreno: Remove use of FDL_MIN_UBWC_WIDTH fdl6_layout_image() already has the fallback-to-linear check. And with gen8 this is no longer a fixed constant. So lets just consolidate all the logic in fdl layout helper. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_blitter.cc | 7 ------- src/gallium/drivers/freedreno/freedreno_resource.c | 3 --- 2 files changed, 10 deletions(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.cc b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.cc index e4b886bc0d4..8b26311f34a 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.cc @@ -1563,12 +1563,5 @@ fd6_tile_mode_for_format(enum pipe_format pfmt) unsigned fd6_tile_mode(const struct pipe_resource *tmpl) { - /* if the mipmap level 0 is still too small to be tiled, then don't - * bother pretending: - */ - if ((tmpl->width0 < FDL_MIN_UBWC_WIDTH) && - !util_format_is_depth_or_stencil(tmpl->format)) - return TILE6_LINEAR; - return fd6_tile_mode_for_format(tmpl->format); } diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 98a3c67aaa1..1fd566a58d8 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -1695,7 +1695,6 @@ fd_resource_from_memobj(struct pipe_screen *pscreen, const struct pipe_resource *tmpl, struct pipe_memory_object *pmemobj, uint64_t offset) { - struct fd_screen *screen = fd_screen(pscreen); struct fd_memory_object *memobj = fd_memory_object(pmemobj); struct pipe_resource *prsc; struct fd_resource *rsc; @@ -1714,8 +1713,6 @@ fd_resource_from_memobj(struct pipe_screen *pscreen, modifiers = metadata.modifier; } else if (tmpl->bind & PIPE_BIND_LINEAR) { modifiers = DRM_FORMAT_MOD_LINEAR; - } else if (is_a6xx(screen) && tmpl->width0 >= FDL_MIN_UBWC_WIDTH) { - modifiers = DRM_FORMAT_MOD_QCOM_COMPRESSED; } /* Allocate new pipe resource. */