mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
fix: separate ipVersion query and setup
Related-To: NEO-15318 Signed-off-by: Grochowski, Stanislaw <stanislaw.grochowski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2c3b6a8760
commit
572932f830
@@ -17,22 +17,12 @@
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/unified_memory/usm_memory_support.h"
|
||||
|
||||
#include "hw_cmds.h"
|
||||
|
||||
#include <array>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
||||
namespace NEO {
|
||||
const DeviceDescriptor deviceDescriptorTable[] = {
|
||||
#define NAMEDDEVICE(devId, gt, devName) {devId, >::hwInfo, >::setupHardwareInfo, devName},
|
||||
#define DEVICE(devId, gt) {devId, >::hwInfo, >::setupHardwareInfo, ""},
|
||||
#include "devices.inl"
|
||||
#undef DEVICE
|
||||
#undef NAMEDDEVICE
|
||||
{0, nullptr, nullptr, ""}};
|
||||
|
||||
Drm *Drm::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
std::unique_ptr<Drm> drm{new Drm(std::move(hwDeviceId), rootDeviceEnvironment)};
|
||||
|
||||
@@ -41,25 +31,12 @@ Drm *Drm::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironm
|
||||
}
|
||||
|
||||
const auto usDeviceID = rootDeviceEnvironment.getHardwareInfo()->platform.usDeviceID;
|
||||
const auto usRevId = rootDeviceEnvironment.getHardwareInfo()->platform.usRevId;
|
||||
|
||||
if (!DeviceFactory::isAllowedDeviceId(usDeviceID, debugManager.flags.FilterDeviceId.get())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const DeviceDescriptor *deviceDescriptor = nullptr;
|
||||
for (auto &deviceDescriptorEntry : deviceDescriptorTable) {
|
||||
if (usDeviceID == deviceDescriptorEntry.deviceId) {
|
||||
deviceDescriptor = &deviceDescriptorEntry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!deviceDescriptor) {
|
||||
PRINT_STRING(debugManager.flags.PrintDebugMessages.get(), stderr,
|
||||
"FATAL: Unknown device: deviceId: %04x, revisionId: %04x\n", usDeviceID, usRevId);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (drm->setupHardwareInfo(deviceDescriptor, true)) {
|
||||
if (drm->setupHardwareInfo(usDeviceID, true)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/gpu_page_fault_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/os_interface/driver_info.h"
|
||||
#include "shared/source/os_interface/linux/cache_info.h"
|
||||
@@ -50,6 +51,8 @@
|
||||
#include "shared/source/utilities/directory.h"
|
||||
#include "shared/source/utilities/io_functions.h"
|
||||
|
||||
#include "hw_cmds.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <fcntl.h>
|
||||
@@ -58,6 +61,22 @@
|
||||
#include <sstream>
|
||||
|
||||
namespace NEO {
|
||||
const DeviceDescriptor deviceDescriptorTable[] = {
|
||||
#define NAMEDDEVICE(devId, gt, devName) {devId, >::hwInfo, >::setupHardwareInfo, devName},
|
||||
#define DEVICE(devId, gt) {devId, >::hwInfo, >::setupHardwareInfo, ""},
|
||||
#include "devices.inl"
|
||||
#undef DEVICE
|
||||
#undef NAMEDDEVICE
|
||||
{0, nullptr, nullptr, ""}};
|
||||
|
||||
const DeviceDescriptor *Drm::getDeviceDescriptor(uint32_t usDeviceID) {
|
||||
for (auto &deviceDescriptorEntry : deviceDescriptorTable) {
|
||||
if (usDeviceID == deviceDescriptorEntry.deviceId) {
|
||||
return &deviceDescriptorEntry;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Drm::Drm(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceIdIn, RootDeviceEnvironment &rootDeviceEnvironment)
|
||||
: DriverModel(DriverModelType::drm),
|
||||
@@ -464,12 +483,20 @@ int Drm::getErrno() {
|
||||
return errno;
|
||||
}
|
||||
|
||||
int Drm::setupHardwareInfo(const DeviceDescriptor *device, bool setupFeatureTableAndWorkaroundTable) {
|
||||
int Drm::setupHardwareInfo(uint32_t deviceId, bool setupFeatureTableAndWorkaroundTable) {
|
||||
const DeviceDescriptor *deviceDescriptor = getDeviceDescriptor(deviceId);
|
||||
|
||||
if (!deviceDescriptor) {
|
||||
PRINT_STRING(debugManager.flags.PrintDebugMessages.get(), stderr,
|
||||
"FATAL: Unknown device: deviceId: %04x, revisionId: %04x\n", deviceId, rootDeviceEnvironment.getHardwareInfo()->platform.usRevId);
|
||||
return -1;
|
||||
}
|
||||
|
||||
const auto usDeviceIdOverride = rootDeviceEnvironment.getHardwareInfo()->platform.usDeviceID;
|
||||
const auto usRevIdOverride = rootDeviceEnvironment.getHardwareInfo()->platform.usRevId;
|
||||
|
||||
// reset hwInfo and apply overrides
|
||||
rootDeviceEnvironment.setHwInfo(device->pHwInfo);
|
||||
rootDeviceEnvironment.setHwInfo(deviceDescriptor->pHwInfo);
|
||||
HardwareInfo *hwInfo = rootDeviceEnvironment.getMutableHardwareInfo();
|
||||
hwInfo->platform.usDeviceID = usDeviceIdOverride;
|
||||
hwInfo->platform.usRevId = usRevIdOverride;
|
||||
@@ -489,11 +516,12 @@ int Drm::setupHardwareInfo(const DeviceDescriptor *device, bool setupFeatureTabl
|
||||
|
||||
const auto productFamily = hwInfo->platform.eProductFamily;
|
||||
setupIoctlHelper(productFamily);
|
||||
hwInfo->ipVersion = ioctlHelper->queryHwIpVersion(productFamily);
|
||||
ioctlHelper->setupIpVersion();
|
||||
rootDeviceEnvironment.initReleaseHelper();
|
||||
|
||||
auto releaseHelper = rootDeviceEnvironment.getReleaseHelper();
|
||||
device->setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper);
|
||||
deviceDescriptor->setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper);
|
||||
this->adjustSharedSystemMemCapabilities();
|
||||
|
||||
querySystemInfo();
|
||||
@@ -652,7 +680,7 @@ int Drm::setupHardwareInfo(const DeviceDescriptor *device, bool setupFeatureTabl
|
||||
rootDeviceEnvironment.setRcsExposure();
|
||||
|
||||
setupCacheInfo(*hwInfo);
|
||||
hwInfo->capabilityTable.deviceName = device->devName;
|
||||
hwInfo->capabilityTable.deviceName = deviceDescriptor->devName;
|
||||
|
||||
rootDeviceEnvironment.initializeGfxCoreHelperFromHwInfo();
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ class Drm : public DriverModel {
|
||||
uint32_t getVirtualMemoryAddressSpace(uint32_t vmId) const;
|
||||
MOCKABLE_VIRTUAL int bindBufferObject(OsContext *osContext, uint32_t vmHandleId, BufferObject *bo, const bool forcePagingFence);
|
||||
MOCKABLE_VIRTUAL int unbindBufferObject(OsContext *osContext, uint32_t vmHandleId, BufferObject *bo);
|
||||
int setupHardwareInfo(const DeviceDescriptor *, bool);
|
||||
int setupHardwareInfo(uint32_t deviceId, bool);
|
||||
void setupSystemInfo(HardwareInfo *hwInfo, SystemInfo *sysInfo);
|
||||
void setupCacheInfo(const HardwareInfo &hwInfo);
|
||||
MOCKABLE_VIRTUAL void getPrelimVersion(std::string &prelimVersion);
|
||||
@@ -288,6 +288,7 @@ class Drm : public DriverModel {
|
||||
void setupIoctlHelper(const PRODUCT_FAMILY productFamily);
|
||||
void queryAndSetVmBindPatIndexProgrammingSupport();
|
||||
bool queryDeviceIdAndRevision();
|
||||
MOCKABLE_VIRTUAL const DeviceDescriptor *getDeviceDescriptor(uint32_t deviceId);
|
||||
static uint64_t alignUpGttSize(uint64_t inputGttSize);
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
@@ -47,6 +47,9 @@ int IoctlHelper::ioctl(int fd, DrmIoctl request, void *arg) {
|
||||
void IoctlHelper::setupIpVersion() {
|
||||
auto &rootDeviceEnvironment = drm.getRootDeviceEnvironment();
|
||||
auto &hwInfo = *rootDeviceEnvironment.getMutableHardwareInfo();
|
||||
if (hwInfo.ipVersion.value) {
|
||||
return;
|
||||
}
|
||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||
hwInfo.ipVersion.value = compilerProductHelper.getHwIpVersion(hwInfo);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/os_interface/linux/drm_allocation.h"
|
||||
#include "shared/source/os_interface/linux/drm_buffer_object.h"
|
||||
#include "shared/source/os_interface/linux/drm_debug.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/drm_wrappers.h"
|
||||
#include "shared/source/utilities/stackvec.h"
|
||||
|
||||
@@ -197,7 +198,7 @@ class IoctlHelper {
|
||||
virtual bool getFabricLatency(uint32_t fabricId, uint32_t &latency, uint32_t &bandwidth) = 0;
|
||||
virtual bool requiresUserFenceSetup(bool bind) const = 0;
|
||||
virtual void *pciBarrierMmap() { return nullptr; };
|
||||
virtual void setupIpVersion();
|
||||
void setupIpVersion();
|
||||
virtual bool isImmediateVmBindRequired() const { return false; }
|
||||
|
||||
virtual void configureCcsMode(std::vector<std::string> &files, const std::string expectedFilePrefix, uint32_t ccsMode,
|
||||
@@ -257,6 +258,7 @@ class IoctlHelper {
|
||||
virtual bool isSmallBarConfigAllowed() const = 0;
|
||||
virtual bool overrideMaxSlicesSupported() const { return false; }
|
||||
virtual bool is2MBSizeAlignmentRequired(AllocationType allocationType) const { return false; }
|
||||
virtual uint32_t queryHwIpVersion(PRODUCT_FAMILY productFamily) { return 0; }
|
||||
|
||||
protected:
|
||||
Drm &drm;
|
||||
@@ -447,7 +449,6 @@ class IoctlHelperPrelim20 : public IoctlHelperI915 {
|
||||
bool getFabricLatency(uint32_t fabricId, uint32_t &latency, uint32_t &bandwidth) override;
|
||||
bool requiresUserFenceSetup(bool bind) const override;
|
||||
void *pciBarrierMmap() override;
|
||||
void setupIpVersion() override;
|
||||
bool getTopologyDataAndMap(HardwareInfo &hwInfo, DrmQueryTopologyData &topologyData, TopologyMap &topologyMap) override;
|
||||
uint32_t registerResource(DrmResourceClass classType, const void *data, size_t size) override;
|
||||
bool registerResourceClasses() override;
|
||||
@@ -465,9 +466,9 @@ class IoctlHelperPrelim20 : public IoctlHelperI915 {
|
||||
uint32_t getStatusForResetStats(bool banned) override;
|
||||
void registerBOBindHandle(Drm *drm, DrmAllocation *drmAllocation) override;
|
||||
EngineCapabilities::Flags getEngineCapabilitiesFlags(uint64_t capabilities) const override;
|
||||
uint32_t queryHwIpVersion(PRODUCT_FAMILY productFamily) override;
|
||||
|
||||
protected:
|
||||
bool queryHwIpVersion(EngineClassInstance &engineInfo, HardwareIpVersion &ipVersion, int &ret);
|
||||
StackVec<uint32_t, size_t(DrmResourceClass::maxSize)> classHandles;
|
||||
bool handleExecBufferInNonBlockMode = false;
|
||||
std::string generateUUID();
|
||||
|
||||
@@ -1050,23 +1050,33 @@ void *IoctlHelperPrelim20::pciBarrierMmap() {
|
||||
return SysCalls::mmap(NULL, MemoryConstants::pageSize, PROT_WRITE, MAP_SHARED, drm.getFileDescriptor(), pciBarrierMmapOffset);
|
||||
}
|
||||
|
||||
bool IoctlHelperPrelim20::queryHwIpVersion(EngineClassInstance &engineInfo, HardwareIpVersion &ipVersion, int &ret) {
|
||||
uint32_t IoctlHelperPrelim20::queryHwIpVersion(PRODUCT_FAMILY productFamily) {
|
||||
auto productHelper = ProductHelper::create(productFamily);
|
||||
if (!productHelper || !productHelper->isPlatformQuerySupported()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
EngineClassInstance engineInfo = {static_cast<uint16_t>(getDrmParamValue(DrmParam::engineClassRender)), 0};
|
||||
|
||||
QueryItem queryItem{};
|
||||
queryItem.queryId = PRELIM_DRM_I915_QUERY_HW_IP_VERSION;
|
||||
|
||||
Query query{};
|
||||
query.itemsPtr = reinterpret_cast<uint64_t>(&queryItem);
|
||||
query.numItems = 1u;
|
||||
ret = ioctl(DrmIoctl::query, &query);
|
||||
int ret = ioctl(DrmIoctl::query, &query);
|
||||
|
||||
if (ret != 0) {
|
||||
return false;
|
||||
int err = drm.getErrno();
|
||||
PRINT_STRING(debugManager.flags.PrintDebugMessages.get(), stderr,
|
||||
"ioctl(PRELIM_DRM_I915_QUERY_HW_IP_VERSION) failed with %d. errno=%d(%s)\n", ret, err, strerror(err));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (queryItem.length != sizeof(prelim_drm_i915_query_hw_ip_version)) {
|
||||
PRINT_STRING(debugManager.flags.PrintDebugMessages.get(), stderr, "%s\n",
|
||||
"Size got from PRELIM_DRM_I915_QUERY_HW_IP_VERSION query does not match PrelimI915::prelim_drm_i915_query_hw_ip_version size");
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
prelim_drm_i915_query_hw_ip_version queryHwIpVersion{};
|
||||
@@ -1076,14 +1086,18 @@ bool IoctlHelperPrelim20::queryHwIpVersion(EngineClassInstance &engineInfo, Hard
|
||||
|
||||
ret = ioctl(DrmIoctl::query, &query);
|
||||
if (ret != 0) {
|
||||
return false;
|
||||
int err = drm.getErrno();
|
||||
PRINT_STRING(debugManager.flags.PrintDebugMessages.get(), stderr,
|
||||
"ioctl(PRELIM_DRM_I915_QUERY_HW_IP_VERSION) failed with %d. errno=%d(%s)\n", ret, err, strerror(err));
|
||||
return 0;
|
||||
}
|
||||
|
||||
HardwareIpVersion ipVersion{};
|
||||
ipVersion.architecture = queryHwIpVersion.arch;
|
||||
ipVersion.release = queryHwIpVersion.release;
|
||||
ipVersion.revision = queryHwIpVersion.stepping;
|
||||
|
||||
return true;
|
||||
return ipVersion.value;
|
||||
}
|
||||
|
||||
bool IoctlHelperPrelim20::initialize() {
|
||||
@@ -1091,32 +1105,6 @@ bool IoctlHelperPrelim20::initialize() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void IoctlHelperPrelim20::setupIpVersion() {
|
||||
auto &rootDeviceEnvironment = drm.getRootDeviceEnvironment();
|
||||
auto hwInfo = rootDeviceEnvironment.getMutableHardwareInfo();
|
||||
auto &productHelper = drm.getRootDeviceEnvironment().getHelper<ProductHelper>();
|
||||
|
||||
EngineClassInstance engineInfo = {static_cast<uint16_t>(getDrmParamValue(DrmParam::engineClassRender)), 0};
|
||||
int ret = 0;
|
||||
|
||||
auto isPlatformQuerySupported = productHelper.isPlatformQuerySupported();
|
||||
bool result = false;
|
||||
|
||||
if (isPlatformQuerySupported) {
|
||||
result = queryHwIpVersion(engineInfo, hwInfo->ipVersion, ret);
|
||||
|
||||
if (result == false && ret != 0) {
|
||||
int err = drm.getErrno();
|
||||
PRINT_STRING(debugManager.flags.PrintDebugMessages.get(), stderr,
|
||||
"ioctl(PRELIM_DRM_I915_QUERY_HW_IP_VERSION) failed with %d. errno=%d(%s)\n", ret, err, strerror(err));
|
||||
}
|
||||
}
|
||||
|
||||
if (result == false) {
|
||||
IoctlHelper::setupIpVersion();
|
||||
}
|
||||
}
|
||||
|
||||
bool IoctlHelperPrelim20::registerResourceClasses() {
|
||||
for (auto &classNameUUID : classNamesToUuid) {
|
||||
auto className = classNameUUID.first;
|
||||
|
||||
@@ -455,24 +455,10 @@ size_t IoctlHelperXe::getLocalMemoryRegionsSize(const MemoryInfo *memoryInfo, ui
|
||||
return size;
|
||||
}
|
||||
|
||||
void IoctlHelperXe::setupIpVersion() {
|
||||
auto &rootDeviceEnvironment = drm.getRootDeviceEnvironment();
|
||||
auto hwInfo = rootDeviceEnvironment.getMutableHardwareInfo();
|
||||
|
||||
if (auto hwIpVersion = GtIpVersion{}; queryHwIpVersion(hwIpVersion)) {
|
||||
hwInfo->ipVersion.architecture = hwIpVersion.major;
|
||||
hwInfo->ipVersion.release = hwIpVersion.minor;
|
||||
hwInfo->ipVersion.revision = hwIpVersion.revision;
|
||||
} else {
|
||||
XELOG("No HW IP version received from drm_xe_gt. Falling back to default value.");
|
||||
IoctlHelper::setupIpVersion();
|
||||
}
|
||||
}
|
||||
|
||||
bool IoctlHelperXe::queryHwIpVersion(GtIpVersion >IpVersion) {
|
||||
uint32_t IoctlHelperXe::queryHwIpVersion(PRODUCT_FAMILY productFamily) {
|
||||
auto gtListData = queryData<uint64_t>(DRM_XE_DEVICE_QUERY_GT_LIST);
|
||||
if (gtListData.empty()) {
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto xeGtListData = reinterpret_cast<drm_xe_query_gt_list *>(gtListData.data());
|
||||
@@ -482,12 +468,14 @@ bool IoctlHelperXe::queryHwIpVersion(GtIpVersion >IpVersion) {
|
||||
if (gtEntry.type == DRM_XE_QUERY_GT_TYPE_MEDIA || gtEntry.ip_ver_major == 0u) {
|
||||
continue;
|
||||
}
|
||||
gtIpVersion.major = gtEntry.ip_ver_major;
|
||||
gtIpVersion.minor = gtEntry.ip_ver_minor;
|
||||
gtIpVersion.revision = gtEntry.ip_ver_rev;
|
||||
return true;
|
||||
|
||||
HardwareIpVersion ipVersion{};
|
||||
ipVersion.architecture = gtEntry.ip_ver_major;
|
||||
ipVersion.release = gtEntry.ip_ver_minor;
|
||||
ipVersion.revision = gtEntry.ip_ver_rev;
|
||||
return ipVersion.value;
|
||||
}
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool IoctlHelperXe::setGpuCpuTimes(TimeStampData *pGpuCpuTime, OSTime *osTime) {
|
||||
|
||||
@@ -118,7 +118,6 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
std::unique_ptr<EngineInfo> createEngineInfo(bool isSysmanEnabled) override;
|
||||
std::unique_ptr<MemoryInfo> createMemoryInfo() override;
|
||||
size_t getLocalMemoryRegionsSize(const MemoryInfo *memoryInfo, uint32_t subDevicesCount, uint32_t deviceBitfield) const override;
|
||||
void setupIpVersion() override;
|
||||
|
||||
bool setGpuCpuTimes(TimeStampData *pGpuCpuTime, OSTime *osTime) override;
|
||||
bool getFdFromVmExport(uint32_t vmId, uint32_t flags, int32_t *fd) override;
|
||||
@@ -146,6 +145,7 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
void *pciBarrierMmap() override;
|
||||
bool retrieveMmapOffsetForBufferObject(BufferObject &bo, uint64_t flags, uint64_t &offset) override;
|
||||
bool is2MBSizeAlignmentRequired(AllocationType allocationType) const override;
|
||||
uint32_t queryHwIpVersion(PRODUCT_FAMILY productFamily) override;
|
||||
|
||||
protected:
|
||||
static constexpr uint32_t maxContextSetProperties = 4;
|
||||
@@ -192,7 +192,6 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
uint16_t minor;
|
||||
uint16_t revision;
|
||||
};
|
||||
bool queryHwIpVersion(GtIpVersion >IpVersion);
|
||||
|
||||
bool isLowLatencyHintAvailable = false;
|
||||
int maxExecQueuePriority = 0;
|
||||
|
||||
@@ -241,6 +241,7 @@ class DrmMock : public Drm {
|
||||
bool failRetHwIpVersion = false;
|
||||
bool returnInvalidHwIpVersionLength = false;
|
||||
bool failPerfOpen = false;
|
||||
DeviceDescriptor *overrideDeviceDescriptor = nullptr;
|
||||
|
||||
bool capturedCooperativeContextRequest = false;
|
||||
bool incrementVmId = false;
|
||||
@@ -345,6 +346,13 @@ class DrmMock : public Drm {
|
||||
}
|
||||
return storedGetDeviceMemoryPhysicalSizeInBytesStatus;
|
||||
}
|
||||
|
||||
const DeviceDescriptor *getDeviceDescriptor(uint32_t usDeviceId) override {
|
||||
if (overrideDeviceDescriptor) {
|
||||
return overrideDeviceDescriptor;
|
||||
}
|
||||
return Drm::getDeviceDescriptor(usDeviceId);
|
||||
}
|
||||
};
|
||||
|
||||
class DrmMockNonFailing : public DrmMock {
|
||||
|
||||
@@ -24,6 +24,7 @@ struct MockIoctlHelperXe : IoctlHelperXe {
|
||||
using IoctlHelperXe::maxContextSetProperties;
|
||||
using IoctlHelperXe::maxExecQueuePriority;
|
||||
using IoctlHelperXe::queryGtListData;
|
||||
using IoctlHelperXe::queryHwIpVersion;
|
||||
using IoctlHelperXe::setContextProperties;
|
||||
using IoctlHelperXe::tileIdToGtId;
|
||||
using IoctlHelperXe::updateBindInfo;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
* Copyright (C) 2022-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -27,8 +27,9 @@ ADLNTEST_F(AdlnHwInfoLinux, WhenSettingUpHwInfoThenConfigIsCorrect) {
|
||||
|
||||
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
DeviceDescriptor device = {0, &hwInfo, &AdlnHwConfig::setupHardwareInfo};
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -26,8 +26,9 @@ ADLSTEST_F(AdlsHwInfoLinux, WhenSettingUpHwInfoThenConfigIsCorrect) {
|
||||
|
||||
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
DeviceDescriptor device = {0, &hwInfo, &AdlsHwConfig::setupHardwareInfo};
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -51,7 +51,9 @@ TYPED_TEST(Dg1HwInfoLinux, WhenGtIsSetupThenGtSystemInfoIsCorrect) {
|
||||
DeviceDescriptor device = {0, &TypeParam::hwInfo, &TypeParam::setupHardwareInfo};
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_GT(gtSystemInfo.EUCount, 0u);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -27,8 +27,9 @@ RKLTEST_F(RklHwInfoLinux, WhenSettingUpHwInfoThenConfigIsCorrect) {
|
||||
|
||||
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
DeviceDescriptor device = {0, &hwInfo, &RklHwConfig::setupHardwareInfo};
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -40,8 +40,9 @@ TYPED_TEST(TgllpHwInfoLinux, gtSetupIsCorrect) {
|
||||
|
||||
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
DeviceDescriptor device = {0, &TypeParam::hwInfo, &TypeParam::setupHardwareInfo};
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/source/os_interface/linux/ioctl_helper.h"
|
||||
#include "shared/source/os_interface/linux/system_info.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
@@ -62,7 +63,8 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoFalseThenSystem
|
||||
class MyMockIoctlHelper : public IoctlHelperPrelim20 {
|
||||
public:
|
||||
using IoctlHelperPrelim20::IoctlHelperPrelim20;
|
||||
void setupIpVersion() override {
|
||||
uint32_t queryHwIpVersion(PRODUCT_FAMILY productFamily) override {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -84,7 +86,8 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoFalseThenSystem
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.PrintDebugMessages.set(true);
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_EQ(nullptr, drm.getSystemInfo());
|
||||
|
||||
@@ -97,9 +100,11 @@ TEST(DrmSystemInfoTest, whenSetupHardwareInfoThenReleaseHelperContainsCorrectIpV
|
||||
class MyMockIoctlHelper : public IoctlHelperPrelim20 {
|
||||
public:
|
||||
using IoctlHelperPrelim20::IoctlHelperPrelim20;
|
||||
void setupIpVersion() override {
|
||||
drm.getRootDeviceEnvironment().getMutableHardwareInfo()->ipVersion.architecture = 12u;
|
||||
drm.getRootDeviceEnvironment().getMutableHardwareInfo()->ipVersion.release = 55u;
|
||||
uint32_t queryHwIpVersion(PRODUCT_FAMILY productFamily) override {
|
||||
HardwareIpVersion ipVersion{};
|
||||
ipVersion.architecture = 12u;
|
||||
ipVersion.release = 55u;
|
||||
return ipVersion.value;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -112,7 +117,8 @@ TEST(DrmSystemInfoTest, whenSetupHardwareInfoThenReleaseHelperContainsCorrectIpV
|
||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
ASSERT_EQ(ret, 0);
|
||||
|
||||
auto *releaseHelper = drm.getRootDeviceEnvironment().getReleaseHelper();
|
||||
@@ -245,7 +251,8 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoFailsThenSystem
|
||||
|
||||
drm.failQueryDeviceBlob = true;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
debugManager.flags.PrintDebugMessages.set(false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_EQ(nullptr, drm.getSystemInfo());
|
||||
@@ -272,7 +279,8 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoSucceedsThenSys
|
||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||
const auto &newHwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
@@ -310,7 +318,8 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoSucceedsThenSys
|
||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
@@ -335,7 +344,8 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoSucceedsAndBlob
|
||||
|
||||
drm.systemInfo.reset(new SystemInfo(inputBlobDataZeros));
|
||||
drm.systemInfoQueried = true;
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||
const auto &newHwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
@@ -356,7 +366,8 @@ TEST(DrmSystemInfoTest, givenZeroBankCountWhenCreatingSystemInfoThenUseDualSubsl
|
||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
@@ -382,7 +393,8 @@ TEST(DrmSystemInfoTest, givenNonZeroBankCountWhenCreatingSystemInfoThenUseDualSu
|
||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
@@ -406,7 +418,8 @@ TEST(DrmSystemInfoTest, givenL3GroupsInfoWhenCreatingSystemInfoThenUseL3GroupsTo
|
||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
@@ -430,7 +443,8 @@ TEST(DrmSystemInfoTest, givenIncompleteL3GroupsInfoWhenCreatingSystemInfoThenDon
|
||||
DrmMockEngine drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm.dontQueryL3BankGroups = dontQueryL3BankGroups;
|
||||
drm.dontQueryL3BanksPerGroup = dontQueryL3BanksPerGroup;
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
@@ -475,7 +489,8 @@ TEST(DrmSystemInfoTest, givenNumL3BanksSetInTopologyDataWhenCreatingSystemInfoTh
|
||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
@@ -505,7 +520,8 @@ TEST(DrmSystemInfoTest, givenHardwareInfoWithoutEuCountWhenQuerySystemInfoSuccee
|
||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||
const auto &newHwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
@@ -533,8 +549,9 @@ TEST(DrmSystemInfoTest, givenHardwareInfoWithoutEuCountWhenQuerySystemInfoFailsT
|
||||
|
||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, -1);
|
||||
EXPECT_EQ(nullptr, drm.getSystemInfo());
|
||||
}
|
||||
@@ -552,7 +569,8 @@ TEST(DrmSystemInfoTest, givenTopologyWithMoreEuPerDssThanInDeviceBlobWhenSetupHa
|
||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||
const auto &newHwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
@@ -575,25 +593,29 @@ TEST(DrmSystemInfoTest, givenOverrideNumThreadsPerEuSetWhenSetupHardwareInfoThen
|
||||
uint32_t dummyBlobEuCount = 6;
|
||||
{
|
||||
DrmMockEngine drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(hwInfo.gtSystemInfo.ThreadCount, dummyBlobThreadCount);
|
||||
}
|
||||
{
|
||||
debugManager.flags.OverrideNumThreadsPerEu.set(7);
|
||||
DrmMockEngine drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(hwInfo.gtSystemInfo.ThreadCount, dummyBlobEuCount * 7);
|
||||
}
|
||||
{
|
||||
debugManager.flags.OverrideNumThreadsPerEu.set(8);
|
||||
DrmMockEngine drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(hwInfo.gtSystemInfo.ThreadCount, dummyBlobEuCount * 8);
|
||||
}
|
||||
{
|
||||
debugManager.flags.OverrideNumThreadsPerEu.set(10);
|
||||
DrmMockEngine drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(hwInfo.gtSystemInfo.ThreadCount, dummyBlobEuCount * 10);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,8 @@ TEST(DrmTest, givenFailedProductHelperSetupHardwareInfoWhenDrmSetupHardwareInfoC
|
||||
auto setupHardwareInfo = [](HardwareInfo *hwInfo, bool, const ReleaseHelper *) {};
|
||||
DeviceDescriptor device = {0, defaultHwInfo.get(), setupHardwareInfo};
|
||||
|
||||
auto rc = drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
auto rc = drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(-1, rc);
|
||||
EXPECT_EQ(1u, productHelper->setupHardwareInfoCalled);
|
||||
}
|
||||
@@ -203,7 +204,9 @@ TEST(DrmTest, givenSmallBarDetectedInMemoryInfoAndNotSupportedWhenSetupHardwareI
|
||||
|
||||
StreamCapture capture;
|
||||
capture.captureStderr();
|
||||
EXPECT_EQ(-1, drm.setupHardwareInfo(&device, false));
|
||||
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
EXPECT_EQ(-1, drm.setupHardwareInfo(0, false));
|
||||
std::string output = capture.getCapturedStderr();
|
||||
EXPECT_STREQ("WARNING: Resizable BAR not detected for device 0000:ab:cd.e\n", output.c_str());
|
||||
}
|
||||
@@ -223,7 +226,8 @@ TEST(DrmTest, givenSmallBarDetectedInMemoryInfoAndSupportedWhenSetupHardwareInfo
|
||||
|
||||
StreamCapture capture;
|
||||
capture.captureStderr();
|
||||
EXPECT_EQ(0, drm.setupHardwareInfo(&device, false));
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
EXPECT_EQ(0, drm.setupHardwareInfo(0, false));
|
||||
std::string output = capture.getCapturedStderr();
|
||||
EXPECT_STREQ("WARNING: Resizable BAR not detected for device 0000:ab:cd.e\n", output.c_str());
|
||||
}
|
||||
@@ -1023,7 +1027,8 @@ TEST(DrmQueryTest, GivenDrmWhenSetupHardwareInfoCalledThenCorrectMaxValuesInGtSy
|
||||
DeviceDescriptor device = {0, hwInfo, setupHardwareInfo};
|
||||
|
||||
drm.ioctlHelper.reset();
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
drm.setupHardwareInfo(0, false);
|
||||
EXPECT_NE(nullptr, drm.getIoctlHelper());
|
||||
EXPECT_EQ(2u, hwInfo->gtSystemInfo.MaxSlicesSupported);
|
||||
EXPECT_EQ(NEO::defaultHwInfo->gtSystemInfo.MaxSubSlicesSupported, hwInfo->gtSystemInfo.MaxSubSlicesSupported);
|
||||
@@ -2079,7 +2084,8 @@ TEST(DrmHwInfoTest, givenTopologyDataWithoutSystemInfoWhenSettingHwInfoThenCorre
|
||||
|
||||
drm.systemInfoQueried = true;
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
|
||||
EXPECT_EQ(hwInfo->gtSystemInfo.SliceCount, 2u);
|
||||
@@ -2134,7 +2140,8 @@ TEST(DrmHwInfoTest, givenTopologyDataWithAsymtricTopologyMappingWhenSettingHwInf
|
||||
|
||||
drm.systemInfoQueried = true;
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
EXPECT_TRUE(hwInfo->gtSystemInfo.IsDynamicallyPopulated);
|
||||
|
||||
@@ -2178,7 +2185,8 @@ TEST(DrmHwInfoTest, givenTopologyDataWithSingleSliceWhenSettingHwInfoThenCorrect
|
||||
|
||||
drm.systemInfoQueried = true;
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
EXPECT_TRUE(hwInfo->gtSystemInfo.IsDynamicallyPopulated);
|
||||
|
||||
@@ -2226,7 +2234,8 @@ TEST(DrmHwInfoTest, givenTopologyDataWithoutTopologyMappingWhenSettingHwInfoThen
|
||||
|
||||
drm.systemInfoQueried = true;
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
drm.setupHardwareInfo(0, false);
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
EXPECT_FALSE(hwInfo->gtSystemInfo.IsDynamicallyPopulated);
|
||||
|
||||
@@ -2263,7 +2272,8 @@ TEST(DrmHwInfoTest, givenTopologyDataWithIncorrectSliceMaskWhenSettingHwInfoThen
|
||||
|
||||
drm.systemInfoQueried = true;
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
EXPECT_NE(0, drm.setupHardwareInfo(&device, false));
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
EXPECT_NE(0, drm.setupHardwareInfo(0, false));
|
||||
}
|
||||
|
||||
TEST(DrmHwInfoTest, givenTopologyDataWithSingleSliceAndNoCommonSubSliceMaskWhenSettingHwInfoThenSuccessIsReturned) {
|
||||
@@ -2296,7 +2306,8 @@ TEST(DrmHwInfoTest, givenTopologyDataWithSingleSliceAndNoCommonSubSliceMaskWhenS
|
||||
|
||||
drm.systemInfoQueried = true;
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
EXPECT_EQ(0, drm.setupHardwareInfo(&device, false));
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
EXPECT_EQ(0, drm.setupHardwareInfo(0, false));
|
||||
|
||||
EXPECT_FALSE(hwInfo->gtSystemInfo.SliceInfo[0].Enabled);
|
||||
EXPECT_TRUE(hwInfo->gtSystemInfo.SliceInfo[1].Enabled);
|
||||
@@ -2331,7 +2342,8 @@ TEST(DrmHwInfoTest, givenOverrideMaxSlicesSupportedIsFalseThenMaxSlicesSupported
|
||||
hwInfo->gtSystemInfo.MaxSlicesSupported = 8;
|
||||
};
|
||||
DeviceDescriptor device = {0, hwInfo, setupHardwareInfo};
|
||||
EXPECT_EQ(0, drm.setupHardwareInfo(&device, false));
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
EXPECT_EQ(0, drm.setupHardwareInfo(0, false));
|
||||
EXPECT_EQ(8u, hwInfo->gtSystemInfo.MaxSlicesSupported);
|
||||
}
|
||||
|
||||
@@ -2365,7 +2377,8 @@ TEST(DrmHwInfoTest, givenTopologyDataWithSingleSliceAndMoreSubslicesThanMaxSubsl
|
||||
|
||||
drm.systemInfoQueried = true;
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
EXPECT_EQ(0, drm.setupHardwareInfo(&device, false));
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
EXPECT_EQ(0, drm.setupHardwareInfo(0, false));
|
||||
|
||||
EXPECT_FALSE(hwInfo->gtSystemInfo.SliceInfo[0].Enabled);
|
||||
EXPECT_TRUE(hwInfo->gtSystemInfo.SliceInfo[1].Enabled);
|
||||
@@ -2407,7 +2420,9 @@ TEST(DrmHwInfoTest, givenTopologyDataWithoutL3BankCountWhenSettingHwInfoThenL3Ba
|
||||
|
||||
drm.systemInfoQueried = true;
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
EXPECT_EQ(0, drm.setupHardwareInfo(&device, false));
|
||||
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
EXPECT_EQ(0, drm.setupHardwareInfo(0, false));
|
||||
EXPECT_EQ(nullptr, drm.systemInfo.get());
|
||||
|
||||
EXPECT_EQ(hwInfo->gtSystemInfo.L3BankCount, 8u);
|
||||
@@ -2674,7 +2689,37 @@ HWTEST_F(DrmHwTest, GivenDrmWhenSetupHardwareInfoCalledThenGfxCoreHelperIsInitia
|
||||
DeviceDescriptor device = {0, executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo(), setupHardwareInfo};
|
||||
|
||||
drm.ioctlHelper = std::make_unique<MockIoctlHelper>(drm);
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
drm.setupHardwareInfo(0, false);
|
||||
|
||||
EXPECT_TRUE(raii.mockGfxCoreHelper->initFromProductHelperCalled);
|
||||
}
|
||||
|
||||
TEST(DrmTest, whenGettingDeviceDescriptorThenCorrectValueIsReturned) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
|
||||
|
||||
uint32_t deviceId = -1;
|
||||
debugManager.flags.FilterDeviceId.set("");
|
||||
auto deviceDescriptor = drm.getDeviceDescriptor(deviceId);
|
||||
EXPECT_EQ(deviceDescriptor, nullptr);
|
||||
|
||||
debugManager.flags.FilterDeviceId.set("unk");
|
||||
deviceDescriptor = drm.getDeviceDescriptor(deviceId);
|
||||
EXPECT_EQ(deviceDescriptor, nullptr);
|
||||
|
||||
deviceId = 0;
|
||||
deviceDescriptor = drm.getDeviceDescriptor(deviceId);
|
||||
EXPECT_NE(deviceDescriptor, nullptr);
|
||||
EXPECT_EQ(deviceDescriptor->deviceId, deviceId);
|
||||
}
|
||||
|
||||
TEST(DrmTests, GivenInvalidDeviceIdWhenDrmSetupHardwareInfoCalledThenFailureIsReturned) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
|
||||
uint32_t deviceId = -1;
|
||||
EXPECT_EQ(nullptr, drm.getDeviceDescriptor(deviceId));
|
||||
|
||||
auto rc = drm.setupHardwareInfo(deviceId, false);
|
||||
EXPECT_EQ(-1, rc);
|
||||
}
|
||||
@@ -937,13 +937,14 @@ TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperWhenInitializatedThenIpVersionI
|
||||
|
||||
auto &ipVersion = executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo()->ipVersion;
|
||||
ipVersion = {};
|
||||
drm->ioctlHelper->setupIpVersion();
|
||||
|
||||
ipVersion.value = drm->ioctlHelper->queryHwIpVersion(executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo()->platform.eProductFamily);
|
||||
EXPECT_EQ(ipVersion.revision, 1u);
|
||||
EXPECT_EQ(ipVersion.release, 2u);
|
||||
EXPECT_EQ(ipVersion.architecture, 3u);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperAndPlatformQueryNotSupportedWhenSetupIpVersionThenIpVersionIsSetFromHelper) {
|
||||
TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperAndPlatformQueryNotSupportedWhenQueryIpVersionThenIpVersionIsSetFromHelper) {
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo();
|
||||
auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<ProductHelper>();
|
||||
if (productHelper.isPlatformQuerySupported() == true) {
|
||||
@@ -953,6 +954,7 @@ TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperAndPlatformQueryNotSupportedWhe
|
||||
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
auto &ipVersion = hwInfo->ipVersion;
|
||||
ipVersion = {};
|
||||
ipVersion = drm->ioctlHelper->queryHwIpVersion(hwInfo->platform.eProductFamily);
|
||||
drm->ioctlHelper->setupIpVersion();
|
||||
auto config = compilerProductHelper.getHwIpVersion(*hwInfo);
|
||||
EXPECT_EQ(config, ipVersion.value);
|
||||
@@ -964,6 +966,20 @@ TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperWhenFailOnInitializationThenIpV
|
||||
auto &ipVersion = hwInfo->ipVersion;
|
||||
ipVersion = {};
|
||||
drm->failRetHwIpVersion = true;
|
||||
|
||||
ipVersion = drm->ioctlHelper->queryHwIpVersion(hwInfo->platform.eProductFamily);
|
||||
drm->ioctlHelper->setupIpVersion();
|
||||
auto config = compilerProductHelper.getHwIpVersion(*hwInfo);
|
||||
EXPECT_EQ(config, ipVersion.value);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperPrelimFixture, givenUnknownProductFamilyWhenQueryIpVersionThenIpVersionIsSetFromHelper) {
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo();
|
||||
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
auto &ipVersion = hwInfo->ipVersion;
|
||||
ipVersion = {};
|
||||
|
||||
ipVersion = drm->ioctlHelper->queryHwIpVersion(IGFX_UNKNOWN);
|
||||
drm->ioctlHelper->setupIpVersion();
|
||||
auto config = compilerProductHelper.getHwIpVersion(*hwInfo);
|
||||
EXPECT_EQ(config, ipVersion.value);
|
||||
@@ -982,7 +998,7 @@ TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperWhenInvalidHwIpVersionSizeOnIni
|
||||
StreamCapture capture;
|
||||
capture.captureStderr();
|
||||
drm->returnInvalidHwIpVersionLength = true;
|
||||
drm->ioctlHelper->setupIpVersion();
|
||||
drm->ioctlHelper->queryHwIpVersion(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily);
|
||||
|
||||
debugManager.flags.PrintDebugMessages.set(false);
|
||||
std::string output = capture.getCapturedStderr();
|
||||
@@ -998,7 +1014,7 @@ TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperWhenFailOnInitializationAndPlat
|
||||
StreamCapture capture;
|
||||
capture.captureStderr();
|
||||
drm->failRetHwIpVersion = true;
|
||||
drm->ioctlHelper->setupIpVersion();
|
||||
drm->ioctlHelper->queryHwIpVersion(executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo()->platform.eProductFamily);
|
||||
|
||||
debugManager.flags.PrintDebugMessages.set(false);
|
||||
std::string output = capture.getCapturedStderr();
|
||||
|
||||
@@ -868,11 +868,12 @@ TEST_F(IoctlPrelimHelperTests, whenGettingPreferredLocationRegionThenReturnCorre
|
||||
EXPECT_EQ(1u, region->memoryInstance);
|
||||
}
|
||||
|
||||
TEST_F(IoctlPrelimHelperTests, WhenSetupIpVersionIsCalledThenIpVersionIsCorrect) {
|
||||
auto &hwInfo = *drm->getRootDeviceEnvironment().getHardwareInfo();
|
||||
TEST_F(IoctlPrelimHelperTests, WhenQueryHwIpVersionAndSetupIpVersionAreCalledThenIpVersionIsCorrect) {
|
||||
auto &hwInfo = *drm->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
auto &compilerProductHelper = drm->getRootDeviceEnvironment().getHelper<CompilerProductHelper>();
|
||||
auto config = compilerProductHelper.getHwIpVersion(hwInfo);
|
||||
|
||||
hwInfo.ipVersion.value = ioctlHelper.queryHwIpVersion(hwInfo.platform.eProductFamily);
|
||||
ioctlHelper.setupIpVersion();
|
||||
EXPECT_EQ(config, hwInfo.ipVersion.value);
|
||||
}
|
||||
|
||||
@@ -2051,15 +2051,16 @@ TEST_F(IoctlHelperXeTest, whenUserFenceFailsThenErrorIsPropagated) {
|
||||
EXPECT_EQ(errorValue, xeIoctlHelper->vmUnbind(vmBindParams));
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperXeTest, WhenSetupIpVersionIsCalledThenIpVersionIsCorrect) {
|
||||
TEST_F(IoctlHelperXeTest, WhenQueryHwIpVersionAndSetupIpVersionAreCalledThenIpVersionIsCorrect) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
auto xeIoctlHelper = static_cast<MockIoctlHelperXe *>(drm->getIoctlHelper());
|
||||
|
||||
auto &hwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
auto &hwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo();
|
||||
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
auto config = compilerProductHelper.getHwIpVersion(hwInfo);
|
||||
|
||||
hwInfo.ipVersion.value = xeIoctlHelper->queryHwIpVersion(hwInfo.platform.eProductFamily);
|
||||
xeIoctlHelper->setupIpVersion();
|
||||
EXPECT_EQ(config, hwInfo.ipVersion.value);
|
||||
}
|
||||
@@ -2647,7 +2648,7 @@ struct HwIpVersionFixture {
|
||||
};
|
||||
using IoctlHelperXeHwIpVersionTests = Test<HwIpVersionFixture>;
|
||||
|
||||
TEST_F(IoctlHelperXeHwIpVersionTests, WhenSetupIpVersionIsCalledAndGtListProvidesProperDataThenIpVersionIsTakenFromGtList) {
|
||||
TEST_F(IoctlHelperXeHwIpVersionTests, WhenQueryHwIpVersionIsCalledAndGtListProvidesProperDataThenIpVersionIsTakenFromGtList) {
|
||||
EXPECT_EQ(mockGtList->gt_list[0].type, DRM_XE_QUERY_GT_TYPE_MAIN);
|
||||
|
||||
NEO::HardwareIpVersion testHwIpVersion{};
|
||||
@@ -2656,11 +2657,12 @@ TEST_F(IoctlHelperXeHwIpVersionTests, WhenSetupIpVersionIsCalledAndGtListProvide
|
||||
testHwIpVersion.revision = mockGtList->gt_list[0].ip_ver_rev;
|
||||
|
||||
auto xeIoctlHelper = std::make_unique<MockIoctlHelperXe>(*drm);
|
||||
xeIoctlHelper->setupIpVersion();
|
||||
EXPECT_EQ(testHwIpVersion.value, hwInfo.ipVersion.value);
|
||||
|
||||
uint32_t ipVersion = xeIoctlHelper->queryHwIpVersion(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(testHwIpVersion.value, ipVersion);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperXeHwIpVersionTests, WhenSetupIpVersionIsCalledAndGtListHasOnlyMediaEntriesThenIpVersionFallsBackToDefault) {
|
||||
TEST_F(IoctlHelperXeHwIpVersionTests, WhenQueryHwIpVersionIsCalledAndGtListHasOnlyMediaEntriesThenReturnZero) {
|
||||
for (size_t i = 0; i < mockGtList->num_gt; i++) {
|
||||
mockGtList->gt_list[i].type = DRM_XE_QUERY_GT_TYPE_MEDIA;
|
||||
}
|
||||
@@ -2670,9 +2672,11 @@ TEST_F(IoctlHelperXeHwIpVersionTests, WhenSetupIpVersionIsCalledAndGtListHasOnly
|
||||
auto xeIoctlHelper = std::make_unique<MockIoctlHelperXe>(*drm);
|
||||
xeIoctlHelper->setupIpVersion();
|
||||
EXPECT_EQ(config, hwInfo.ipVersion.value);
|
||||
uint32_t ipVersion = xeIoctlHelper->queryHwIpVersion(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(0u, ipVersion);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperXeHwIpVersionTests, WhenSetupIpVersionIsCalledAndGtListEntryHasZeroMajorVersionThenThisEntryIsConsideredInvalid) {
|
||||
TEST_F(IoctlHelperXeHwIpVersionTests, WhenQueryHwIpVersionIsCalledAndGtListEntryHasZeroMajorVersionThenThisEntryIsConsideredInvalid) {
|
||||
EXPECT_EQ(mockGtList->gt_list[0].type, DRM_XE_QUERY_GT_TYPE_MAIN);
|
||||
EXPECT_EQ(mockGtList->gt_list[2].type, DRM_XE_QUERY_GT_TYPE_MAIN);
|
||||
mockGtList->gt_list[0].ip_ver_major = static_cast<uint16_t>(0u);
|
||||
@@ -2683,16 +2687,17 @@ TEST_F(IoctlHelperXeHwIpVersionTests, WhenSetupIpVersionIsCalledAndGtListEntryHa
|
||||
testHwIpVersion.revision = mockGtList->gt_list[2].ip_ver_rev;
|
||||
|
||||
auto xeIoctlHelper = std::make_unique<MockIoctlHelperXe>(*drm);
|
||||
xeIoctlHelper->setupIpVersion();
|
||||
EXPECT_EQ(testHwIpVersion.value, hwInfo.ipVersion.value);
|
||||
uint32_t ipVersion = xeIoctlHelper->queryHwIpVersion(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(testHwIpVersion.value, ipVersion);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperXeHwIpVersionTests, WhenSetupIpVersionIsCalledAndIoctlReturnsNoDataThenIpVersionFallsBackToDefault) {
|
||||
TEST_F(IoctlHelperXeHwIpVersionTests, WhenQueryHwIpVersionIsCalledAndIoctlReturnsNoDataThenSetupIpVersionRetrievesCorrectIpVersion) {
|
||||
drm->testMode(true, 0);
|
||||
auto &compilerProductHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
auto config = compilerProductHelper.getHwIpVersion(hwInfo);
|
||||
auto xeIoctlHelper = std::make_unique<MockIoctlHelperXe>(*drm);
|
||||
|
||||
auto mutableHwInfo = executionEnvironment.rootDeviceEnvironments[0]->getMutableHardwareInfo();
|
||||
mutableHwInfo->ipVersion.value = xeIoctlHelper->queryHwIpVersion(hwInfo.platform.eProductFamily);
|
||||
xeIoctlHelper->setupIpVersion();
|
||||
EXPECT_EQ(config, hwInfo.ipVersion.value);
|
||||
}
|
||||
|
||||
@@ -82,8 +82,9 @@ BMGTEST_F(BmgProductHelperLinux, WhenGtIsSetupThenGtSystemInfoIsCorrect) {
|
||||
|
||||
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
DeviceDescriptor device = {0, &BmgHwConfig::hwInfo, &BmgHwConfig::setupHardwareInfo};
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
|
||||
|
||||
@@ -91,8 +91,9 @@ LNLTEST_F(LnlHwInfoLinux, WhenGtIsSetupThenGtSystemInfoIsCorrect) {
|
||||
|
||||
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
DeviceDescriptor device = {0, &LnlHwConfig::hwInfo, &LnlHwConfig::setupHardwareInfo};
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
|
||||
|
||||
@@ -44,8 +44,9 @@ NVLSTEST_F(NvlsHwInfoLinux, WhenGtIsSetupThenGtSystemInfoIsCorrect) {
|
||||
|
||||
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
DeviceDescriptor device = {0, &NvlsHwConfig::hwInfo, &NvlsHwConfig::setupHardwareInfo};
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
|
||||
|
||||
@@ -43,8 +43,9 @@ PTLTEST_F(PtlHwInfoLinux, WhenGtIsSetupThenGtSystemInfoIsCorrect) {
|
||||
|
||||
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
DeviceDescriptor device = {0, &PtlHwConfig::hwInfo, &PtlHwConfig::setupHardwareInfo};
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
|
||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
||||
|
||||
|
||||
@@ -71,8 +71,9 @@ ARLTEST_F(ArlHwInfoLinux, whenSetupHardwareInfoThenGtSetupIsCorrect) {
|
||||
|
||||
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
DeviceDescriptor device = {0, &ArlHwConfig::hwInfo, &ArlHwConfig::setupHardwareInfo};
|
||||
drm.overrideDeviceDescriptor = &device;
|
||||
|
||||
int ret = drm.setupHardwareInfo(&device, false);
|
||||
int ret = drm.setupHardwareInfo(0, false);
|
||||
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_GT(gtSystemInfo.EUCount, 0u);
|
||||
|
||||
Reference in New Issue
Block a user