1 #ifndef _G_CHANNEL_DESCENDANT_NVOC_H_
2 #define _G_CHANNEL_DESCENDANT_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_channel_descendant_nvoc.h"
33
34 #ifndef _CHANNEL_DESCENDANT_H_
35 #define _CHANNEL_DESCENDANT_H_
36
37 #include "core/core.h"
38 #include "rmapi/event.h"
39
40 #include "containers/btree.h"
41 #include "resserv/rs_resource.h"
42 #include "gpu/gpu_resource.h"
43 #include "gpu/gpu_resource_desc.h"
44 #include "kernel/gpu/gpu_halspec.h"
45
46 struct ChannelDescendant;
47
48 #ifndef __NVOC_CLASS_ChannelDescendant_TYPEDEF__
49 #define __NVOC_CLASS_ChannelDescendant_TYPEDEF__
50 typedef struct ChannelDescendant ChannelDescendant;
51 #endif /* __NVOC_CLASS_ChannelDescendant_TYPEDEF__ */
52
53 #ifndef __nvoc_class_id_ChannelDescendant
54 #define __nvoc_class_id_ChannelDescendant 0x43d7c4
55 #endif /* __nvoc_class_id_ChannelDescendant */
56
57
58 struct ContextDma;
59
60 #ifndef __NVOC_CLASS_ContextDma_TYPEDEF__
61 #define __NVOC_CLASS_ContextDma_TYPEDEF__
62 typedef struct ContextDma ContextDma;
63 #endif /* __NVOC_CLASS_ContextDma_TYPEDEF__ */
64
65 #ifndef __nvoc_class_id_ContextDma
66 #define __nvoc_class_id_ContextDma 0x88441b
67 #endif /* __nvoc_class_id_ContextDma */
68
69
70 struct KernelChannel;
71
72 #ifndef __NVOC_CLASS_KernelChannel_TYPEDEF__
73 #define __NVOC_CLASS_KernelChannel_TYPEDEF__
74 typedef struct KernelChannel KernelChannel;
75 #endif /* __NVOC_CLASS_KernelChannel_TYPEDEF__ */
76
77 #ifndef __nvoc_class_id_KernelChannel
78 #define __nvoc_class_id_KernelChannel 0x5d8d70
79 #endif /* __nvoc_class_id_KernelChannel */
80
81
82
83 /*!
84 * Definitions for SW methods (emulation of pushbuffer methods in SW)
85 */
86 typedef struct _METHOD METHOD, *PMETHOD;
87
88 typedef NV_STATUS (*METHODPROC)(OBJGPU *, struct ChannelDescendant *, NvU32, NvV32);
89
90 struct _METHOD
91 {
92 METHODPROC Proc;
93 NvU32 Low;
94 NvU32 High;
95 };
96
97 /*!
98 * Determines id engine that should handle the resource allocation. Used when
99 * there are multiple engines that support the same class id (e.g.: Copy
100 * Engine).
101 */
102 typedef ENGDESCRIPTOR PARAM_TO_ENGDESC_FUNCTION(OBJGPU *pGpu, NvU32 externalClassId,
103 void *pAllocParams);
104
105 /*!
106 * Abstract base class for descendants of XXX_CHANNEL_DMA (Channel)
107 */
108
109 // Private field names are wrapped in PRIVATE_FIELD, which does nothing for
110 // the matching C source file, but causes diagnostics to be issued if another
111 // source file references the field.
112 #ifdef NVOC_CHANNEL_DESCENDANT_H_PRIVATE_ACCESS_ALLOWED
113 #define PRIVATE_FIELD(x) x
114 #else
115 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
116 #endif
117
118 struct ChannelDescendant {
119 const struct NVOC_RTTI *__nvoc_rtti;
120 struct GpuResource __nvoc_base_GpuResource;
121 struct Notifier __nvoc_base_Notifier;
122 struct Object *__nvoc_pbase_Object;
123 struct RsResource *__nvoc_pbase_RsResource;
124 struct RmResourceCommon *__nvoc_pbase_RmResourceCommon;
125 struct RmResource *__nvoc_pbase_RmResource;
126 struct GpuResource *__nvoc_pbase_GpuResource;
127 struct INotifier *__nvoc_pbase_INotifier;
128 struct Notifier *__nvoc_pbase_Notifier;
129 struct ChannelDescendant *__nvoc_pbase_ChannelDescendant;
130 NV_STATUS (*__chandesGetSwMethods__)(struct ChannelDescendant *, const METHOD **, NvU32 *);
131 NvBool (*__chandesIsSwMethodStalling__)(struct ChannelDescendant *, NvU32);
132 NV_STATUS (*__chandesCheckMemInterUnmap__)(struct ChannelDescendant *, NvBool);
133 NvBool (*__chandesShareCallback__)(struct ChannelDescendant *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *);
134 NV_STATUS (*__chandesGetOrAllocNotifShare__)(struct ChannelDescendant *, NvHandle, NvHandle, struct NotifShare **);
135 NV_STATUS (*__chandesMapTo__)(struct ChannelDescendant *, RS_RES_MAP_TO_PARAMS *);
136 NV_STATUS (*__chandesGetMapAddrSpace__)(struct ChannelDescendant *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *);
137 void (*__chandesSetNotificationShare__)(struct ChannelDescendant *, struct NotifShare *);
138 NvU32 (*__chandesGetRefCount__)(struct ChannelDescendant *);
139 void (*__chandesAddAdditionalDependants__)(struct RsClient *, struct ChannelDescendant *, RsResourceRef *);
140 NV_STATUS (*__chandesControl_Prologue__)(struct ChannelDescendant *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
141 NV_STATUS (*__chandesGetRegBaseOffsetAndSize__)(struct ChannelDescendant *, struct OBJGPU *, NvU32 *, NvU32 *);
142 NV_STATUS (*__chandesInternalControlForward__)(struct ChannelDescendant *, NvU32, void *, NvU32);
143 NV_STATUS (*__chandesUnmapFrom__)(struct ChannelDescendant *, RS_RES_UNMAP_FROM_PARAMS *);
144 void (*__chandesControl_Epilogue__)(struct ChannelDescendant *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
145 NvHandle (*__chandesGetInternalObjectHandle__)(struct ChannelDescendant *);
146 NV_STATUS (*__chandesControl__)(struct ChannelDescendant *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
147 NV_STATUS (*__chandesUnmap__)(struct ChannelDescendant *, struct CALL_CONTEXT *, struct RsCpuMapping *);
148 NV_STATUS (*__chandesGetMemInterMapParams__)(struct ChannelDescendant *, RMRES_MEM_INTER_MAP_PARAMS *);
149 NV_STATUS (*__chandesGetMemoryMappingDescriptor__)(struct ChannelDescendant *, struct MEMORY_DESCRIPTOR **);
150 NV_STATUS (*__chandesControlFilter__)(struct ChannelDescendant *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
151 NV_STATUS (*__chandesUnregisterEvent__)(struct ChannelDescendant *, NvHandle, NvHandle, NvHandle, NvHandle);
152 NV_STATUS (*__chandesControlSerialization_Prologue__)(struct ChannelDescendant *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
153 NvBool (*__chandesCanCopy__)(struct ChannelDescendant *);
154 NvBool (*__chandesIsPartialUnmapSupported__)(struct ChannelDescendant *);
155 void (*__chandesPreDestruct__)(struct ChannelDescendant *);
156 NV_STATUS (*__chandesIsDuplicate__)(struct ChannelDescendant *, NvHandle, NvBool *);
157 void (*__chandesControlSerialization_Epilogue__)(struct ChannelDescendant *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
158 PEVENTNOTIFICATION *(*__chandesGetNotificationListPtr__)(struct ChannelDescendant *);
159 struct NotifShare *(*__chandesGetNotificationShare__)(struct ChannelDescendant *);
160 NV_STATUS (*__chandesMap__)(struct ChannelDescendant *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *);
161 NvBool (*__chandesAccessCallback__)(struct ChannelDescendant *, struct RsClient *, void *, RsAccessRight);
162 struct KernelChannel *pKernelChannel;
163 GPU_RESOURCE_DESC resourceDesc;
164 NvU16 classID;
165 NvU32 notifyAction;
166 NvBool bNotifyTrigger;
167 };
168
169 #ifndef __NVOC_CLASS_ChannelDescendant_TYPEDEF__
170 #define __NVOC_CLASS_ChannelDescendant_TYPEDEF__
171 typedef struct ChannelDescendant ChannelDescendant;
172 #endif /* __NVOC_CLASS_ChannelDescendant_TYPEDEF__ */
173
174 #ifndef __nvoc_class_id_ChannelDescendant
175 #define __nvoc_class_id_ChannelDescendant 0x43d7c4
176 #endif /* __nvoc_class_id_ChannelDescendant */
177
178 extern const struct NVOC_CLASS_DEF __nvoc_class_def_ChannelDescendant;
179
180 #define __staticCast_ChannelDescendant(pThis) \
181 ((pThis)->__nvoc_pbase_ChannelDescendant)
182
183 #ifdef __nvoc_channel_descendant_h_disabled
184 #define __dynamicCast_ChannelDescendant(pThis) ((ChannelDescendant*)NULL)
185 #else //__nvoc_channel_descendant_h_disabled
186 #define __dynamicCast_ChannelDescendant(pThis) \
187 ((ChannelDescendant*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(ChannelDescendant)))
188 #endif //__nvoc_channel_descendant_h_disabled
189
190
191 NV_STATUS __nvoc_objCreateDynamic_ChannelDescendant(ChannelDescendant**, Dynamic*, NvU32, va_list);
192
193 NV_STATUS __nvoc_objCreate_ChannelDescendant(ChannelDescendant**, Dynamic*, NvU32, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams, PARAM_TO_ENGDESC_FUNCTION * arg_pParamToEngDescFn);
194 #define __objCreate_ChannelDescendant(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams, arg_pParamToEngDescFn) \
195 __nvoc_objCreate_ChannelDescendant((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams, arg_pParamToEngDescFn)
196
197 #define chandesGetSwMethods(pChannelDescendant, ppMethods, pNumMethods) chandesGetSwMethods_DISPATCH(pChannelDescendant, ppMethods, pNumMethods)
198 #define chandesIsSwMethodStalling(pChannelDescendant, hHandle) chandesIsSwMethodStalling_DISPATCH(pChannelDescendant, hHandle)
199 #define chandesCheckMemInterUnmap(pChannelDescendant, bSubdeviceHandleProvided) chandesCheckMemInterUnmap_DISPATCH(pChannelDescendant, bSubdeviceHandleProvided)
200 #define chandesShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) chandesShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy)
201 #define chandesGetOrAllocNotifShare(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) chandesGetOrAllocNotifShare_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare)
202 #define chandesMapTo(pResource, pParams) chandesMapTo_DISPATCH(pResource, pParams)
203 #define chandesGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) chandesGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace)
204 #define chandesSetNotificationShare(pNotifier, pNotifShare) chandesSetNotificationShare_DISPATCH(pNotifier, pNotifShare)
205 #define chandesGetRefCount(pResource) chandesGetRefCount_DISPATCH(pResource)
206 #define chandesAddAdditionalDependants(pClient, pResource, pReference) chandesAddAdditionalDependants_DISPATCH(pClient, pResource, pReference)
207 #define chandesControl_Prologue(pResource, pCallContext, pParams) chandesControl_Prologue_DISPATCH(pResource, pCallContext, pParams)
208 #define chandesGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) chandesGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize)
209 #define chandesInternalControlForward(pGpuResource, command, pParams, size) chandesInternalControlForward_DISPATCH(pGpuResource, command, pParams, size)
210 #define chandesUnmapFrom(pResource, pParams) chandesUnmapFrom_DISPATCH(pResource, pParams)
211 #define chandesControl_Epilogue(pResource, pCallContext, pParams) chandesControl_Epilogue_DISPATCH(pResource, pCallContext, pParams)
212 #define chandesGetInternalObjectHandle(pGpuResource) chandesGetInternalObjectHandle_DISPATCH(pGpuResource)
213 #define chandesControl(pGpuResource, pCallContext, pParams) chandesControl_DISPATCH(pGpuResource, pCallContext, pParams)
214 #define chandesUnmap(pGpuResource, pCallContext, pCpuMapping) chandesUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping)
215 #define chandesGetMemInterMapParams(pRmResource, pParams) chandesGetMemInterMapParams_DISPATCH(pRmResource, pParams)
216 #define chandesGetMemoryMappingDescriptor(pRmResource, ppMemDesc) chandesGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc)
217 #define chandesControlFilter(pResource, pCallContext, pParams) chandesControlFilter_DISPATCH(pResource, pCallContext, pParams)
218 #define chandesUnregisterEvent(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) chandesUnregisterEvent_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent)
219 #define chandesControlSerialization_Prologue(pResource, pCallContext, pParams) chandesControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams)
220 #define chandesCanCopy(pResource) chandesCanCopy_DISPATCH(pResource)
221 #define chandesIsPartialUnmapSupported(pResource) chandesIsPartialUnmapSupported_DISPATCH(pResource)
222 #define chandesPreDestruct(pResource) chandesPreDestruct_DISPATCH(pResource)
223 #define chandesIsDuplicate(pResource, hMemory, pDuplicate) chandesIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate)
224 #define chandesControlSerialization_Epilogue(pResource, pCallContext, pParams) chandesControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams)
225 #define chandesGetNotificationListPtr(pNotifier) chandesGetNotificationListPtr_DISPATCH(pNotifier)
226 #define chandesGetNotificationShare(pNotifier) chandesGetNotificationShare_DISPATCH(pNotifier)
227 #define chandesMap(pGpuResource, pCallContext, pParams, pCpuMapping) chandesMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping)
228 #define chandesAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) chandesAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight)
chandesIsolateOnDestruct_b3696a(struct ChannelDescendant * pChannelDescendant)229 static inline void chandesIsolateOnDestruct_b3696a(struct ChannelDescendant *pChannelDescendant) {
230 return;
231 }
232
233
234 #ifdef __nvoc_channel_descendant_h_disabled
chandesIsolateOnDestruct(struct ChannelDescendant * pChannelDescendant)235 static inline void chandesIsolateOnDestruct(struct ChannelDescendant *pChannelDescendant) {
236 NV_ASSERT_FAILED_PRECOMP("ChannelDescendant was disabled!");
237 }
238 #else //__nvoc_channel_descendant_h_disabled
239 #define chandesIsolateOnDestruct(pChannelDescendant) chandesIsolateOnDestruct_b3696a(pChannelDescendant)
240 #endif //__nvoc_channel_descendant_h_disabled
241
242 #define chandesIsolateOnDestruct_HAL(pChannelDescendant) chandesIsolateOnDestruct(pChannelDescendant)
243
chandesDestroy_b3696a(struct ChannelDescendant * pChannelDescendant)244 static inline void chandesDestroy_b3696a(struct ChannelDescendant *pChannelDescendant) {
245 return;
246 }
247
248
249 #ifdef __nvoc_channel_descendant_h_disabled
chandesDestroy(struct ChannelDescendant * pChannelDescendant)250 static inline void chandesDestroy(struct ChannelDescendant *pChannelDescendant) {
251 NV_ASSERT_FAILED_PRECOMP("ChannelDescendant was disabled!");
252 }
253 #else //__nvoc_channel_descendant_h_disabled
254 #define chandesDestroy(pChannelDescendant) chandesDestroy_b3696a(pChannelDescendant)
255 #endif //__nvoc_channel_descendant_h_disabled
256
257 #define chandesDestroy_HAL(pChannelDescendant) chandesDestroy(pChannelDescendant)
258
259 NV_STATUS chandesGetSwMethods_IMPL(struct ChannelDescendant *pChannelDescendant, const METHOD **ppMethods, NvU32 *pNumMethods);
260
chandesGetSwMethods_DISPATCH(struct ChannelDescendant * pChannelDescendant,const METHOD ** ppMethods,NvU32 * pNumMethods)261 static inline NV_STATUS chandesGetSwMethods_DISPATCH(struct ChannelDescendant *pChannelDescendant, const METHOD **ppMethods, NvU32 *pNumMethods) {
262 return pChannelDescendant->__chandesGetSwMethods__(pChannelDescendant, ppMethods, pNumMethods);
263 }
264
265 NvBool chandesIsSwMethodStalling_IMPL(struct ChannelDescendant *pChannelDescendant, NvU32 hHandle);
266
chandesIsSwMethodStalling_DISPATCH(struct ChannelDescendant * pChannelDescendant,NvU32 hHandle)267 static inline NvBool chandesIsSwMethodStalling_DISPATCH(struct ChannelDescendant *pChannelDescendant, NvU32 hHandle) {
268 return pChannelDescendant->__chandesIsSwMethodStalling__(pChannelDescendant, hHandle);
269 }
270
271 NV_STATUS chandesCheckMemInterUnmap_IMPL(struct ChannelDescendant *pChannelDescendant, NvBool bSubdeviceHandleProvided);
272
chandesCheckMemInterUnmap_DISPATCH(struct ChannelDescendant * pChannelDescendant,NvBool bSubdeviceHandleProvided)273 static inline NV_STATUS chandesCheckMemInterUnmap_DISPATCH(struct ChannelDescendant *pChannelDescendant, NvBool bSubdeviceHandleProvided) {
274 return pChannelDescendant->__chandesCheckMemInterUnmap__(pChannelDescendant, bSubdeviceHandleProvided);
275 }
276
chandesShareCallback_DISPATCH(struct ChannelDescendant * pGpuResource,struct RsClient * pInvokingClient,struct RsResourceRef * pParentRef,RS_SHARE_POLICY * pSharePolicy)277 static inline NvBool chandesShareCallback_DISPATCH(struct ChannelDescendant *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) {
278 return pGpuResource->__chandesShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy);
279 }
280
chandesGetOrAllocNotifShare_DISPATCH(struct ChannelDescendant * pNotifier,NvHandle hNotifierClient,NvHandle hNotifierResource,struct NotifShare ** ppNotifShare)281 static inline NV_STATUS chandesGetOrAllocNotifShare_DISPATCH(struct ChannelDescendant *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) {
282 return pNotifier->__chandesGetOrAllocNotifShare__(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare);
283 }
284
chandesMapTo_DISPATCH(struct ChannelDescendant * pResource,RS_RES_MAP_TO_PARAMS * pParams)285 static inline NV_STATUS chandesMapTo_DISPATCH(struct ChannelDescendant *pResource, RS_RES_MAP_TO_PARAMS *pParams) {
286 return pResource->__chandesMapTo__(pResource, pParams);
287 }
288
chandesGetMapAddrSpace_DISPATCH(struct ChannelDescendant * pGpuResource,struct CALL_CONTEXT * pCallContext,NvU32 mapFlags,NV_ADDRESS_SPACE * pAddrSpace)289 static inline NV_STATUS chandesGetMapAddrSpace_DISPATCH(struct ChannelDescendant *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) {
290 return pGpuResource->__chandesGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace);
291 }
292
chandesSetNotificationShare_DISPATCH(struct ChannelDescendant * pNotifier,struct NotifShare * pNotifShare)293 static inline void chandesSetNotificationShare_DISPATCH(struct ChannelDescendant *pNotifier, struct NotifShare *pNotifShare) {
294 pNotifier->__chandesSetNotificationShare__(pNotifier, pNotifShare);
295 }
296
chandesGetRefCount_DISPATCH(struct ChannelDescendant * pResource)297 static inline NvU32 chandesGetRefCount_DISPATCH(struct ChannelDescendant *pResource) {
298 return pResource->__chandesGetRefCount__(pResource);
299 }
300
chandesAddAdditionalDependants_DISPATCH(struct RsClient * pClient,struct ChannelDescendant * pResource,RsResourceRef * pReference)301 static inline void chandesAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct ChannelDescendant *pResource, RsResourceRef *pReference) {
302 pResource->__chandesAddAdditionalDependants__(pClient, pResource, pReference);
303 }
304
chandesControl_Prologue_DISPATCH(struct ChannelDescendant * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)305 static inline NV_STATUS chandesControl_Prologue_DISPATCH(struct ChannelDescendant *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
306 return pResource->__chandesControl_Prologue__(pResource, pCallContext, pParams);
307 }
308
chandesGetRegBaseOffsetAndSize_DISPATCH(struct ChannelDescendant * pGpuResource,struct OBJGPU * pGpu,NvU32 * pOffset,NvU32 * pSize)309 static inline NV_STATUS chandesGetRegBaseOffsetAndSize_DISPATCH(struct ChannelDescendant *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) {
310 return pGpuResource->__chandesGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize);
311 }
312
chandesInternalControlForward_DISPATCH(struct ChannelDescendant * pGpuResource,NvU32 command,void * pParams,NvU32 size)313 static inline NV_STATUS chandesInternalControlForward_DISPATCH(struct ChannelDescendant *pGpuResource, NvU32 command, void *pParams, NvU32 size) {
314 return pGpuResource->__chandesInternalControlForward__(pGpuResource, command, pParams, size);
315 }
316
chandesUnmapFrom_DISPATCH(struct ChannelDescendant * pResource,RS_RES_UNMAP_FROM_PARAMS * pParams)317 static inline NV_STATUS chandesUnmapFrom_DISPATCH(struct ChannelDescendant *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) {
318 return pResource->__chandesUnmapFrom__(pResource, pParams);
319 }
320
chandesControl_Epilogue_DISPATCH(struct ChannelDescendant * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)321 static inline void chandesControl_Epilogue_DISPATCH(struct ChannelDescendant *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
322 pResource->__chandesControl_Epilogue__(pResource, pCallContext, pParams);
323 }
324
chandesGetInternalObjectHandle_DISPATCH(struct ChannelDescendant * pGpuResource)325 static inline NvHandle chandesGetInternalObjectHandle_DISPATCH(struct ChannelDescendant *pGpuResource) {
326 return pGpuResource->__chandesGetInternalObjectHandle__(pGpuResource);
327 }
328
chandesControl_DISPATCH(struct ChannelDescendant * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)329 static inline NV_STATUS chandesControl_DISPATCH(struct ChannelDescendant *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
330 return pGpuResource->__chandesControl__(pGpuResource, pCallContext, pParams);
331 }
332
chandesUnmap_DISPATCH(struct ChannelDescendant * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RsCpuMapping * pCpuMapping)333 static inline NV_STATUS chandesUnmap_DISPATCH(struct ChannelDescendant *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) {
334 return pGpuResource->__chandesUnmap__(pGpuResource, pCallContext, pCpuMapping);
335 }
336
chandesGetMemInterMapParams_DISPATCH(struct ChannelDescendant * pRmResource,RMRES_MEM_INTER_MAP_PARAMS * pParams)337 static inline NV_STATUS chandesGetMemInterMapParams_DISPATCH(struct ChannelDescendant *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) {
338 return pRmResource->__chandesGetMemInterMapParams__(pRmResource, pParams);
339 }
340
chandesGetMemoryMappingDescriptor_DISPATCH(struct ChannelDescendant * pRmResource,struct MEMORY_DESCRIPTOR ** ppMemDesc)341 static inline NV_STATUS chandesGetMemoryMappingDescriptor_DISPATCH(struct ChannelDescendant *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) {
342 return pRmResource->__chandesGetMemoryMappingDescriptor__(pRmResource, ppMemDesc);
343 }
344
chandesControlFilter_DISPATCH(struct ChannelDescendant * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)345 static inline NV_STATUS chandesControlFilter_DISPATCH(struct ChannelDescendant *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
346 return pResource->__chandesControlFilter__(pResource, pCallContext, pParams);
347 }
348
chandesUnregisterEvent_DISPATCH(struct ChannelDescendant * pNotifier,NvHandle hNotifierClient,NvHandle hNotifierResource,NvHandle hEventClient,NvHandle hEvent)349 static inline NV_STATUS chandesUnregisterEvent_DISPATCH(struct ChannelDescendant *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) {
350 return pNotifier->__chandesUnregisterEvent__(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent);
351 }
352
chandesControlSerialization_Prologue_DISPATCH(struct ChannelDescendant * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)353 static inline NV_STATUS chandesControlSerialization_Prologue_DISPATCH(struct ChannelDescendant *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
354 return pResource->__chandesControlSerialization_Prologue__(pResource, pCallContext, pParams);
355 }
356
chandesCanCopy_DISPATCH(struct ChannelDescendant * pResource)357 static inline NvBool chandesCanCopy_DISPATCH(struct ChannelDescendant *pResource) {
358 return pResource->__chandesCanCopy__(pResource);
359 }
360
chandesIsPartialUnmapSupported_DISPATCH(struct ChannelDescendant * pResource)361 static inline NvBool chandesIsPartialUnmapSupported_DISPATCH(struct ChannelDescendant *pResource) {
362 return pResource->__chandesIsPartialUnmapSupported__(pResource);
363 }
364
chandesPreDestruct_DISPATCH(struct ChannelDescendant * pResource)365 static inline void chandesPreDestruct_DISPATCH(struct ChannelDescendant *pResource) {
366 pResource->__chandesPreDestruct__(pResource);
367 }
368
chandesIsDuplicate_DISPATCH(struct ChannelDescendant * pResource,NvHandle hMemory,NvBool * pDuplicate)369 static inline NV_STATUS chandesIsDuplicate_DISPATCH(struct ChannelDescendant *pResource, NvHandle hMemory, NvBool *pDuplicate) {
370 return pResource->__chandesIsDuplicate__(pResource, hMemory, pDuplicate);
371 }
372
chandesControlSerialization_Epilogue_DISPATCH(struct ChannelDescendant * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)373 static inline void chandesControlSerialization_Epilogue_DISPATCH(struct ChannelDescendant *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
374 pResource->__chandesControlSerialization_Epilogue__(pResource, pCallContext, pParams);
375 }
376
chandesGetNotificationListPtr_DISPATCH(struct ChannelDescendant * pNotifier)377 static inline PEVENTNOTIFICATION *chandesGetNotificationListPtr_DISPATCH(struct ChannelDescendant *pNotifier) {
378 return pNotifier->__chandesGetNotificationListPtr__(pNotifier);
379 }
380
chandesGetNotificationShare_DISPATCH(struct ChannelDescendant * pNotifier)381 static inline struct NotifShare *chandesGetNotificationShare_DISPATCH(struct ChannelDescendant *pNotifier) {
382 return pNotifier->__chandesGetNotificationShare__(pNotifier);
383 }
384
chandesMap_DISPATCH(struct ChannelDescendant * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_CPU_MAP_PARAMS * pParams,struct RsCpuMapping * pCpuMapping)385 static inline NV_STATUS chandesMap_DISPATCH(struct ChannelDescendant *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) {
386 return pGpuResource->__chandesMap__(pGpuResource, pCallContext, pParams, pCpuMapping);
387 }
388
chandesAccessCallback_DISPATCH(struct ChannelDescendant * pResource,struct RsClient * pInvokingClient,void * pAllocParams,RsAccessRight accessRight)389 static inline NvBool chandesAccessCallback_DISPATCH(struct ChannelDescendant *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) {
390 return pResource->__chandesAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight);
391 }
392
393 NV_STATUS chandesConstruct_IMPL(struct ChannelDescendant *arg_pChannelDescendant, struct CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams, PARAM_TO_ENGDESC_FUNCTION *arg_pParamToEngDescFn);
394
395 #define __nvoc_chandesConstruct(arg_pChannelDescendant, arg_pCallContext, arg_pParams, arg_pParamToEngDescFn) chandesConstruct_IMPL(arg_pChannelDescendant, arg_pCallContext, arg_pParams, arg_pParamToEngDescFn)
396 void chandesDestruct_IMPL(struct ChannelDescendant *pChannelDescendant);
397
398 #define __nvoc_chandesDestruct(pChannelDescendant) chandesDestruct_IMPL(pChannelDescendant)
399 #undef PRIVATE_FIELD
400
401
402 //---------------------------------------------------------------------------
403 //
404 // Method prototypes.
405 //
406 //---------------------------------------------------------------------------
407
408 NV_STATUS mthdNoOperation(OBJGPU *, struct ChannelDescendant *, NvU32, NvU32);
409
410 #endif // _CHANNEL_DESCENDANT_H_
411
412 #ifdef __cplusplus
413 } // extern "C"
414 #endif
415
416 #endif // _G_CHANNEL_DESCENDANT_NVOC_H_
417