Update topology query

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-01-26 16:03:12 +00:00
committed by Compute-Runtime-Automation
parent ccf9d72019
commit eb1ea19360
5 changed files with 8 additions and 8 deletions

View File

@@ -295,7 +295,7 @@ TEST_F(HwInfoConfigTestLinuxDummy, givenInvalidTopologyDataWhenConfiguringThenRe
drm->StoredEUVal = 0;
int sliceCount, subSliceCount, euCount;
EXPECT_FALSE(drm->queryTopology(sliceCount, subSliceCount, euCount));
EXPECT_FALSE(drm->queryTopology(outHwInfo, sliceCount, subSliceCount, euCount));
}
{
@@ -305,7 +305,7 @@ TEST_F(HwInfoConfigTestLinuxDummy, givenInvalidTopologyDataWhenConfiguringThenRe
drm->StoredEUVal = storedEUVal;
int sliceCount, subSliceCount, euCount;
EXPECT_FALSE(drm->queryTopology(sliceCount, subSliceCount, euCount));
EXPECT_FALSE(drm->queryTopology(outHwInfo, sliceCount, subSliceCount, euCount));
}
{
@@ -315,7 +315,7 @@ TEST_F(HwInfoConfigTestLinuxDummy, givenInvalidTopologyDataWhenConfiguringThenRe
drm->StoredEUVal = storedEUVal;
int sliceCount, subSliceCount, euCount;
EXPECT_FALSE(drm->queryTopology(sliceCount, subSliceCount, euCount));
EXPECT_FALSE(drm->queryTopology(outHwInfo, sliceCount, subSliceCount, euCount));
}
}

View File

@@ -280,7 +280,7 @@ int Drm::setupHardwareInfo(DeviceDescriptor *device, bool setupFeatureTableAndWo
int subSliceTotal;
int euTotal;
bool status = queryTopology(sliceTotal, subSliceTotal, euTotal);
bool status = queryTopology(*hwInfo, sliceTotal, subSliceTotal, euTotal);
if (!status) {
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Topology query failed!\n");

View File

@@ -100,7 +100,7 @@ class Drm {
MOCKABLE_VIRTUAL bool querySystemInfo();
MOCKABLE_VIRTUAL bool queryEngineInfo();
MOCKABLE_VIRTUAL bool queryMemoryInfo();
bool queryTopology(int &sliceCount, int &subSliceCount, int &euCount);
bool queryTopology(const HardwareInfo &hwInfo, int &sliceCount, int &subSliceCount, int &euCount);
bool createVirtualMemoryAddressSpace(uint32_t vmCount);
void destroyVirtualMemoryAddressSpace();
uint32_t getVirtualMemoryAddressSpace(uint32_t vmId);

View File

@@ -11,7 +11,7 @@
namespace NEO {
bool Drm::queryTopology(int &sliceCount, int &subSliceCount, int &euCount) {
bool Drm::queryTopology(const HardwareInfo &hwInfo, int &sliceCount, int &subSliceCount, int &euCount) {
int32_t length;
auto dataQuery = this->query(DRM_I915_QUERY_TOPOLOGY_INFO, DrmQueryItemFlags::topology, length);
auto data = reinterpret_cast<drm_i915_query_topology_info *>(dataQuery.get());

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -94,7 +94,7 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou
int subSliceCount;
int euCount;
bool status = drm->queryTopology(sliceCount, subSliceCount, euCount);
bool status = drm->queryTopology(*outHwInfo, sliceCount, subSliceCount, euCount);
if (!status) {
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Topology query failed!\n");