broadcom/common: fix V3D 7.1 TFU ICFG IFORMAT values

The V3D 7.1 TFU ICFG register restructured the IFORMAT field to 3 bits
(25:23) vs 4 bits on V3D 4.2. The defines were still using the V3D 4.2
encoding (11-15) which overflows the 3-bit field. Fix values to the
correct 3-7 range.

This was working by accident because the overflow bits land in the
SVTWID field, which is not used for the affected tiling formats.

Also rename SAND_128 to SAND since V3D 7.1 has a single SAND input
format; the tile width is now controlled by SVTWID.

Fixes: 146ceadcf4 ("v3dv: add support for TFU jobs in v71")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit 89229f08bb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
This commit is contained in:
Jose Maria Casanova Crespo 2026-03-20 17:06:15 +01:00 committed by Eric Engestrom
parent 8c2283df41
commit b640985aab
2 changed files with 8 additions and 8 deletions

View file

@ -2984,7 +2984,7 @@
"description": "broadcom/common: fix V3D 7.1 TFU ICFG IFORMAT values",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "146ceadcf45db7d2e6434ccc816f133da8dcd81f",
"notes": null

View file

@ -64,12 +64,12 @@
#define V3D71_TFU_ICFG_OTYPE_SHIFT 16
#define V3D71_TFU_ICFG_IFORMAT_SHIFT 23
#define V3D71_TFU_ICFG_FORMAT_RASTER 0
#define V3D71_TFU_ICFG_FORMAT_SAND_128 1
#define V3D71_TFU_ICFG_FORMAT_SAND_256 2
#define V3D71_TFU_ICFG_FORMAT_LINEARTILE 11
#define V3D71_TFU_ICFG_FORMAT_UBLINEAR_1_COLUMN 12
#define V3D71_TFU_ICFG_FORMAT_UBLINEAR_2_COLUMN 13
#define V3D71_TFU_ICFG_FORMAT_UIF_NO_XOR 14
#define V3D71_TFU_ICFG_FORMAT_UIF_XOR 15
#define V3D71_TFU_ICFG_FORMAT_SAND 1
#define V3D71_TFU_ICFG_FORMAT_CONSTANT_COLOUR 2
#define V3D71_TFU_ICFG_FORMAT_LINEARTILE 3
#define V3D71_TFU_ICFG_FORMAT_UBLINEAR_1_COLUMN 4
#define V3D71_TFU_ICFG_FORMAT_UBLINEAR_2_COLUMN 5
#define V3D71_TFU_ICFG_FORMAT_UIF_NO_XOR 6
#define V3D71_TFU_ICFG_FORMAT_UIF_XOR 7
#endif