1 #ifndef _G_DEFERRED_API_NVOC_H_ 2 #define _G_DEFERRED_API_NVOC_H_ 3 #include "nvoc/runtime.h" 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 /* 10 * SPDX-FileCopyrightText: Copyright (c) 1993-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 #include "g_deferred_api_nvoc.h" 32 33 #ifndef DEFERRED_API_H 34 #define DEFERRED_API_H 1 35 36 #include "core/core.h" 37 #include "kernel/gpu/fifo/channel_descendant.h" 38 #include "rmapi/control.h" 39 #include "ctrl/ctrl5080.h" 40 #include "nvsecurityinfo.h" 41 42 #define DEFERRED_API_INFO_FLAGS_HAS_EXECUTED 0x00000001 43 #define DEFERRED_API_INFO_FLAGS_HAS_TLB_FLUSHED 0x00000002 44 #define DEFERRED_API_INFO_FLAGS_HAS_PRIVATE_DATA_ALLOC 0x00000004 45 46 typedef struct _def_deferred_api_info 47 { 48 NODE Node; 49 NvHandle Handle; 50 NvU32 Flags; // see DEFERRED_API_INFO_FLAGS_* defines 51 RS_PRIV_LEVEL privLevel; // privilege level of the client that initiated deferred call. 52 void * pDeferredApiInfo; 53 NvP64 pDeferredPrivateData; 54 } DEFERRED_API_INFO; 55 56 57 /*! 58 * RM internal class representing NV50_DEFERRED_API_CLASS 59 */ 60 #ifdef NVOC_DEFERRED_API_H_PRIVATE_ACCESS_ALLOWED 61 #define PRIVATE_FIELD(x) x 62 #else 63 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x) 64 #endif 65 struct DeferredApiObject { 66 const struct NVOC_RTTI *__nvoc_rtti; 67 struct ChannelDescendant __nvoc_base_ChannelDescendant; 68 struct Object *__nvoc_pbase_Object; 69 struct RsResource *__nvoc_pbase_RsResource; 70 struct RmResourceCommon *__nvoc_pbase_RmResourceCommon; 71 struct RmResource *__nvoc_pbase_RmResource; 72 struct GpuResource *__nvoc_pbase_GpuResource; 73 struct INotifier *__nvoc_pbase_INotifier; 74 struct Notifier *__nvoc_pbase_Notifier; 75 struct ChannelDescendant *__nvoc_pbase_ChannelDescendant; 76 struct DeferredApiObject *__nvoc_pbase_DeferredApiObject; 77 NV_STATUS (*__defapiGetSwMethods__)(struct DeferredApiObject *, const METHOD **, NvU32 *); 78 NvBool (*__defapiIsSwMethodStalling__)(struct DeferredApiObject *, NvU32); 79 NV_STATUS (*__defapiCtrlCmdDeferredApi__)(struct DeferredApiObject *, NV5080_CTRL_DEFERRED_API_PARAMS *); 80 NV_STATUS (*__defapiCtrlCmdDeferredApiV2__)(struct DeferredApiObject *, NV5080_CTRL_DEFERRED_API_V2_PARAMS *); 81 NV_STATUS (*__defapiCtrlCmdRemoveApi__)(struct DeferredApiObject *, NV5080_CTRL_REMOVE_API_PARAMS *); 82 NV_STATUS (*__defapiCheckMemInterUnmap__)(struct DeferredApiObject *, NvBool); 83 NvBool (*__defapiShareCallback__)(struct DeferredApiObject *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *); 84 NvBool (*__defapiAccessCallback__)(struct DeferredApiObject *, struct RsClient *, void *, RsAccessRight); 85 NV_STATUS (*__defapiMapTo__)(struct DeferredApiObject *, RS_RES_MAP_TO_PARAMS *); 86 NV_STATUS (*__defapiGetMapAddrSpace__)(struct DeferredApiObject *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *); 87 void (*__defapiSetNotificationShare__)(struct DeferredApiObject *, struct NotifShare *); 88 NvU32 (*__defapiGetRefCount__)(struct DeferredApiObject *); 89 void (*__defapiAddAdditionalDependants__)(struct RsClient *, struct DeferredApiObject *, RsResourceRef *); 90 NV_STATUS (*__defapiControl_Prologue__)(struct DeferredApiObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 91 NV_STATUS (*__defapiGetRegBaseOffsetAndSize__)(struct DeferredApiObject *, struct OBJGPU *, NvU32 *, NvU32 *); 92 NV_STATUS (*__defapiInternalControlForward__)(struct DeferredApiObject *, NvU32, void *, NvU32); 93 NV_STATUS (*__defapiUnmapFrom__)(struct DeferredApiObject *, RS_RES_UNMAP_FROM_PARAMS *); 94 void (*__defapiControl_Epilogue__)(struct DeferredApiObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 95 NV_STATUS (*__defapiControlLookup__)(struct DeferredApiObject *, struct RS_RES_CONTROL_PARAMS_INTERNAL *, const struct NVOC_EXPORTED_METHOD_DEF **); 96 NvHandle (*__defapiGetInternalObjectHandle__)(struct DeferredApiObject *); 97 NV_STATUS (*__defapiControl__)(struct DeferredApiObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 98 NV_STATUS (*__defapiUnmap__)(struct DeferredApiObject *, struct CALL_CONTEXT *, struct RsCpuMapping *); 99 NV_STATUS (*__defapiGetMemInterMapParams__)(struct DeferredApiObject *, RMRES_MEM_INTER_MAP_PARAMS *); 100 NV_STATUS (*__defapiGetMemoryMappingDescriptor__)(struct DeferredApiObject *, struct MEMORY_DESCRIPTOR **); 101 NV_STATUS (*__defapiControlFilter__)(struct DeferredApiObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 102 NV_STATUS (*__defapiUnregisterEvent__)(struct DeferredApiObject *, NvHandle, NvHandle, NvHandle, NvHandle); 103 NV_STATUS (*__defapiControlSerialization_Prologue__)(struct DeferredApiObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 104 NvBool (*__defapiCanCopy__)(struct DeferredApiObject *); 105 void (*__defapiPreDestruct__)(struct DeferredApiObject *); 106 NV_STATUS (*__defapiIsDuplicate__)(struct DeferredApiObject *, NvHandle, NvBool *); 107 void (*__defapiControlSerialization_Epilogue__)(struct DeferredApiObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 108 PEVENTNOTIFICATION *(*__defapiGetNotificationListPtr__)(struct DeferredApiObject *); 109 struct NotifShare *(*__defapiGetNotificationShare__)(struct DeferredApiObject *); 110 NV_STATUS (*__defapiMap__)(struct DeferredApiObject *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *); 111 NV_STATUS (*__defapiGetOrAllocNotifShare__)(struct DeferredApiObject *, NvHandle, NvHandle, struct NotifShare **); 112 PNODE DeferredApiList; 113 NvU32 NumWaitingOnTLBFlush; 114 }; 115 116 #ifndef __NVOC_CLASS_DeferredApiObject_TYPEDEF__ 117 #define __NVOC_CLASS_DeferredApiObject_TYPEDEF__ 118 typedef struct DeferredApiObject DeferredApiObject; 119 #endif /* __NVOC_CLASS_DeferredApiObject_TYPEDEF__ */ 120 121 #ifndef __nvoc_class_id_DeferredApiObject 122 #define __nvoc_class_id_DeferredApiObject 0x8ea933 123 #endif /* __nvoc_class_id_DeferredApiObject */ 124 125 extern const struct NVOC_CLASS_DEF __nvoc_class_def_DeferredApiObject; 126 127 #define __staticCast_DeferredApiObject(pThis) \ 128 ((pThis)->__nvoc_pbase_DeferredApiObject) 129 130 #ifdef __nvoc_deferred_api_h_disabled 131 #define __dynamicCast_DeferredApiObject(pThis) ((DeferredApiObject*)NULL) 132 #else //__nvoc_deferred_api_h_disabled 133 #define __dynamicCast_DeferredApiObject(pThis) \ 134 ((DeferredApiObject*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(DeferredApiObject))) 135 #endif //__nvoc_deferred_api_h_disabled 136 137 138 NV_STATUS __nvoc_objCreateDynamic_DeferredApiObject(DeferredApiObject**, Dynamic*, NvU32, va_list); 139 140 NV_STATUS __nvoc_objCreate_DeferredApiObject(DeferredApiObject**, Dynamic*, NvU32, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams); 141 #define __objCreate_DeferredApiObject(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \ 142 __nvoc_objCreate_DeferredApiObject((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams) 143 144 #define defapiGetSwMethods(pDeferredApi, ppMethods, pNumMethods) defapiGetSwMethods_DISPATCH(pDeferredApi, ppMethods, pNumMethods) 145 #define defapiIsSwMethodStalling(pDeferredApi, hDeferredApi) defapiIsSwMethodStalling_DISPATCH(pDeferredApi, hDeferredApi) 146 #define defapiCtrlCmdDeferredApi(pDeferredApiObj, pDeferredApi) defapiCtrlCmdDeferredApi_DISPATCH(pDeferredApiObj, pDeferredApi) 147 #define defapiCtrlCmdDeferredApiV2(pDeferredApiObj, pDeferredApi) defapiCtrlCmdDeferredApiV2_DISPATCH(pDeferredApiObj, pDeferredApi) 148 #define defapiCtrlCmdRemoveApi(pDeferredApiObj, pRemoveApi) defapiCtrlCmdRemoveApi_DISPATCH(pDeferredApiObj, pRemoveApi) 149 #define defapiCheckMemInterUnmap(pChannelDescendant, bSubdeviceHandleProvided) defapiCheckMemInterUnmap_DISPATCH(pChannelDescendant, bSubdeviceHandleProvided) 150 #define defapiShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) defapiShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) 151 #define defapiAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) defapiAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight) 152 #define defapiMapTo(pResource, pParams) defapiMapTo_DISPATCH(pResource, pParams) 153 #define defapiGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) defapiGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace) 154 #define defapiSetNotificationShare(pNotifier, pNotifShare) defapiSetNotificationShare_DISPATCH(pNotifier, pNotifShare) 155 #define defapiGetRefCount(pResource) defapiGetRefCount_DISPATCH(pResource) 156 #define defapiAddAdditionalDependants(pClient, pResource, pReference) defapiAddAdditionalDependants_DISPATCH(pClient, pResource, pReference) 157 #define defapiControl_Prologue(pResource, pCallContext, pParams) defapiControl_Prologue_DISPATCH(pResource, pCallContext, pParams) 158 #define defapiGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) defapiGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize) 159 #define defapiInternalControlForward(pGpuResource, command, pParams, size) defapiInternalControlForward_DISPATCH(pGpuResource, command, pParams, size) 160 #define defapiUnmapFrom(pResource, pParams) defapiUnmapFrom_DISPATCH(pResource, pParams) 161 #define defapiControl_Epilogue(pResource, pCallContext, pParams) defapiControl_Epilogue_DISPATCH(pResource, pCallContext, pParams) 162 #define defapiControlLookup(pResource, pParams, ppEntry) defapiControlLookup_DISPATCH(pResource, pParams, ppEntry) 163 #define defapiGetInternalObjectHandle(pGpuResource) defapiGetInternalObjectHandle_DISPATCH(pGpuResource) 164 #define defapiControl(pGpuResource, pCallContext, pParams) defapiControl_DISPATCH(pGpuResource, pCallContext, pParams) 165 #define defapiUnmap(pGpuResource, pCallContext, pCpuMapping) defapiUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping) 166 #define defapiGetMemInterMapParams(pRmResource, pParams) defapiGetMemInterMapParams_DISPATCH(pRmResource, pParams) 167 #define defapiGetMemoryMappingDescriptor(pRmResource, ppMemDesc) defapiGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc) 168 #define defapiControlFilter(pResource, pCallContext, pParams) defapiControlFilter_DISPATCH(pResource, pCallContext, pParams) 169 #define defapiUnregisterEvent(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) defapiUnregisterEvent_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) 170 #define defapiControlSerialization_Prologue(pResource, pCallContext, pParams) defapiControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams) 171 #define defapiCanCopy(pResource) defapiCanCopy_DISPATCH(pResource) 172 #define defapiPreDestruct(pResource) defapiPreDestruct_DISPATCH(pResource) 173 #define defapiIsDuplicate(pResource, hMemory, pDuplicate) defapiIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate) 174 #define defapiControlSerialization_Epilogue(pResource, pCallContext, pParams) defapiControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams) 175 #define defapiGetNotificationListPtr(pNotifier) defapiGetNotificationListPtr_DISPATCH(pNotifier) 176 #define defapiGetNotificationShare(pNotifier) defapiGetNotificationShare_DISPATCH(pNotifier) 177 #define defapiMap(pGpuResource, pCallContext, pParams, pCpuMapping) defapiMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping) 178 #define defapiGetOrAllocNotifShare(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) defapiGetOrAllocNotifShare_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) 179 NV_STATUS defapiGetSwMethods_IMPL(struct DeferredApiObject *pDeferredApi, const METHOD **ppMethods, NvU32 *pNumMethods); 180 181 static inline NV_STATUS defapiGetSwMethods_DISPATCH(struct DeferredApiObject *pDeferredApi, const METHOD **ppMethods, NvU32 *pNumMethods) { 182 return pDeferredApi->__defapiGetSwMethods__(pDeferredApi, ppMethods, pNumMethods); 183 } 184 185 NvBool defapiIsSwMethodStalling_IMPL(struct DeferredApiObject *pDeferredApi, NvU32 hDeferredApi); 186 187 static inline NvBool defapiIsSwMethodStalling_DISPATCH(struct DeferredApiObject *pDeferredApi, NvU32 hDeferredApi) { 188 return pDeferredApi->__defapiIsSwMethodStalling__(pDeferredApi, hDeferredApi); 189 } 190 191 NV_STATUS defapiCtrlCmdDeferredApi_IMPL(struct DeferredApiObject *pDeferredApiObj, NV5080_CTRL_DEFERRED_API_PARAMS *pDeferredApi); 192 193 static inline NV_STATUS defapiCtrlCmdDeferredApi_DISPATCH(struct DeferredApiObject *pDeferredApiObj, NV5080_CTRL_DEFERRED_API_PARAMS *pDeferredApi) { 194 return pDeferredApiObj->__defapiCtrlCmdDeferredApi__(pDeferredApiObj, pDeferredApi); 195 } 196 197 NV_STATUS defapiCtrlCmdDeferredApiV2_IMPL(struct DeferredApiObject *pDeferredApiObj, NV5080_CTRL_DEFERRED_API_V2_PARAMS *pDeferredApi); 198 199 static inline NV_STATUS defapiCtrlCmdDeferredApiV2_DISPATCH(struct DeferredApiObject *pDeferredApiObj, NV5080_CTRL_DEFERRED_API_V2_PARAMS *pDeferredApi) { 200 return pDeferredApiObj->__defapiCtrlCmdDeferredApiV2__(pDeferredApiObj, pDeferredApi); 201 } 202 203 NV_STATUS defapiCtrlCmdRemoveApi_IMPL(struct DeferredApiObject *pDeferredApiObj, NV5080_CTRL_REMOVE_API_PARAMS *pRemoveApi); 204 205 static inline NV_STATUS defapiCtrlCmdRemoveApi_DISPATCH(struct DeferredApiObject *pDeferredApiObj, NV5080_CTRL_REMOVE_API_PARAMS *pRemoveApi) { 206 return pDeferredApiObj->__defapiCtrlCmdRemoveApi__(pDeferredApiObj, pRemoveApi); 207 } 208 209 static inline NV_STATUS defapiCheckMemInterUnmap_DISPATCH(struct DeferredApiObject *pChannelDescendant, NvBool bSubdeviceHandleProvided) { 210 return pChannelDescendant->__defapiCheckMemInterUnmap__(pChannelDescendant, bSubdeviceHandleProvided); 211 } 212 213 static inline NvBool defapiShareCallback_DISPATCH(struct DeferredApiObject *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) { 214 return pGpuResource->__defapiShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy); 215 } 216 217 static inline NvBool defapiAccessCallback_DISPATCH(struct DeferredApiObject *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) { 218 return pResource->__defapiAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight); 219 } 220 221 static inline NV_STATUS defapiMapTo_DISPATCH(struct DeferredApiObject *pResource, RS_RES_MAP_TO_PARAMS *pParams) { 222 return pResource->__defapiMapTo__(pResource, pParams); 223 } 224 225 static inline NV_STATUS defapiGetMapAddrSpace_DISPATCH(struct DeferredApiObject *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) { 226 return pGpuResource->__defapiGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace); 227 } 228 229 static inline void defapiSetNotificationShare_DISPATCH(struct DeferredApiObject *pNotifier, struct NotifShare *pNotifShare) { 230 pNotifier->__defapiSetNotificationShare__(pNotifier, pNotifShare); 231 } 232 233 static inline NvU32 defapiGetRefCount_DISPATCH(struct DeferredApiObject *pResource) { 234 return pResource->__defapiGetRefCount__(pResource); 235 } 236 237 static inline void defapiAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct DeferredApiObject *pResource, RsResourceRef *pReference) { 238 pResource->__defapiAddAdditionalDependants__(pClient, pResource, pReference); 239 } 240 241 static inline NV_STATUS defapiControl_Prologue_DISPATCH(struct DeferredApiObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 242 return pResource->__defapiControl_Prologue__(pResource, pCallContext, pParams); 243 } 244 245 static inline NV_STATUS defapiGetRegBaseOffsetAndSize_DISPATCH(struct DeferredApiObject *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) { 246 return pGpuResource->__defapiGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize); 247 } 248 249 static inline NV_STATUS defapiInternalControlForward_DISPATCH(struct DeferredApiObject *pGpuResource, NvU32 command, void *pParams, NvU32 size) { 250 return pGpuResource->__defapiInternalControlForward__(pGpuResource, command, pParams, size); 251 } 252 253 static inline NV_STATUS defapiUnmapFrom_DISPATCH(struct DeferredApiObject *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) { 254 return pResource->__defapiUnmapFrom__(pResource, pParams); 255 } 256 257 static inline void defapiControl_Epilogue_DISPATCH(struct DeferredApiObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 258 pResource->__defapiControl_Epilogue__(pResource, pCallContext, pParams); 259 } 260 261 static inline NV_STATUS defapiControlLookup_DISPATCH(struct DeferredApiObject *pResource, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams, const struct NVOC_EXPORTED_METHOD_DEF **ppEntry) { 262 return pResource->__defapiControlLookup__(pResource, pParams, ppEntry); 263 } 264 265 static inline NvHandle defapiGetInternalObjectHandle_DISPATCH(struct DeferredApiObject *pGpuResource) { 266 return pGpuResource->__defapiGetInternalObjectHandle__(pGpuResource); 267 } 268 269 static inline NV_STATUS defapiControl_DISPATCH(struct DeferredApiObject *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 270 return pGpuResource->__defapiControl__(pGpuResource, pCallContext, pParams); 271 } 272 273 static inline NV_STATUS defapiUnmap_DISPATCH(struct DeferredApiObject *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) { 274 return pGpuResource->__defapiUnmap__(pGpuResource, pCallContext, pCpuMapping); 275 } 276 277 static inline NV_STATUS defapiGetMemInterMapParams_DISPATCH(struct DeferredApiObject *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) { 278 return pRmResource->__defapiGetMemInterMapParams__(pRmResource, pParams); 279 } 280 281 static inline NV_STATUS defapiGetMemoryMappingDescriptor_DISPATCH(struct DeferredApiObject *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) { 282 return pRmResource->__defapiGetMemoryMappingDescriptor__(pRmResource, ppMemDesc); 283 } 284 285 static inline NV_STATUS defapiControlFilter_DISPATCH(struct DeferredApiObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 286 return pResource->__defapiControlFilter__(pResource, pCallContext, pParams); 287 } 288 289 static inline NV_STATUS defapiUnregisterEvent_DISPATCH(struct DeferredApiObject *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) { 290 return pNotifier->__defapiUnregisterEvent__(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent); 291 } 292 293 static inline NV_STATUS defapiControlSerialization_Prologue_DISPATCH(struct DeferredApiObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 294 return pResource->__defapiControlSerialization_Prologue__(pResource, pCallContext, pParams); 295 } 296 297 static inline NvBool defapiCanCopy_DISPATCH(struct DeferredApiObject *pResource) { 298 return pResource->__defapiCanCopy__(pResource); 299 } 300 301 static inline void defapiPreDestruct_DISPATCH(struct DeferredApiObject *pResource) { 302 pResource->__defapiPreDestruct__(pResource); 303 } 304 305 static inline NV_STATUS defapiIsDuplicate_DISPATCH(struct DeferredApiObject *pResource, NvHandle hMemory, NvBool *pDuplicate) { 306 return pResource->__defapiIsDuplicate__(pResource, hMemory, pDuplicate); 307 } 308 309 static inline void defapiControlSerialization_Epilogue_DISPATCH(struct DeferredApiObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 310 pResource->__defapiControlSerialization_Epilogue__(pResource, pCallContext, pParams); 311 } 312 313 static inline PEVENTNOTIFICATION *defapiGetNotificationListPtr_DISPATCH(struct DeferredApiObject *pNotifier) { 314 return pNotifier->__defapiGetNotificationListPtr__(pNotifier); 315 } 316 317 static inline struct NotifShare *defapiGetNotificationShare_DISPATCH(struct DeferredApiObject *pNotifier) { 318 return pNotifier->__defapiGetNotificationShare__(pNotifier); 319 } 320 321 static inline NV_STATUS defapiMap_DISPATCH(struct DeferredApiObject *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) { 322 return pGpuResource->__defapiMap__(pGpuResource, pCallContext, pParams, pCpuMapping); 323 } 324 325 static inline NV_STATUS defapiGetOrAllocNotifShare_DISPATCH(struct DeferredApiObject *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) { 326 return pNotifier->__defapiGetOrAllocNotifShare__(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare); 327 } 328 329 NV_STATUS defapiConstruct_IMPL(struct DeferredApiObject *arg_pDeferredApi, struct CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams); 330 331 #define __nvoc_defapiConstruct(arg_pDeferredApi, arg_pCallContext, arg_pParams) defapiConstruct_IMPL(arg_pDeferredApi, arg_pCallContext, arg_pParams) 332 void defapiDestruct_IMPL(struct DeferredApiObject *pDeferredApi); 333 334 #define __nvoc_defapiDestruct(pDeferredApi) defapiDestruct_IMPL(pDeferredApi) 335 #undef PRIVATE_FIELD 336 337 338 #endif // DEFERRED_API_H 339 340 #ifdef __cplusplus 341 } // extern "C" 342 #endif 343 344 #endif // _G_DEFERRED_API_NVOC_H_ 345