mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 13:48:29 +00:00
m1n1.trace.agx: Dump some buffers on G14X from register values
Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
6902cb6210
commit
311385e645
1 changed files with 27 additions and 1 deletions
|
@ -760,7 +760,17 @@ class AGXTracer(ASCTracer):
|
|||
context = wi0.context_id
|
||||
|
||||
def read(off, size):
|
||||
return self.uat.ioread(context, off & 0x7fff_ffff_ffff_ffff, size)
|
||||
data = b""
|
||||
while size > 0:
|
||||
boundary = (off + 0x4000) & ~0x3fff
|
||||
block = min(size, boundary - off)
|
||||
try:
|
||||
data += self.uat.ioread(context, off & 0x7fff_ffff_ffff_ffff, block)
|
||||
except Exception:
|
||||
break
|
||||
off += block
|
||||
size -= block
|
||||
return data
|
||||
|
||||
#chexdump(kread(wi0.addr, 0x600), print_fn=self.log)
|
||||
self.log(f" context_id = {context:#x}")
|
||||
|
@ -810,6 +820,22 @@ class AGXTracer(ASCTracer):
|
|||
# self.log(f" TILES {xt} {yt} {blocks} {size:#x}")
|
||||
#self.uat.dump(context, self.log)
|
||||
|
||||
regs = getattr(wi0, "registers", None)
|
||||
if regs is not None:
|
||||
for reg in regs:
|
||||
if reg.number == 0x1c920: # meta1
|
||||
self.log(f" meta1 @ {reg.data:#x}:")
|
||||
data = read(reg.data, 0x41000)
|
||||
chexdump(data, print_fn=self.log)
|
||||
elif reg.number == 0x1c041: # clustering tilemaps
|
||||
self.log(f" cl_tilemaps @ {reg.data:#x}:")
|
||||
data = read(reg.data, 0x100000)
|
||||
chexdump(data, print_fn=self.log)
|
||||
elif reg.number == 0x1c039: # tilemaps
|
||||
self.log(f" tilemap @ {reg.data:#x}:")
|
||||
data = read(reg.data, 0x100000)
|
||||
chexdump(data, print_fn=self.log)
|
||||
|
||||
def handle_3d(self, wi):
|
||||
self.log(f"Got 3D WI{wi.cmdid:d}")
|
||||
if wi.cmdid != 1:
|
||||
|
|
Loading…
Add table
Reference in a new issue