1 #ifndef _G_KERNEL_CE_CONTEXT_NVOC_H_
2 #define _G_KERNEL_CE_CONTEXT_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_ce_context_nvoc.h"
33 
34 #ifndef KERNEL_CE_CONTEXT_H
35 #define KERNEL_CE_CONTEXT_H
36 
37 #include "core/core.h"
38 #include "gpu/eng_state.h"
39 #include "gpu/gpu_halspec.h"
40 #include "gpu/gpu.h"
41 #include "kernel/gpu/fifo/channel_descendant.h"
42 
43 ENGDESCRIPTOR kceGetEngineDescFromAllocParams(struct OBJGPU *pGpu, NvU32 externalClassId, void *pAllocParams);
44 
45 /*!
46  * RM internal class representing XXX_DMA_COPY_A
47  */
48 
49 // Private field names are wrapped in PRIVATE_FIELD, which does nothing for
50 // the matching C source file, but causes diagnostics to be issued if another
51 // source file references the field.
52 #ifdef NVOC_KERNEL_CE_CONTEXT_H_PRIVATE_ACCESS_ALLOWED
53 #define PRIVATE_FIELD(x) x
54 #else
55 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
56 #endif
57 
58 struct KernelCeContext {
59     const struct NVOC_RTTI *__nvoc_rtti;
60     struct ChannelDescendant __nvoc_base_ChannelDescendant;
61     struct Object *__nvoc_pbase_Object;
62     struct RsResource *__nvoc_pbase_RsResource;
63     struct RmResourceCommon *__nvoc_pbase_RmResourceCommon;
64     struct RmResource *__nvoc_pbase_RmResource;
65     struct GpuResource *__nvoc_pbase_GpuResource;
66     struct INotifier *__nvoc_pbase_INotifier;
67     struct Notifier *__nvoc_pbase_Notifier;
68     struct ChannelDescendant *__nvoc_pbase_ChannelDescendant;
69     struct KernelCeContext *__nvoc_pbase_KernelCeContext;
70     NV_STATUS (*__kcectxCheckMemInterUnmap__)(struct KernelCeContext *, NvBool);
71     NvBool (*__kcectxShareCallback__)(struct KernelCeContext *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *);
72     NvBool (*__kcectxAccessCallback__)(struct KernelCeContext *, struct RsClient *, void *, RsAccessRight);
73     NV_STATUS (*__kcectxMapTo__)(struct KernelCeContext *, RS_RES_MAP_TO_PARAMS *);
74     NV_STATUS (*__kcectxGetMapAddrSpace__)(struct KernelCeContext *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *);
75     void (*__kcectxSetNotificationShare__)(struct KernelCeContext *, struct NotifShare *);
76     NvU32 (*__kcectxGetRefCount__)(struct KernelCeContext *);
77     void (*__kcectxAddAdditionalDependants__)(struct RsClient *, struct KernelCeContext *, RsResourceRef *);
78     NV_STATUS (*__kcectxControl_Prologue__)(struct KernelCeContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
79     NV_STATUS (*__kcectxGetRegBaseOffsetAndSize__)(struct KernelCeContext *, struct OBJGPU *, NvU32 *, NvU32 *);
80     NV_STATUS (*__kcectxInternalControlForward__)(struct KernelCeContext *, NvU32, void *, NvU32);
81     NV_STATUS (*__kcectxUnmapFrom__)(struct KernelCeContext *, RS_RES_UNMAP_FROM_PARAMS *);
82     void (*__kcectxControl_Epilogue__)(struct KernelCeContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
83     NV_STATUS (*__kcectxGetSwMethods__)(struct KernelCeContext *, const METHOD **, NvU32 *);
84     NvHandle (*__kcectxGetInternalObjectHandle__)(struct KernelCeContext *);
85     NV_STATUS (*__kcectxControl__)(struct KernelCeContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
86     NV_STATUS (*__kcectxUnmap__)(struct KernelCeContext *, struct CALL_CONTEXT *, struct RsCpuMapping *);
87     NV_STATUS (*__kcectxGetMemInterMapParams__)(struct KernelCeContext *, RMRES_MEM_INTER_MAP_PARAMS *);
88     NV_STATUS (*__kcectxGetMemoryMappingDescriptor__)(struct KernelCeContext *, struct MEMORY_DESCRIPTOR **);
89     NvBool (*__kcectxIsSwMethodStalling__)(struct KernelCeContext *, NvU32);
90     NV_STATUS (*__kcectxControlFilter__)(struct KernelCeContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
91     NV_STATUS (*__kcectxUnregisterEvent__)(struct KernelCeContext *, NvHandle, NvHandle, NvHandle, NvHandle);
92     NV_STATUS (*__kcectxControlSerialization_Prologue__)(struct KernelCeContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
93     NvBool (*__kcectxCanCopy__)(struct KernelCeContext *);
94     NvBool (*__kcectxIsPartialUnmapSupported__)(struct KernelCeContext *);
95     void (*__kcectxPreDestruct__)(struct KernelCeContext *);
96     NV_STATUS (*__kcectxIsDuplicate__)(struct KernelCeContext *, NvHandle, NvBool *);
97     void (*__kcectxControlSerialization_Epilogue__)(struct KernelCeContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
98     PEVENTNOTIFICATION *(*__kcectxGetNotificationListPtr__)(struct KernelCeContext *);
99     struct NotifShare *(*__kcectxGetNotificationShare__)(struct KernelCeContext *);
100     NV_STATUS (*__kcectxMap__)(struct KernelCeContext *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *);
101     NV_STATUS (*__kcectxGetOrAllocNotifShare__)(struct KernelCeContext *, NvHandle, NvHandle, struct NotifShare **);
102 };
103 
104 #ifndef __NVOC_CLASS_KernelCeContext_TYPEDEF__
105 #define __NVOC_CLASS_KernelCeContext_TYPEDEF__
106 typedef struct KernelCeContext KernelCeContext;
107 #endif /* __NVOC_CLASS_KernelCeContext_TYPEDEF__ */
108 
109 #ifndef __nvoc_class_id_KernelCeContext
110 #define __nvoc_class_id_KernelCeContext 0x2d0ee9
111 #endif /* __nvoc_class_id_KernelCeContext */
112 
113 extern const struct NVOC_CLASS_DEF __nvoc_class_def_KernelCeContext;
114 
115 #define __staticCast_KernelCeContext(pThis) \
116     ((pThis)->__nvoc_pbase_KernelCeContext)
117 
118 #ifdef __nvoc_kernel_ce_context_h_disabled
119 #define __dynamicCast_KernelCeContext(pThis) ((KernelCeContext*)NULL)
120 #else //__nvoc_kernel_ce_context_h_disabled
121 #define __dynamicCast_KernelCeContext(pThis) \
122     ((KernelCeContext*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(KernelCeContext)))
123 #endif //__nvoc_kernel_ce_context_h_disabled
124 
125 
126 NV_STATUS __nvoc_objCreateDynamic_KernelCeContext(KernelCeContext**, Dynamic*, NvU32, va_list);
127 
128 NV_STATUS __nvoc_objCreate_KernelCeContext(KernelCeContext**, Dynamic*, NvU32, CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams);
129 #define __objCreate_KernelCeContext(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \
130     __nvoc_objCreate_KernelCeContext((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams)
131 
132 #define kcectxCheckMemInterUnmap(pChannelDescendant, bSubdeviceHandleProvided) kcectxCheckMemInterUnmap_DISPATCH(pChannelDescendant, bSubdeviceHandleProvided)
133 #define kcectxShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) kcectxShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy)
134 #define kcectxAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) kcectxAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight)
135 #define kcectxMapTo(pResource, pParams) kcectxMapTo_DISPATCH(pResource, pParams)
136 #define kcectxGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) kcectxGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace)
137 #define kcectxSetNotificationShare(pNotifier, pNotifShare) kcectxSetNotificationShare_DISPATCH(pNotifier, pNotifShare)
138 #define kcectxGetRefCount(pResource) kcectxGetRefCount_DISPATCH(pResource)
139 #define kcectxAddAdditionalDependants(pClient, pResource, pReference) kcectxAddAdditionalDependants_DISPATCH(pClient, pResource, pReference)
140 #define kcectxControl_Prologue(pResource, pCallContext, pParams) kcectxControl_Prologue_DISPATCH(pResource, pCallContext, pParams)
141 #define kcectxGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) kcectxGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize)
142 #define kcectxInternalControlForward(pGpuResource, command, pParams, size) kcectxInternalControlForward_DISPATCH(pGpuResource, command, pParams, size)
143 #define kcectxUnmapFrom(pResource, pParams) kcectxUnmapFrom_DISPATCH(pResource, pParams)
144 #define kcectxControl_Epilogue(pResource, pCallContext, pParams) kcectxControl_Epilogue_DISPATCH(pResource, pCallContext, pParams)
145 #define kcectxGetSwMethods(pChannelDescendant, ppMethods, pNumMethods) kcectxGetSwMethods_DISPATCH(pChannelDescendant, ppMethods, pNumMethods)
146 #define kcectxGetInternalObjectHandle(pGpuResource) kcectxGetInternalObjectHandle_DISPATCH(pGpuResource)
147 #define kcectxControl(pGpuResource, pCallContext, pParams) kcectxControl_DISPATCH(pGpuResource, pCallContext, pParams)
148 #define kcectxUnmap(pGpuResource, pCallContext, pCpuMapping) kcectxUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping)
149 #define kcectxGetMemInterMapParams(pRmResource, pParams) kcectxGetMemInterMapParams_DISPATCH(pRmResource, pParams)
150 #define kcectxGetMemoryMappingDescriptor(pRmResource, ppMemDesc) kcectxGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc)
151 #define kcectxIsSwMethodStalling(pChannelDescendant, hHandle) kcectxIsSwMethodStalling_DISPATCH(pChannelDescendant, hHandle)
152 #define kcectxControlFilter(pResource, pCallContext, pParams) kcectxControlFilter_DISPATCH(pResource, pCallContext, pParams)
153 #define kcectxUnregisterEvent(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) kcectxUnregisterEvent_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent)
154 #define kcectxControlSerialization_Prologue(pResource, pCallContext, pParams) kcectxControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams)
155 #define kcectxCanCopy(pResource) kcectxCanCopy_DISPATCH(pResource)
156 #define kcectxIsPartialUnmapSupported(pResource) kcectxIsPartialUnmapSupported_DISPATCH(pResource)
157 #define kcectxPreDestruct(pResource) kcectxPreDestruct_DISPATCH(pResource)
158 #define kcectxIsDuplicate(pResource, hMemory, pDuplicate) kcectxIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate)
159 #define kcectxControlSerialization_Epilogue(pResource, pCallContext, pParams) kcectxControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams)
160 #define kcectxGetNotificationListPtr(pNotifier) kcectxGetNotificationListPtr_DISPATCH(pNotifier)
161 #define kcectxGetNotificationShare(pNotifier) kcectxGetNotificationShare_DISPATCH(pNotifier)
162 #define kcectxMap(pGpuResource, pCallContext, pParams, pCpuMapping) kcectxMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping)
163 #define kcectxGetOrAllocNotifShare(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) kcectxGetOrAllocNotifShare_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare)
kcectxCheckMemInterUnmap_DISPATCH(struct KernelCeContext * pChannelDescendant,NvBool bSubdeviceHandleProvided)164 static inline NV_STATUS kcectxCheckMemInterUnmap_DISPATCH(struct KernelCeContext *pChannelDescendant, NvBool bSubdeviceHandleProvided) {
165     return pChannelDescendant->__kcectxCheckMemInterUnmap__(pChannelDescendant, bSubdeviceHandleProvided);
166 }
167 
kcectxShareCallback_DISPATCH(struct KernelCeContext * pGpuResource,struct RsClient * pInvokingClient,struct RsResourceRef * pParentRef,RS_SHARE_POLICY * pSharePolicy)168 static inline NvBool kcectxShareCallback_DISPATCH(struct KernelCeContext *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) {
169     return pGpuResource->__kcectxShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy);
170 }
171 
kcectxAccessCallback_DISPATCH(struct KernelCeContext * pResource,struct RsClient * pInvokingClient,void * pAllocParams,RsAccessRight accessRight)172 static inline NvBool kcectxAccessCallback_DISPATCH(struct KernelCeContext *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) {
173     return pResource->__kcectxAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight);
174 }
175 
kcectxMapTo_DISPATCH(struct KernelCeContext * pResource,RS_RES_MAP_TO_PARAMS * pParams)176 static inline NV_STATUS kcectxMapTo_DISPATCH(struct KernelCeContext *pResource, RS_RES_MAP_TO_PARAMS *pParams) {
177     return pResource->__kcectxMapTo__(pResource, pParams);
178 }
179 
kcectxGetMapAddrSpace_DISPATCH(struct KernelCeContext * pGpuResource,struct CALL_CONTEXT * pCallContext,NvU32 mapFlags,NV_ADDRESS_SPACE * pAddrSpace)180 static inline NV_STATUS kcectxGetMapAddrSpace_DISPATCH(struct KernelCeContext *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) {
181     return pGpuResource->__kcectxGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace);
182 }
183 
kcectxSetNotificationShare_DISPATCH(struct KernelCeContext * pNotifier,struct NotifShare * pNotifShare)184 static inline void kcectxSetNotificationShare_DISPATCH(struct KernelCeContext *pNotifier, struct NotifShare *pNotifShare) {
185     pNotifier->__kcectxSetNotificationShare__(pNotifier, pNotifShare);
186 }
187 
kcectxGetRefCount_DISPATCH(struct KernelCeContext * pResource)188 static inline NvU32 kcectxGetRefCount_DISPATCH(struct KernelCeContext *pResource) {
189     return pResource->__kcectxGetRefCount__(pResource);
190 }
191 
kcectxAddAdditionalDependants_DISPATCH(struct RsClient * pClient,struct KernelCeContext * pResource,RsResourceRef * pReference)192 static inline void kcectxAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct KernelCeContext *pResource, RsResourceRef *pReference) {
193     pResource->__kcectxAddAdditionalDependants__(pClient, pResource, pReference);
194 }
195 
kcectxControl_Prologue_DISPATCH(struct KernelCeContext * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)196 static inline NV_STATUS kcectxControl_Prologue_DISPATCH(struct KernelCeContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
197     return pResource->__kcectxControl_Prologue__(pResource, pCallContext, pParams);
198 }
199 
kcectxGetRegBaseOffsetAndSize_DISPATCH(struct KernelCeContext * pGpuResource,struct OBJGPU * pGpu,NvU32 * pOffset,NvU32 * pSize)200 static inline NV_STATUS kcectxGetRegBaseOffsetAndSize_DISPATCH(struct KernelCeContext *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) {
201     return pGpuResource->__kcectxGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize);
202 }
203 
kcectxInternalControlForward_DISPATCH(struct KernelCeContext * pGpuResource,NvU32 command,void * pParams,NvU32 size)204 static inline NV_STATUS kcectxInternalControlForward_DISPATCH(struct KernelCeContext *pGpuResource, NvU32 command, void *pParams, NvU32 size) {
205     return pGpuResource->__kcectxInternalControlForward__(pGpuResource, command, pParams, size);
206 }
207 
kcectxUnmapFrom_DISPATCH(struct KernelCeContext * pResource,RS_RES_UNMAP_FROM_PARAMS * pParams)208 static inline NV_STATUS kcectxUnmapFrom_DISPATCH(struct KernelCeContext *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) {
209     return pResource->__kcectxUnmapFrom__(pResource, pParams);
210 }
211 
kcectxControl_Epilogue_DISPATCH(struct KernelCeContext * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)212 static inline void kcectxControl_Epilogue_DISPATCH(struct KernelCeContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
213     pResource->__kcectxControl_Epilogue__(pResource, pCallContext, pParams);
214 }
215 
kcectxGetSwMethods_DISPATCH(struct KernelCeContext * pChannelDescendant,const METHOD ** ppMethods,NvU32 * pNumMethods)216 static inline NV_STATUS kcectxGetSwMethods_DISPATCH(struct KernelCeContext *pChannelDescendant, const METHOD **ppMethods, NvU32 *pNumMethods) {
217     return pChannelDescendant->__kcectxGetSwMethods__(pChannelDescendant, ppMethods, pNumMethods);
218 }
219 
kcectxGetInternalObjectHandle_DISPATCH(struct KernelCeContext * pGpuResource)220 static inline NvHandle kcectxGetInternalObjectHandle_DISPATCH(struct KernelCeContext *pGpuResource) {
221     return pGpuResource->__kcectxGetInternalObjectHandle__(pGpuResource);
222 }
223 
kcectxControl_DISPATCH(struct KernelCeContext * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)224 static inline NV_STATUS kcectxControl_DISPATCH(struct KernelCeContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
225     return pGpuResource->__kcectxControl__(pGpuResource, pCallContext, pParams);
226 }
227 
kcectxUnmap_DISPATCH(struct KernelCeContext * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RsCpuMapping * pCpuMapping)228 static inline NV_STATUS kcectxUnmap_DISPATCH(struct KernelCeContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) {
229     return pGpuResource->__kcectxUnmap__(pGpuResource, pCallContext, pCpuMapping);
230 }
231 
kcectxGetMemInterMapParams_DISPATCH(struct KernelCeContext * pRmResource,RMRES_MEM_INTER_MAP_PARAMS * pParams)232 static inline NV_STATUS kcectxGetMemInterMapParams_DISPATCH(struct KernelCeContext *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) {
233     return pRmResource->__kcectxGetMemInterMapParams__(pRmResource, pParams);
234 }
235 
kcectxGetMemoryMappingDescriptor_DISPATCH(struct KernelCeContext * pRmResource,struct MEMORY_DESCRIPTOR ** ppMemDesc)236 static inline NV_STATUS kcectxGetMemoryMappingDescriptor_DISPATCH(struct KernelCeContext *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) {
237     return pRmResource->__kcectxGetMemoryMappingDescriptor__(pRmResource, ppMemDesc);
238 }
239 
kcectxIsSwMethodStalling_DISPATCH(struct KernelCeContext * pChannelDescendant,NvU32 hHandle)240 static inline NvBool kcectxIsSwMethodStalling_DISPATCH(struct KernelCeContext *pChannelDescendant, NvU32 hHandle) {
241     return pChannelDescendant->__kcectxIsSwMethodStalling__(pChannelDescendant, hHandle);
242 }
243 
kcectxControlFilter_DISPATCH(struct KernelCeContext * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)244 static inline NV_STATUS kcectxControlFilter_DISPATCH(struct KernelCeContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
245     return pResource->__kcectxControlFilter__(pResource, pCallContext, pParams);
246 }
247 
kcectxUnregisterEvent_DISPATCH(struct KernelCeContext * pNotifier,NvHandle hNotifierClient,NvHandle hNotifierResource,NvHandle hEventClient,NvHandle hEvent)248 static inline NV_STATUS kcectxUnregisterEvent_DISPATCH(struct KernelCeContext *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) {
249     return pNotifier->__kcectxUnregisterEvent__(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent);
250 }
251 
kcectxControlSerialization_Prologue_DISPATCH(struct KernelCeContext * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)252 static inline NV_STATUS kcectxControlSerialization_Prologue_DISPATCH(struct KernelCeContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
253     return pResource->__kcectxControlSerialization_Prologue__(pResource, pCallContext, pParams);
254 }
255 
kcectxCanCopy_DISPATCH(struct KernelCeContext * pResource)256 static inline NvBool kcectxCanCopy_DISPATCH(struct KernelCeContext *pResource) {
257     return pResource->__kcectxCanCopy__(pResource);
258 }
259 
kcectxIsPartialUnmapSupported_DISPATCH(struct KernelCeContext * pResource)260 static inline NvBool kcectxIsPartialUnmapSupported_DISPATCH(struct KernelCeContext *pResource) {
261     return pResource->__kcectxIsPartialUnmapSupported__(pResource);
262 }
263 
kcectxPreDestruct_DISPATCH(struct KernelCeContext * pResource)264 static inline void kcectxPreDestruct_DISPATCH(struct KernelCeContext *pResource) {
265     pResource->__kcectxPreDestruct__(pResource);
266 }
267 
kcectxIsDuplicate_DISPATCH(struct KernelCeContext * pResource,NvHandle hMemory,NvBool * pDuplicate)268 static inline NV_STATUS kcectxIsDuplicate_DISPATCH(struct KernelCeContext *pResource, NvHandle hMemory, NvBool *pDuplicate) {
269     return pResource->__kcectxIsDuplicate__(pResource, hMemory, pDuplicate);
270 }
271 
kcectxControlSerialization_Epilogue_DISPATCH(struct KernelCeContext * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)272 static inline void kcectxControlSerialization_Epilogue_DISPATCH(struct KernelCeContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
273     pResource->__kcectxControlSerialization_Epilogue__(pResource, pCallContext, pParams);
274 }
275 
kcectxGetNotificationListPtr_DISPATCH(struct KernelCeContext * pNotifier)276 static inline PEVENTNOTIFICATION *kcectxGetNotificationListPtr_DISPATCH(struct KernelCeContext *pNotifier) {
277     return pNotifier->__kcectxGetNotificationListPtr__(pNotifier);
278 }
279 
kcectxGetNotificationShare_DISPATCH(struct KernelCeContext * pNotifier)280 static inline struct NotifShare *kcectxGetNotificationShare_DISPATCH(struct KernelCeContext *pNotifier) {
281     return pNotifier->__kcectxGetNotificationShare__(pNotifier);
282 }
283 
kcectxMap_DISPATCH(struct KernelCeContext * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_CPU_MAP_PARAMS * pParams,struct RsCpuMapping * pCpuMapping)284 static inline NV_STATUS kcectxMap_DISPATCH(struct KernelCeContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) {
285     return pGpuResource->__kcectxMap__(pGpuResource, pCallContext, pParams, pCpuMapping);
286 }
287 
kcectxGetOrAllocNotifShare_DISPATCH(struct KernelCeContext * pNotifier,NvHandle hNotifierClient,NvHandle hNotifierResource,struct NotifShare ** ppNotifShare)288 static inline NV_STATUS kcectxGetOrAllocNotifShare_DISPATCH(struct KernelCeContext *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) {
289     return pNotifier->__kcectxGetOrAllocNotifShare__(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare);
290 }
291 
292 NV_STATUS kcectxConstruct_IMPL(struct KernelCeContext *arg_pKCeContext, CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams);
293 
294 #define __nvoc_kcectxConstruct(arg_pKCeContext, arg_pCallContext, arg_pParams) kcectxConstruct_IMPL(arg_pKCeContext, arg_pCallContext, arg_pParams)
295 void kcectxDestruct_IMPL(struct KernelCeContext *pKCeContext);
296 
297 #define __nvoc_kcectxDestruct(pKCeContext) kcectxDestruct_IMPL(pKCeContext)
298 #undef PRIVATE_FIELD
299 
300 
301 #endif
302 
303 #ifdef __cplusplus
304 } // extern "C"
305 #endif
306 
307 #endif // _G_KERNEL_CE_CONTEXT_NVOC_H_
308