kfdtest: add KFDTestUtilQueue

Some infrastructures below,
Implement SdmaTimePacket which records the global GPU timestamp.

Introduce class AsyncMPSQ and AsyncMPMQ.
AsyncMPSQ is aka async multiple packet single queue. It takes a set of
packet when create and submits them to a GPU to run. While AsyncMPMQ is
aka async multiple packet multiple queue. It manages a set of AsyncMPSQ,
and use a forloop to do operations of AsyncMPSQ.

Implement sdma_multicopy helper functions.

Change-Id: I47e1d2ca9630113b2a1d85a0055f3f8ee629fb5f
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
This commit is contained in:
xinhui pan
2018-08-27 15:01:21 +08:00
parent 247fa9f1e0
commit f618b3f075
6 changed files with 662 additions and 0 deletions
+19
View File
@@ -141,4 +141,23 @@ class SDMATrapPacket : public SDMAPacket {
SDMA_PKT_TRAP packetData;
};
class SDMATimePacket : public SDMAPacket {
public:
// Empty constructor, before using the packet call the init func
SDMATimePacket(void*);
virtual ~SDMATimePacket(void);
// @returns Pointer to the packet
virtual const void *GetPacket() const { return &packetData; }
// @brief Initialise the packet
void InitPacket(void*);
// @returns Packet size in bytes
virtual unsigned int SizeInBytes() const { return sizeof(SDMA_PKT_TIMESTAMP); }
protected:
SDMA_PKT_TIMESTAMP packetData;
};
#endif // __KFD_SDMA_PACKET__H__