kfdtest: Add event-based synchronization mechanism to queues
Wait4PacketConsumption now can accept an event to wait all packets subbmitted to be processed. Change-Id: I1497b7704e892b04d05811b8d3e4742237c1be57 Signed-off-by: xinhui pan <xinhui.pan@amd.com>
This commit is contained in:
@@ -71,3 +71,15 @@ void PM4Queue::SubmitPacket() {
|
||||
}
|
||||
}
|
||||
|
||||
void PM4Queue::Wait4PacketConsumption(HsaEvent *event) {
|
||||
if (event) {
|
||||
PlaceAndSubmitPacket(PM4ReleaseMemoryPacket(0,
|
||||
event->EventData.HWData2,
|
||||
event->EventId,
|
||||
true));
|
||||
|
||||
EXPECT_SUCCESS(hsaKmtWaitOnEvent(event, g_TestTimeOut));
|
||||
} else {
|
||||
BaseQueue::Wait4PacketConsumption();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user