SWDEV-272496 - Fix multiple timing issues

- Don't notify if the batch is empty, because that means
the current command was processed already.
- Disable pinning optimization to avoid a race condition on stall.
- TS marker submition requires extra AQL barrier
to track the status.

Change-Id: I17eff4ad12ac66cfe1bb44048bebb1891805279d
This commit is contained in:
German Andryeyev
2021-02-26 16:17:30 -05:00
committato da Saleel Kudchadker
parent 639d67866c
commit 24299e25bd
4 ha cambiato i file con 43 aggiunte e 29 eliminazioni
+9 -5
Vedi File
@@ -213,13 +213,17 @@ bool Event::awaitCompletion() {
// ================================================================================================
bool Event::notifyCmdQueue() {
HostQueue* queue = command().queue();
if ((status() > CL_COMPLETE) &&
// Don't need to notify any marker with direct dispatch,
// because all markers are blocking
if ((status() > CL_COMPLETE) && (nullptr != queue) &&
(!AMD_DIRECT_DISPATCH ||
// Don't need to notify any marker with direct dispatch,
// because all markers are blocking.
((command().type() != CL_COMMAND_MARKER) &&
(command().type() != 0))) &&
(nullptr != queue) && !notified_.test_and_set()) {
(command().type() != 0)) ||
// Don't need to notify if the current batch is empty,
// because that means the command was processed and extra notification
// will cause a stall on the host.
(queue->GetSubmittionBatch() != nullptr)) &&
!notified_.test_and_set()) {
// Make sure the queue is draining the enqueued commands.
amd::Command* command = new amd::Marker(*queue, false, nullWaitList, this);
if (command == NULL) {