mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Use dedicated using type for TaskCount
Related-To: NEO-7155 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3f962bf3e8
commit
4b42b066f8
@@ -62,7 +62,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenEnabledDirectSubmissionWhenGetting
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamTest, whenGettingCompletionAddressThenOffsettedTagAddressIsReturned) {
|
||||
csr->initializeTagAllocation();
|
||||
EXPECT_NE(nullptr, csr->getTagAddress());
|
||||
uint64_t tagAddress = castToUint64(const_cast<uint32_t *>(csr->getTagAddress()));
|
||||
uint64_t tagAddress = castToUint64(const_cast<TagAddressType *>(csr->getTagAddress()));
|
||||
auto expectedAddress = tagAddress + Drm::completionFenceOffset;
|
||||
EXPECT_EQ(expectedAddress, csr->getCompletionAddress());
|
||||
}
|
||||
|
||||
@@ -746,7 +746,7 @@ struct MockDrmDirectSubmissionToTestDtor : public DrmDirectSubmission<GfxFamily,
|
||||
functionsCalled.stopRingBuffer = true;
|
||||
return true;
|
||||
}
|
||||
void wait(uint32_t taskCountToWait) override {
|
||||
void wait(TaskCountType taskCountToWait) override {
|
||||
functionsCalled.wait = true;
|
||||
}
|
||||
void deallocateResources() override {
|
||||
|
||||
@@ -142,7 +142,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTestDrmPrelim, givenWaitUserFenceEnab
|
||||
testDrmCsr->useContextForUserFenceWait = true;
|
||||
testDrmCsr->activePartitions = static_cast<uint32_t>(drmCtxSize);
|
||||
|
||||
uint64_t tagAddress = castToUint64(const_cast<uint32_t *>(testDrmCsr->getTagAddress()));
|
||||
uint64_t tagAddress = castToUint64(const_cast<TagAddressType *>(testDrmCsr->getTagAddress()));
|
||||
FlushStamp handleToWait = 123;
|
||||
testDrmCsr->waitForFlushStamp(handleToWait);
|
||||
|
||||
@@ -155,7 +155,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTestDrmPrelim, givenWaitUserFenceEnab
|
||||
EXPECT_NE(0u, mock->context.receivedGemWaitUserFence.ctxId);
|
||||
EXPECT_EQ(DrmPrelimHelper::getGTEWaitUserFenceFlag(), mock->context.receivedGemWaitUserFence.op);
|
||||
EXPECT_EQ(0u, mock->context.receivedGemWaitUserFence.flags);
|
||||
EXPECT_EQ(DrmPrelimHelper::getU32WaitUserFenceFlag(), mock->context.receivedGemWaitUserFence.mask);
|
||||
EXPECT_EQ(DrmPrelimHelper::getU64WaitUserFenceFlag(), mock->context.receivedGemWaitUserFence.mask);
|
||||
EXPECT_EQ(-1, mock->context.receivedGemWaitUserFence.timeout);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTestDrmPrelim, givenWaitUserFenceEnab
|
||||
testDrmCsr->useUserFenceWait = true;
|
||||
testDrmCsr->useContextForUserFenceWait = false;
|
||||
|
||||
uint64_t tagAddress = castToUint64(const_cast<uint32_t *>(testDrmCsr->getTagAddress()));
|
||||
uint64_t tagAddress = castToUint64(const_cast<TaskCountType *>(testDrmCsr->getTagAddress()));
|
||||
FlushStamp handleToWait = 123;
|
||||
testDrmCsr->waitForFlushStamp(handleToWait);
|
||||
|
||||
@@ -188,7 +188,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTestDrmPrelim, givenWaitUserFenceEnab
|
||||
EXPECT_EQ(0u, mock->context.receivedGemWaitUserFence.ctxId);
|
||||
EXPECT_EQ(DrmPrelimHelper::getGTEWaitUserFenceFlag(), mock->context.receivedGemWaitUserFence.op);
|
||||
EXPECT_EQ(0u, mock->context.receivedGemWaitUserFence.flags);
|
||||
EXPECT_EQ(DrmPrelimHelper::getU32WaitUserFenceFlag(), mock->context.receivedGemWaitUserFence.mask);
|
||||
EXPECT_EQ(DrmPrelimHelper::getU64WaitUserFenceFlag(), mock->context.receivedGemWaitUserFence.mask);
|
||||
EXPECT_EQ(-1, mock->context.receivedGemWaitUserFence.timeout);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTestDrmPrelim, givenWaitUserFenceEnab
|
||||
testDrmCsr->activePartitions = 2u;
|
||||
EXPECT_NE(0u, testDrmCsr->postSyncWriteOffset);
|
||||
|
||||
uint64_t tagAddress = castToUint64(const_cast<uint32_t *>(testDrmCsr->getTagAddress()));
|
||||
uint64_t tagAddress = castToUint64(const_cast<TagAddressType *>(testDrmCsr->getTagAddress()));
|
||||
FlushStamp handleToWait = 123;
|
||||
testDrmCsr->waitForFlushStamp(handleToWait);
|
||||
|
||||
@@ -223,7 +223,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTestDrmPrelim, givenWaitUserFenceEnab
|
||||
EXPECT_EQ(0u, mock->context.receivedGemWaitUserFence.ctxId);
|
||||
EXPECT_EQ(DrmPrelimHelper::getGTEWaitUserFenceFlag(), mock->context.receivedGemWaitUserFence.op);
|
||||
EXPECT_EQ(0u, mock->context.receivedGemWaitUserFence.flags);
|
||||
EXPECT_EQ(DrmPrelimHelper::getU32WaitUserFenceFlag(), mock->context.receivedGemWaitUserFence.mask);
|
||||
EXPECT_EQ(DrmPrelimHelper::getU64WaitUserFenceFlag(), mock->context.receivedGemWaitUserFence.mask);
|
||||
EXPECT_EQ(-1, mock->context.receivedGemWaitUserFence.timeout);
|
||||
}
|
||||
|
||||
|
||||
@@ -126,15 +126,15 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmCommandStreamMultiTileMemExecTest, GivenDrmSuppo
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{0, 1024, AllocationType::COMMAND_BUFFER});
|
||||
allocation->updateTaskCount(2, defaultEngine.osContext->getContextId());
|
||||
|
||||
volatile uint32_t *completionAddress = defaultEngine.commandStreamReceiver->getTagAddress();
|
||||
completionAddress += (Drm::completionFenceOffset / sizeof(uint32_t));
|
||||
volatile TagAddressType *completionAddress = defaultEngine.commandStreamReceiver->getTagAddress();
|
||||
completionAddress += (Drm::completionFenceOffset / sizeof(TagAddressType));
|
||||
*completionAddress = 1;
|
||||
completionAddress += (postSyncOffset / sizeof(uint32_t));
|
||||
completionAddress += (postSyncOffset / sizeof(TagAddressType));
|
||||
*completionAddress = 1;
|
||||
|
||||
memoryManager->handleFenceCompletion(allocation);
|
||||
|
||||
uint64_t expectedAddress = castToUint64(const_cast<uint32_t *>(defaultEngine.commandStreamReceiver->getTagAddress())) +
|
||||
uint64_t expectedAddress = castToUint64(const_cast<TagAddressType *>(defaultEngine.commandStreamReceiver->getTagAddress())) +
|
||||
Drm::completionFenceOffset +
|
||||
postSyncOffset;
|
||||
constexpr uint64_t expectedValue = 2;
|
||||
@@ -160,15 +160,15 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmCommandStreamMultiTileMemExecTest, GivenDrmSuppo
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{0, 1024, AllocationType::COMMAND_BUFFER});
|
||||
allocation->updateTaskCount(2, defaultEngine.osContext->getContextId());
|
||||
|
||||
volatile uint32_t *completionAddress = defaultEngine.commandStreamReceiver->getTagAddress();
|
||||
completionAddress += (Drm::completionFenceOffset / sizeof(uint32_t));
|
||||
volatile TagAddressType *completionAddress = defaultEngine.commandStreamReceiver->getTagAddress();
|
||||
completionAddress += (Drm::completionFenceOffset / sizeof(TagAddressType));
|
||||
*completionAddress = 2; //1st context is ready
|
||||
completionAddress += (postSyncOffset / sizeof(uint32_t));
|
||||
completionAddress += (postSyncOffset / sizeof(TagAddressType));
|
||||
*completionAddress = 1;
|
||||
|
||||
memoryManager->handleFenceCompletion(allocation);
|
||||
|
||||
uint64_t expectedAddress = castToUint64(const_cast<uint32_t *>(defaultEngine.commandStreamReceiver->getTagAddress())) +
|
||||
uint64_t expectedAddress = castToUint64(const_cast<TagAddressType *>(defaultEngine.commandStreamReceiver->getTagAddress())) +
|
||||
Drm::completionFenceOffset +
|
||||
postSyncOffset;
|
||||
constexpr uint64_t expectedValue = 2;
|
||||
|
||||
@@ -5367,7 +5367,7 @@ TEST_F(DrmMemoryManagerTest, givenCompletionFenceEnabledWhenHandlingCompletionOf
|
||||
auto engine = memoryManager->getRegisteredEngines()[0];
|
||||
allocation->updateTaskCount(2, engine.osContext->getContextId());
|
||||
|
||||
uint64_t expectedFenceAddress = castToUint64(const_cast<uint32_t *>(engine.commandStreamReceiver->getTagAddress())) + Drm::completionFenceOffset;
|
||||
uint64_t expectedFenceAddress = castToUint64(const_cast<TagAddressType *>(engine.commandStreamReceiver->getTagAddress())) + Drm::completionFenceOffset;
|
||||
constexpr uint64_t expectedValue = 2;
|
||||
|
||||
memoryManager->handleFenceCompletion(allocation);
|
||||
|
||||
Reference in New Issue
Block a user