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