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>


[ROCm/ROCR-Runtime commit: f618b3f075]
This commit is contained in:
xinhui pan
2018-08-27 15:01:21 +08:00
parent ca0873a234
commit 6b357be502
6 ha cambiato i file con 662 aggiunte e 0 eliminazioni
@@ -30,6 +30,7 @@ const unsigned int SDMA_OP_WRITE = 2;
const unsigned int SDMA_OP_FENCE = 5;
const unsigned int SDMA_OP_TRAP = 6;
const unsigned int SDMA_OP_TIMESTAMP = 13;
const unsigned int SDMA_OP_CONST_FILL = 11;
@@ -316,4 +317,41 @@ typedef struct SDMA_PKT_TRAP_TAG
} SDMA_PKT_TRAP, *PSDMA_PKT_TRAP;
/*
** Definitions for SDMA_PKT_TIMESTAMP packet
*/
typedef struct SDMA_PKT_TIMESTAMP_TAG
{
union
{
struct
{
unsigned int op:8;
unsigned int sub_op:8;
unsigned int reserved_0:16;
};
unsigned int DW_0_DATA;
} HEADER_UNION;
union
{
struct
{
unsigned int addr_31_0:32;
};
unsigned int DW_1_DATA;
} ADDR_LO_UNION;
union
{
struct
{
unsigned int addr_63_32:32;
};
unsigned int DW_2_DATA;
} ADDR_HI_UNION;
} SDMA_PKT_TIMESTAMP, *PSDMA_PKT_TIMESTAMP;
#endif // __SDMA_PKT_STRUCT_H__