freedreno: Fix CP_CCHE_INVALIDATE not being applied at the right point
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Apparently CP_CCHE_INVALIDATE is just a plain register write underneath,
so it needs WFI before it, in order to invalidate at the right point.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41266>
This commit is contained in:
Danylo Piliaiev 2026-04-29 17:27:59 +02:00 committed by Marge Bot
parent c2e78f1b22
commit 5fcde4d65d

View file

@ -38,8 +38,13 @@ fd6_emit_flushes(struct fd_context *ctx, fd_cs &cs, unsigned flushes)
if ((CHIP >= A7XX) && (flushes & FD6_BLIT_CLEAN_CACHE))
fd6_event_write<CHIP>(ctx, cs, FD_CCU_CLEAN_BLIT_CACHE);
if ((CHIP >= A7XX) && (flushes & FD6_INVALIDATE_CCHE))
if ((CHIP >= A7XX) && (flushes & FD6_INVALIDATE_CCHE)) {
/* CP_CCHE_INVALIDATE is just a plain register write underneath, so
* it needs WFI before it, in order to invalidate at the right point.
*/
fd_pkt7(cs, CP_WAIT_FOR_IDLE, 0);
fd_pkt7(cs, CP_CCHE_INVALIDATE, 0);
}
if (flushes & FD6_WAIT_MEM_WRITES)
fd_pkt7(cs, CP_WAIT_MEM_WRITES, 0);