2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2020-02-22 16:28:27 +08:00
|
|
|
* Copyright (C) 2017-2020 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-10-02 03:08:46 +08:00
|
|
|
#include "shared/source/command_container/command_encoder.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/gen9/hw_cmds.h"
|
2020-10-14 20:04:29 +08:00
|
|
|
#include "shared/source/helpers/populate_factory.h"
|
2020-02-24 17:22:30 +08:00
|
|
|
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "opencl/source/device_queue/device_queue_hw.h"
|
|
|
|
#include "opencl/source/device_queue/device_queue_hw_bdw_plus.inl"
|
|
|
|
#include "opencl/source/device_queue/device_queue_hw_profiling.inl"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
typedef SKLFamily Family;
|
|
|
|
static auto gfxCore = IGFX_GEN9_CORE;
|
|
|
|
|
|
|
|
template <>
|
|
|
|
void populateFactoryTable<DeviceQueueHw<Family>>() {
|
|
|
|
extern DeviceQueueCreateFunc deviceQueueFactory[IGFX_MAX_CORE];
|
|
|
|
deviceQueueFactory[gfxCore] = DeviceQueueHw<Family>::create;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
size_t DeviceQueueHw<Family>::getWaCommandsSize() {
|
|
|
|
return sizeof(Family::MI_ARB_CHECK) +
|
|
|
|
sizeof(Family::MI_ATOMIC) +
|
|
|
|
sizeof(Family::MI_ARB_CHECK) +
|
|
|
|
sizeof(Family::PIPE_CONTROL) +
|
|
|
|
sizeof(Family::PIPE_CONTROL);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
void DeviceQueueHw<Family>::addArbCheckCmdWa() {
|
|
|
|
auto arbCheck = slbCS.getSpaceForCmd<Family::MI_ARB_CHECK>();
|
2019-01-18 00:10:12 +08:00
|
|
|
*arbCheck = Family::cmdInitArbCheck;
|
2017-12-21 07:45:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
void DeviceQueueHw<Family>::addMiAtomicCmdWa(uint64_t atomicOpPlaceholder) {
|
2020-10-02 03:08:46 +08:00
|
|
|
EncodeAtomic<Family>::programMiAtomic(slbCS,
|
|
|
|
atomicOpPlaceholder,
|
|
|
|
Family::MI_ATOMIC::ATOMIC_OPCODES::ATOMIC_8B_INCREMENT,
|
|
|
|
Family::MI_ATOMIC::DATA_SIZE::DATA_SIZE_QWORD,
|
|
|
|
0x1u, 0x1u);
|
2017-12-21 07:45:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
void DeviceQueueHw<Family>::addLriCmdWa(bool setArbCheck) {}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
void DeviceQueueHw<Family>::addPipeControlCmdWa(bool isNoopCmd) {
|
|
|
|
auto pipeControl = slbCS.getSpaceForCmd<Family::PIPE_CONTROL>();
|
|
|
|
if (isNoopCmd)
|
|
|
|
memset(pipeControl, 0x0, sizeof(Family::PIPE_CONTROL));
|
|
|
|
else
|
|
|
|
initPipeControl(pipeControl);
|
|
|
|
}
|
|
|
|
|
|
|
|
template class DeviceQueueHw<Family>;
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|