dev-amdgpu: Rework PM4 NOP packet
The PM4 NOP header is used to insert spaces in the PM4 ring and can
therefore be any size. This includes zero. A size of zero is denoted by
a value of 0x3fff in the NOP packet header. Currently we assume this
means the remainder of the PM4 queue up to the wptr is empty/NOPs. This
is not always true.
This changeset reworks the PM4 NOP packet to handle the value of 0x3fff
as a special value and advances the rptr by 0 bytes. This fixes issues
where there were additional packets in the queue which were being
skipped over by fast forwarding. Since those packets could be anything,
that leads to undefined behavior afterwards.
Maintainer: Matt Sinclair <firstname.lastname@example.org>
Tested-by: kokoro <email@example.com>
Reviewed-by: Matt Sinclair <firstname.lastname@example.org>
1 file changed