2018-11-26 14:04:52 +01:00
|
|
|
/*
|
2022-06-14 16:47:02 +00:00
|
|
|
* Copyright (C) 2020-2022 Intel Corporation
|
2018-11-26 14:04:52 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/os_interface/linux/drm_engine_mapper.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/helpers/debug_helpers.h"
|
2021-08-02 15:16:41 +00:00
|
|
|
#include "shared/source/helpers/engine_node_helper.h"
|
2022-06-14 16:47:02 +00:00
|
|
|
#include "shared/source/os_interface/linux/drm_wrappers.h"
|
2019-11-18 16:48:41 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2018-11-26 14:04:52 +01:00
|
|
|
|
2022-06-14 16:47:02 +00:00
|
|
|
DrmParam DrmEngineMapper::engineNodeMap(aub_stream::EngineType engineType) {
|
2021-08-02 15:16:41 +00:00
|
|
|
if (EngineHelpers::isCcs(engineType)) {
|
2022-06-14 16:47:02 +00:00
|
|
|
return DrmParam::ExecDefault;
|
2021-12-08 13:57:37 +00:00
|
|
|
} else if (aub_stream::ENGINE_BCS == engineType || EngineHelpers::isLinkBcs(engineType)) {
|
2022-06-14 16:47:02 +00:00
|
|
|
return DrmParam::ExecBlt;
|
2018-11-26 14:04:52 +01:00
|
|
|
}
|
2021-12-08 13:57:37 +00:00
|
|
|
UNRECOVERABLE_IF(engineType != aub_stream::ENGINE_RCS && engineType != aub_stream::ENGINE_CCCS);
|
2022-06-14 16:47:02 +00:00
|
|
|
return DrmParam::ExecRender;
|
2018-11-26 14:04:52 +01:00
|
|
|
}
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|