1 #ifndef _G_EVENT_BUFFER_NVOC_H_
2 #define _G_EVENT_BUFFER_NVOC_H_
3 #include "nvoc/runtime.h"
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 /*
10 * SPDX-FileCopyrightText: Copyright (c) 2016-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
11 * SPDX-License-Identifier: MIT
12 *
13 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the "Software"),
15 * to deal in the Software without restriction, including without limitation
16 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 * and/or sell copies of the Software, and to permit persons to whom the
18 * Software is furnished to do so, subject to the following conditions:
19 *
20 * The above copyright notice and this permission notice shall be included in
21 * all copies or substantial portions of the Software.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 * DEALINGS IN THE SOFTWARE.
30 */
31 #include "g_event_buffer_nvoc.h"
32
33 #ifndef _EVENT_BUFFER_H_
34 #define _EVENT_BUFFER_H_
35
36 #include "resserv/resserv.h"
37 #include "nvoc/prelude.h"
38 #include "rmapi/event.h"
39 #include "rmapi/resource.h"
40 #include "ctrl/ctrl90cd.h"
41 #include "eventbufferproducer.h"
42
43 struct Memory;
44
45 #ifndef __NVOC_CLASS_Memory_TYPEDEF__
46 #define __NVOC_CLASS_Memory_TYPEDEF__
47 typedef struct Memory Memory;
48 #endif /* __NVOC_CLASS_Memory_TYPEDEF__ */
49
50 #ifndef __nvoc_class_id_Memory
51 #define __nvoc_class_id_Memory 0x4789f2
52 #endif /* __nvoc_class_id_Memory */
53
54
55
56 typedef struct
57 {
58 //
59 // Addr: user RO address
60 // Priv: return cookie to be passed to unmap
61 //
62 NvP64 headerAddr;
63 NvP64 headerPriv;
64 NvP64 recordBuffAddr;
65 NvP64 recordBuffPriv;
66 NvP64 vardataBuffAddr;
67 NvP64 vardataBuffPriv;
68 } EVENT_BUFFER_MAP_INFO;
69
70 // This class shares buffers between kernel and usermode
71
72 // Private field names are wrapped in PRIVATE_FIELD, which does nothing for
73 // the matching C source file, but causes diagnostics to be issued if another
74 // source file references the field.
75 #ifdef NVOC_EVENT_BUFFER_H_PRIVATE_ACCESS_ALLOWED
76 #define PRIVATE_FIELD(x) x
77 #else
78 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
79 #endif
80
81 struct EventBuffer {
82 const struct NVOC_RTTI *__nvoc_rtti;
83 struct RmResource __nvoc_base_RmResource;
84 struct Object *__nvoc_pbase_Object;
85 struct RsResource *__nvoc_pbase_RsResource;
86 struct RmResourceCommon *__nvoc_pbase_RmResourceCommon;
87 struct RmResource *__nvoc_pbase_RmResource;
88 struct EventBuffer *__nvoc_pbase_EventBuffer;
89 NV_STATUS (*__eventbuffertBufferCtrlCmdEnableEvent__)(struct EventBuffer *, NV_EVENT_BUFFER_CTRL_CMD_ENABLE_EVENTS_PARAMS *);
90 NV_STATUS (*__eventbuffertBufferCtrlCmdUpdateGet__)(struct EventBuffer *, NV_EVENT_BUFFER_CTRL_CMD_UPDATE_GET_PARAMS *);
91 NV_STATUS (*__eventbuffertBufferCtrlCmdFlush__)(struct EventBuffer *);
92 NV_STATUS (*__eventbuffertBufferCtrlCmdPostTelemetryEvent__)(struct EventBuffer *, NV_EVENT_BUFFER_CTRL_CMD_POST_TELEMETRY_EVENT_PARAMS *);
93 NvBool (*__eventbufferShareCallback__)(struct EventBuffer *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *);
94 NV_STATUS (*__eventbufferCheckMemInterUnmap__)(struct EventBuffer *, NvBool);
95 NV_STATUS (*__eventbufferControl__)(struct EventBuffer *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
96 NV_STATUS (*__eventbufferGetMemInterMapParams__)(struct EventBuffer *, RMRES_MEM_INTER_MAP_PARAMS *);
97 NV_STATUS (*__eventbufferGetMemoryMappingDescriptor__)(struct EventBuffer *, struct MEMORY_DESCRIPTOR **);
98 NvU32 (*__eventbufferGetRefCount__)(struct EventBuffer *);
99 NV_STATUS (*__eventbufferControlFilter__)(struct EventBuffer *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
100 void (*__eventbufferAddAdditionalDependants__)(struct RsClient *, struct EventBuffer *, RsResourceRef *);
101 NV_STATUS (*__eventbufferControlSerialization_Prologue__)(struct EventBuffer *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
102 NV_STATUS (*__eventbufferControl_Prologue__)(struct EventBuffer *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
103 NvBool (*__eventbufferCanCopy__)(struct EventBuffer *);
104 NV_STATUS (*__eventbufferUnmap__)(struct EventBuffer *, struct CALL_CONTEXT *, RsCpuMapping *);
105 NvBool (*__eventbufferIsPartialUnmapSupported__)(struct EventBuffer *);
106 void (*__eventbufferPreDestruct__)(struct EventBuffer *);
107 NV_STATUS (*__eventbufferMapTo__)(struct EventBuffer *, RS_RES_MAP_TO_PARAMS *);
108 NV_STATUS (*__eventbufferIsDuplicate__)(struct EventBuffer *, NvHandle, NvBool *);
109 void (*__eventbufferControlSerialization_Epilogue__)(struct EventBuffer *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
110 void (*__eventbufferControl_Epilogue__)(struct EventBuffer *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
111 NV_STATUS (*__eventbufferUnmapFrom__)(struct EventBuffer *, RS_RES_UNMAP_FROM_PARAMS *);
112 NV_STATUS (*__eventbufferMap__)(struct EventBuffer *, struct CALL_CONTEXT *, RS_CPU_MAP_PARAMS *, RsCpuMapping *);
113 NvBool (*__eventbufferAccessCallback__)(struct EventBuffer *, struct RsClient *, void *, RsAccessRight);
114 struct MEMORY_DESCRIPTOR *pHeaderDesc;
115 struct MEMORY_DESCRIPTOR *pRecordBufDesc;
116 struct MEMORY_DESCRIPTOR *pVardataBufDesc;
117 NvHandle hSubDevice;
118 NvU32 subDeviceInst;
119 EVENT_BUFFER_MAP_INFO kernelMapInfo;
120 EVENT_BUFFER_MAP_INFO clientMapInfo;
121 NvHandle hClient;
122 NvU16 seqNo;
123 NvBool bNotifyPending;
124 PEVENTNOTIFICATION pListeners;
125 EVENT_BUFFER_PRODUCER_INFO producerInfo;
126 struct Memory *pHeader;
127 struct Memory *pRecord;
128 struct Memory *pVardata;
129 NvHandle hInternalClient;
130 NvHandle hInternalDevice;
131 NvHandle hInternalSubdevice;
132 NvHandle hInternalHeader;
133 NvHandle hInternalBuffer;
134 };
135
136 #ifndef __NVOC_CLASS_EventBuffer_TYPEDEF__
137 #define __NVOC_CLASS_EventBuffer_TYPEDEF__
138 typedef struct EventBuffer EventBuffer;
139 #endif /* __NVOC_CLASS_EventBuffer_TYPEDEF__ */
140
141 #ifndef __nvoc_class_id_EventBuffer
142 #define __nvoc_class_id_EventBuffer 0x63502b
143 #endif /* __nvoc_class_id_EventBuffer */
144
145 extern const struct NVOC_CLASS_DEF __nvoc_class_def_EventBuffer;
146
147 #define __staticCast_EventBuffer(pThis) \
148 ((pThis)->__nvoc_pbase_EventBuffer)
149
150 #ifdef __nvoc_event_buffer_h_disabled
151 #define __dynamicCast_EventBuffer(pThis) ((EventBuffer*)NULL)
152 #else //__nvoc_event_buffer_h_disabled
153 #define __dynamicCast_EventBuffer(pThis) \
154 ((EventBuffer*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(EventBuffer)))
155 #endif //__nvoc_event_buffer_h_disabled
156
157
158 NV_STATUS __nvoc_objCreateDynamic_EventBuffer(EventBuffer**, Dynamic*, NvU32, va_list);
159
160 NV_STATUS __nvoc_objCreate_EventBuffer(EventBuffer**, Dynamic*, NvU32, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams);
161 #define __objCreate_EventBuffer(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \
162 __nvoc_objCreate_EventBuffer((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams)
163
164 #define eventbuffertBufferCtrlCmdEnableEvent(pEventBuffer, pEnableParams) eventbuffertBufferCtrlCmdEnableEvent_DISPATCH(pEventBuffer, pEnableParams)
165 #define eventbuffertBufferCtrlCmdUpdateGet(pEventBuffer, pUpdateParams) eventbuffertBufferCtrlCmdUpdateGet_DISPATCH(pEventBuffer, pUpdateParams)
166 #define eventbuffertBufferCtrlCmdFlush(pEventBuffer) eventbuffertBufferCtrlCmdFlush_DISPATCH(pEventBuffer)
167 #define eventbuffertBufferCtrlCmdPostTelemetryEvent(pEventBuffer, pPostTelemetryEvent) eventbuffertBufferCtrlCmdPostTelemetryEvent_DISPATCH(pEventBuffer, pPostTelemetryEvent)
168 #define eventbufferShareCallback(pResource, pInvokingClient, pParentRef, pSharePolicy) eventbufferShareCallback_DISPATCH(pResource, pInvokingClient, pParentRef, pSharePolicy)
169 #define eventbufferCheckMemInterUnmap(pRmResource, bSubdeviceHandleProvided) eventbufferCheckMemInterUnmap_DISPATCH(pRmResource, bSubdeviceHandleProvided)
170 #define eventbufferControl(pResource, pCallContext, pParams) eventbufferControl_DISPATCH(pResource, pCallContext, pParams)
171 #define eventbufferGetMemInterMapParams(pRmResource, pParams) eventbufferGetMemInterMapParams_DISPATCH(pRmResource, pParams)
172 #define eventbufferGetMemoryMappingDescriptor(pRmResource, ppMemDesc) eventbufferGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc)
173 #define eventbufferGetRefCount(pResource) eventbufferGetRefCount_DISPATCH(pResource)
174 #define eventbufferControlFilter(pResource, pCallContext, pParams) eventbufferControlFilter_DISPATCH(pResource, pCallContext, pParams)
175 #define eventbufferAddAdditionalDependants(pClient, pResource, pReference) eventbufferAddAdditionalDependants_DISPATCH(pClient, pResource, pReference)
176 #define eventbufferControlSerialization_Prologue(pResource, pCallContext, pParams) eventbufferControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams)
177 #define eventbufferControl_Prologue(pResource, pCallContext, pParams) eventbufferControl_Prologue_DISPATCH(pResource, pCallContext, pParams)
178 #define eventbufferCanCopy(pResource) eventbufferCanCopy_DISPATCH(pResource)
179 #define eventbufferUnmap(pResource, pCallContext, pCpuMapping) eventbufferUnmap_DISPATCH(pResource, pCallContext, pCpuMapping)
180 #define eventbufferIsPartialUnmapSupported(pResource) eventbufferIsPartialUnmapSupported_DISPATCH(pResource)
181 #define eventbufferPreDestruct(pResource) eventbufferPreDestruct_DISPATCH(pResource)
182 #define eventbufferMapTo(pResource, pParams) eventbufferMapTo_DISPATCH(pResource, pParams)
183 #define eventbufferIsDuplicate(pResource, hMemory, pDuplicate) eventbufferIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate)
184 #define eventbufferControlSerialization_Epilogue(pResource, pCallContext, pParams) eventbufferControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams)
185 #define eventbufferControl_Epilogue(pResource, pCallContext, pParams) eventbufferControl_Epilogue_DISPATCH(pResource, pCallContext, pParams)
186 #define eventbufferUnmapFrom(pResource, pParams) eventbufferUnmapFrom_DISPATCH(pResource, pParams)
187 #define eventbufferMap(pResource, pCallContext, pParams, pCpuMapping) eventbufferMap_DISPATCH(pResource, pCallContext, pParams, pCpuMapping)
188 #define eventbufferAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) eventbufferAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight)
189 NV_STATUS eventbuffertBufferCtrlCmdEnableEvent_IMPL(struct EventBuffer *pEventBuffer, NV_EVENT_BUFFER_CTRL_CMD_ENABLE_EVENTS_PARAMS *pEnableParams);
190
eventbuffertBufferCtrlCmdEnableEvent_DISPATCH(struct EventBuffer * pEventBuffer,NV_EVENT_BUFFER_CTRL_CMD_ENABLE_EVENTS_PARAMS * pEnableParams)191 static inline NV_STATUS eventbuffertBufferCtrlCmdEnableEvent_DISPATCH(struct EventBuffer *pEventBuffer, NV_EVENT_BUFFER_CTRL_CMD_ENABLE_EVENTS_PARAMS *pEnableParams) {
192 return pEventBuffer->__eventbuffertBufferCtrlCmdEnableEvent__(pEventBuffer, pEnableParams);
193 }
194
195 NV_STATUS eventbuffertBufferCtrlCmdUpdateGet_IMPL(struct EventBuffer *pEventBuffer, NV_EVENT_BUFFER_CTRL_CMD_UPDATE_GET_PARAMS *pUpdateParams);
196
eventbuffertBufferCtrlCmdUpdateGet_DISPATCH(struct EventBuffer * pEventBuffer,NV_EVENT_BUFFER_CTRL_CMD_UPDATE_GET_PARAMS * pUpdateParams)197 static inline NV_STATUS eventbuffertBufferCtrlCmdUpdateGet_DISPATCH(struct EventBuffer *pEventBuffer, NV_EVENT_BUFFER_CTRL_CMD_UPDATE_GET_PARAMS *pUpdateParams) {
198 return pEventBuffer->__eventbuffertBufferCtrlCmdUpdateGet__(pEventBuffer, pUpdateParams);
199 }
200
201 NV_STATUS eventbuffertBufferCtrlCmdFlush_IMPL(struct EventBuffer *pEventBuffer);
202
eventbuffertBufferCtrlCmdFlush_DISPATCH(struct EventBuffer * pEventBuffer)203 static inline NV_STATUS eventbuffertBufferCtrlCmdFlush_DISPATCH(struct EventBuffer *pEventBuffer) {
204 return pEventBuffer->__eventbuffertBufferCtrlCmdFlush__(pEventBuffer);
205 }
206
207 NV_STATUS eventbuffertBufferCtrlCmdPostTelemetryEvent_IMPL(struct EventBuffer *pEventBuffer, NV_EVENT_BUFFER_CTRL_CMD_POST_TELEMETRY_EVENT_PARAMS *pPostTelemetryEvent);
208
eventbuffertBufferCtrlCmdPostTelemetryEvent_DISPATCH(struct EventBuffer * pEventBuffer,NV_EVENT_BUFFER_CTRL_CMD_POST_TELEMETRY_EVENT_PARAMS * pPostTelemetryEvent)209 static inline NV_STATUS eventbuffertBufferCtrlCmdPostTelemetryEvent_DISPATCH(struct EventBuffer *pEventBuffer, NV_EVENT_BUFFER_CTRL_CMD_POST_TELEMETRY_EVENT_PARAMS *pPostTelemetryEvent) {
210 return pEventBuffer->__eventbuffertBufferCtrlCmdPostTelemetryEvent__(pEventBuffer, pPostTelemetryEvent);
211 }
212
eventbufferShareCallback_DISPATCH(struct EventBuffer * pResource,struct RsClient * pInvokingClient,struct RsResourceRef * pParentRef,RS_SHARE_POLICY * pSharePolicy)213 static inline NvBool eventbufferShareCallback_DISPATCH(struct EventBuffer *pResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) {
214 return pResource->__eventbufferShareCallback__(pResource, pInvokingClient, pParentRef, pSharePolicy);
215 }
216
eventbufferCheckMemInterUnmap_DISPATCH(struct EventBuffer * pRmResource,NvBool bSubdeviceHandleProvided)217 static inline NV_STATUS eventbufferCheckMemInterUnmap_DISPATCH(struct EventBuffer *pRmResource, NvBool bSubdeviceHandleProvided) {
218 return pRmResource->__eventbufferCheckMemInterUnmap__(pRmResource, bSubdeviceHandleProvided);
219 }
220
eventbufferControl_DISPATCH(struct EventBuffer * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)221 static inline NV_STATUS eventbufferControl_DISPATCH(struct EventBuffer *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
222 return pResource->__eventbufferControl__(pResource, pCallContext, pParams);
223 }
224
eventbufferGetMemInterMapParams_DISPATCH(struct EventBuffer * pRmResource,RMRES_MEM_INTER_MAP_PARAMS * pParams)225 static inline NV_STATUS eventbufferGetMemInterMapParams_DISPATCH(struct EventBuffer *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) {
226 return pRmResource->__eventbufferGetMemInterMapParams__(pRmResource, pParams);
227 }
228
eventbufferGetMemoryMappingDescriptor_DISPATCH(struct EventBuffer * pRmResource,struct MEMORY_DESCRIPTOR ** ppMemDesc)229 static inline NV_STATUS eventbufferGetMemoryMappingDescriptor_DISPATCH(struct EventBuffer *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) {
230 return pRmResource->__eventbufferGetMemoryMappingDescriptor__(pRmResource, ppMemDesc);
231 }
232
eventbufferGetRefCount_DISPATCH(struct EventBuffer * pResource)233 static inline NvU32 eventbufferGetRefCount_DISPATCH(struct EventBuffer *pResource) {
234 return pResource->__eventbufferGetRefCount__(pResource);
235 }
236
eventbufferControlFilter_DISPATCH(struct EventBuffer * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)237 static inline NV_STATUS eventbufferControlFilter_DISPATCH(struct EventBuffer *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
238 return pResource->__eventbufferControlFilter__(pResource, pCallContext, pParams);
239 }
240
eventbufferAddAdditionalDependants_DISPATCH(struct RsClient * pClient,struct EventBuffer * pResource,RsResourceRef * pReference)241 static inline void eventbufferAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct EventBuffer *pResource, RsResourceRef *pReference) {
242 pResource->__eventbufferAddAdditionalDependants__(pClient, pResource, pReference);
243 }
244
eventbufferControlSerialization_Prologue_DISPATCH(struct EventBuffer * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)245 static inline NV_STATUS eventbufferControlSerialization_Prologue_DISPATCH(struct EventBuffer *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
246 return pResource->__eventbufferControlSerialization_Prologue__(pResource, pCallContext, pParams);
247 }
248
eventbufferControl_Prologue_DISPATCH(struct EventBuffer * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)249 static inline NV_STATUS eventbufferControl_Prologue_DISPATCH(struct EventBuffer *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
250 return pResource->__eventbufferControl_Prologue__(pResource, pCallContext, pParams);
251 }
252
eventbufferCanCopy_DISPATCH(struct EventBuffer * pResource)253 static inline NvBool eventbufferCanCopy_DISPATCH(struct EventBuffer *pResource) {
254 return pResource->__eventbufferCanCopy__(pResource);
255 }
256
eventbufferUnmap_DISPATCH(struct EventBuffer * pResource,struct CALL_CONTEXT * pCallContext,RsCpuMapping * pCpuMapping)257 static inline NV_STATUS eventbufferUnmap_DISPATCH(struct EventBuffer *pResource, struct CALL_CONTEXT *pCallContext, RsCpuMapping *pCpuMapping) {
258 return pResource->__eventbufferUnmap__(pResource, pCallContext, pCpuMapping);
259 }
260
eventbufferIsPartialUnmapSupported_DISPATCH(struct EventBuffer * pResource)261 static inline NvBool eventbufferIsPartialUnmapSupported_DISPATCH(struct EventBuffer *pResource) {
262 return pResource->__eventbufferIsPartialUnmapSupported__(pResource);
263 }
264
eventbufferPreDestruct_DISPATCH(struct EventBuffer * pResource)265 static inline void eventbufferPreDestruct_DISPATCH(struct EventBuffer *pResource) {
266 pResource->__eventbufferPreDestruct__(pResource);
267 }
268
eventbufferMapTo_DISPATCH(struct EventBuffer * pResource,RS_RES_MAP_TO_PARAMS * pParams)269 static inline NV_STATUS eventbufferMapTo_DISPATCH(struct EventBuffer *pResource, RS_RES_MAP_TO_PARAMS *pParams) {
270 return pResource->__eventbufferMapTo__(pResource, pParams);
271 }
272
eventbufferIsDuplicate_DISPATCH(struct EventBuffer * pResource,NvHandle hMemory,NvBool * pDuplicate)273 static inline NV_STATUS eventbufferIsDuplicate_DISPATCH(struct EventBuffer *pResource, NvHandle hMemory, NvBool *pDuplicate) {
274 return pResource->__eventbufferIsDuplicate__(pResource, hMemory, pDuplicate);
275 }
276
eventbufferControlSerialization_Epilogue_DISPATCH(struct EventBuffer * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)277 static inline void eventbufferControlSerialization_Epilogue_DISPATCH(struct EventBuffer *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
278 pResource->__eventbufferControlSerialization_Epilogue__(pResource, pCallContext, pParams);
279 }
280
eventbufferControl_Epilogue_DISPATCH(struct EventBuffer * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)281 static inline void eventbufferControl_Epilogue_DISPATCH(struct EventBuffer *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
282 pResource->__eventbufferControl_Epilogue__(pResource, pCallContext, pParams);
283 }
284
eventbufferUnmapFrom_DISPATCH(struct EventBuffer * pResource,RS_RES_UNMAP_FROM_PARAMS * pParams)285 static inline NV_STATUS eventbufferUnmapFrom_DISPATCH(struct EventBuffer *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) {
286 return pResource->__eventbufferUnmapFrom__(pResource, pParams);
287 }
288
eventbufferMap_DISPATCH(struct EventBuffer * pResource,struct CALL_CONTEXT * pCallContext,RS_CPU_MAP_PARAMS * pParams,RsCpuMapping * pCpuMapping)289 static inline NV_STATUS eventbufferMap_DISPATCH(struct EventBuffer *pResource, struct CALL_CONTEXT *pCallContext, RS_CPU_MAP_PARAMS *pParams, RsCpuMapping *pCpuMapping) {
290 return pResource->__eventbufferMap__(pResource, pCallContext, pParams, pCpuMapping);
291 }
292
eventbufferAccessCallback_DISPATCH(struct EventBuffer * pResource,struct RsClient * pInvokingClient,void * pAllocParams,RsAccessRight accessRight)293 static inline NvBool eventbufferAccessCallback_DISPATCH(struct EventBuffer *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) {
294 return pResource->__eventbufferAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight);
295 }
296
297 NV_STATUS eventbufferConstruct_IMPL(struct EventBuffer *arg_pEventBuffer, struct CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams);
298
299 #define __nvoc_eventbufferConstruct(arg_pEventBuffer, arg_pCallContext, arg_pParams) eventbufferConstruct_IMPL(arg_pEventBuffer, arg_pCallContext, arg_pParams)
300 void eventbufferDestruct_IMPL(struct EventBuffer *pEventBuffer);
301
302 #define __nvoc_eventbufferDestruct(pEventBuffer) eventbufferDestruct_IMPL(pEventBuffer)
303 #undef PRIVATE_FIELD
304
305
306 NV_STATUS eventBufferAdd(struct EventBuffer *pEventBuffer, void* pEventData, NvU32 recordType, NvBool* bNotify, NvP64 *pHandle);
307
308 #endif
309
310 #ifdef __cplusplus
311 } // extern "C"
312 #endif
313
314 #endif // _G_EVENT_BUFFER_NVOC_H_
315