mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
fix: Use capability table to determine engine type for defaultEngine
Related-To: GSD-7097 Signed-off-by: Francois Dugast <francois.dugast@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
743904d2df
commit
278ced35dc
@@ -476,11 +476,22 @@ void IoctlHelperXe::updateBindInfo(uint32_t handle, uint64_t userPtr, uint64_t s
|
||||
}
|
||||
|
||||
void IoctlHelperXe::setDefaultEngine() {
|
||||
auto defaultEngineClass = DRM_XE_ENGINE_CLASS_COMPUTE;
|
||||
auto defaultEngineType = drm.getRootDeviceEnvironment().getHardwareInfo()->capabilityTable.defaultEngineType;
|
||||
uint32_t defaultEngineClass;
|
||||
|
||||
if (defaultEngineType == aub_stream::EngineType::ENGINE_CCS) {
|
||||
defaultEngineClass = DRM_XE_ENGINE_CLASS_COMPUTE;
|
||||
} else if (defaultEngineType == aub_stream::EngineType::ENGINE_RCS) {
|
||||
defaultEngineClass = DRM_XE_ENGINE_CLASS_RENDER;
|
||||
} else {
|
||||
/* So far defaultEngineType is either ENGINE_RCS or ENGINE_CCS */
|
||||
UNRECOVERABLE_IF(true);
|
||||
}
|
||||
|
||||
for (auto i = 0u; i < allEngines.size(); i++) {
|
||||
if (allEngines[i].engine_class == defaultEngineClass) {
|
||||
defaultEngine = xeFindMatchingEngine(defaultEngineClass, allEngines[i].engine_instance);
|
||||
xeLog("Found default engine of class %s\n", xeGetClassName(defaultEngineClass));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user