kfdtest: add PM4EventInterrupt test

Similar with SdmaEventInterrupt, verify event interrupt on pm4 queue.

Change-Id: I0e43f26fd0d965126985820704215d2ef5e52c1a
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
This commit is contained in:
xinhui pan
2018-08-23 13:27:34 +08:00
parent bdb1f8a066
commit 3e527bc7e8
3 changed files with 79 additions and 0 deletions
+14
View File
@@ -30,6 +30,20 @@
#include "Dispatch.hpp"
#include "SDMAPacket.hpp"
uint64_t RoundToPowerOf2(uint64_t val) {
int bytes = sizeof(uint64_t);
val--;
for (int i = 0; i < bytes; i++) {
val |= val >> (1 << i);
}
val++;
return val;
}
bool WaitOnValue(const volatile unsigned int *buf, unsigned int value) {
unsigned int timeOut = g_TestTimeOut;