mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 16:24:18 +08:00
Add check to verify UUID platform support
Related-To: LOCI-3495 Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1995fd9d92
commit
6944baaca8
@@ -21,6 +21,7 @@ namespace ult {
|
|||||||
std::unique_ptr<NEO::UltDeviceFactory> PciSpeedInfoTest::createDevices(uint32_t numSubDevices, const NEO::PhyicalDevicePciSpeedInfo &pciSpeedInfo) {
|
std::unique_ptr<NEO::UltDeviceFactory> PciSpeedInfoTest::createDevices(uint32_t numSubDevices, const NEO::PhyicalDevicePciSpeedInfo &pciSpeedInfo) {
|
||||||
|
|
||||||
DebugManager.flags.CreateMultipleSubDevices.set(numSubDevices);
|
DebugManager.flags.CreateMultipleSubDevices.set(numSubDevices);
|
||||||
|
DebugManager.flags.EnableChipsetUniqueUUID.set(0);
|
||||||
NEO::ExecutionEnvironment *executionEnvironment = new MockExecutionEnvironment(defaultHwInfo.get(), false, 1);
|
NEO::ExecutionEnvironment *executionEnvironment = new MockExecutionEnvironment(defaultHwInfo.get(), false, 1);
|
||||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new OSInterface);
|
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new OSInterface);
|
||||||
executionEnvironment->memoryManager.reset(new MockMemoryManagerOsAgnosticContext(*executionEnvironment));
|
executionEnvironment->memoryManager.reset(new MockMemoryManagerOsAgnosticContext(*executionEnvironment));
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, OverrideSystolicInComputeWalker, -1, "set SYSTOL
|
|||||||
DECLARE_DEBUG_VARIABLE(int32_t, AddStatePrefetchCmdToMemoryPrefetchAPI, -1, "Add STATE_PREFETCH to zeCommandListAppendMemoryPrefetch, -1:default, 0:disable, 1:enable")
|
DECLARE_DEBUG_VARIABLE(int32_t, AddStatePrefetchCmdToMemoryPrefetchAPI, -1, "Add STATE_PREFETCH to zeCommandListAppendMemoryPrefetch, -1:default, 0:disable, 1:enable")
|
||||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableDrmCompletionFence, -1, "Enables DRM completion fence, -1:default (disabled), 0:disable, 1:enable")
|
DECLARE_DEBUG_VARIABLE(int32_t, EnableDrmCompletionFence, -1, "Enables DRM completion fence, -1:default (disabled), 0:disable, 1:enable")
|
||||||
DECLARE_DEBUG_VARIABLE(int32_t, UseDrmCompletionFenceForAllAllocations, -1, "Uses DRM completion fence for all allocations, -1:default (disabled), 0:disable, 1:enable")
|
DECLARE_DEBUG_VARIABLE(int32_t, UseDrmCompletionFenceForAllAllocations, -1, "Uses DRM completion fence for all allocations, -1:default (disabled), 0:disable, 1:enable")
|
||||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableChipsetUniqueUUID, -1, "Enables retrieving chipset unique UUID using telemetry, -1:default (disabled), 0:disable, 1:enable")
|
DECLARE_DEBUG_VARIABLE(int32_t, EnableChipsetUniqueUUID, -1, "Enables retrieving chipset unique UUID using telemetry, -1:default (enabled), 0:disable, 1:enable")
|
||||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableFlushTaskSubmission, -1, "Driver uses csr flushTask for immediate commandlist submissions, -1:default (enabled), 0:disabled, 1:enabled")
|
DECLARE_DEBUG_VARIABLE(int32_t, EnableFlushTaskSubmission, -1, "Driver uses csr flushTask for immediate commandlist submissions, -1:default (enabled), 0:disabled, 1:enabled")
|
||||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableImmediateCmdListHeapSharing, -1, "Immediate command lists using flush task use current csr heap instead private cmd list heap, -1:default (disabled), 0:disabled, 1:enabled")
|
DECLARE_DEBUG_VARIABLE(int32_t, EnableImmediateCmdListHeapSharing, -1, "Immediate command lists using flush task use current csr heap instead private cmd list heap, -1:default (disabled), 0:disabled, 1:enabled")
|
||||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableBcsSwControlWa, -1, "Enable BCS WA via BCSSWCONTROL MMIO. -1: default, 0: disabled, 1: if src in system mem, 2: if dst in system mem, 3: if src and dst in system mem, 4: always")
|
DECLARE_DEBUG_VARIABLE(int32_t, EnableBcsSwControlWa, -1, "Enable BCS WA via BCSSWCONTROL MMIO. -1: default, 0: disabled, 1: if src in system mem, 2: if dst in system mem, 3: if src and dst in system mem, 4: always")
|
||||||
|
|||||||
@@ -266,9 +266,11 @@ bool Device::createDeviceImpl() {
|
|||||||
auto hardwareInfo = getRootDeviceEnvironment().getMutableHardwareInfo();
|
auto hardwareInfo = getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||||
uuid.isValid = false;
|
uuid.isValid = false;
|
||||||
|
|
||||||
if (DebugManager.flags.EnableChipsetUniqueUUID.get() == 1) {
|
if (DebugManager.flags.EnableChipsetUniqueUUID.get() != 0) {
|
||||||
|
if (HwHelper::get(hwInfo.platform.eRenderCoreFamily).isChipsetUniqueUUIDSupported()) {
|
||||||
uuid.isValid = HwInfoConfig::get(hardwareInfo->platform.eProductFamily)->getUuid(this, uuid.id);
|
uuid.isValid = HwInfoConfig::get(hardwareInfo->platform.eProductFamily)->getUuid(this, uuid.id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!uuid.isValid && getRootDeviceEnvironment().osInterface != nullptr) {
|
if (!uuid.isValid && getRootDeviceEnvironment().osInterface != nullptr) {
|
||||||
PhysicalDevicePciBusInfo pciBusInfo = getRootDeviceEnvironment().osInterface->getDriverModel()->getPciBusInfo();
|
PhysicalDevicePciBusInfo pciBusInfo = getRootDeviceEnvironment().osInterface->getDriverModel()->getPciBusInfo();
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ class HwHelper {
|
|||||||
virtual uint32_t getMinimalScratchSpaceSize() const = 0;
|
virtual uint32_t getMinimalScratchSpaceSize() const = 0;
|
||||||
virtual bool copyThroughLockedPtrEnabled() const = 0;
|
virtual bool copyThroughLockedPtrEnabled() const = 0;
|
||||||
virtual uint32_t getAmountOfAllocationsToFill() const = 0;
|
virtual uint32_t getAmountOfAllocationsToFill() const = 0;
|
||||||
|
virtual bool isChipsetUniqueUUIDSupported() const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
HwHelper() = default;
|
HwHelper() = default;
|
||||||
@@ -404,6 +405,7 @@ class HwHelperHw : public HwHelper {
|
|||||||
uint32_t getMinimalScratchSpaceSize() const override;
|
uint32_t getMinimalScratchSpaceSize() const override;
|
||||||
bool copyThroughLockedPtrEnabled() const override;
|
bool copyThroughLockedPtrEnabled() const override;
|
||||||
uint32_t getAmountOfAllocationsToFill() const override;
|
uint32_t getAmountOfAllocationsToFill() const override;
|
||||||
|
bool isChipsetUniqueUUIDSupported() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static const AuxTranslationMode defaultAuxTranslationMode;
|
static const AuxTranslationMode defaultAuxTranslationMode;
|
||||||
|
|||||||
@@ -734,4 +734,8 @@ uint32_t HwHelperHw<gfxProduct>::getAmountOfAllocationsToFill() const {
|
|||||||
return 0u;
|
return 0u;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename gfxProduct>
|
||||||
|
bool HwHelperHw<gfxProduct>::isChipsetUniqueUUIDSupported() const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|||||||
@@ -225,4 +225,9 @@ uint32_t HwHelperHw<GfxFamily>::getMinimalScratchSpaceSize() const {
|
|||||||
return 64U;
|
return 64U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
bool HwHelperHw<Family>::isChipsetUniqueUUIDSupported() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ class MockHwInfoConfigHwUuidEnablementTest : public HwInfoConfigHw<gfxProduct> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
HWTEST2_F(DeviceUuidEnablementTest, GivenEnableChipsetUniqueUUIDIsDefaultWhenDeviceIsCreatedThenChipsetUniqueUuidUsingTelemetryIsNotUsed, MatchAny) {
|
HWTEST2_F(DeviceUuidEnablementTest, GivenEnableChipsetUniqueUUIDIsDefaultWhenDeviceIsCreatedThenChipsetUniqueUuidUsingTelemetryIstUsed, MatchAny) {
|
||||||
|
|
||||||
mockHwInfoConfig.reset(new MockHwInfoConfigHwUuidEnablementTest<productFamily>(true));
|
mockHwInfoConfig.reset(new MockHwInfoConfigHwUuidEnablementTest<productFamily>(true));
|
||||||
VariableBackup<HwInfoConfig *> backupHwInfoConfig(&hwInfoConfigFactory[productFamily], mockHwInfoConfig.get());
|
VariableBackup<HwInfoConfig *> backupHwInfoConfig(&hwInfoConfigFactory[productFamily], mockHwInfoConfig.get());
|
||||||
@@ -177,8 +177,13 @@ HWTEST2_F(DeviceUuidEnablementTest, GivenEnableChipsetUniqueUUIDIsDefaultWhenDev
|
|||||||
const auto deviceFactory = createDevices(pciBusInfo, 2);
|
const auto deviceFactory = createDevices(pciBusInfo, 2);
|
||||||
|
|
||||||
EXPECT_EQ(true, deviceFactory->rootDevices[0]->getUuid(uuid));
|
EXPECT_EQ(true, deviceFactory->rootDevices[0]->getUuid(uuid));
|
||||||
|
|
||||||
|
if (HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily).isChipsetUniqueUUIDSupported()) {
|
||||||
|
EXPECT_TRUE(0 == std::memcmp(uuid.data(), expectedUuid.data(), 16));
|
||||||
|
} else {
|
||||||
EXPECT_FALSE(0 == std::memcmp(uuid.data(), expectedUuid.data(), 16));
|
EXPECT_FALSE(0 == std::memcmp(uuid.data(), expectedUuid.data(), 16));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HWTEST2_F(DeviceUuidEnablementTest, GivenEnableChipsetUniqueUUIDIsEnabledWhenDeviceIsCreatedThenChipsetUniqueUuidUsingTelemetryIsUsed, MatchAny) {
|
HWTEST2_F(DeviceUuidEnablementTest, GivenEnableChipsetUniqueUUIDIsEnabledWhenDeviceIsCreatedThenChipsetUniqueUuidUsingTelemetryIsUsed, MatchAny) {
|
||||||
|
|
||||||
@@ -188,12 +193,15 @@ HWTEST2_F(DeviceUuidEnablementTest, GivenEnableChipsetUniqueUUIDIsEnabledWhenDev
|
|||||||
std::array<uint8_t, 16> uuid, expectedUuid;
|
std::array<uint8_t, 16> uuid, expectedUuid;
|
||||||
uuid.fill(0u);
|
uuid.fill(0u);
|
||||||
expectedUuid.fill(255u);
|
expectedUuid.fill(255u);
|
||||||
|
|
||||||
PhysicalDevicePciBusInfo pciBusInfo(0x00, 0x34, 0xab, 0xcd);
|
PhysicalDevicePciBusInfo pciBusInfo(0x00, 0x34, 0xab, 0xcd);
|
||||||
const auto deviceFactory = createDevices(pciBusInfo, 2);
|
|
||||||
|
|
||||||
|
const auto deviceFactory = createDevices(pciBusInfo, 2);
|
||||||
EXPECT_EQ(true, deviceFactory->rootDevices[0]->getUuid(uuid));
|
EXPECT_EQ(true, deviceFactory->rootDevices[0]->getUuid(uuid));
|
||||||
|
if (HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily).isChipsetUniqueUUIDSupported()) {
|
||||||
EXPECT_TRUE(0 == std::memcmp(uuid.data(), expectedUuid.data(), 16));
|
EXPECT_TRUE(0 == std::memcmp(uuid.data(), expectedUuid.data(), 16));
|
||||||
|
} else {
|
||||||
|
EXPECT_FALSE(0 == std::memcmp(uuid.data(), expectedUuid.data(), 16));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(DeviceUuidEnablementTest, GivenEnableChipsetUniqueUUIDIsDisabledWhenDeviceIsCreatedThenChipsetUniqueUuidUsingTelemetryIsNotUsed, MatchAny) {
|
HWTEST2_F(DeviceUuidEnablementTest, GivenEnableChipsetUniqueUUIDIsDisabledWhenDeviceIsCreatedThenChipsetUniqueUuidUsingTelemetryIsNotUsed, MatchAny) {
|
||||||
|
|||||||
Reference in New Issue
Block a user