panfrost: Disable CRC at <16x16 tile sizes
authorAlyssa Rosenzweig <alyssa@collabora.com>
Fri, 10 Jun 2022 15:28:09 +0000 (11:28 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 13 Jun 2022 15:46:12 +0000 (15:46 +0000)
commit44223e5f28c42ff19a5ddba182b403315bbac3ef
tree0b3b71e2b2701c56100393e72e24bbbc3c663c8a
parentcac0578ee58c5b0838ececbe2b7aa5f7c29874c3
panfrost: Disable CRC at <16x16 tile sizes

The hardware writes one CRC per (effective) tile, the tile size of the CRC
buffer is the same as the configured effective tile size. However, all our CRC
infrastructure assumes 16x16 tiles. In case CRC is used with smaller tiles,
buffer overflows and incorrect rendering are all possible. Don't use CRC at
smaller tile sizes. Note disabling CRC correctly invalidates any bound CRC
buffers.

Fixes: 2e97d7c8350 ("panfrost: Transaction elimination support")
Closes: #6332
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16983>
src/panfrost/lib/pan_blitter.c
src/panfrost/lib/pan_cs.c
src/panfrost/lib/pan_cs.h