freedreno/a6xx: VSC overflow detection/handling
authorRob Clark <robdclark@chromium.org>
Fri, 26 Jul 2019 16:55:14 +0000 (09:55 -0700)
committerRob Clark <robdclark@chromium.org>
Fri, 2 Aug 2019 17:24:14 +0000 (10:24 -0700)
commitde3e130fc9cdd894b413fa769658960a210f8b74
tree3a4b9f52d05f0df48aed9a9d37c64e57f566878e
parent401f532bea2bec0bdfc4bebd3b8849fd0e8f78e3
freedreno/a6xx: VSC overflow detection/handling

Check VSC_SIZE/VSC_SIZE2 regs from cmdstream to detect overflow, and
skip use of VSC visibility stream when overflow is detected, to avoid
GPU hangs.  This is done w/ introduction of some CP_REG_TEST/
CP_COND_REG_EXEC packet pairs.

In addition, eventually (after a frame or two) detect the condition and
resize the VSC buffers until overflow no longer happens.

Note that this significantly reduces the initial size of the VSC
buffers, backing out a previous hack to make them 16x larger than
what should be typically required (the previous "solution" for
VSC overflow).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/drivers/freedreno/a6xx/fd6_context.c
src/gallium/drivers/freedreno/a6xx/fd6_context.h
src/gallium/drivers/freedreno/a6xx/fd6_gmem.c