freedreno: Don't WFI and set RB_DBG_ECO_CNTL if it's not changing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19794>
This commit is contained in:
Emma Anholt 2022-11-16 16:07:03 -08:00 committed by Marge Bot
parent 4ab489a0b7
commit 9076b38610

View file

@ -429,18 +429,21 @@ fd6_clear_lrz(struct fd_batch *batch, struct fd_resource *zsbuf, double depth) a
fd6_event_write(batch, ring, 0x3f, false);
OUT_WFI5(ring);
OUT_PKT4(ring, REG_A6XX_RB_DBG_ECO_CNTL, 1);
OUT_RING(ring, screen->info->a6xx.magic.RB_DBG_ECO_CNTL_blit);
if (screen->info->a6xx.magic.RB_DBG_ECO_CNTL_blit != screen->info->a6xx.magic.RB_DBG_ECO_CNTL) {
/* This a non-context register, so we have to WFI before changing. */
OUT_WFI5(ring);
OUT_PKT4(ring, REG_A6XX_RB_DBG_ECO_CNTL, 1);
OUT_RING(ring, screen->info->a6xx.magic.RB_DBG_ECO_CNTL_blit);
}
OUT_PKT7(ring, CP_BLIT, 1);
OUT_RING(ring, CP_BLIT_0_OP(BLIT_OP_SCALE));
OUT_WFI5(ring);
OUT_PKT4(ring, REG_A6XX_RB_DBG_ECO_CNTL, 1);
OUT_RING(ring, screen->info->a6xx.magic.RB_DBG_ECO_CNTL);
if (screen->info->a6xx.magic.RB_DBG_ECO_CNTL_blit != screen->info->a6xx.magic.RB_DBG_ECO_CNTL) {
OUT_WFI5(ring);
OUT_PKT4(ring, REG_A6XX_RB_DBG_ECO_CNTL, 1);
OUT_RING(ring, screen->info->a6xx.magic.RB_DBG_ECO_CNTL);
}
fd6_event_write(batch, ring, PC_CCU_FLUSH_COLOR_TS, true);
fd6_event_write(batch, ring, PC_CCU_FLUSH_DEPTH_TS, true);