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: dec49ec50a ("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>
This commit is contained in:
Rob Clark
2023-03-22 11:56:09 -07:00
committed by Marge Bot
parent 8af8c5bd07
commit 79ac6197a9
@@ -760,6 +760,9 @@ fd6_emit_restore(struct fd_batch *batch, struct fd_ringbuffer *ring)
trace_start_state_restore(&batch->trace, ring);
}
OUT_PKT7(ring, CP_SET_MODE, 1);
OUT_RING(ring, 0);
fd6_cache_inv(batch, ring);
OUT_REG(ring,