mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
Move clGfxCoreHelper ownership to rootDeviceEnv
Related-To: NEO-6853 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5ff0ff0997
commit
468d722efb
@@ -357,7 +357,7 @@ TEST(DrmBufferObject, givenDrmIoctlReturnsErrorNotSupportedThenBufferObjectRetur
|
||||
auto executionEnvironment = new ExecutionEnvironment;
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
@@ -384,7 +384,7 @@ TEST(DrmBufferObject, givenPerContextVmRequiredWhenBoBoundAndUnboundThenCorrectB
|
||||
auto executionEnvironment = new ExecutionEnvironment;
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
@@ -427,7 +427,7 @@ TEST(DrmBufferObject, givenPrintBOBindingResultWhenBOBindAndUnbindSucceedsThenPr
|
||||
auto executionEnvironment = new ExecutionEnvironment;
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
@@ -480,7 +480,7 @@ TEST(DrmBufferObject, givenPrintBOBindingResultWhenBOBindAndUnbindFailsThenPrint
|
||||
auto executionEnvironment = new ExecutionEnvironment;
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -63,7 +63,7 @@ HWTEST_F(DrmCommandStreamMMTest, givenForcePinDisabledWhenMemoryManagerIsCreated
|
||||
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto drm = new DrmMockCustom(*executionEnvironment.rootDeviceEnvironments[0]);
|
||||
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment.rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
|
||||
executionEnvironment.rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment.rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drm));
|
||||
@@ -82,7 +82,7 @@ HWTEST_F(DrmCommandStreamMMTest, givenExecutionEnvironmentWithMoreThanOneRootDev
|
||||
executionEnvironment.prepareRootDeviceEnvironments(2);
|
||||
|
||||
for (uint32_t rootDeviceIndex = 0; rootDeviceIndex < executionEnvironment.rootDeviceEnvironments.size(); rootDeviceIndex++) {
|
||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initGmm();
|
||||
auto drm = new DrmMockCustom(*executionEnvironment.rootDeviceEnvironments[0]);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -918,7 +918,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamBlitterDirectSubmissionTest, givenEnabledDire
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenDrmCommandStreamReceiverWhenCreatePageTableManagerIsCalledThenCreatePageTableManager) {
|
||||
executionEnvironment.prepareRootDeviceEnvironments(2);
|
||||
executionEnvironment.rootDeviceEnvironments[1]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment.rootDeviceEnvironments[1]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment.rootDeviceEnvironments[1]->initGmm();
|
||||
executionEnvironment.rootDeviceEnvironments[1]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment.rootDeviceEnvironments[1]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(new DrmMockCustom(*executionEnvironment.rootDeviceEnvironments[0])));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -394,14 +394,14 @@ struct DrmImplicitScalingCommandStreamTest : ::testing::Test {
|
||||
hwInfo.reset(new HardwareInfo(*defaultHwInfo));
|
||||
hwInfo->gtSystemInfo.MultiTileArchInfo.IsValid = true;
|
||||
hwInfo->gtSystemInfo.MultiTileArchInfo.TileCount = 0b11;
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(hwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(hwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
constexpr int mockFd = 33;
|
||||
drm = new DrmMock(mockFd, *executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm->setupIoctlHelper(hwInfo->platform.eProductFamily);
|
||||
drm->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(hwInfo.get()));
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(hwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(hwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drm));
|
||||
executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*drm, 0u);
|
||||
|
||||
@@ -51,7 +51,7 @@ struct DrmCommandStreamMultiTileMemExecFixture {
|
||||
*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1u);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(NEO::defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(NEO::defaultHwInfo.get());
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
|
||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -196,7 +196,7 @@ TEST(DrmPrelimTest, givenContextDebugAvailableWhenCheckedForSupportThenTrueIsRet
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
@@ -220,7 +220,7 @@ TEST(DrmPrelimTest, givenContextDebugNotAvailableWhenCheckedForSupportThenTrueIs
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
@@ -315,7 +315,7 @@ TEST(DrmPrelimTest, givenProgramDebuggingAndContextDebugAvailableAndCCSEnginesWh
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
@@ -337,7 +337,7 @@ TEST(DrmPrelimTest, givenProgramDebuggingAndContextDebugAvailableAndCCSEnginesWh
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -215,7 +215,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmTestXeHPAndLater, givenLinkBcsEngineWhenBindingS
|
||||
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&localHwInfo);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&localHwInfo);
|
||||
auto drm = std::make_unique<DrmQueryMock>(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm->supportedCopyEnginesMask = maxNBitValue(9);
|
||||
|
||||
@@ -244,7 +244,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmTestXeHPAndLater, givenLinkBcsEngineWithoutMainC
|
||||
localHwInfo.gtSystemInfo.MultiTileArchInfo.TileMask = 0;
|
||||
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&localHwInfo);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&localHwInfo);
|
||||
auto drm = std::make_unique<DrmQueryMock>(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm->supportedCopyEnginesMask = maxNBitValue(9);
|
||||
drm->supportedCopyEnginesMask.set(0, false);
|
||||
@@ -293,7 +293,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmTestXeHPAndLater, giveNotAllLinkBcsEnginesWhenBi
|
||||
localHwInfo.gtSystemInfo.MultiTileArchInfo.TileMask = 0;
|
||||
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&localHwInfo);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&localHwInfo);
|
||||
auto drm = std::make_unique<DrmQueryMock>(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm->supportedCopyEnginesMask = maxNBitValue(9);
|
||||
drm->supportedCopyEnginesMask.set(2, false);
|
||||
@@ -342,7 +342,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmTestXeHPAndLater, givenLinkBcsEngineWhenBindingM
|
||||
localHwInfo.gtSystemInfo.MultiTileArchInfo.TileMask = 0b1111;
|
||||
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&localHwInfo);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&localHwInfo);
|
||||
auto drm = std::make_unique<DrmQueryMock>(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm->supportedCopyEnginesMask = maxNBitValue(9);
|
||||
|
||||
@@ -373,7 +373,7 @@ HWTEST2_F(DrmTestXeHPCAndLater, givenBcsVirtualEnginesEnabledWhenCreatingContext
|
||||
localHwInfo.gtSystemInfo.MultiTileArchInfo.TileCount = 0;
|
||||
localHwInfo.gtSystemInfo.MultiTileArchInfo.TileMask = 0;
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&localHwInfo);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&localHwInfo);
|
||||
auto drm = std::make_unique<DrmQueryMock>(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm->supportedCopyEnginesMask = maxNBitValue(9);
|
||||
drm->queryEngineInfo();
|
||||
@@ -402,7 +402,7 @@ HWTEST2_F(DrmTestXeHPCAndLater, givenBcsVirtualEnginesEnabledWhenCreatingContext
|
||||
localHwInfo.gtSystemInfo.MultiTileArchInfo.TileCount = 0;
|
||||
localHwInfo.gtSystemInfo.MultiTileArchInfo.TileMask = 0;
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&localHwInfo);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&localHwInfo);
|
||||
auto drm = std::make_unique<DrmQueryMock>(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm->supportedCopyEnginesMask = maxNBitValue(9);
|
||||
drm->queryEngineInfo();
|
||||
@@ -431,7 +431,7 @@ HWTEST2_F(DrmTestXeHPCAndLater, givenBcsVirtualEnginesDisabledWhenCreatingContex
|
||||
localHwInfo.gtSystemInfo.MultiTileArchInfo.TileCount = 0;
|
||||
localHwInfo.gtSystemInfo.MultiTileArchInfo.TileMask = 0;
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&localHwInfo);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&localHwInfo);
|
||||
auto drm = std::make_unique<DrmQueryMock>(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
ASSERT_NE(nullptr, drm);
|
||||
drm->supportedCopyEnginesMask = maxNBitValue(9);
|
||||
@@ -803,7 +803,7 @@ struct DistanceQueryDrmTests : ::testing::Test {
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
|
||||
rootDeviceEnvironment = executionEnvironment->rootDeviceEnvironments[0].get();
|
||||
rootDeviceEnvironment->setHwInfo(NEO::defaultHwInfo.get());
|
||||
rootDeviceEnvironment->setHwInfoAndInitHelpers(NEO::defaultHwInfo.get());
|
||||
}
|
||||
|
||||
std::unique_ptr<MyDrm> createDrm(bool supportDistanceInfoQuery) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -178,7 +178,7 @@ struct MultiTileMemoryInfoFixture : public ::testing::Test {
|
||||
void SetUp() override {
|
||||
executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
pHwInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
|
||||
@@ -90,7 +90,7 @@ TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenMultiRootDeviceEnvironmentAnd
|
||||
|
||||
executionEnvironment->prepareRootDeviceEnvironments(rootDevicesNumber);
|
||||
for (uint32_t i = 0; i < rootDevicesNumber; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->initGmm();
|
||||
auto mock = new DrmQueryMock(*executionEnvironment->rootDeviceEnvironments[i]);
|
||||
|
||||
@@ -140,7 +140,7 @@ TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenMultiRootDeviceEnvironmentAnd
|
||||
|
||||
executionEnvironment->prepareRootDeviceEnvironments(rootDevicesNumber);
|
||||
for (uint32_t i = 0; i < rootDevicesNumber; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->initGmm();
|
||||
auto mock = new DrmQueryMock(*executionEnvironment->rootDeviceEnvironments[i]);
|
||||
|
||||
@@ -180,7 +180,7 @@ TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenMultiRootDeviceEnvironmentAnd
|
||||
|
||||
executionEnvironment->prepareRootDeviceEnvironments(rootDevicesNumber);
|
||||
for (uint32_t i = 0; i < rootDevicesNumber; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->initGmm();
|
||||
auto mock = new DrmQueryMock(*executionEnvironment->rootDeviceEnvironments[i]);
|
||||
|
||||
@@ -220,7 +220,7 @@ TEST_F(DrmMemoryManagerUsmSharedHandlePrelimTest, givenMultiRootDeviceEnvironmen
|
||||
auto osInterface = executionEnvironment->rootDeviceEnvironments[0]->osInterface.release();
|
||||
|
||||
executionEnvironment->prepareRootDeviceEnvironments(rootDevicesNumber);
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->initGmm();
|
||||
auto mock = new DrmQueryMock(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]);
|
||||
|
||||
@@ -255,7 +255,7 @@ TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenMultiRootDeviceEnvironmentAnd
|
||||
|
||||
executionEnvironment->prepareRootDeviceEnvironments(rootDevicesNumber);
|
||||
for (uint32_t i = 0; i < rootDevicesNumber; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->initGmm();
|
||||
auto mock = new DrmQueryMock(*executionEnvironment->rootDeviceEnvironments[i]);
|
||||
|
||||
@@ -2357,7 +2357,7 @@ using AllocationInfoLogging = DrmMemoryManagerLocalMemoryPrelimTest;
|
||||
TEST(AllocationInfoLogging, givenDrmGraphicsAllocationWithMultipleBOsWhenGettingImplementationSpecificAllocationInfoThenReturnInfoStringWithAllHandles) {
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
DrmQueryMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
|
||||
|
||||
@@ -61,7 +61,7 @@ class DrmMemoryManagerLocalMemoryTest : public ::testing::Test {
|
||||
const bool localMemoryEnabled = true;
|
||||
executionEnvironment = new ExecutionEnvironment;
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
mock = new DrmTipMock(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]);
|
||||
mock->memoryInfo.reset(new MockMemoryInfo(*mock));
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->osInterface = std::make_unique<OSInterface>();
|
||||
@@ -88,7 +88,7 @@ class DrmMemoryManagerLocalMemoryWithCustomMockTest : public ::testing::Test {
|
||||
const bool localMemoryEnabled = true;
|
||||
executionEnvironment = new ExecutionEnvironment;
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
mock = new DrmMockCustom(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mock));
|
||||
@@ -146,7 +146,7 @@ HWTEST2_F(DrmMemoryManagerLocalMemoryTest, givenMultiRootDeviceEnvironmentAndMem
|
||||
|
||||
executionEnvironment->prepareRootDeviceEnvironments(rootDevicesNumber);
|
||||
for (uint32_t i = 0; i < rootDevicesNumber; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
auto mock = new DrmTipMock(*executionEnvironment->rootDeviceEnvironments[i]);
|
||||
|
||||
std::vector<MemoryRegion> regionInfo(2);
|
||||
@@ -192,7 +192,7 @@ TEST_F(DrmMemoryManagerLocalMemoryTest, givenMultiRootDeviceEnvironmentAndMemory
|
||||
|
||||
executionEnvironment->prepareRootDeviceEnvironments(rootDevicesNumber);
|
||||
for (uint32_t i = 0; i < rootDevicesNumber; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
auto mock = new DrmTipMock(*executionEnvironment->rootDeviceEnvironments[i]);
|
||||
|
||||
std::vector<MemoryRegion> regionInfo(2);
|
||||
@@ -252,7 +252,7 @@ TEST_F(DrmMemoryManagerUsmSharedHandleTest, givenMultiRootDeviceEnvironmentAndMe
|
||||
auto osInterface = executionEnvironment->rootDeviceEnvironments[0]->osInterface.release();
|
||||
|
||||
executionEnvironment->prepareRootDeviceEnvironments(rootDevicesNumber);
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
auto mock = new DrmTipMock(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]);
|
||||
|
||||
std::vector<MemoryRegion> regionInfo(2);
|
||||
@@ -288,7 +288,7 @@ TEST_F(DrmMemoryManagerLocalMemoryTest, givenMultiRootDeviceEnvironmentAndNoMemo
|
||||
|
||||
executionEnvironment->prepareRootDeviceEnvironments(rootDevicesNumber);
|
||||
for (uint32_t i = 0; i < rootDevicesNumber; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
auto mock = new DrmTipMock(*executionEnvironment->rootDeviceEnvironments[i]);
|
||||
|
||||
mock->memoryInfo.reset(nullptr);
|
||||
@@ -460,7 +460,7 @@ class DrmMemoryManagerLocalMemoryMemoryBankTest : public ::testing::Test {
|
||||
const bool localMemoryEnabled = true;
|
||||
executionEnvironment = new ExecutionEnvironment;
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
mock = new DrmTipMock(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]);
|
||||
mock->memoryInfo.reset(new MockMemoryInfo(*mock));
|
||||
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->osInterface = std::make_unique<OSInterface>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -989,7 +989,7 @@ TEST(DrmMemoryManagerTest2, givenDrmMemoryManagerWhengetSystemSharedMemoryIsCall
|
||||
auto mock = new DrmMockCustom(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
executionEnvironment->rootDeviceEnvironments[i]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->rootDeviceEnvironments[i]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mock));
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->initGmm();
|
||||
}
|
||||
auto memoryManager = std::make_unique<TestedDrmMemoryManager>(false, false, false, *executionEnvironment);
|
||||
@@ -1020,7 +1020,7 @@ TEST(DrmMemoryManagerTest2, WhenGetMinimumSystemSharedMemoryThenCorrectValueIsRe
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(4u);
|
||||
for (auto i = 0u; i < 4u; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
auto mock = new DrmMockCustom(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
executionEnvironment->rootDeviceEnvironments[i]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->rootDeviceEnvironments[i]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mock));
|
||||
@@ -3181,7 +3181,7 @@ struct DrmAllocationTests : public ::testing::Test {
|
||||
void SetUp() override {
|
||||
executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
}
|
||||
|
||||
@@ -3220,7 +3220,7 @@ TEST(DrmMemoryManagerWithExplicitExpectationsTest2, whenObtainFdFromHandleIsCall
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(4u);
|
||||
for (auto i = 0u; i < 4u; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
auto mock = new DrmMockCustom(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
executionEnvironment->rootDeviceEnvironments[i]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->rootDeviceEnvironments[i]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mock));
|
||||
@@ -3244,7 +3244,7 @@ TEST(DrmMemoryManagerWithExplicitExpectationsTest2, whenFailingToObtainFdFromHan
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(4u);
|
||||
for (auto i = 0u; i < 4u; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
auto mock = new DrmMockCustom(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
executionEnvironment->rootDeviceEnvironments[i]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->rootDeviceEnvironments[i]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mock));
|
||||
|
||||
@@ -19,7 +19,7 @@ class DrmTipMock : public DrmMock {
|
||||
public:
|
||||
DrmTipMock(RootDeviceEnvironment &rootDeviceEnvironment) : DrmTipMock(rootDeviceEnvironment, defaultHwInfo.get()) {}
|
||||
DrmTipMock(RootDeviceEnvironment &rootDeviceEnvironment, const HardwareInfo *inputHwInfo) : DrmMock(rootDeviceEnvironment) {
|
||||
rootDeviceEnvironment.setHwInfo(inputHwInfo);
|
||||
rootDeviceEnvironment.setHwInfoAndInitHelpers(inputHwInfo);
|
||||
ioctlHelper.reset();
|
||||
setupIoctlHelper(inputHwInfo->platform.eProductFamily);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -26,7 +26,7 @@ class DrmMockProdDg1 : public DrmTipMock {
|
||||
public:
|
||||
DrmMockProdDg1(RootDeviceEnvironment &rootDeviceEnvironment) : DrmMockProdDg1(rootDeviceEnvironment, defaultHwInfo.get()) {}
|
||||
DrmMockProdDg1(RootDeviceEnvironment &rootDeviceEnvironment, const HardwareInfo *inputHwInfo) : DrmTipMock(rootDeviceEnvironment) {
|
||||
rootDeviceEnvironment.setHwInfo(inputHwInfo);
|
||||
rootDeviceEnvironment.setHwInfoAndInitHelpers(inputHwInfo);
|
||||
}
|
||||
|
||||
void handleQueryItem(QueryItem *queryItem) override {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -313,7 +313,7 @@ TEST(DrmBufferObjectTestPrelim, givenLocalMemoryEnabledWhenCreateDrmVirtualMemor
|
||||
testHwInfo.gtSystemInfo.MultiTileArchInfo.TileCount = 1;
|
||||
testHwInfo.gtSystemInfo.MultiTileArchInfo.Tile0 = 1;
|
||||
testHwInfo.gtSystemInfo.MultiTileArchInfo.TileMask = 0b1;
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&testHwInfo);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(&testHwInfo);
|
||||
DrmQueryMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
|
||||
uint32_t vmId = 0;
|
||||
|
||||
@@ -65,7 +65,7 @@ struct DrmMemoryOperationsHandlerBindFixture : public ::testing::Test {
|
||||
executionEnvironment = new ExecutionEnvironment;
|
||||
executionEnvironment->prepareRootDeviceEnvironments(numRootDevices);
|
||||
for (uint32_t i = 0u; i < numRootDevices; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->initGmm();
|
||||
}
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
@@ -164,7 +164,7 @@ struct DrmMemoryOperationsHandlerBindFixture2 : public ::testing::Test {
|
||||
executionEnvironment = new ExecutionEnvironment;
|
||||
executionEnvironment->prepareRootDeviceEnvironments(numRootDevices);
|
||||
for (uint32_t i = 0u; i < numRootDevices; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->initGmm();
|
||||
}
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -28,7 +28,7 @@ class DrmMemManagerFixture {
|
||||
DebugManager.flags.UseExternalAllocatorForSshAndDsh.set(true);
|
||||
executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
DeviceFactory::prepareDeviceEnvironments(*executionEnvironment);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(new DrmMock(*executionEnvironment->rootDeviceEnvironments[0])));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -354,7 +354,7 @@ TEST(DrmTest, GivenDrmWhenAskedForContextThatFailsThenFalseIsReturned) {
|
||||
TEST(DrmTest, givenDrmWhenOsContextIsCreatedThenCreateAndDestroyNewDrmOsContext) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
{
|
||||
@@ -379,7 +379,7 @@ TEST(DrmTest, givenDrmWhenOsContextIsCreatedThenCreateAndDestroyNewDrmOsContext)
|
||||
|
||||
TEST(DrmTest, whenCreatingDrmContextWithVirtualMemoryAddressSpaceThenProperVmIdIsSet) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
@@ -396,7 +396,7 @@ TEST(DrmTest, whenCreatingDrmContextWithVirtualMemoryAddressSpaceThenProperVmIdI
|
||||
|
||||
TEST(DrmTest, whenCreatingDrmContextWithNoVirtualMemoryAddressSpaceThenProperContextIdIsSet) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
@@ -412,7 +412,7 @@ TEST(DrmTest, whenCreatingDrmContextWithNoVirtualMemoryAddressSpaceThenProperCon
|
||||
|
||||
TEST(DrmTest, givenDrmAndNegativeCheckNonPersistentContextsSupportWhenOsContextIsCreatedThenReceivedContextParamRequestCountReturnsCorrectValue) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
@@ -439,7 +439,7 @@ TEST(DrmTest, givenDrmAndNegativeCheckNonPersistentContextsSupportWhenOsContextI
|
||||
|
||||
TEST(DrmTest, givenDrmPreemptionEnabledAndLowPriorityEngineWhenCreatingOsContextThenCallSetContextPriorityIoctl) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
@@ -641,7 +641,7 @@ TEST(HwDeviceId, whenHwDeviceIdIsDestroyedThenFileDescriptorIsClosed) {
|
||||
|
||||
TEST(DrmTest, givenDrmWhenCreatingOsContextThenCreateDrmContextWithVmId) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
@@ -741,7 +741,7 @@ TEST(DrmTest, givenPerContextVMRequiredWhenCreatingOsContextsForRootDeviceThenIm
|
||||
|
||||
TEST(DrmTest, givenNoPerContextVmsDrmWhenCreatingOsContextsThenVmIdIsNotQueriedAndStored) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
@@ -761,7 +761,7 @@ TEST(DrmTest, givenProgramDebuggingAndContextDebugAvailableWhenCreatingContextTh
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
@@ -781,7 +781,7 @@ TEST(DrmTest, givenProgramDebuggingAndContextDebugAvailableWhenCreatingContextFo
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
@@ -797,7 +797,7 @@ TEST(DrmTest, givenProgramDebuggingAndContextDebugAvailableWhenCreatingContextFo
|
||||
|
||||
TEST(DrmTest, givenNotEnabledDebuggingOrContextDebugUnsupportedWhenCreatingContextThenCooperativeFlagIsNotPassedToCreateDrmContext) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
@@ -873,7 +873,7 @@ TEST(DrmTest, givenProgramDebuggingWhenCreatingContextThenUnrecoverableContextIs
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->setDebuggingEnabled();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
executionEnvironment->calculateMaxOsContextCount();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -34,7 +34,7 @@ struct ProductHelperTestLinux : public ProductHelperTest {
|
||||
ProductHelperTest::SetUp();
|
||||
executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
|
||||
drm = new DrmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new OSInterface());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -27,7 +27,7 @@ struct MultipleDeviceUuidTest : public ::testing::Test {
|
||||
ExecutionEnvironment *executionEnvironment = new ExecutionEnvironment();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(numRootDevices);
|
||||
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
executionEnvironment->rootDeviceEnvironments[i]->initGmm();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -358,7 +358,7 @@ TEST_F(IoctlPrelimHelperTests, givenPrelimWhenGettingEuStallFdParameterThenCorre
|
||||
class DrmMockIoctl : public DrmMock {
|
||||
public:
|
||||
DrmMockIoctl(RootDeviceEnvironment &rootDeviceEnvironment) : DrmMock(rootDeviceEnvironment) {
|
||||
rootDeviceEnvironment.setHwInfo(defaultHwInfo.get());
|
||||
rootDeviceEnvironment.setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
}
|
||||
int handleRemainingRequests(DrmIoctl request, void *arg) override {
|
||||
if (request == DrmIoctl::Query) {
|
||||
|
||||
Reference in New Issue
Block a user