mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Update topology query
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ccf9d72019
commit
eb1ea19360
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user