fix: do not add link engines on integrated gpu

- caps check is not needed when link engines are not available for
product

Related-To: NEO-7886
Signed-off-by: Cencelewska, Katarzyna <katarzyna.cencelewska@intel.com>
This commit is contained in:
Cencelewska, Katarzyna
2023-04-19 23:49:07 +00:00
committed by Compute-Runtime-Automation
parent 2647efc23c
commit 659109adc6
3 changed files with 59 additions and 11 deletions

View File

@ -64,7 +64,8 @@ EngineInfo::EngineInfo(Drm *drm, const std::vector<EngineCapabilities> &engineIn
if (engine.engineClass == ioctlHelper->getDrmParamValue(DrmParam::EngineClassRender)) {
tileToEngineToInstanceMap[0][EngineHelpers::remapEngineTypeToHwSpecific(aub_stream::EngineType::ENGINE_RCS, rootDeviceEnvironment)] = engine;
} else if (engine.engineClass == ioctlHelper->getDrmParamValue(DrmParam::EngineClassCopy)) {
assignCopyEngine(EngineInfo::getBaseCopyEngineType(ioctlHelper, engineInfo.capabilities), 0, engine,
const auto &hwInfo = rootDeviceEnvironment.getHardwareInfo();
assignCopyEngine(EngineInfo::getBaseCopyEngineType(ioctlHelper, engineInfo.capabilities, hwInfo->capabilityTable.isIntegratedDevice), 0, engine,
bcsInfoMask, numHostLinkCopyEngines, numScaleUpLinkCopyEngines);
} else if (engine.engineClass == ioctlHelper->getDrmParamValue(DrmParam::EngineClassCompute)) {
tileToEngineToInstanceMap[0][static_cast<aub_stream::EngineType>(aub_stream::ENGINE_CCS + computeEngines)] = engine;
@ -183,16 +184,16 @@ void EngineInfo::assignCopyEngine(aub_stream::EngineType baseEngineType, uint32_
}
// EngineIndex = (Base + EngineCounter - 1)
aub_stream::EngineType EngineInfo::getBaseCopyEngineType(IoctlHelper *ioctlHelper, uint64_t capabilities) {
aub_stream::EngineType EngineInfo::getBaseCopyEngineType(IoctlHelper *ioctlHelper, uint64_t capabilities, bool isIntegratedDevice) {
if (!isIntegratedDevice) {
if (const auto capa = ioctlHelper->getCopyClassSaturatePCIECapability(); capa && isValueSet(capabilities, *capa)) {
return DrmEngineMappingHelper::baseForHostLinkCopyEngine;
}
if (const auto capa = ioctlHelper->getCopyClassSaturatePCIECapability(); capa && isValueSet(capabilities, *capa)) {
return DrmEngineMappingHelper::baseForHostLinkCopyEngine;
if (const auto capa = ioctlHelper->getCopyClassSaturateLinkCapability(); capa && isValueSet(capabilities, *capa)) {
return DrmEngineMappingHelper::baseForScaleUpLinkCopyEngine;
}
}
if (const auto capa = ioctlHelper->getCopyClassSaturateLinkCapability(); capa && isValueSet(capabilities, *capa)) {
return DrmEngineMappingHelper::baseForScaleUpLinkCopyEngine;
}
// no capabilites check for BCS0, to be backward compatible
return DrmEngineMappingHelper::baseForMainCopyEngine;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2022 Intel Corporation
* Copyright (C) 2019-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -36,7 +36,7 @@ struct EngineInfo {
std::vector<EngineCapabilities> engines;
protected:
static aub_stream::EngineType getBaseCopyEngineType(IoctlHelper *ioctlHelper, uint64_t capabilities);
static aub_stream::EngineType getBaseCopyEngineType(IoctlHelper *ioctlHelper, uint64_t capabilities, bool isIntegratedDevice);
static void setSupportedEnginesInfo(const RootDeviceEnvironment &rootDeviceEnvironment, uint32_t numComputeEngines, const BcsInfoMask &bcsInfoMask);
void assignCopyEngine(aub_stream::EngineType baseEngineType, uint32_t tileId, const EngineClassInstance &engine,