From c966b06736bc83d2cdd47a1463fc2ee6272fef76 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 6 Jan 2023 19:14:18 +0100 Subject: [PATCH] etnaviv: don't drop TS capability on GPUs with MMUv2 Currently etnaviv disables TS on all MC1.0 GPUs, since the TS unit doesn't properly take into account the linear window offset with MC1.0, creating address aliases on MMUv1 that aren't properly dealt with. MMUv2 however doesn't have a linear window, so we can safely enable TS on those GPUs. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_screen.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index ec4f9b0e948..0a52b69b29b 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -1020,10 +1020,12 @@ etna_get_specs(struct etna_screen *screen) screen->specs.use_blt = VIV_FEATURE(screen, chipMinorFeatures5, BLT_ENGINE); - /* Only allow fast clear with MC2.0, as the TS unit bypasses the memory - * offset on MC1.0 and we have no way to fixup the address. + /* Only allow fast clear with MC2.0 or MMUv2, as the TS unit bypasses the + * memory offset for the MMUv1 linear window on MC1.0 and we have no way to + * fixup the address. */ - if (!VIV_FEATURE(screen, chipMinorFeatures0, MC20)) + if (!VIV_FEATURE(screen, chipMinorFeatures0, MC20) && + !VIV_FEATURE(screen, chipMinorFeatures1, MMU_VERSION)) screen->features[viv_chipFeatures] &= ~chipFeatures_FAST_CLEAR; return true;