[2/n] Move Hardware Info to Execution Environment

- remove hwInfo from the csr functions where it was passed as a parameter,
now csr functions have access to hwInfo by Execution Environment

Change-Id: I756ae63d9728c9c963571147bab97f9e1c15797b
Signed-off-by: Adam Stefanowski <adam.stefanowski@intel.com>
This commit is contained in:
Stefanowski, Adam
2019-02-27 10:06:14 +01:00
committed by sys_ocldev
parent ca4b47f7f4
commit 16aee8cc46
83 changed files with 482 additions and 499 deletions

View File

@@ -71,14 +71,14 @@ struct KmdNotifyTests : public ::testing::Test {
template <typename Family>
class MockKmdNotifyCsr : public UltCommandStreamReceiver<Family> {
public:
MockKmdNotifyCsr(const HardwareInfo &hwInfo, const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<Family>(hwInfo, const_cast<ExecutionEnvironment &>(executionEnvironment)) {}
MockKmdNotifyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<Family>(const_cast<ExecutionEnvironment &>(executionEnvironment)) {}
MOCK_METHOD1(waitForFlushStamp, bool(FlushStamp &flushStampToWait));
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
};
template <typename Family>
MockKmdNotifyCsr<Family> *createMockCsr() {
auto csr = new ::testing::NiceMock<MockKmdNotifyCsr<Family>>(device->getHardwareInfo(), *device->executionEnvironment);
auto csr = new ::testing::NiceMock<MockKmdNotifyCsr<Family>>(*device->executionEnvironment);
device->resetCommandStreamReceiver(csr);
mockKmdNotifyHelper = new MockKmdNotifyHelper(&device->getHardwareInfo().capabilityTable.kmdNotifyProperties);

View File

@@ -253,7 +253,7 @@ TEST_F(TimestampPacketSimpleTests, whenAskedForStampAddressThenReturnWithValidOf
}
HWTEST_F(TimestampPacketTests, givenCommandStreamReceiverHwWhenObtainingPreferredTagPoolSizeThenReturnCorrectValue) {
CommandStreamReceiverHw<FamilyType> csr(*platformDevices[0], *executionEnvironment);
CommandStreamReceiverHw<FamilyType> csr(*executionEnvironment);
EXPECT_EQ(512u, csr.getPreferredTagPoolSize());
}