panfrost: Workaround ISSUE_TSIX_2033
According to mali_kbase, all Bifrost and Valhall GPUs are affected by issue TSIX_2033. This hardware bug breaks the INTERSECT frame shader mode when forcing clean_tile_writes. What does that mean? The hardware considers a tile "clean" if it has been cleared but not drawn to. Setting clean_tile_write forces the hardware to write back such "clean" tiles to main memory. Bifrost hardware supports frame shaders, which insert a rectangle into every tile according to a configured rule. Frame shaders are used in Panfrost to implement tile reloads (i.e. LOAD_OP_LOAD). Two modes are relevant to the current discussion: ALWAYS, which always inserts a frame shader, and INTERSECT, which tries to only insert where there is geometry. Normally, we use INTERSECT for tile reloads as it is more efficient than ALWAYS-- it allows us to skip reloads of tiles that are discarded and never written back to memory. From a software perspective, Panfrost's current logic is correct: if we clear, we set clean_tile_writes, else we use an INTERSECT frame shader. There is no software interaction between the two. Unfortunately, there is a hardware interaction. The hardware forces clean_tile_writes in certain circumstances when AFBC is used. Ordinarily, this is a hardware implementation detail and invisible to software. Unfortunately, this implicit clean tile write is enough to trigger the hardware bug when using INTERSECT. As such, we need to detect this case and use ALWAYS instead of INTERSECT for correct results. Signed-off-by:Alyssa Rosenzweig <alyssa@collabora.com> Cc: mesa-stable Part-of: <mesa/mesa!13205>
Loading
Please register or sign in to comment