dev-amdgpu: Improve PM4 write data packet

The write data packet can write multiple dwords but currently always
assumes there is one dword, which can cause some write data to be
missed. This case is not common, but the number of dwords is implicitly
defined in the PM4 header.

This changeset passes the PM4 header to write data so that the correct
number of dwords can be determined. For now we assume no page crossing
when writing multiple dwords as the driver should be checking for that.

Change-Id: I0e8c3cbc28873779f468c2a11fdcf177210a22b7
This commit is contained in:
Matthew Poremba
2024-02-07 13:27:30 -06:00
parent c045c68540
commit 998709d4fc
2 changed files with 42 additions and 14 deletions

View File

@@ -136,7 +136,7 @@ class PM4PacketProcessor : public DmaVirtDevice
void decodeHeader(PM4Queue *q, PM4Header header);
/* Methods that implement PM4 packets */
void writeData(PM4Queue *q, PM4WriteData *pkt);
void writeData(PM4Queue *q, PM4WriteData *pkt, PM4Header header);
void writeDataDone(PM4Queue *q, PM4WriteData *pkt, Addr addr);
void mapQueues(PM4Queue *q, PM4MapQueues *pkt);
void unmapQueues(PM4Queue *q, PM4UnmapQueues *pkt);