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