2018-11-26 21:04:52 +08:00
|
|
|
/*
|
2022-06-15 00:47:02 +08:00
|
|
|
* Copyright (C) 2020-2022 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"
|
2022-06-15 00:47:02 +08:00
|
|
|
#include "shared/source/os_interface/linux/drm_wrappers.h"
|
2019-11-18 23:48:41 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-11-26 21:04:52 +08:00
|
|
|
|
2022-06-15 00:47:02 +08:00
|
|
|
DrmParam DrmEngineMapper::engineNodeMap(aub_stream::EngineType engineType) {
|
2021-08-02 23:16:41 +08:00
|
|
|
if (EngineHelpers::isCcs(engineType)) {
|
2022-06-15 00:47:02 +08:00
|
|
|
return DrmParam::ExecDefault;
|
2021-12-08 21:57:37 +08:00
|
|
|
} else if (aub_stream::ENGINE_BCS == engineType || EngineHelpers::isLinkBcs(engineType)) {
|
2022-06-15 00:47:02 +08:00
|
|
|
return DrmParam::ExecBlt;
|
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);
|
2022-06-15 00:47:02 +08:00
|
|
|
return DrmParam::ExecRender;
|
2018-11-26 21:04:52 +08:00
|
|
|
}
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|