2020-01-16 00:02:47 +08:00
|
|
|
/*
|
2021-04-14 22:40:23 +08:00
|
|
|
* Copyright (C) 2020-2021 Intel Corporation
|
2020-01-16 00:02:47 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-09-01 01:50:48 +08:00
|
|
|
#include "shared/source/command_container/command_encoder.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/command_stream/linear_stream.h"
|
|
|
|
#include "shared/source/direct_submission/dispatchers/blitter_dispatcher.h"
|
|
|
|
#include "shared/source/helpers/hw_info.h"
|
2020-01-16 00:02:47 +08:00
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-03-27 23:32:07 +08:00
|
|
|
inline void BlitterDispatcher<GfxFamily>::dispatchPreemption(LinearStream &cmdBuffer) {
|
2020-01-16 00:02:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-03-27 23:32:07 +08:00
|
|
|
inline size_t BlitterDispatcher<GfxFamily>::getSizePreemption() {
|
2020-01-16 00:02:47 +08:00
|
|
|
size_t size = 0;
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-03-27 23:32:07 +08:00
|
|
|
inline void BlitterDispatcher<GfxFamily>::dispatchMonitorFence(LinearStream &cmdBuffer,
|
|
|
|
uint64_t gpuAddress,
|
|
|
|
uint64_t immediateData,
|
2021-06-17 19:55:28 +08:00
|
|
|
const HardwareInfo &hwInfo,
|
2021-09-28 07:27:46 +08:00
|
|
|
bool useNotifyEnable,
|
|
|
|
bool partitionedWorkload) {
|
2021-06-17 19:55:28 +08:00
|
|
|
MiFlushArgs args;
|
|
|
|
args.commandWithPostSync = true;
|
|
|
|
args.notifyEnable = useNotifyEnable;
|
|
|
|
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(cmdBuffer, gpuAddress, immediateData, args);
|
2020-01-16 00:02:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-03-27 23:32:07 +08:00
|
|
|
inline size_t BlitterDispatcher<GfxFamily>::getSizeMonitorFence(const HardwareInfo &hwInfo) {
|
2020-09-01 01:50:48 +08:00
|
|
|
size_t size = EncodeMiFlushDW<GfxFamily>::getMiFlushDwCmdSizeForDataWrite();
|
2020-01-16 00:02:47 +08:00
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2021-07-29 14:40:42 +08:00
|
|
|
inline void BlitterDispatcher<GfxFamily>::dispatchCacheFlush(LinearStream &cmdBuffer, const HardwareInfo &hwInfo, uint64_t address) {
|
|
|
|
dispatchTlbFlush(cmdBuffer, address);
|
2020-01-16 00:02:47 +08:00
|
|
|
}
|
|
|
|
|
2021-04-14 22:40:23 +08:00
|
|
|
template <typename GfxFamily>
|
2021-07-29 14:40:42 +08:00
|
|
|
inline void BlitterDispatcher<GfxFamily>::dispatchTlbFlush(LinearStream &cmdBuffer, uint64_t address) {
|
|
|
|
MiFlushArgs args;
|
|
|
|
args.tlbFlush = true;
|
|
|
|
args.commandWithPostSync = true;
|
|
|
|
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(cmdBuffer, address, 0ull, args);
|
2021-04-14 22:40:23 +08:00
|
|
|
}
|
|
|
|
|
2020-01-16 00:02:47 +08:00
|
|
|
template <typename GfxFamily>
|
2020-03-27 23:32:07 +08:00
|
|
|
inline size_t BlitterDispatcher<GfxFamily>::getSizeCacheFlush(const HardwareInfo &hwInfo) {
|
2020-09-01 01:50:48 +08:00
|
|
|
size_t size = EncodeMiFlushDW<GfxFamily>::getMiFlushDwCmdSizeForDataWrite();
|
2020-01-16 00:02:47 +08:00
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
2021-04-14 22:40:23 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
inline size_t BlitterDispatcher<GfxFamily>::getSizeTlbFlush() {
|
2021-07-29 14:40:42 +08:00
|
|
|
size_t size = EncodeMiFlushDW<GfxFamily>::getMiFlushDwCmdSizeForDataWrite();
|
|
|
|
return size;
|
2021-04-14 22:40:23 +08:00
|
|
|
}
|
|
|
|
|
2020-01-16 00:02:47 +08:00
|
|
|
} // namespace NEO
|