1 #ifndef _G_KERNEL_OFA_CTX_NVOC_H_
2 #define _G_KERNEL_OFA_CTX_NVOC_H_
3 #include "nvoc/runtime.h"
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 /*
10  * SPDX-FileCopyrightText: Copyright (c) 2018-2023 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 
32 #include "g_kernel_ofa_ctx_nvoc.h"
33 
34 #ifndef KERNEL_OFA_CTX_H
35 #define KERNEL_OFA_CTX_H
36 
37 #include "kernel/gpu/fifo/channel_descendant.h"
38 
39 ENGDESCRIPTOR ofaGetEngineDescFromAllocParams(OBJGPU *pGpu, NvU32 externalClassId, void *pAllocParams);
40 
41 /*!
42  * RM internal class representing NVXXXX_VIDEO_OFA
43  */
44 #ifdef NVOC_KERNEL_OFA_CTX_H_PRIVATE_ACCESS_ALLOWED
45 #define PRIVATE_FIELD(x) x
46 #else
47 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
48 #endif
49 struct OfaContext {
50     const struct NVOC_RTTI *__nvoc_rtti;
51     struct ChannelDescendant __nvoc_base_ChannelDescendant;
52     struct Object *__nvoc_pbase_Object;
53     struct RsResource *__nvoc_pbase_RsResource;
54     struct RmResourceCommon *__nvoc_pbase_RmResourceCommon;
55     struct RmResource *__nvoc_pbase_RmResource;
56     struct GpuResource *__nvoc_pbase_GpuResource;
57     struct INotifier *__nvoc_pbase_INotifier;
58     struct Notifier *__nvoc_pbase_Notifier;
59     struct ChannelDescendant *__nvoc_pbase_ChannelDescendant;
60     struct OfaContext *__nvoc_pbase_OfaContext;
61     NV_STATUS (*__ofactxCheckMemInterUnmap__)(struct OfaContext *, NvBool);
62     NvBool (*__ofactxShareCallback__)(struct OfaContext *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *);
63     NvBool (*__ofactxAccessCallback__)(struct OfaContext *, struct RsClient *, void *, RsAccessRight);
64     NV_STATUS (*__ofactxMapTo__)(struct OfaContext *, RS_RES_MAP_TO_PARAMS *);
65     NV_STATUS (*__ofactxGetMapAddrSpace__)(struct OfaContext *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *);
66     void (*__ofactxSetNotificationShare__)(struct OfaContext *, struct NotifShare *);
67     NvU32 (*__ofactxGetRefCount__)(struct OfaContext *);
68     void (*__ofactxAddAdditionalDependants__)(struct RsClient *, struct OfaContext *, RsResourceRef *);
69     NV_STATUS (*__ofactxControl_Prologue__)(struct OfaContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
70     NV_STATUS (*__ofactxGetRegBaseOffsetAndSize__)(struct OfaContext *, struct OBJGPU *, NvU32 *, NvU32 *);
71     NV_STATUS (*__ofactxInternalControlForward__)(struct OfaContext *, NvU32, void *, NvU32);
72     NV_STATUS (*__ofactxUnmapFrom__)(struct OfaContext *, RS_RES_UNMAP_FROM_PARAMS *);
73     void (*__ofactxControl_Epilogue__)(struct OfaContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
74     NV_STATUS (*__ofactxControlLookup__)(struct OfaContext *, struct RS_RES_CONTROL_PARAMS_INTERNAL *, const struct NVOC_EXPORTED_METHOD_DEF **);
75     NV_STATUS (*__ofactxGetSwMethods__)(struct OfaContext *, const METHOD **, NvU32 *);
76     NvHandle (*__ofactxGetInternalObjectHandle__)(struct OfaContext *);
77     NV_STATUS (*__ofactxControl__)(struct OfaContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
78     NV_STATUS (*__ofactxUnmap__)(struct OfaContext *, struct CALL_CONTEXT *, struct RsCpuMapping *);
79     NV_STATUS (*__ofactxGetMemInterMapParams__)(struct OfaContext *, RMRES_MEM_INTER_MAP_PARAMS *);
80     NV_STATUS (*__ofactxGetMemoryMappingDescriptor__)(struct OfaContext *, struct MEMORY_DESCRIPTOR **);
81     NvBool (*__ofactxIsSwMethodStalling__)(struct OfaContext *, NvU32);
82     NV_STATUS (*__ofactxControlFilter__)(struct OfaContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
83     NV_STATUS (*__ofactxUnregisterEvent__)(struct OfaContext *, NvHandle, NvHandle, NvHandle, NvHandle);
84     NV_STATUS (*__ofactxControlSerialization_Prologue__)(struct OfaContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
85     NvBool (*__ofactxCanCopy__)(struct OfaContext *);
86     void (*__ofactxPreDestruct__)(struct OfaContext *);
87     NV_STATUS (*__ofactxIsDuplicate__)(struct OfaContext *, NvHandle, NvBool *);
88     void (*__ofactxControlSerialization_Epilogue__)(struct OfaContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
89     PEVENTNOTIFICATION *(*__ofactxGetNotificationListPtr__)(struct OfaContext *);
90     struct NotifShare *(*__ofactxGetNotificationShare__)(struct OfaContext *);
91     NV_STATUS (*__ofactxMap__)(struct OfaContext *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *);
92     NV_STATUS (*__ofactxGetOrAllocNotifShare__)(struct OfaContext *, NvHandle, NvHandle, struct NotifShare **);
93 };
94 
95 #ifndef __NVOC_CLASS_OfaContext_TYPEDEF__
96 #define __NVOC_CLASS_OfaContext_TYPEDEF__
97 typedef struct OfaContext OfaContext;
98 #endif /* __NVOC_CLASS_OfaContext_TYPEDEF__ */
99 
100 #ifndef __nvoc_class_id_OfaContext
101 #define __nvoc_class_id_OfaContext 0xf63d99
102 #endif /* __nvoc_class_id_OfaContext */
103 
104 extern const struct NVOC_CLASS_DEF __nvoc_class_def_OfaContext;
105 
106 #define __staticCast_OfaContext(pThis) \
107     ((pThis)->__nvoc_pbase_OfaContext)
108 
109 #ifdef __nvoc_kernel_ofa_ctx_h_disabled
110 #define __dynamicCast_OfaContext(pThis) ((OfaContext*)NULL)
111 #else //__nvoc_kernel_ofa_ctx_h_disabled
112 #define __dynamicCast_OfaContext(pThis) \
113     ((OfaContext*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(OfaContext)))
114 #endif //__nvoc_kernel_ofa_ctx_h_disabled
115 
116 
117 NV_STATUS __nvoc_objCreateDynamic_OfaContext(OfaContext**, Dynamic*, NvU32, va_list);
118 
119 NV_STATUS __nvoc_objCreate_OfaContext(OfaContext**, Dynamic*, NvU32, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams);
120 #define __objCreate_OfaContext(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \
121     __nvoc_objCreate_OfaContext((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams)
122 
123 #define ofactxCheckMemInterUnmap(pChannelDescendant, bSubdeviceHandleProvided) ofactxCheckMemInterUnmap_DISPATCH(pChannelDescendant, bSubdeviceHandleProvided)
124 #define ofactxShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) ofactxShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy)
125 #define ofactxAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) ofactxAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight)
126 #define ofactxMapTo(pResource, pParams) ofactxMapTo_DISPATCH(pResource, pParams)
127 #define ofactxGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) ofactxGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace)
128 #define ofactxSetNotificationShare(pNotifier, pNotifShare) ofactxSetNotificationShare_DISPATCH(pNotifier, pNotifShare)
129 #define ofactxGetRefCount(pResource) ofactxGetRefCount_DISPATCH(pResource)
130 #define ofactxAddAdditionalDependants(pClient, pResource, pReference) ofactxAddAdditionalDependants_DISPATCH(pClient, pResource, pReference)
131 #define ofactxControl_Prologue(pResource, pCallContext, pParams) ofactxControl_Prologue_DISPATCH(pResource, pCallContext, pParams)
132 #define ofactxGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) ofactxGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize)
133 #define ofactxInternalControlForward(pGpuResource, command, pParams, size) ofactxInternalControlForward_DISPATCH(pGpuResource, command, pParams, size)
134 #define ofactxUnmapFrom(pResource, pParams) ofactxUnmapFrom_DISPATCH(pResource, pParams)
135 #define ofactxControl_Epilogue(pResource, pCallContext, pParams) ofactxControl_Epilogue_DISPATCH(pResource, pCallContext, pParams)
136 #define ofactxControlLookup(pResource, pParams, ppEntry) ofactxControlLookup_DISPATCH(pResource, pParams, ppEntry)
137 #define ofactxGetSwMethods(pChannelDescendant, ppMethods, pNumMethods) ofactxGetSwMethods_DISPATCH(pChannelDescendant, ppMethods, pNumMethods)
138 #define ofactxGetInternalObjectHandle(pGpuResource) ofactxGetInternalObjectHandle_DISPATCH(pGpuResource)
139 #define ofactxControl(pGpuResource, pCallContext, pParams) ofactxControl_DISPATCH(pGpuResource, pCallContext, pParams)
140 #define ofactxUnmap(pGpuResource, pCallContext, pCpuMapping) ofactxUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping)
141 #define ofactxGetMemInterMapParams(pRmResource, pParams) ofactxGetMemInterMapParams_DISPATCH(pRmResource, pParams)
142 #define ofactxGetMemoryMappingDescriptor(pRmResource, ppMemDesc) ofactxGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc)
143 #define ofactxIsSwMethodStalling(pChannelDescendant, hHandle) ofactxIsSwMethodStalling_DISPATCH(pChannelDescendant, hHandle)
144 #define ofactxControlFilter(pResource, pCallContext, pParams) ofactxControlFilter_DISPATCH(pResource, pCallContext, pParams)
145 #define ofactxUnregisterEvent(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) ofactxUnregisterEvent_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent)
146 #define ofactxControlSerialization_Prologue(pResource, pCallContext, pParams) ofactxControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams)
147 #define ofactxCanCopy(pResource) ofactxCanCopy_DISPATCH(pResource)
148 #define ofactxPreDestruct(pResource) ofactxPreDestruct_DISPATCH(pResource)
149 #define ofactxIsDuplicate(pResource, hMemory, pDuplicate) ofactxIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate)
150 #define ofactxControlSerialization_Epilogue(pResource, pCallContext, pParams) ofactxControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams)
151 #define ofactxGetNotificationListPtr(pNotifier) ofactxGetNotificationListPtr_DISPATCH(pNotifier)
152 #define ofactxGetNotificationShare(pNotifier) ofactxGetNotificationShare_DISPATCH(pNotifier)
153 #define ofactxMap(pGpuResource, pCallContext, pParams, pCpuMapping) ofactxMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping)
154 #define ofactxGetOrAllocNotifShare(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) ofactxGetOrAllocNotifShare_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare)
155 NV_STATUS ofactxConstructHal_KERNEL(struct OfaContext *pOfaContext, struct CALL_CONTEXT *pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *pParams);
156 
157 
158 #ifdef __nvoc_kernel_ofa_ctx_h_disabled
159 static inline NV_STATUS ofactxConstructHal(struct OfaContext *pOfaContext, struct CALL_CONTEXT *pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *pParams) {
160     NV_ASSERT_FAILED_PRECOMP("OfaContext was disabled!");
161     return NV_ERR_NOT_SUPPORTED;
162 }
163 #else //__nvoc_kernel_ofa_ctx_h_disabled
164 #define ofactxConstructHal(pOfaContext, pCallContext, pParams) ofactxConstructHal_KERNEL(pOfaContext, pCallContext, pParams)
165 #endif //__nvoc_kernel_ofa_ctx_h_disabled
166 
167 #define ofactxConstructHal_HAL(pOfaContext, pCallContext, pParams) ofactxConstructHal(pOfaContext, pCallContext, pParams)
168 
169 void ofactxDestructHal_KERNEL(struct OfaContext *pOfaContext);
170 
171 
172 #ifdef __nvoc_kernel_ofa_ctx_h_disabled
173 static inline void ofactxDestructHal(struct OfaContext *pOfaContext) {
174     NV_ASSERT_FAILED_PRECOMP("OfaContext was disabled!");
175 }
176 #else //__nvoc_kernel_ofa_ctx_h_disabled
177 #define ofactxDestructHal(pOfaContext) ofactxDestructHal_KERNEL(pOfaContext)
178 #endif //__nvoc_kernel_ofa_ctx_h_disabled
179 
180 #define ofactxDestructHal_HAL(pOfaContext) ofactxDestructHal(pOfaContext)
181 
182 static inline NV_STATUS ofactxCheckMemInterUnmap_DISPATCH(struct OfaContext *pChannelDescendant, NvBool bSubdeviceHandleProvided) {
183     return pChannelDescendant->__ofactxCheckMemInterUnmap__(pChannelDescendant, bSubdeviceHandleProvided);
184 }
185 
186 static inline NvBool ofactxShareCallback_DISPATCH(struct OfaContext *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) {
187     return pGpuResource->__ofactxShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy);
188 }
189 
190 static inline NvBool ofactxAccessCallback_DISPATCH(struct OfaContext *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) {
191     return pResource->__ofactxAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight);
192 }
193 
194 static inline NV_STATUS ofactxMapTo_DISPATCH(struct OfaContext *pResource, RS_RES_MAP_TO_PARAMS *pParams) {
195     return pResource->__ofactxMapTo__(pResource, pParams);
196 }
197 
198 static inline NV_STATUS ofactxGetMapAddrSpace_DISPATCH(struct OfaContext *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) {
199     return pGpuResource->__ofactxGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace);
200 }
201 
202 static inline void ofactxSetNotificationShare_DISPATCH(struct OfaContext *pNotifier, struct NotifShare *pNotifShare) {
203     pNotifier->__ofactxSetNotificationShare__(pNotifier, pNotifShare);
204 }
205 
206 static inline NvU32 ofactxGetRefCount_DISPATCH(struct OfaContext *pResource) {
207     return pResource->__ofactxGetRefCount__(pResource);
208 }
209 
210 static inline void ofactxAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct OfaContext *pResource, RsResourceRef *pReference) {
211     pResource->__ofactxAddAdditionalDependants__(pClient, pResource, pReference);
212 }
213 
214 static inline NV_STATUS ofactxControl_Prologue_DISPATCH(struct OfaContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
215     return pResource->__ofactxControl_Prologue__(pResource, pCallContext, pParams);
216 }
217 
218 static inline NV_STATUS ofactxGetRegBaseOffsetAndSize_DISPATCH(struct OfaContext *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) {
219     return pGpuResource->__ofactxGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize);
220 }
221 
222 static inline NV_STATUS ofactxInternalControlForward_DISPATCH(struct OfaContext *pGpuResource, NvU32 command, void *pParams, NvU32 size) {
223     return pGpuResource->__ofactxInternalControlForward__(pGpuResource, command, pParams, size);
224 }
225 
226 static inline NV_STATUS ofactxUnmapFrom_DISPATCH(struct OfaContext *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) {
227     return pResource->__ofactxUnmapFrom__(pResource, pParams);
228 }
229 
230 static inline void ofactxControl_Epilogue_DISPATCH(struct OfaContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
231     pResource->__ofactxControl_Epilogue__(pResource, pCallContext, pParams);
232 }
233 
234 static inline NV_STATUS ofactxControlLookup_DISPATCH(struct OfaContext *pResource, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams, const struct NVOC_EXPORTED_METHOD_DEF **ppEntry) {
235     return pResource->__ofactxControlLookup__(pResource, pParams, ppEntry);
236 }
237 
238 static inline NV_STATUS ofactxGetSwMethods_DISPATCH(struct OfaContext *pChannelDescendant, const METHOD **ppMethods, NvU32 *pNumMethods) {
239     return pChannelDescendant->__ofactxGetSwMethods__(pChannelDescendant, ppMethods, pNumMethods);
240 }
241 
242 static inline NvHandle ofactxGetInternalObjectHandle_DISPATCH(struct OfaContext *pGpuResource) {
243     return pGpuResource->__ofactxGetInternalObjectHandle__(pGpuResource);
244 }
245 
246 static inline NV_STATUS ofactxControl_DISPATCH(struct OfaContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
247     return pGpuResource->__ofactxControl__(pGpuResource, pCallContext, pParams);
248 }
249 
250 static inline NV_STATUS ofactxUnmap_DISPATCH(struct OfaContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) {
251     return pGpuResource->__ofactxUnmap__(pGpuResource, pCallContext, pCpuMapping);
252 }
253 
254 static inline NV_STATUS ofactxGetMemInterMapParams_DISPATCH(struct OfaContext *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) {
255     return pRmResource->__ofactxGetMemInterMapParams__(pRmResource, pParams);
256 }
257 
258 static inline NV_STATUS ofactxGetMemoryMappingDescriptor_DISPATCH(struct OfaContext *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) {
259     return pRmResource->__ofactxGetMemoryMappingDescriptor__(pRmResource, ppMemDesc);
260 }
261 
262 static inline NvBool ofactxIsSwMethodStalling_DISPATCH(struct OfaContext *pChannelDescendant, NvU32 hHandle) {
263     return pChannelDescendant->__ofactxIsSwMethodStalling__(pChannelDescendant, hHandle);
264 }
265 
266 static inline NV_STATUS ofactxControlFilter_DISPATCH(struct OfaContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
267     return pResource->__ofactxControlFilter__(pResource, pCallContext, pParams);
268 }
269 
270 static inline NV_STATUS ofactxUnregisterEvent_DISPATCH(struct OfaContext *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) {
271     return pNotifier->__ofactxUnregisterEvent__(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent);
272 }
273 
274 static inline NV_STATUS ofactxControlSerialization_Prologue_DISPATCH(struct OfaContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
275     return pResource->__ofactxControlSerialization_Prologue__(pResource, pCallContext, pParams);
276 }
277 
278 static inline NvBool ofactxCanCopy_DISPATCH(struct OfaContext *pResource) {
279     return pResource->__ofactxCanCopy__(pResource);
280 }
281 
282 static inline void ofactxPreDestruct_DISPATCH(struct OfaContext *pResource) {
283     pResource->__ofactxPreDestruct__(pResource);
284 }
285 
286 static inline NV_STATUS ofactxIsDuplicate_DISPATCH(struct OfaContext *pResource, NvHandle hMemory, NvBool *pDuplicate) {
287     return pResource->__ofactxIsDuplicate__(pResource, hMemory, pDuplicate);
288 }
289 
290 static inline void ofactxControlSerialization_Epilogue_DISPATCH(struct OfaContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
291     pResource->__ofactxControlSerialization_Epilogue__(pResource, pCallContext, pParams);
292 }
293 
294 static inline PEVENTNOTIFICATION *ofactxGetNotificationListPtr_DISPATCH(struct OfaContext *pNotifier) {
295     return pNotifier->__ofactxGetNotificationListPtr__(pNotifier);
296 }
297 
298 static inline struct NotifShare *ofactxGetNotificationShare_DISPATCH(struct OfaContext *pNotifier) {
299     return pNotifier->__ofactxGetNotificationShare__(pNotifier);
300 }
301 
302 static inline NV_STATUS ofactxMap_DISPATCH(struct OfaContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) {
303     return pGpuResource->__ofactxMap__(pGpuResource, pCallContext, pParams, pCpuMapping);
304 }
305 
306 static inline NV_STATUS ofactxGetOrAllocNotifShare_DISPATCH(struct OfaContext *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) {
307     return pNotifier->__ofactxGetOrAllocNotifShare__(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare);
308 }
309 
310 static inline NV_STATUS __nvoc_ofactxConstruct(struct OfaContext *arg_pOfaContext, struct CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams) {
311     return ofactxConstructHal(arg_pOfaContext, arg_pCallContext, arg_pParams);
312 }
313 
314 static inline void __nvoc_ofactxDestruct(struct OfaContext *pOfaContext) {
315     ofactxDestructHal(pOfaContext);
316 }
317 
318 #undef PRIVATE_FIELD
319 
320 
321 #endif // KERNEL_OFA_CTX_H
322 
323 #ifdef __cplusplus
324 } // extern "C"
325 #endif
326 
327 #endif // _G_KERNEL_OFA_CTX_NVOC_H_
328