SWDEV-302383 - Get active state from device

The queue can be destroyed at the time the app will request
the event status. Hence just get the active state from the device.

Change-Id: I887ecb0cfe414c2119247228b0d1255b8308da1e
This commit is contained in:
German Andryeyev
2021-09-14 18:21:57 -04:00
parent e6c0e0fe8b
commit f116959b54
+1 -2
View File
@@ -2564,8 +2564,7 @@ bool Device::IsHwEventReady(const amd::Event& event, bool wait) const {
ClPrint(amd::LOG_INFO, amd::LOG_SIG, "No HW event");
return false;
} else if (wait) {
auto* vdev = event.command().queue()->vdev();
WaitForSignal(reinterpret_cast<ProfilingSignal*>(hw_event)->signal_, vdev->ActiveWait());
WaitForSignal(reinterpret_cast<ProfilingSignal*>(hw_event)->signal_, ActiveWait());
return true;
}
return (hsa_signal_load_relaxed(reinterpret_cast<ProfilingSignal*>(hw_event)->signal_) <= 0);