Refactor waitOnCompletionFence method in DrmMemoryManager

get completion address and value from command stream receiver

Related-To: NEO-6643

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-03-30 12:40:09 +00:00
committed by Compute-Runtime-Automation
parent e32f624bf4
commit 9d502dea25
9 changed files with 59 additions and 35 deletions

View File

@@ -64,6 +64,13 @@ struct CommandStreamReceiverTest : public DeviceFixture,
InternalAllocationStorage *internalAllocationStorage;
};
TEST_F(CommandStreamReceiverTest, givenOsAgnosticCsrWhenGettingCompletionValueOrAddressThenZeroIsReturned) {
EXPECT_EQ(0u, commandStreamReceiver->getCompletionAddress());
MockGraphicsAllocation allocation{};
EXPECT_EQ(0u, commandStreamReceiver->getCompletionValue(allocation));
}
HWTEST_F(CommandStreamReceiverTest, WhenCreatingCsrThenDefaultValuesAreSet) {
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
EXPECT_EQ(0u, csr.peekTaskLevel());