From: Rob Clark Date: Wed, 22 Mar 2023 18:56:09 +0000 (-0700) Subject: freedreno/a6xx: Restore mode X-Git-Tag: upstream/23.3.3~11253 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=79ac6197a994efaee352354730d0302df09bfa78;p=platform%2Fupstream%2Fmesa.git 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 Part-of: --- diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc b/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc index b8d976c..03dc180 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc @@ -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,