Debian Codegraph @

shared/source/direct_submission/dispatchers/blitter_dispatcher.inl

raw
1 /*
2 * Copyright (C) 2020-2025 Intel Corporation
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #include "shared/source/command_container/command_encoder.h"
9 #include "shared/source/command_stream/linear_stream.h"
10 #include "shared/source/direct_submission/dispatchers/blitter_dispatcher.h"
11 #include "shared/source/helpers/definitions/command_encoder_args.h"
12 #include "shared/source/helpers/hw_info.h"
13
14 namespace NEO {
15
16 template <typename GfxFamily>
17 inline void BlitterDispatcher<GfxFamily>::dispatchPreemption(LinearStream &cmdBuffer) {
18 }
19
20 template <typename GfxFamily>
21 inline size_t BlitterDispatcher<GfxFamily>::getSizePreemption() {
22 size_t size = 0;
23 return size;
24 }
25
26 template <typename GfxFamily>
27 inline void BlitterDispatcher<GfxFamily>::dispatchMonitorFence(LinearStream &cmdBuffer,
28 uint64_t gpuAddress,
29 uint64_t immediateData,
30 const RootDeviceEnvironment &rootDeviceEnvironment,
31 bool partitionedWorkload,
32 bool dcFlushRequired,
33 bool notifyKmd) {
34 NEO::EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&rootDeviceEnvironment)};
35 MiFlushArgs args{waArgs};
36 args.commandWithPostSync = true;
37 args.notifyEnable = notifyKmd;
38
39 EncodeMiFlushDW<GfxFamily>::programWithWa(cmdBuffer, gpuAddress, immediateData, args);
40 }
41
42 template <typename GfxFamily>
43 inline size_t BlitterDispatcher<GfxFamily>::getSizeMonitorFence(const RootDeviceEnvironment &rootDeviceEnvironment) {
44 EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&rootDeviceEnvironment)};
45 size_t size = EncodeMiFlushDW<GfxFamily>::getCommandSizeWithWa(waArgs);
46 return size;
47 }
48
49 template <typename GfxFamily>
50 inline void BlitterDispatcher<GfxFamily>::dispatchTlbFlush(LinearStream &cmdBuffer, uint64_t address, const RootDeviceEnvironment &rootDeviceEnvironment) {
51 NEO::EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&rootDeviceEnvironment)};
52 MiFlushArgs args{waArgs};
53 args.tlbFlush = true;
54 args.commandWithPostSync = true;
55 EncodeMiFlushDW<GfxFamily>::programWithWa(cmdBuffer, address, 0ull, args);
56 }
57
58 template <typename GfxFamily>
59 inline size_t BlitterDispatcher<GfxFamily>::getSizeTlbFlush(const RootDeviceEnvironment &rootDeviceEnvironment) {
60 EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&rootDeviceEnvironment)};
61 size_t size = EncodeMiFlushDW<GfxFamily>::getCommandSizeWithWa(waArgs);
62 return size;
63 }
64
65 } // namespace NEO