2018-11-26 21:04:52 +08:00
|
|
|
/*
|
2020-01-21 22:24:52 +08:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-11-26 21:04:52 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-24 01:46:50 +08:00
|
|
|
#include "os_interface/linux/drm_engine_mapper.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2020-02-24 01:46:50 +08:00
|
|
|
#include "helpers/debug_helpers.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) {
|
|
|
|
if (aub_stream::ENGINE_RCS == engineType) {
|
2018-11-26 21:04:52 +08:00
|
|
|
return I915_EXEC_RENDER;
|
2019-04-04 16:40:55 +08:00
|
|
|
} else if (aub_stream::ENGINE_BCS == engineType) {
|
|
|
|
return I915_EXEC_BLT;
|
2019-09-19 01:32:33 +08:00
|
|
|
} else if (aub_stream::ENGINE_CCS == engineType) {
|
|
|
|
return I915_EXEC_COMPUTE;
|
2018-11-26 21:04:52 +08:00
|
|
|
}
|
|
|
|
UNRECOVERABLE_IF(true);
|
|
|
|
}
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|