Skip to content

Commit e0e19c2

Browse files
Change TBX 'coherence' terminology to 'download'
Related-To: NEO-3054 Change-Id: Ic2d7fe76dc85b007acfe19ee2c29f8dd8539ccbc Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
1 parent d106980 commit e0e19c2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

runtime/command_stream/tbx_command_stream_receiver_hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
3939
uint32_t getMaskAndValueForPollForCompletion() const;
4040
bool getpollNotEqualValueForPollForCompletion() const;
4141

42-
MOCKABLE_VIRTUAL void makeCoherent(GraphicsAllocation &gfxAllocation);
42+
MOCKABLE_VIRTUAL void downloadAllocation(GraphicsAllocation &gfxAllocation);
4343

4444
public:
4545
using CommandStreamReceiverSimulatedCommonHw<GfxFamily>::initAdditionalMMIO;

runtime/command_stream/tbx_command_stream_receiver_hw.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,11 @@ void TbxCommandStreamReceiverHw<GfxFamily>::waitForTaskCountWithKmdNotifyFallbac
390390
this->flushBatchedSubmissions();
391391

392392
while (*this->getTagAddress() < this->latestFlushedTaskCount) {
393-
makeCoherent(*this->getTagAllocation());
393+
downloadAllocation(*this->getTagAllocation());
394394
}
395395

396396
for (GraphicsAllocation *graphicsAllocation : this->allocationsForDownload) {
397-
makeCoherent(*graphicsAllocation);
397+
downloadAllocation(*graphicsAllocation);
398398
}
399399
this->allocationsForDownload.clear();
400400

@@ -418,7 +418,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::processResidency(ResidencyContainer
418418
}
419419

420420
template <typename GfxFamily>
421-
void TbxCommandStreamReceiverHw<GfxFamily>::makeCoherent(GraphicsAllocation &gfxAllocation) {
421+
void TbxCommandStreamReceiverHw<GfxFamily>::downloadAllocation(GraphicsAllocation &gfxAllocation) {
422422
if (hardwareContextController) {
423423
hardwareContextController->readMemory(gfxAllocation.getGpuAddress(), gfxAllocation.getUnderlyingBuffer(), gfxAllocation.getUnderlyingBufferSize(),
424424
this->getMemoryBank(&gfxAllocation), MemoryConstants::pageSize64k);

unit_tests/command_stream/tbx_command_stream_tests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ HWTEST_F(TbxCommandStreamTests, givenDbgDeviceIdFlagIsSetWhenTbxCsrIsCreatedThen
318318
EXPECT_EQ(9u, tbxCsr->aubDeviceId);
319319
}
320320

321-
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenCallingMakeSurfacePackNonResidentThenOnlyResidentAllocationsAreScheduledForCoherence) {
321+
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenCallingMakeSurfacePackNonResidentThenOnlyResidentAllocationsAddedAllocationsForDownload) {
322322
MockTbxCsr<FamilyType> tbxCsr{*pDevice->executionEnvironment};
323323
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
324324
tbxCsr.setupContext(osContext);
@@ -343,7 +343,7 @@ HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCsrWhenCallingWaitForTaskCountWithKm
343343
struct MockTbxCsr : TbxCommandStreamReceiverHw<FamilyType> {
344344
using CommandStreamReceiver::latestFlushedTaskCount;
345345
using TbxCommandStreamReceiverHw<FamilyType>::TbxCommandStreamReceiverHw;
346-
void makeCoherent(GraphicsAllocation &gfxAllocation) override {
346+
void downloadAllocation(GraphicsAllocation &gfxAllocation) override {
347347
*reinterpret_cast<uint32_t *>(CommandStreamReceiver::getTagAllocation()->getUnderlyingBuffer()) = this->latestFlushedTaskCount;
348348
downloadedAllocations.insert(&gfxAllocation);
349349
}
@@ -479,14 +479,14 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenMakeResidentIsC
479479
EXPECT_TRUE(tbxCsr.writeMemoryWithAubManagerCalled);
480480
}
481481

482-
HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenMakeCoherentIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
482+
HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenDownloadAllocationIsCalledThenItShouldCallTheExpectedHwContextFunctions) {
483483
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
484484
MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false);
485485
tbxCsr.setupContext(osContext);
486486
auto mockHardwareContext = static_cast<MockHardwareContext *>(tbxCsr.hardwareContextController->hardwareContexts[0].get());
487487

488488
MockGraphicsAllocation allocation(reinterpret_cast<void *>(0x1000), 0x1000);
489-
tbxCsr.makeCoherent(allocation);
489+
tbxCsr.downloadAllocation(allocation);
490490

491491
EXPECT_TRUE(mockHardwareContext->readMemoryCalled);
492492
}

unit_tests/mocks/mock_tbx_csr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class MockTbxCsr : public TbxCommandStreamReceiverHw<GfxFamily> {
4949
TbxCommandStreamReceiverHw<GfxFamily>::pollForCompletion();
5050
pollForCompletionCalled = true;
5151
}
52-
void makeCoherent(GraphicsAllocation &gfxAllocation) override {
53-
TbxCommandStreamReceiverHw<GfxFamily>::makeCoherent(gfxAllocation);
52+
void downloadAllocation(GraphicsAllocation &gfxAllocation) override {
53+
TbxCommandStreamReceiverHw<GfxFamily>::downloadAllocation(gfxAllocation);
5454
makeCoherentCalled = true;
5555
}
5656
bool initializeEngineCalled = false;

0 commit comments

Comments
 (0)