2020-01-15 17:02:47 +01:00
|
|
|
/*
|
2023-01-20 03:04:15 +00:00
|
|
|
* Copyright (C) 2020-2023 Intel Corporation
|
2020-01-15 17:02:47 +01:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-08-31 19:50:48 +02:00
|
|
|
#include "shared/source/command_container/command_encoder.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/command_stream/linear_stream.h"
|
|
|
|
#include "shared/source/direct_submission/dispatchers/blitter_dispatcher.h"
|
2023-03-06 12:42:09 +00:00
|
|
|
#include "shared/source/helpers/definitions/command_encoder_args.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/helpers/hw_info.h"
|
2020-01-15 17:02:47 +01:00
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-03-27 16:32:07 +01:00
|
|
|
inline void BlitterDispatcher<GfxFamily>::dispatchPreemption(LinearStream &cmdBuffer) {
|
2020-01-15 17:02:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-03-27 16:32:07 +01:00
|
|
|
inline size_t BlitterDispatcher<GfxFamily>::getSizePreemption() {
|
2020-01-15 17:02:47 +01:00
|
|
|
size_t size = 0;
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-03-27 16:32:07 +01:00
|
|
|
inline void BlitterDispatcher<GfxFamily>::dispatchMonitorFence(LinearStream &cmdBuffer,
|
|
|
|
uint64_t gpuAddress,
|
|
|
|
uint64_t immediateData,
|
2023-01-25 19:28:09 +00:00
|
|
|
const RootDeviceEnvironment &rootDeviceEnvironment,
|
2021-09-27 23:27:46 +00:00
|
|
|
bool useNotifyEnable,
|
2022-10-11 18:47:13 +00:00
|
|
|
bool partitionedWorkload,
|
|
|
|
bool dcFlushRequired) {
|
2023-03-10 19:21:59 +00:00
|
|
|
NEO::EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&rootDeviceEnvironment)};
|
|
|
|
MiFlushArgs args{waArgs};
|
2021-06-17 11:55:28 +00:00
|
|
|
args.commandWithPostSync = true;
|
|
|
|
args.notifyEnable = useNotifyEnable;
|
2023-03-10 19:21:59 +00:00
|
|
|
|
2023-03-06 12:42:09 +00:00
|
|
|
EncodeMiFlushDW<GfxFamily>::programWithWa(cmdBuffer, gpuAddress, immediateData, args);
|
2020-01-15 17:02:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2023-01-26 03:58:18 +00:00
|
|
|
inline size_t BlitterDispatcher<GfxFamily>::getSizeMonitorFence(const RootDeviceEnvironment &rootDeviceEnvironment) {
|
2023-03-10 19:21:59 +00:00
|
|
|
EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&rootDeviceEnvironment)};
|
2023-03-06 12:42:09 +00:00
|
|
|
size_t size = EncodeMiFlushDW<GfxFamily>::getCommandSizeWithWa(waArgs);
|
2020-01-15 17:02:47 +01:00
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2023-01-20 03:04:15 +00:00
|
|
|
inline void BlitterDispatcher<GfxFamily>::dispatchCacheFlush(LinearStream &cmdBuffer, const RootDeviceEnvironment &rootDeviceEnvironment, uint64_t address) {
|
2023-03-06 12:42:09 +00:00
|
|
|
dispatchTlbFlush(cmdBuffer, address, rootDeviceEnvironment);
|
2020-01-15 17:02:47 +01:00
|
|
|
}
|
|
|
|
|
2021-04-14 14:40:23 +00:00
|
|
|
template <typename GfxFamily>
|
2023-03-06 12:42:09 +00:00
|
|
|
inline void BlitterDispatcher<GfxFamily>::dispatchTlbFlush(LinearStream &cmdBuffer, uint64_t address, const RootDeviceEnvironment &rootDeviceEnvironment) {
|
2023-03-10 19:21:59 +00:00
|
|
|
NEO::EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&rootDeviceEnvironment)};
|
|
|
|
MiFlushArgs args{waArgs};
|
2021-07-29 06:40:42 +00:00
|
|
|
args.tlbFlush = true;
|
|
|
|
args.commandWithPostSync = true;
|
2023-03-06 12:42:09 +00:00
|
|
|
EncodeMiFlushDW<GfxFamily>::programWithWa(cmdBuffer, address, 0ull, args);
|
2021-04-14 14:40:23 +00:00
|
|
|
}
|
|
|
|
|
2020-01-15 17:02:47 +01:00
|
|
|
template <typename GfxFamily>
|
2023-03-06 12:42:09 +00:00
|
|
|
inline size_t BlitterDispatcher<GfxFamily>::getSizeCacheFlush(const RootDeviceEnvironment &rootDeviceEnvironment) {
|
2023-03-10 19:21:59 +00:00
|
|
|
return getSizeTlbFlush(rootDeviceEnvironment);
|
2020-01-15 17:02:47 +01:00
|
|
|
}
|
|
|
|
|
2021-04-14 14:40:23 +00:00
|
|
|
template <typename GfxFamily>
|
2023-03-06 12:42:09 +00:00
|
|
|
inline size_t BlitterDispatcher<GfxFamily>::getSizeTlbFlush(const RootDeviceEnvironment &rootDeviceEnvironment) {
|
2023-03-10 19:21:59 +00:00
|
|
|
EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&rootDeviceEnvironment)};
|
2023-03-06 12:42:09 +00:00
|
|
|
size_t size = EncodeMiFlushDW<GfxFamily>::getCommandSizeWithWa(waArgs);
|
2021-07-29 06:40:42 +00:00
|
|
|
return size;
|
2021-04-14 14:40:23 +00:00
|
|
|
}
|
|
|
|
|
2020-01-15 17:02:47 +01:00
|
|
|
} // namespace NEO
|