Skip to content

Commit c878590

Browse files
Remove EngineInstance parameter from pollForCompletion call
Change-Id: I07652db2de656032cdb3452239b671edbe876b75 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
1 parent c870628 commit c878590

7 files changed

+13
-13
lines changed

runtime/command_stream/aub_command_stream_receiver_hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
6060

6161
// Family specific version
6262
MOCKABLE_VIRTUAL void submitBatchBuffer(size_t engineIndex, uint64_t batchBufferGpuAddress, const void *batchBuffer, size_t batchBufferSize, uint32_t memoryBank, uint64_t entryBits);
63-
MOCKABLE_VIRTUAL void pollForCompletion(EngineInstanceT engineInstance);
63+
MOCKABLE_VIRTUAL void pollForCompletion();
6464

6565
uint32_t getDumpHandle();
6666
MOCKABLE_VIRTUAL void addContextToken(uint32_t dumpHandle);

runtime/command_stream/aub_command_stream_receiver_hw.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ FlushStamp AUBCommandStreamReceiverHw<GfxFamily>::flush(BatchBuffer &batchBuffer
345345
submitBatchBuffer(engineIndex, batchBufferGpuAddress, pBatchBuffer, sizeBatchBuffer, this->getMemoryBank(batchBuffer.commandBufferAllocation), this->getPPGTTAdditionalBits(batchBuffer.commandBufferAllocation));
346346

347347
if (!DebugManager.flags.AUBDumpConcurrentCS.get()) {
348-
pollForCompletion(osContext->getEngineType());
348+
pollForCompletion();
349349
}
350350

351351
if (this->standalone) {
@@ -563,13 +563,13 @@ void AUBCommandStreamReceiverHw<GfxFamily>::submitBatchBuffer(size_t engineIndex
563563
}
564564

565565
template <typename GfxFamily>
566-
void AUBCommandStreamReceiverHw<GfxFamily>::pollForCompletion(EngineInstanceT engineInstance) {
566+
void AUBCommandStreamReceiverHw<GfxFamily>::pollForCompletion() {
567567
if (hardwareContext) {
568568
hardwareContext->pollForCompletion();
569569
return;
570570
}
571571

572-
const auto mmioBase = this->getCsTraits(engineInstance).mmioBase;
572+
const auto mmioBase = this->getCsTraits(osContext->getEngineType()).mmioBase;
573573
const bool pollNotEqual = false;
574574
const uint32_t mask = getMaskAndValueForPollForCompletion();
575575
const uint32_t value = mask;

runtime/command_stream/tbx_command_stream_receiver_hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
4949

5050
// Family specific version
5151
MOCKABLE_VIRTUAL void submitBatchBuffer(size_t engineIndex, uint64_t batchBufferGpuAddress, const void *batchBuffer, size_t batchBufferSize, uint32_t memoryBank, uint64_t entryBits);
52-
MOCKABLE_VIRTUAL void pollForCompletion(EngineInstanceT engineInstance);
52+
MOCKABLE_VIRTUAL void pollForCompletion();
5353

5454
static CommandStreamReceiver *create(const HardwareInfo &hwInfoIn, bool withAubDump, ExecutionEnvironment &executionEnvironment);
5555

runtime/command_stream/tbx_command_stream_receiver_hw.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ FlushStamp TbxCommandStreamReceiverHw<GfxFamily>::flush(BatchBuffer &batchBuffer
210210

211211
submitBatchBuffer(engineIndex, batchBufferGpuAddress, pBatchBuffer, sizeBatchBuffer, this->getMemoryBank(batchBuffer.commandBufferAllocation), this->getPPGTTAdditionalBits(batchBuffer.commandBufferAllocation));
212212

213-
pollForCompletion(osContext->getEngineType());
213+
pollForCompletion();
214214
return 0;
215215
}
216216

@@ -344,15 +344,15 @@ void TbxCommandStreamReceiverHw<GfxFamily>::submitBatchBuffer(size_t engineIndex
344344
}
345345

346346
template <typename GfxFamily>
347-
void TbxCommandStreamReceiverHw<GfxFamily>::pollForCompletion(EngineInstanceT engineInstance) {
347+
void TbxCommandStreamReceiverHw<GfxFamily>::pollForCompletion() {
348348
if (hardwareContext) {
349349
hardwareContext->pollForCompletion();
350350
return;
351351
}
352352

353353
typedef typename AubMemDump::CmdServicesMemTraceRegisterPoll CmdServicesMemTraceRegisterPoll;
354354

355-
auto mmioBase = this->getCsTraits(engineInstance).mmioBase;
355+
auto mmioBase = this->getCsTraits(osContext->getEngineType()).mmioBase;
356356
bool pollNotEqual = false;
357357
tbxStream.registerPoll(
358358
AubMemDump::computeRegisterOffset(mmioBase, 0x2234), //EXECLIST_STATUS

unit_tests/aub_tests/command_stream/aub_command_stream_fixture.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class AUBCommandStreamFixture : public CommandStreamFixture {
8484
}
8585

8686
auto aubCsr = reinterpret_cast<AUBCommandStreamReceiverHw<FamilyType> *>(csr);
87-
aubCsr->pollForCompletion(csr->getOsContext().getEngineType());
87+
aubCsr->pollForCompletion();
8888
}
8989

9090
GraphicsAllocation *createResidentAllocationAndStoreItInCsr(const void *address, size_t size) {

unit_tests/mocks/mock_aub_csr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
8686
AUBCommandStreamReceiverHw<GfxFamily>::submitBatchBuffer(engineIndex, batchBufferGpuAddress, batchBuffer, batchBufferSize, memoryBank, entryBits);
8787
submitBatchBufferCalled = true;
8888
}
89-
void pollForCompletion(EngineInstanceT engineInstance) override {
90-
AUBCommandStreamReceiverHw<GfxFamily>::pollForCompletion(engineInstance);
89+
void pollForCompletion() override {
90+
AUBCommandStreamReceiverHw<GfxFamily>::pollForCompletion();
9191
pollForCompletionCalled = true;
9292
}
9393
void expectMemoryEqual(void *gfxAddress, const void *srcAddress, size_t length) {

unit_tests/mocks/mock_tbx_csr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class MockTbxCsr : public TbxCommandStreamReceiverHw<GfxFamily> {
5050
TbxCommandStreamReceiverHw<GfxFamily>::submitBatchBuffer(engineIndex, batchBufferGpuAddress, batchBuffer, batchBufferSize, memoryBank, entryBits);
5151
submitBatchBufferCalled = true;
5252
}
53-
void pollForCompletion(EngineInstanceT engineInstance) override {
54-
TbxCommandStreamReceiverHw<GfxFamily>::pollForCompletion(engineInstance);
53+
void pollForCompletion() override {
54+
TbxCommandStreamReceiverHw<GfxFamily>::pollForCompletion();
5555
pollForCompletionCalled = true;
5656
}
5757
void makeCoherent(GraphicsAllocation &gfxAllocation) override {

0 commit comments

Comments
 (0)