1 #ifndef _G_KERNEL_NVDEC_CTX_NVOC_H_ 2 #define _G_KERNEL_NVDEC_CTX_NVOC_H_ 3 #include "nvoc/runtime.h" 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 /* 10 * SPDX-FileCopyrightText: Copyright (c) 1993-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_nvdec_ctx_nvoc.h" 33 34 #ifndef KERNEL_NVDEC_CTX_H 35 #define KERNEL_NVDEC_CTX_H 36 37 #include "kernel/gpu/fifo/channel_descendant.h" 38 39 ENGDESCRIPTOR nvdecGetEngineDescFromAllocParams(OBJGPU *pGpu, NvU32 externalClassId, void *pAllocParams); 40 41 /*! 42 * RM internal class representing NVXXXX_VIDEO_DECODER 43 */ 44 #ifdef NVOC_KERNEL_NVDEC_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 NvdecContext { 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 NvdecContext *__nvoc_pbase_NvdecContext; 61 NV_STATUS (*__nvdecctxCheckMemInterUnmap__)(struct NvdecContext *, NvBool); 62 NvBool (*__nvdecctxShareCallback__)(struct NvdecContext *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *); 63 NvBool (*__nvdecctxAccessCallback__)(struct NvdecContext *, struct RsClient *, void *, RsAccessRight); 64 NV_STATUS (*__nvdecctxMapTo__)(struct NvdecContext *, RS_RES_MAP_TO_PARAMS *); 65 NV_STATUS (*__nvdecctxGetMapAddrSpace__)(struct NvdecContext *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *); 66 void (*__nvdecctxSetNotificationShare__)(struct NvdecContext *, struct NotifShare *); 67 NvU32 (*__nvdecctxGetRefCount__)(struct NvdecContext *); 68 void (*__nvdecctxAddAdditionalDependants__)(struct RsClient *, struct NvdecContext *, RsResourceRef *); 69 NV_STATUS (*__nvdecctxControl_Prologue__)(struct NvdecContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 70 NV_STATUS (*__nvdecctxGetRegBaseOffsetAndSize__)(struct NvdecContext *, struct OBJGPU *, NvU32 *, NvU32 *); 71 NV_STATUS (*__nvdecctxInternalControlForward__)(struct NvdecContext *, NvU32, void *, NvU32); 72 NV_STATUS (*__nvdecctxUnmapFrom__)(struct NvdecContext *, RS_RES_UNMAP_FROM_PARAMS *); 73 void (*__nvdecctxControl_Epilogue__)(struct NvdecContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 74 NV_STATUS (*__nvdecctxControlLookup__)(struct NvdecContext *, struct RS_RES_CONTROL_PARAMS_INTERNAL *, const struct NVOC_EXPORTED_METHOD_DEF **); 75 NV_STATUS (*__nvdecctxGetSwMethods__)(struct NvdecContext *, const METHOD **, NvU32 *); 76 NvHandle (*__nvdecctxGetInternalObjectHandle__)(struct NvdecContext *); 77 NV_STATUS (*__nvdecctxControl__)(struct NvdecContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 78 NV_STATUS (*__nvdecctxUnmap__)(struct NvdecContext *, struct CALL_CONTEXT *, struct RsCpuMapping *); 79 NV_STATUS (*__nvdecctxGetMemInterMapParams__)(struct NvdecContext *, RMRES_MEM_INTER_MAP_PARAMS *); 80 NV_STATUS (*__nvdecctxGetMemoryMappingDescriptor__)(struct NvdecContext *, struct MEMORY_DESCRIPTOR **); 81 NvBool (*__nvdecctxIsSwMethodStalling__)(struct NvdecContext *, NvU32); 82 NV_STATUS (*__nvdecctxControlFilter__)(struct NvdecContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 83 NV_STATUS (*__nvdecctxUnregisterEvent__)(struct NvdecContext *, NvHandle, NvHandle, NvHandle, NvHandle); 84 NV_STATUS (*__nvdecctxControlSerialization_Prologue__)(struct NvdecContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 85 NvBool (*__nvdecctxCanCopy__)(struct NvdecContext *); 86 void (*__nvdecctxPreDestruct__)(struct NvdecContext *); 87 NV_STATUS (*__nvdecctxIsDuplicate__)(struct NvdecContext *, NvHandle, NvBool *); 88 void (*__nvdecctxControlSerialization_Epilogue__)(struct NvdecContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 89 PEVENTNOTIFICATION *(*__nvdecctxGetNotificationListPtr__)(struct NvdecContext *); 90 struct NotifShare *(*__nvdecctxGetNotificationShare__)(struct NvdecContext *); 91 NV_STATUS (*__nvdecctxMap__)(struct NvdecContext *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *); 92 NV_STATUS (*__nvdecctxGetOrAllocNotifShare__)(struct NvdecContext *, NvHandle, NvHandle, struct NotifShare **); 93 }; 94 95 #ifndef __NVOC_CLASS_NvdecContext_TYPEDEF__ 96 #define __NVOC_CLASS_NvdecContext_TYPEDEF__ 97 typedef struct NvdecContext NvdecContext; 98 #endif /* __NVOC_CLASS_NvdecContext_TYPEDEF__ */ 99 100 #ifndef __nvoc_class_id_NvdecContext 101 #define __nvoc_class_id_NvdecContext 0x70d2be 102 #endif /* __nvoc_class_id_NvdecContext */ 103 104 extern const struct NVOC_CLASS_DEF __nvoc_class_def_NvdecContext; 105 106 #define __staticCast_NvdecContext(pThis) \ 107 ((pThis)->__nvoc_pbase_NvdecContext) 108 109 #ifdef __nvoc_kernel_nvdec_ctx_h_disabled 110 #define __dynamicCast_NvdecContext(pThis) ((NvdecContext*)NULL) 111 #else //__nvoc_kernel_nvdec_ctx_h_disabled 112 #define __dynamicCast_NvdecContext(pThis) \ 113 ((NvdecContext*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(NvdecContext))) 114 #endif //__nvoc_kernel_nvdec_ctx_h_disabled 115 116 117 NV_STATUS __nvoc_objCreateDynamic_NvdecContext(NvdecContext**, Dynamic*, NvU32, va_list); 118 119 NV_STATUS __nvoc_objCreate_NvdecContext(NvdecContext**, Dynamic*, NvU32, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams); 120 #define __objCreate_NvdecContext(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \ 121 __nvoc_objCreate_NvdecContext((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams) 122 123 #define nvdecctxCheckMemInterUnmap(pChannelDescendant, bSubdeviceHandleProvided) nvdecctxCheckMemInterUnmap_DISPATCH(pChannelDescendant, bSubdeviceHandleProvided) 124 #define nvdecctxShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) nvdecctxShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) 125 #define nvdecctxAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) nvdecctxAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight) 126 #define nvdecctxMapTo(pResource, pParams) nvdecctxMapTo_DISPATCH(pResource, pParams) 127 #define nvdecctxGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) nvdecctxGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace) 128 #define nvdecctxSetNotificationShare(pNotifier, pNotifShare) nvdecctxSetNotificationShare_DISPATCH(pNotifier, pNotifShare) 129 #define nvdecctxGetRefCount(pResource) nvdecctxGetRefCount_DISPATCH(pResource) 130 #define nvdecctxAddAdditionalDependants(pClient, pResource, pReference) nvdecctxAddAdditionalDependants_DISPATCH(pClient, pResource, pReference) 131 #define nvdecctxControl_Prologue(pResource, pCallContext, pParams) nvdecctxControl_Prologue_DISPATCH(pResource, pCallContext, pParams) 132 #define nvdecctxGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) nvdecctxGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize) 133 #define nvdecctxInternalControlForward(pGpuResource, command, pParams, size) nvdecctxInternalControlForward_DISPATCH(pGpuResource, command, pParams, size) 134 #define nvdecctxUnmapFrom(pResource, pParams) nvdecctxUnmapFrom_DISPATCH(pResource, pParams) 135 #define nvdecctxControl_Epilogue(pResource, pCallContext, pParams) nvdecctxControl_Epilogue_DISPATCH(pResource, pCallContext, pParams) 136 #define nvdecctxControlLookup(pResource, pParams, ppEntry) nvdecctxControlLookup_DISPATCH(pResource, pParams, ppEntry) 137 #define nvdecctxGetSwMethods(pChannelDescendant, ppMethods, pNumMethods) nvdecctxGetSwMethods_DISPATCH(pChannelDescendant, ppMethods, pNumMethods) 138 #define nvdecctxGetInternalObjectHandle(pGpuResource) nvdecctxGetInternalObjectHandle_DISPATCH(pGpuResource) 139 #define nvdecctxControl(pGpuResource, pCallContext, pParams) nvdecctxControl_DISPATCH(pGpuResource, pCallContext, pParams) 140 #define nvdecctxUnmap(pGpuResource, pCallContext, pCpuMapping) nvdecctxUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping) 141 #define nvdecctxGetMemInterMapParams(pRmResource, pParams) nvdecctxGetMemInterMapParams_DISPATCH(pRmResource, pParams) 142 #define nvdecctxGetMemoryMappingDescriptor(pRmResource, ppMemDesc) nvdecctxGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc) 143 #define nvdecctxIsSwMethodStalling(pChannelDescendant, hHandle) nvdecctxIsSwMethodStalling_DISPATCH(pChannelDescendant, hHandle) 144 #define nvdecctxControlFilter(pResource, pCallContext, pParams) nvdecctxControlFilter_DISPATCH(pResource, pCallContext, pParams) 145 #define nvdecctxUnregisterEvent(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) nvdecctxUnregisterEvent_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) 146 #define nvdecctxControlSerialization_Prologue(pResource, pCallContext, pParams) nvdecctxControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams) 147 #define nvdecctxCanCopy(pResource) nvdecctxCanCopy_DISPATCH(pResource) 148 #define nvdecctxPreDestruct(pResource) nvdecctxPreDestruct_DISPATCH(pResource) 149 #define nvdecctxIsDuplicate(pResource, hMemory, pDuplicate) nvdecctxIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate) 150 #define nvdecctxControlSerialization_Epilogue(pResource, pCallContext, pParams) nvdecctxControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams) 151 #define nvdecctxGetNotificationListPtr(pNotifier) nvdecctxGetNotificationListPtr_DISPATCH(pNotifier) 152 #define nvdecctxGetNotificationShare(pNotifier) nvdecctxGetNotificationShare_DISPATCH(pNotifier) 153 #define nvdecctxMap(pGpuResource, pCallContext, pParams, pCpuMapping) nvdecctxMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping) 154 #define nvdecctxGetOrAllocNotifShare(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) nvdecctxGetOrAllocNotifShare_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) 155 NV_STATUS nvdecctxConstructHal_KERNEL(struct NvdecContext *pNvdecContext, struct CALL_CONTEXT *pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *pParams); 156 157 158 #ifdef __nvoc_kernel_nvdec_ctx_h_disabled 159 static inline NV_STATUS nvdecctxConstructHal(struct NvdecContext *pNvdecContext, struct CALL_CONTEXT *pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *pParams) { 160 NV_ASSERT_FAILED_PRECOMP("NvdecContext was disabled!"); 161 return NV_ERR_NOT_SUPPORTED; 162 } 163 #else //__nvoc_kernel_nvdec_ctx_h_disabled 164 #define nvdecctxConstructHal(pNvdecContext, pCallContext, pParams) nvdecctxConstructHal_KERNEL(pNvdecContext, pCallContext, pParams) 165 #endif //__nvoc_kernel_nvdec_ctx_h_disabled 166 167 #define nvdecctxConstructHal_HAL(pNvdecContext, pCallContext, pParams) nvdecctxConstructHal(pNvdecContext, pCallContext, pParams) 168 169 void nvdecctxDestructHal_KERNEL(struct NvdecContext *pNvdecContext); 170 171 172 #ifdef __nvoc_kernel_nvdec_ctx_h_disabled 173 static inline void nvdecctxDestructHal(struct NvdecContext *pNvdecContext) { 174 NV_ASSERT_FAILED_PRECOMP("NvdecContext was disabled!"); 175 } 176 #else //__nvoc_kernel_nvdec_ctx_h_disabled 177 #define nvdecctxDestructHal(pNvdecContext) nvdecctxDestructHal_KERNEL(pNvdecContext) 178 #endif //__nvoc_kernel_nvdec_ctx_h_disabled 179 180 #define nvdecctxDestructHal_HAL(pNvdecContext) nvdecctxDestructHal(pNvdecContext) 181 182 static inline NV_STATUS nvdecctxCheckMemInterUnmap_DISPATCH(struct NvdecContext *pChannelDescendant, NvBool bSubdeviceHandleProvided) { 183 return pChannelDescendant->__nvdecctxCheckMemInterUnmap__(pChannelDescendant, bSubdeviceHandleProvided); 184 } 185 186 static inline NvBool nvdecctxShareCallback_DISPATCH(struct NvdecContext *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) { 187 return pGpuResource->__nvdecctxShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy); 188 } 189 190 static inline NvBool nvdecctxAccessCallback_DISPATCH(struct NvdecContext *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) { 191 return pResource->__nvdecctxAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight); 192 } 193 194 static inline NV_STATUS nvdecctxMapTo_DISPATCH(struct NvdecContext *pResource, RS_RES_MAP_TO_PARAMS *pParams) { 195 return pResource->__nvdecctxMapTo__(pResource, pParams); 196 } 197 198 static inline NV_STATUS nvdecctxGetMapAddrSpace_DISPATCH(struct NvdecContext *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) { 199 return pGpuResource->__nvdecctxGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace); 200 } 201 202 static inline void nvdecctxSetNotificationShare_DISPATCH(struct NvdecContext *pNotifier, struct NotifShare *pNotifShare) { 203 pNotifier->__nvdecctxSetNotificationShare__(pNotifier, pNotifShare); 204 } 205 206 static inline NvU32 nvdecctxGetRefCount_DISPATCH(struct NvdecContext *pResource) { 207 return pResource->__nvdecctxGetRefCount__(pResource); 208 } 209 210 static inline void nvdecctxAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct NvdecContext *pResource, RsResourceRef *pReference) { 211 pResource->__nvdecctxAddAdditionalDependants__(pClient, pResource, pReference); 212 } 213 214 static inline NV_STATUS nvdecctxControl_Prologue_DISPATCH(struct NvdecContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 215 return pResource->__nvdecctxControl_Prologue__(pResource, pCallContext, pParams); 216 } 217 218 static inline NV_STATUS nvdecctxGetRegBaseOffsetAndSize_DISPATCH(struct NvdecContext *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) { 219 return pGpuResource->__nvdecctxGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize); 220 } 221 222 static inline NV_STATUS nvdecctxInternalControlForward_DISPATCH(struct NvdecContext *pGpuResource, NvU32 command, void *pParams, NvU32 size) { 223 return pGpuResource->__nvdecctxInternalControlForward__(pGpuResource, command, pParams, size); 224 } 225 226 static inline NV_STATUS nvdecctxUnmapFrom_DISPATCH(struct NvdecContext *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) { 227 return pResource->__nvdecctxUnmapFrom__(pResource, pParams); 228 } 229 230 static inline void nvdecctxControl_Epilogue_DISPATCH(struct NvdecContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 231 pResource->__nvdecctxControl_Epilogue__(pResource, pCallContext, pParams); 232 } 233 234 static inline NV_STATUS nvdecctxControlLookup_DISPATCH(struct NvdecContext *pResource, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams, const struct NVOC_EXPORTED_METHOD_DEF **ppEntry) { 235 return pResource->__nvdecctxControlLookup__(pResource, pParams, ppEntry); 236 } 237 238 static inline NV_STATUS nvdecctxGetSwMethods_DISPATCH(struct NvdecContext *pChannelDescendant, const METHOD **ppMethods, NvU32 *pNumMethods) { 239 return pChannelDescendant->__nvdecctxGetSwMethods__(pChannelDescendant, ppMethods, pNumMethods); 240 } 241 242 static inline NvHandle nvdecctxGetInternalObjectHandle_DISPATCH(struct NvdecContext *pGpuResource) { 243 return pGpuResource->__nvdecctxGetInternalObjectHandle__(pGpuResource); 244 } 245 246 static inline NV_STATUS nvdecctxControl_DISPATCH(struct NvdecContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 247 return pGpuResource->__nvdecctxControl__(pGpuResource, pCallContext, pParams); 248 } 249 250 static inline NV_STATUS nvdecctxUnmap_DISPATCH(struct NvdecContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) { 251 return pGpuResource->__nvdecctxUnmap__(pGpuResource, pCallContext, pCpuMapping); 252 } 253 254 static inline NV_STATUS nvdecctxGetMemInterMapParams_DISPATCH(struct NvdecContext *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) { 255 return pRmResource->__nvdecctxGetMemInterMapParams__(pRmResource, pParams); 256 } 257 258 static inline NV_STATUS nvdecctxGetMemoryMappingDescriptor_DISPATCH(struct NvdecContext *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) { 259 return pRmResource->__nvdecctxGetMemoryMappingDescriptor__(pRmResource, ppMemDesc); 260 } 261 262 static inline NvBool nvdecctxIsSwMethodStalling_DISPATCH(struct NvdecContext *pChannelDescendant, NvU32 hHandle) { 263 return pChannelDescendant->__nvdecctxIsSwMethodStalling__(pChannelDescendant, hHandle); 264 } 265 266 static inline NV_STATUS nvdecctxControlFilter_DISPATCH(struct NvdecContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 267 return pResource->__nvdecctxControlFilter__(pResource, pCallContext, pParams); 268 } 269 270 static inline NV_STATUS nvdecctxUnregisterEvent_DISPATCH(struct NvdecContext *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) { 271 return pNotifier->__nvdecctxUnregisterEvent__(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent); 272 } 273 274 static inline NV_STATUS nvdecctxControlSerialization_Prologue_DISPATCH(struct NvdecContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 275 return pResource->__nvdecctxControlSerialization_Prologue__(pResource, pCallContext, pParams); 276 } 277 278 static inline NvBool nvdecctxCanCopy_DISPATCH(struct NvdecContext *pResource) { 279 return pResource->__nvdecctxCanCopy__(pResource); 280 } 281 282 static inline void nvdecctxPreDestruct_DISPATCH(struct NvdecContext *pResource) { 283 pResource->__nvdecctxPreDestruct__(pResource); 284 } 285 286 static inline NV_STATUS nvdecctxIsDuplicate_DISPATCH(struct NvdecContext *pResource, NvHandle hMemory, NvBool *pDuplicate) { 287 return pResource->__nvdecctxIsDuplicate__(pResource, hMemory, pDuplicate); 288 } 289 290 static inline void nvdecctxControlSerialization_Epilogue_DISPATCH(struct NvdecContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 291 pResource->__nvdecctxControlSerialization_Epilogue__(pResource, pCallContext, pParams); 292 } 293 294 static inline PEVENTNOTIFICATION *nvdecctxGetNotificationListPtr_DISPATCH(struct NvdecContext *pNotifier) { 295 return pNotifier->__nvdecctxGetNotificationListPtr__(pNotifier); 296 } 297 298 static inline struct NotifShare *nvdecctxGetNotificationShare_DISPATCH(struct NvdecContext *pNotifier) { 299 return pNotifier->__nvdecctxGetNotificationShare__(pNotifier); 300 } 301 302 static inline NV_STATUS nvdecctxMap_DISPATCH(struct NvdecContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) { 303 return pGpuResource->__nvdecctxMap__(pGpuResource, pCallContext, pParams, pCpuMapping); 304 } 305 306 static inline NV_STATUS nvdecctxGetOrAllocNotifShare_DISPATCH(struct NvdecContext *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) { 307 return pNotifier->__nvdecctxGetOrAllocNotifShare__(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare); 308 } 309 310 static inline NV_STATUS __nvoc_nvdecctxConstruct(struct NvdecContext *arg_pNvdecContext, struct CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams) { 311 return nvdecctxConstructHal(arg_pNvdecContext, arg_pCallContext, arg_pParams); 312 } 313 314 static inline void __nvoc_nvdecctxDestruct(struct NvdecContext *pNvdecContext) { 315 nvdecctxDestructHal(pNvdecContext); 316 } 317 318 #undef PRIVATE_FIELD 319 320 321 #endif // KERNEL_NVDEC_CTX_H 322 323 #ifdef __cplusplus 324 } // extern "C" 325 #endif 326 #endif // _G_KERNEL_NVDEC_CTX_NVOC_H_ 327