2018-11-26 21:04:52 +08:00
|
|
|
/*
|
2021-05-17 02:51:16 +08:00
|
|
|
* Copyright (C) 2020-2021 Intel Corporation
|
2018-11-26 21:04:52 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/os_interface/linux/drm_engine_mapper.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/helpers/debug_helpers.h"
|
2021-08-02 23:16:41 +08:00
|
|
|
#include "shared/source/helpers/engine_node_helper.h"
|
2019-11-18 23:48:41 +08:00
|
|
|
|
2018-11-26 21:04:52 +08:00
|
|
|
#include "drm/i915_drm.h"
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-11-26 21:04:52 +08:00
|
|
|
|
2019-03-27 17:06:29 +08:00
|
|
|
unsigned int DrmEngineMapper::engineNodeMap(aub_stream::EngineType engineType) {
|
2021-08-02 23:16:41 +08:00
|
|
|
if (EngineHelpers::isCcs(engineType)) {
|
|
|
|
return I915_EXEC_DEFAULT;
|
2021-12-08 21:57:37 +08:00
|
|
|
} else if (aub_stream::ENGINE_BCS == engineType || EngineHelpers::isLinkBcs(engineType)) {
|
2019-04-04 16:40:55 +08:00
|
|
|
return I915_EXEC_BLT;
|
2018-11-26 21:04:52 +08:00
|
|
|
}
|
2021-12-08 21:57:37 +08:00
|
|
|
UNRECOVERABLE_IF(engineType != aub_stream::ENGINE_RCS && engineType != aub_stream::ENGINE_CCCS);
|
|
|
|
return I915_EXEC_RENDER;
|
2018-11-26 21:04:52 +08:00
|
|
|
}
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|