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