Skip to content

freedreno: Add 'replay' tool which allows to replay cmdstreams

Replay command stream obtained from:

  • /sys/kernel/debug/dri/0/rd
  • /sys/kernel/debug/dri/0/hangrd

!!! Command stream capture should be done with ALL buffers:

  • echo 1 > /sys/module/msm/parameters/rd_full

Requires kernel with MSM_INFO_SET_IOVA support.

This tool is intended for reproduction of various GPU issues:

  • GPU hangs, note that command stream obtained from hangrd may not reproduce (rarely) the hang, since the buffers are snapshotted at the moment of the hang and not at the start of the hanging command stream.
  • TODO: Misrendering, would require marking framebuffer images at each renderpass in order to fetch and decode them.

Code from Freedreno/Turnip is not re-used here since the relevant pieces may introduce additional allocations which cannot be allowed during the replay.


Is it useful as-is? Yes, a bit, to confirm that hang is reproducible and reproducible with obtained cmdstream.

Though it's not that useful. The end goal is to be able to do an edit + replay cycle to quickly test theories. So the replay tool is just a piece of the puzzle.

Merge request reports