freedreno/decode: Emulate CP_MEM_WRITE
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

This will let us see actual cmdstream, in cases like FDM where
CP_MEM_WRITE is used for cmdstream patching.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39704>
This commit is contained in:
Rob Clark 2026-02-04 11:57:20 -08:00 committed by Marge Bot
parent 017d453525
commit 7e8a61cd7b
2 changed files with 13 additions and 1 deletions

View file

@ -2758,6 +2758,9 @@ cp_wfi(uint32_t *dwords, uint32_t sizedwords, int level)
static void
cp_mem_write(uint32_t *dwords, uint32_t sizedwords, int level)
{
struct rnndomain *domain = rnn_finddomain(rnn->db, "CP_MEM_WRITE");
internal_packet(dwords, sizedwords, rnn, domain);
if (quiet(2))
return;
@ -2784,7 +2787,6 @@ cp_rmw(uint32_t *dwords, uint32_t sizedwords, int level)
domain = rnn_finddomain(rnn->db, "CP_REG_RMW");
str = internal_packet(dwords, sizedwords, rnn, domain);
printl(3, "%srmw %s", levels[level], str);
if (needs_wfi)
printl(2, "NEEDS WFI: rmw %s", str);

View file

@ -54,3 +54,13 @@ function CP_REG_RMW(pkt, size)
dst_reg_str, dst_reg_str, src0_str, rotate,
op_str, src1_str)
end
function CP_MEM_WRITE(pkt, size)
local addr = pkt.ADDR
for i = 2, size - 1 do
dbg("write: %x %x\n", addr, pkt[i])
bos.write(addr, pkt[i])
addr = addr + 4
end
end