freedreno/a6xx: Restore mode
authorRob Clark <robdclark@chromium.org>
Wed, 22 Mar 2023 18:56:09 +0000 (11:56 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 22 Mar 2023 20:53:17 +0000 (20:53 +0000)
commit79ac6197a994efaee352354730d0302df09bfa78
tree66d99c53683d16dc411d695d0fc4d8718cd3ef40
parent8af8c5bd075776da251aee8fdab9c98894eccada
freedreno/a6xx: Restore mode

We set the "mode" to 1 for CS because we want CP_SET_DRAW_STATE to
immediately execute the state groups.  But in the 3d path, we don't
restore the value in the sysmem path.  This was causing GPU faults
on 7c3 and presumably other a6xx gen4 things.  But somehow not on
a6xx gen1.

Let's just set it as part of initial state restore where we are
ensuring that the GPU is in a sane state.

Fixes: dec49ec50a2 ("freedreno/a6xx: Move CS state to PROG state group")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22080>
src/gallium/drivers/freedreno/a6xx/fd6_emit.cc