2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2021-05-17 02:51:16 +08:00
|
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-12-27 23:01:22 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "opencl/source/command_queue/gpgpu_walker.h"
|
|
|
|
#include "opencl/source/device_queue/device_queue_hw.h"
|
2019-05-13 19:35:14 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
void DeviceQueueHw<GfxFamily>::addProfilingEndCmds(uint64_t timestampAddress) {
|
|
|
|
|
2021-07-09 20:14:05 +08:00
|
|
|
auto pipeControlSpace = (PIPE_CONTROL *)slbCS.getSpace(sizeof(PIPE_CONTROL));
|
|
|
|
auto pipeControlCmd = GfxFamily::cmdInitPipeControl;
|
|
|
|
pipeControlCmd.setCommandStreamerStallEnable(true);
|
|
|
|
*pipeControlSpace = pipeControlCmd;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
//low part
|
2021-07-09 20:14:05 +08:00
|
|
|
auto mICmdLowSpace = (MI_STORE_REGISTER_MEM *)slbCS.getSpace(sizeof(MI_STORE_REGISTER_MEM));
|
|
|
|
auto mICmdLow = GfxFamily::cmdInitStoreRegisterMem;
|
|
|
|
GpgpuWalkerHelper<GfxFamily>::adjustMiStoreRegMemMode(&mICmdLow);
|
|
|
|
mICmdLow.setRegisterAddress(GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW);
|
|
|
|
mICmdLow.setMemoryAddress(timestampAddress);
|
|
|
|
*mICmdLowSpace = mICmdLow;
|
2017-12-21 07:45:38 +08:00
|
|
|
}
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|