freedreno/drm: Handle a7xx case

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
(cherry picked from commit a6c9f152cc)
This commit is contained in:
Rob Clark 2024-07-18 14:16:48 -07:00 committed by Eric Engestrom
parent 602757bec9
commit 1800532d6d
2 changed files with 11 additions and 2 deletions

View file

@ -4384,7 +4384,7 @@
"description": "freedreno/drm: Handle a7xx case",
"nominated": false,
"nomination_type": 3,
"resolution": 4,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -200,8 +200,17 @@ uint32_t
fd_pipe_emit_fence(struct fd_pipe *pipe, struct fd_ringbuffer *ring)
{
uint32_t fence = ++pipe->last_fence;
unsigned gen = fd_dev_gen(&pipe->dev_id);
if (pipe->is_64bit) {
if (gen >= A7XX) {
OUT_PKT7(ring, CP_EVENT_WRITE7, 4);
OUT_RING(ring, CP_EVENT_WRITE_0_EVENT(CACHE_FLUSH_TS) |
CP_EVENT_WRITE7_0_WRITE_SRC(EV_WRITE_USER_32B) |
CP_EVENT_WRITE7_0_WRITE_DST(EV_DST_RAM) |
CP_EVENT_WRITE7_0_WRITE_ENABLED);
OUT_RELOC(ring, control_ptr(pipe, fence)); /* ADDR_LO/HI */
OUT_RING(ring, fence);
} else if (gen >= A5XX) {
OUT_PKT7(ring, CP_EVENT_WRITE, 4);
OUT_RING(ring, CP_EVENT_WRITE_0_EVENT(CACHE_FLUSH_TS));
OUT_RELOC(ring, control_ptr(pipe, fence)); /* ADDR_LO/HI */