summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMaíra Canal <mcanal@igalia.com>2026-11-18 18:47:30 -0300
committerMaíra Canal <mcanal@igalia.com>2026-11-19 10:40:54 -0300
commitc0e1ed41ad86cf5230d64dc5f2c6d2e3aeb59937 (patch)
tree0c599c47c837477a8ae51389abe7b444dcab24f3 /scripts
parent15da41dff1f66a389d238db60a1c19fa83582d07 (diff)
drm/vc4: Start shader code at varying offsets in its BO
VC4 is affected by the HW erratum GFXH-16: the QPUs can get stuck in a loop where instruction cache loads are evicted before they are used. The QPUs of a slice share one instruction cache. Shader BOs are page aligned and the code always starts at offset 0, so instructions at the same position in different shaders end up mapping to the same cache sets. When the four QPUs of a slice run four different shaders, their fills evict each other, no instruction executes and the hangcheck resets the GPU. Place each shader's code at one of four offsets, 256 bytes apart, inside its BO, and add the offset when relocating the shader record. Shader code is position independent, as the validator only accepts relative branches. The offsets are tracked per client, so shaders a given client creates in sequence (which tend to run together) start in different sets. Notice that this approach makes the livelock unlikely, but not impossible. The next commit will address the remaining cases. On a Raspberry Pi 3 running the issue's reproducer, GPU resets went from dozens in an hour to none. Cc: stable@vger.kernel.org Fixes: 463873d57014 ("drm/vc4: Add an API for creating GPU shaders in GEM BOs.") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/16652 Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Link: https://patch.msgid.link/20261118-vc4-icache-workaround-v1-3-5b8adc2c84fe@igalia.com Signed-off-by: Maíra Canal <mcanal@igalia.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions