1 #ifndef _G_TMR_NVOC_H_ 2 #define _G_TMR_NVOC_H_ 3 #include "nvoc/runtime.h" 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 /* 10 * SPDX-FileCopyrightText: Copyright (c) 1993-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 32 #include "g_tmr_nvoc.h" 33 34 #ifndef _TMR_H_ 35 #define _TMR_H_ 36 37 /****************************** Timer Module *******************************\ 38 * * 39 * Module: TMR.H * 40 * Timer functions. * 41 * * 42 ****************************************************************************/ 43 44 #include "core/core.h" 45 #include "gpu/gpu_resource.h" 46 #include "rmapi/event.h" 47 48 #include "ctrl/ctrl0004.h" 49 50 typedef struct OBJTMR *POBJTMR; 51 52 #ifndef __NVOC_CLASS_OBJTMR_TYPEDEF__ 53 #define __NVOC_CLASS_OBJTMR_TYPEDEF__ 54 typedef struct OBJTMR OBJTMR; 55 #endif /* __NVOC_CLASS_OBJTMR_TYPEDEF__ */ 56 57 #ifndef __nvoc_class_id_OBJTMR 58 #define __nvoc_class_id_OBJTMR 0x9ddede 59 #endif /* __nvoc_class_id_OBJTMR */ 60 61 62 63 //--------------------------------------------------------------------------- 64 // 65 // Time objects. 66 // 67 //--------------------------------------------------------------------------- 68 69 #define TIMER_STATE_IDLE 0 70 #define TIMER_STATE_BUSY 1 71 72 // Opaque callback memory type for interfacing the scheduling API 73 typedef struct TMR_EVENT *PTMR_EVENT; 74 typedef struct TMR_EVENT TMR_EVENT; 75 76 typedef NV_STATUS (*TIMEPROC)(OBJGPU *, struct OBJTMR *, PTMR_EVENT); 77 typedef NV_STATUS (*TIMEPROC_OBSOLETE)(OBJGPU *, struct OBJTMR *, void *); 78 typedef NV_STATUS (*TIMEPROC_COUNTDOWN)(OBJGPU *, THREAD_STATE_NODE *); 79 80 /*! 81 * RM internal class representing NV01_TIMER (child of SubDevice) 82 */ 83 #ifdef NVOC_TMR_H_PRIVATE_ACCESS_ALLOWED 84 #define PRIVATE_FIELD(x) x 85 #else 86 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x) 87 #endif 88 struct TimerApi { 89 const struct NVOC_RTTI *__nvoc_rtti; 90 struct GpuResource __nvoc_base_GpuResource; 91 struct Notifier __nvoc_base_Notifier; 92 struct Object *__nvoc_pbase_Object; 93 struct RsResource *__nvoc_pbase_RsResource; 94 struct RmResourceCommon *__nvoc_pbase_RmResourceCommon; 95 struct RmResource *__nvoc_pbase_RmResource; 96 struct GpuResource *__nvoc_pbase_GpuResource; 97 struct INotifier *__nvoc_pbase_INotifier; 98 struct Notifier *__nvoc_pbase_Notifier; 99 struct TimerApi *__nvoc_pbase_TimerApi; 100 NV_STATUS (*__tmrapiGetRegBaseOffsetAndSize__)(struct TimerApi *, struct OBJGPU *, NvU32 *, NvU32 *); 101 NV_STATUS (*__tmrapiCtrlCmdTmrSetAlarmNotify__)(struct TimerApi *, NV0004_CTRL_TMR_SET_ALARM_NOTIFY_PARAMS *); 102 NvBool (*__tmrapiShareCallback__)(struct TimerApi *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *); 103 NV_STATUS (*__tmrapiCheckMemInterUnmap__)(struct TimerApi *, NvBool); 104 NV_STATUS (*__tmrapiGetOrAllocNotifShare__)(struct TimerApi *, NvHandle, NvHandle, struct NotifShare **); 105 NV_STATUS (*__tmrapiMapTo__)(struct TimerApi *, RS_RES_MAP_TO_PARAMS *); 106 NV_STATUS (*__tmrapiGetMapAddrSpace__)(struct TimerApi *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *); 107 void (*__tmrapiSetNotificationShare__)(struct TimerApi *, struct NotifShare *); 108 NvU32 (*__tmrapiGetRefCount__)(struct TimerApi *); 109 void (*__tmrapiAddAdditionalDependants__)(struct RsClient *, struct TimerApi *, RsResourceRef *); 110 NV_STATUS (*__tmrapiControl_Prologue__)(struct TimerApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 111 NV_STATUS (*__tmrapiInternalControlForward__)(struct TimerApi *, NvU32, void *, NvU32); 112 NV_STATUS (*__tmrapiUnmapFrom__)(struct TimerApi *, RS_RES_UNMAP_FROM_PARAMS *); 113 void (*__tmrapiControl_Epilogue__)(struct TimerApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 114 NV_STATUS (*__tmrapiControlLookup__)(struct TimerApi *, struct RS_RES_CONTROL_PARAMS_INTERNAL *, const struct NVOC_EXPORTED_METHOD_DEF **); 115 NvHandle (*__tmrapiGetInternalObjectHandle__)(struct TimerApi *); 116 NV_STATUS (*__tmrapiControl__)(struct TimerApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 117 NV_STATUS (*__tmrapiUnmap__)(struct TimerApi *, struct CALL_CONTEXT *, struct RsCpuMapping *); 118 NV_STATUS (*__tmrapiGetMemInterMapParams__)(struct TimerApi *, RMRES_MEM_INTER_MAP_PARAMS *); 119 NV_STATUS (*__tmrapiGetMemoryMappingDescriptor__)(struct TimerApi *, struct MEMORY_DESCRIPTOR **); 120 NV_STATUS (*__tmrapiControlFilter__)(struct TimerApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 121 NV_STATUS (*__tmrapiUnregisterEvent__)(struct TimerApi *, NvHandle, NvHandle, NvHandle, NvHandle); 122 NV_STATUS (*__tmrapiControlSerialization_Prologue__)(struct TimerApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 123 NvBool (*__tmrapiCanCopy__)(struct TimerApi *); 124 void (*__tmrapiPreDestruct__)(struct TimerApi *); 125 NV_STATUS (*__tmrapiIsDuplicate__)(struct TimerApi *, NvHandle, NvBool *); 126 void (*__tmrapiControlSerialization_Epilogue__)(struct TimerApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 127 PEVENTNOTIFICATION *(*__tmrapiGetNotificationListPtr__)(struct TimerApi *); 128 struct NotifShare *(*__tmrapiGetNotificationShare__)(struct TimerApi *); 129 NV_STATUS (*__tmrapiMap__)(struct TimerApi *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *); 130 NvBool (*__tmrapiAccessCallback__)(struct TimerApi *, struct RsClient *, void *, RsAccessRight); 131 }; 132 133 #ifndef __NVOC_CLASS_TimerApi_TYPEDEF__ 134 #define __NVOC_CLASS_TimerApi_TYPEDEF__ 135 typedef struct TimerApi TimerApi; 136 #endif /* __NVOC_CLASS_TimerApi_TYPEDEF__ */ 137 138 #ifndef __nvoc_class_id_TimerApi 139 #define __nvoc_class_id_TimerApi 0xb13ac4 140 #endif /* __nvoc_class_id_TimerApi */ 141 142 extern const struct NVOC_CLASS_DEF __nvoc_class_def_TimerApi; 143 144 #define __staticCast_TimerApi(pThis) \ 145 ((pThis)->__nvoc_pbase_TimerApi) 146 147 #ifdef __nvoc_tmr_h_disabled 148 #define __dynamicCast_TimerApi(pThis) ((TimerApi*)NULL) 149 #else //__nvoc_tmr_h_disabled 150 #define __dynamicCast_TimerApi(pThis) \ 151 ((TimerApi*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(TimerApi))) 152 #endif //__nvoc_tmr_h_disabled 153 154 155 NV_STATUS __nvoc_objCreateDynamic_TimerApi(TimerApi**, Dynamic*, NvU32, va_list); 156 157 NV_STATUS __nvoc_objCreate_TimerApi(TimerApi**, Dynamic*, NvU32, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams); 158 #define __objCreate_TimerApi(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \ 159 __nvoc_objCreate_TimerApi((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams) 160 161 #define tmrapiGetRegBaseOffsetAndSize(pTimerApi, pGpu, pOffset, pSize) tmrapiGetRegBaseOffsetAndSize_DISPATCH(pTimerApi, pGpu, pOffset, pSize) 162 #define tmrapiCtrlCmdTmrSetAlarmNotify(pTimerApi, pParams) tmrapiCtrlCmdTmrSetAlarmNotify_DISPATCH(pTimerApi, pParams) 163 #define tmrapiShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) tmrapiShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) 164 #define tmrapiCheckMemInterUnmap(pRmResource, bSubdeviceHandleProvided) tmrapiCheckMemInterUnmap_DISPATCH(pRmResource, bSubdeviceHandleProvided) 165 #define tmrapiGetOrAllocNotifShare(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) tmrapiGetOrAllocNotifShare_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) 166 #define tmrapiMapTo(pResource, pParams) tmrapiMapTo_DISPATCH(pResource, pParams) 167 #define tmrapiGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) tmrapiGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace) 168 #define tmrapiSetNotificationShare(pNotifier, pNotifShare) tmrapiSetNotificationShare_DISPATCH(pNotifier, pNotifShare) 169 #define tmrapiGetRefCount(pResource) tmrapiGetRefCount_DISPATCH(pResource) 170 #define tmrapiAddAdditionalDependants(pClient, pResource, pReference) tmrapiAddAdditionalDependants_DISPATCH(pClient, pResource, pReference) 171 #define tmrapiControl_Prologue(pResource, pCallContext, pParams) tmrapiControl_Prologue_DISPATCH(pResource, pCallContext, pParams) 172 #define tmrapiInternalControlForward(pGpuResource, command, pParams, size) tmrapiInternalControlForward_DISPATCH(pGpuResource, command, pParams, size) 173 #define tmrapiUnmapFrom(pResource, pParams) tmrapiUnmapFrom_DISPATCH(pResource, pParams) 174 #define tmrapiControl_Epilogue(pResource, pCallContext, pParams) tmrapiControl_Epilogue_DISPATCH(pResource, pCallContext, pParams) 175 #define tmrapiControlLookup(pResource, pParams, ppEntry) tmrapiControlLookup_DISPATCH(pResource, pParams, ppEntry) 176 #define tmrapiGetInternalObjectHandle(pGpuResource) tmrapiGetInternalObjectHandle_DISPATCH(pGpuResource) 177 #define tmrapiControl(pGpuResource, pCallContext, pParams) tmrapiControl_DISPATCH(pGpuResource, pCallContext, pParams) 178 #define tmrapiUnmap(pGpuResource, pCallContext, pCpuMapping) tmrapiUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping) 179 #define tmrapiGetMemInterMapParams(pRmResource, pParams) tmrapiGetMemInterMapParams_DISPATCH(pRmResource, pParams) 180 #define tmrapiGetMemoryMappingDescriptor(pRmResource, ppMemDesc) tmrapiGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc) 181 #define tmrapiControlFilter(pResource, pCallContext, pParams) tmrapiControlFilter_DISPATCH(pResource, pCallContext, pParams) 182 #define tmrapiUnregisterEvent(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) tmrapiUnregisterEvent_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) 183 #define tmrapiControlSerialization_Prologue(pResource, pCallContext, pParams) tmrapiControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams) 184 #define tmrapiCanCopy(pResource) tmrapiCanCopy_DISPATCH(pResource) 185 #define tmrapiPreDestruct(pResource) tmrapiPreDestruct_DISPATCH(pResource) 186 #define tmrapiIsDuplicate(pResource, hMemory, pDuplicate) tmrapiIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate) 187 #define tmrapiControlSerialization_Epilogue(pResource, pCallContext, pParams) tmrapiControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams) 188 #define tmrapiGetNotificationListPtr(pNotifier) tmrapiGetNotificationListPtr_DISPATCH(pNotifier) 189 #define tmrapiGetNotificationShare(pNotifier) tmrapiGetNotificationShare_DISPATCH(pNotifier) 190 #define tmrapiMap(pGpuResource, pCallContext, pParams, pCpuMapping) tmrapiMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping) 191 #define tmrapiAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) tmrapiAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight) 192 NV_STATUS tmrapiGetRegBaseOffsetAndSize_IMPL(struct TimerApi *pTimerApi, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize); 193 194 static inline NV_STATUS tmrapiGetRegBaseOffsetAndSize_DISPATCH(struct TimerApi *pTimerApi, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) { 195 return pTimerApi->__tmrapiGetRegBaseOffsetAndSize__(pTimerApi, pGpu, pOffset, pSize); 196 } 197 198 NV_STATUS tmrapiCtrlCmdTmrSetAlarmNotify_IMPL(struct TimerApi *pTimerApi, NV0004_CTRL_TMR_SET_ALARM_NOTIFY_PARAMS *pParams); 199 200 static inline NV_STATUS tmrapiCtrlCmdTmrSetAlarmNotify_DISPATCH(struct TimerApi *pTimerApi, NV0004_CTRL_TMR_SET_ALARM_NOTIFY_PARAMS *pParams) { 201 return pTimerApi->__tmrapiCtrlCmdTmrSetAlarmNotify__(pTimerApi, pParams); 202 } 203 204 static inline NvBool tmrapiShareCallback_DISPATCH(struct TimerApi *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) { 205 return pGpuResource->__tmrapiShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy); 206 } 207 208 static inline NV_STATUS tmrapiCheckMemInterUnmap_DISPATCH(struct TimerApi *pRmResource, NvBool bSubdeviceHandleProvided) { 209 return pRmResource->__tmrapiCheckMemInterUnmap__(pRmResource, bSubdeviceHandleProvided); 210 } 211 212 static inline NV_STATUS tmrapiGetOrAllocNotifShare_DISPATCH(struct TimerApi *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) { 213 return pNotifier->__tmrapiGetOrAllocNotifShare__(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare); 214 } 215 216 static inline NV_STATUS tmrapiMapTo_DISPATCH(struct TimerApi *pResource, RS_RES_MAP_TO_PARAMS *pParams) { 217 return pResource->__tmrapiMapTo__(pResource, pParams); 218 } 219 220 static inline NV_STATUS tmrapiGetMapAddrSpace_DISPATCH(struct TimerApi *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) { 221 return pGpuResource->__tmrapiGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace); 222 } 223 224 static inline void tmrapiSetNotificationShare_DISPATCH(struct TimerApi *pNotifier, struct NotifShare *pNotifShare) { 225 pNotifier->__tmrapiSetNotificationShare__(pNotifier, pNotifShare); 226 } 227 228 static inline NvU32 tmrapiGetRefCount_DISPATCH(struct TimerApi *pResource) { 229 return pResource->__tmrapiGetRefCount__(pResource); 230 } 231 232 static inline void tmrapiAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct TimerApi *pResource, RsResourceRef *pReference) { 233 pResource->__tmrapiAddAdditionalDependants__(pClient, pResource, pReference); 234 } 235 236 static inline NV_STATUS tmrapiControl_Prologue_DISPATCH(struct TimerApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 237 return pResource->__tmrapiControl_Prologue__(pResource, pCallContext, pParams); 238 } 239 240 static inline NV_STATUS tmrapiInternalControlForward_DISPATCH(struct TimerApi *pGpuResource, NvU32 command, void *pParams, NvU32 size) { 241 return pGpuResource->__tmrapiInternalControlForward__(pGpuResource, command, pParams, size); 242 } 243 244 static inline NV_STATUS tmrapiUnmapFrom_DISPATCH(struct TimerApi *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) { 245 return pResource->__tmrapiUnmapFrom__(pResource, pParams); 246 } 247 248 static inline void tmrapiControl_Epilogue_DISPATCH(struct TimerApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 249 pResource->__tmrapiControl_Epilogue__(pResource, pCallContext, pParams); 250 } 251 252 static inline NV_STATUS tmrapiControlLookup_DISPATCH(struct TimerApi *pResource, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams, const struct NVOC_EXPORTED_METHOD_DEF **ppEntry) { 253 return pResource->__tmrapiControlLookup__(pResource, pParams, ppEntry); 254 } 255 256 static inline NvHandle tmrapiGetInternalObjectHandle_DISPATCH(struct TimerApi *pGpuResource) { 257 return pGpuResource->__tmrapiGetInternalObjectHandle__(pGpuResource); 258 } 259 260 static inline NV_STATUS tmrapiControl_DISPATCH(struct TimerApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 261 return pGpuResource->__tmrapiControl__(pGpuResource, pCallContext, pParams); 262 } 263 264 static inline NV_STATUS tmrapiUnmap_DISPATCH(struct TimerApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) { 265 return pGpuResource->__tmrapiUnmap__(pGpuResource, pCallContext, pCpuMapping); 266 } 267 268 static inline NV_STATUS tmrapiGetMemInterMapParams_DISPATCH(struct TimerApi *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) { 269 return pRmResource->__tmrapiGetMemInterMapParams__(pRmResource, pParams); 270 } 271 272 static inline NV_STATUS tmrapiGetMemoryMappingDescriptor_DISPATCH(struct TimerApi *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) { 273 return pRmResource->__tmrapiGetMemoryMappingDescriptor__(pRmResource, ppMemDesc); 274 } 275 276 static inline NV_STATUS tmrapiControlFilter_DISPATCH(struct TimerApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 277 return pResource->__tmrapiControlFilter__(pResource, pCallContext, pParams); 278 } 279 280 static inline NV_STATUS tmrapiUnregisterEvent_DISPATCH(struct TimerApi *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) { 281 return pNotifier->__tmrapiUnregisterEvent__(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent); 282 } 283 284 static inline NV_STATUS tmrapiControlSerialization_Prologue_DISPATCH(struct TimerApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 285 return pResource->__tmrapiControlSerialization_Prologue__(pResource, pCallContext, pParams); 286 } 287 288 static inline NvBool tmrapiCanCopy_DISPATCH(struct TimerApi *pResource) { 289 return pResource->__tmrapiCanCopy__(pResource); 290 } 291 292 static inline void tmrapiPreDestruct_DISPATCH(struct TimerApi *pResource) { 293 pResource->__tmrapiPreDestruct__(pResource); 294 } 295 296 static inline NV_STATUS tmrapiIsDuplicate_DISPATCH(struct TimerApi *pResource, NvHandle hMemory, NvBool *pDuplicate) { 297 return pResource->__tmrapiIsDuplicate__(pResource, hMemory, pDuplicate); 298 } 299 300 static inline void tmrapiControlSerialization_Epilogue_DISPATCH(struct TimerApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 301 pResource->__tmrapiControlSerialization_Epilogue__(pResource, pCallContext, pParams); 302 } 303 304 static inline PEVENTNOTIFICATION *tmrapiGetNotificationListPtr_DISPATCH(struct TimerApi *pNotifier) { 305 return pNotifier->__tmrapiGetNotificationListPtr__(pNotifier); 306 } 307 308 static inline struct NotifShare *tmrapiGetNotificationShare_DISPATCH(struct TimerApi *pNotifier) { 309 return pNotifier->__tmrapiGetNotificationShare__(pNotifier); 310 } 311 312 static inline NV_STATUS tmrapiMap_DISPATCH(struct TimerApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) { 313 return pGpuResource->__tmrapiMap__(pGpuResource, pCallContext, pParams, pCpuMapping); 314 } 315 316 static inline NvBool tmrapiAccessCallback_DISPATCH(struct TimerApi *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) { 317 return pResource->__tmrapiAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight); 318 } 319 320 NV_STATUS tmrapiConstruct_IMPL(struct TimerApi *arg_pTimerApi, struct CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams); 321 322 #define __nvoc_tmrapiConstruct(arg_pTimerApi, arg_pCallContext, arg_pParams) tmrapiConstruct_IMPL(arg_pTimerApi, arg_pCallContext, arg_pParams) 323 void tmrapiDestruct_IMPL(struct TimerApi *pTimerApi); 324 325 #define __nvoc_tmrapiDestruct(pTimerApi) tmrapiDestruct_IMPL(pTimerApi) 326 void tmrapiDeregisterEvents_IMPL(struct TimerApi *pTimerApi); 327 328 #ifdef __nvoc_tmr_h_disabled 329 static inline void tmrapiDeregisterEvents(struct TimerApi *pTimerApi) { 330 NV_ASSERT_FAILED_PRECOMP("TimerApi was disabled!"); 331 } 332 #else //__nvoc_tmr_h_disabled 333 #define tmrapiDeregisterEvents(pTimerApi) tmrapiDeregisterEvents_IMPL(pTimerApi) 334 #endif //__nvoc_tmr_h_disabled 335 336 #undef PRIVATE_FIELD 337 338 339 340 //--------------------------------------------------------------------------- 341 // 342 // Function prototypes. 343 // 344 //--------------------------------------------------------------------------- 345 346 347 #endif // _TMR_H_ 348 349 350 #ifdef __cplusplus 351 } // extern "C" 352 #endif 353 #endif // _G_TMR_NVOC_H_ 354