etnaviv: use feature bit to check for big tile support

128B/256B tile support is not a HALTI5 property, but has its own
separate feature bit.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9255>
This commit is contained in:
Lucas Stach 2022-04-10 13:14:09 +02:00 committed by Marge Bot
parent 4122011697
commit 2d2f9572c2
2 changed files with 5 additions and 4 deletions

View File

@ -86,7 +86,7 @@ etna_screen_resource_alloc_ts(struct pipe_screen *pscreen,
struct etna_screen *screen = etna_screen(pscreen);
size_t rt_ts_size, ts_layer_stride;
size_t bytes_per_tile;
uint8_t ts_mode = TS_MODE_128B; /* only used by halti5 */
uint8_t ts_mode = TS_MODE_128B;
int8_t ts_compress_fmt;
assert(!rsc->ts_bo);
@ -98,7 +98,7 @@ etna_screen_resource_alloc_ts(struct pipe_screen *pscreen,
ts_compress_fmt = (screen->specs.v4_compression || rsc->base.nr_samples > 1) ?
translate_ts_format(rsc->base.format) : -1;
if (screen->specs.halti >= 5) {
if (VIV_FEATURE(screen, chipMinorFeatures6, CACHE128B256BPERLINE)) {
/* enable 256B ts mode with compression, as it improves performance
* the size of the resource might also determine if we want to use it or not
*/

View File

@ -159,8 +159,9 @@ etna_set_framebuffer_state(struct pipe_context *pctx,
cs->PE_COLOR_FORMAT |=
VIVS_PE_COLOR_FORMAT_COMPONENTS__MASK |
VIVS_PE_COLOR_FORMAT_OVERWRITE |
COND(color_supertiled, VIVS_PE_COLOR_FORMAT_SUPER_TILED) |
COND(color_supertiled && screen->specs.halti >= 5, VIVS_PE_COLOR_FORMAT_SUPER_TILED_NEW);
COND(color_supertiled, VIVS_PE_COLOR_FORMAT_SUPER_TILED);
if (VIV_FEATURE(screen, chipMinorFeatures6, CACHE128B256BPERLINE))
cs->PE_COLOR_FORMAT |= COND(color_supertiled, VIVS_PE_COLOR_FORMAT_SUPER_TILED_NEW);
/* VIVS_PE_COLOR_FORMAT_COMPONENTS() and
* VIVS_PE_COLOR_FORMAT_OVERWRITE comes from blend_state
* but only if we set the bits above. */