From c878590162c96cf823e49c01ac3856c50c892c2c Mon Sep 17 00:00:00 2001 From: "Dunajski, Bartosz" Date: Mon, 28 Jan 2019 14:20:58 +0100 Subject: [PATCH] Remove EngineInstance parameter from pollForCompletion call Change-Id: I07652db2de656032cdb3452239b671edbe876b75 Signed-off-by: Dunajski, Bartosz --- runtime/command_stream/aub_command_stream_receiver_hw.h | 2 +- runtime/command_stream/aub_command_stream_receiver_hw.inl | 6 +++--- runtime/command_stream/tbx_command_stream_receiver_hw.h | 2 +- runtime/command_stream/tbx_command_stream_receiver_hw.inl | 6 +++--- .../aub_tests/command_stream/aub_command_stream_fixture.h | 2 +- unit_tests/mocks/mock_aub_csr.h | 4 ++-- unit_tests/mocks/mock_tbx_csr.h | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/runtime/command_stream/aub_command_stream_receiver_hw.h b/runtime/command_stream/aub_command_stream_receiver_hw.h index f86c8f89a3..ae8a24e1f7 100644 --- a/runtime/command_stream/aub_command_stream_receiver_hw.h +++ b/runtime/command_stream/aub_command_stream_receiver_hw.h @@ -60,7 +60,7 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw::flush(BatchBuffer &batchBuffer submitBatchBuffer(engineIndex, batchBufferGpuAddress, pBatchBuffer, sizeBatchBuffer, this->getMemoryBank(batchBuffer.commandBufferAllocation), this->getPPGTTAdditionalBits(batchBuffer.commandBufferAllocation)); if (!DebugManager.flags.AUBDumpConcurrentCS.get()) { - pollForCompletion(osContext->getEngineType()); + pollForCompletion(); } if (this->standalone) { @@ -563,13 +563,13 @@ void AUBCommandStreamReceiverHw::submitBatchBuffer(size_t engineIndex } template -void AUBCommandStreamReceiverHw::pollForCompletion(EngineInstanceT engineInstance) { +void AUBCommandStreamReceiverHw::pollForCompletion() { if (hardwareContext) { hardwareContext->pollForCompletion(); return; } - const auto mmioBase = this->getCsTraits(engineInstance).mmioBase; + const auto mmioBase = this->getCsTraits(osContext->getEngineType()).mmioBase; const bool pollNotEqual = false; const uint32_t mask = getMaskAndValueForPollForCompletion(); const uint32_t value = mask; diff --git a/runtime/command_stream/tbx_command_stream_receiver_hw.h b/runtime/command_stream/tbx_command_stream_receiver_hw.h index 67a46283a9..50499a17f3 100644 --- a/runtime/command_stream/tbx_command_stream_receiver_hw.h +++ b/runtime/command_stream/tbx_command_stream_receiver_hw.h @@ -49,7 +49,7 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw::flush(BatchBuffer &batchBuffer submitBatchBuffer(engineIndex, batchBufferGpuAddress, pBatchBuffer, sizeBatchBuffer, this->getMemoryBank(batchBuffer.commandBufferAllocation), this->getPPGTTAdditionalBits(batchBuffer.commandBufferAllocation)); - pollForCompletion(osContext->getEngineType()); + pollForCompletion(); return 0; } @@ -344,7 +344,7 @@ void TbxCommandStreamReceiverHw::submitBatchBuffer(size_t engineIndex } template -void TbxCommandStreamReceiverHw::pollForCompletion(EngineInstanceT engineInstance) { +void TbxCommandStreamReceiverHw::pollForCompletion() { if (hardwareContext) { hardwareContext->pollForCompletion(); return; @@ -352,7 +352,7 @@ void TbxCommandStreamReceiverHw::pollForCompletion(EngineInstanceT en typedef typename AubMemDump::CmdServicesMemTraceRegisterPoll CmdServicesMemTraceRegisterPoll; - auto mmioBase = this->getCsTraits(engineInstance).mmioBase; + auto mmioBase = this->getCsTraits(osContext->getEngineType()).mmioBase; bool pollNotEqual = false; tbxStream.registerPoll( AubMemDump::computeRegisterOffset(mmioBase, 0x2234), //EXECLIST_STATUS diff --git a/unit_tests/aub_tests/command_stream/aub_command_stream_fixture.h b/unit_tests/aub_tests/command_stream/aub_command_stream_fixture.h index 9618a43be6..1385adada8 100644 --- a/unit_tests/aub_tests/command_stream/aub_command_stream_fixture.h +++ b/unit_tests/aub_tests/command_stream/aub_command_stream_fixture.h @@ -84,7 +84,7 @@ class AUBCommandStreamFixture : public CommandStreamFixture { } auto aubCsr = reinterpret_cast *>(csr); - aubCsr->pollForCompletion(csr->getOsContext().getEngineType()); + aubCsr->pollForCompletion(); } GraphicsAllocation *createResidentAllocationAndStoreItInCsr(const void *address, size_t size) { diff --git a/unit_tests/mocks/mock_aub_csr.h b/unit_tests/mocks/mock_aub_csr.h index 606dfdc8a0..4b9b660fec 100644 --- a/unit_tests/mocks/mock_aub_csr.h +++ b/unit_tests/mocks/mock_aub_csr.h @@ -86,8 +86,8 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw { AUBCommandStreamReceiverHw::submitBatchBuffer(engineIndex, batchBufferGpuAddress, batchBuffer, batchBufferSize, memoryBank, entryBits); submitBatchBufferCalled = true; } - void pollForCompletion(EngineInstanceT engineInstance) override { - AUBCommandStreamReceiverHw::pollForCompletion(engineInstance); + void pollForCompletion() override { + AUBCommandStreamReceiverHw::pollForCompletion(); pollForCompletionCalled = true; } void expectMemoryEqual(void *gfxAddress, const void *srcAddress, size_t length) { diff --git a/unit_tests/mocks/mock_tbx_csr.h b/unit_tests/mocks/mock_tbx_csr.h index 6f9bd90a71..ca6bad12b3 100644 --- a/unit_tests/mocks/mock_tbx_csr.h +++ b/unit_tests/mocks/mock_tbx_csr.h @@ -50,8 +50,8 @@ class MockTbxCsr : public TbxCommandStreamReceiverHw { TbxCommandStreamReceiverHw::submitBatchBuffer(engineIndex, batchBufferGpuAddress, batchBuffer, batchBufferSize, memoryBank, entryBits); submitBatchBufferCalled = true; } - void pollForCompletion(EngineInstanceT engineInstance) override { - TbxCommandStreamReceiverHw::pollForCompletion(engineInstance); + void pollForCompletion() override { + TbxCommandStreamReceiverHw::pollForCompletion(); pollForCompletionCalled = true; } void makeCoherent(GraphicsAllocation &gfxAllocation) override {