Skip to content

radeonsi: fix preamble state producing incorrect packets

If the first time the preamble is written, one of the rings isn't allocated, we wouldn't write the RING_SIZE to the preamble.

Later, when the preamble gets updated after the ring allocation, the new RING_SIZE packet would overwrite other packets.

For instance:

Capture_d_écran_du_2022-06-10_10-44-11

To prevent this, always write the RING_SIZE (the alternative would be to write NOP packets).

This fix "ERROR Illegal register access in command stream" hangs I observed on GFX8.

Fixes: 32c7805c ("radeonsi: merge all preamble states into one")

Merge request reports