1 #ifndef _G_DISPSW_NVOC_H_
2 #define _G_DISPSW_NVOC_H_
3 #include "nvoc/runtime.h"
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 /*
10  * SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
11  * SPDX-License-Identifier: MIT
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a
14  * copy of this software and associated documentation files (the "Software"),
15  * to deal in the Software without restriction, including without limitation
16  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  * and/or sell copies of the Software, and to permit persons to whom the
18  * Software is furnished to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included in
21  * all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29  * DEALINGS IN THE SOFTWARE.
30  */
31 
32 #include "g_dispsw_nvoc.h"
33 
34 #ifndef DISPSW_H
35 #define DISPSW_H
36 
37 #include "core/core.h"
38 #include "kernel/gpu/fifo/channel_descendant.h"
39 #include "gpu/disp/vblank_callback/vblank.h"
40 #include "gpu/gpu_halspec.h"
41 
42 #include "ctrl/ctrl9072.h"
43 
44 /* ------------------------ Types definitions ------------------------------ */
45 #define F_SEMAPHORE_ADDR_HI_VALID      (NVBIT(0))
46 #define F_SEMAPHORE_ADDR_LO_VALID      (NVBIT(1))
47 #define F_SEMAPHORE_ADDR_VALID         (F_SEMAPHORE_ADDR_HI_VALID | F_SEMAPHORE_ADDR_LO_VALID)
48 #define F_SEMAPHORE_RELEASE            (NVBIT(2))
49 #define F_NOTIFIER_FILL                (NVBIT(3))
50 /* ------------------------ Types definitions ------------------------------ */
51 typedef struct DispSwObject *PDISP_EVENT_SW_OBJECT;
52 
53 #ifndef __NVOC_CLASS_DispSwObject_TYPEDEF__
54 #define __NVOC_CLASS_DispSwObject_TYPEDEF__
55 typedef struct DispSwObject DispSwObject;
56 #endif /* __NVOC_CLASS_DispSwObject_TYPEDEF__ */
57 
58 #ifndef __nvoc_class_id_DispSwObject
59 #define __nvoc_class_id_DispSwObject 0x99ad6d
60 #endif /* __nvoc_class_id_DispSwObject */
61 
62 
63 
64 /* ------------------------ Macros & Defines ------------------------------- */
65 typedef struct DISPCOMMONOBJECT
66 {
67     struct {
68         /*!
69          * A semaphore release location is specified by GPU virtual address.
70          */
71         union {
72             NvU64       GPUVA;
73         } Addr;
74         NvU32       ReleaseValue;
75         NvU32       ReleaseTrigger;
76         VBLANKCALLBACK ReleaseCallback;
77     } Semaphore;
78 
79     NvU32           SwapReadyMode;
80     NvU32           Head;
81 
82     /*!
83     * a pointer back to the "child" (encapsulating) arch-specific object
84     */
85     PDISP_EVENT_SW_OBJECT DispObject;
86 } DISPCOMMONOBJECT, *PDISPCOMMONOBJECT;
87 
88 struct DISP_SW_OBJECT_NOTIFY
89 {
90     NvU64          NotifierGPUVA;
91     NvU32          NotifyAction;
92     NvU32          NotifyTrigger;
93     VBLANKCALLBACK Callback;
94 };
95 
96 NV_STATUS dispswReleaseSemaphoreAndNotifierFill(struct OBJGPU *pGpu,
97                                                 NvU64 gpuVA,
98                                                 NvU32 vaSpace,
99                                                 NvU32 releasevalue,
100                                                 NvU32 flags,
101                                                 NvU32 completionStatus,
102                                                 NvHandle hClient,
103                                                 NvHandle hEvent);
104 
105 /*!
106  * RM internal class representing GF100_DISP_SW
107  */
108 #ifdef NVOC_DISPSW_H_PRIVATE_ACCESS_ALLOWED
109 #define PRIVATE_FIELD(x) x
110 #else
111 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
112 #endif
113 struct DispSwObject {
114     const struct NVOC_RTTI *__nvoc_rtti;
115     struct ChannelDescendant __nvoc_base_ChannelDescendant;
116     struct Object *__nvoc_pbase_Object;
117     struct RsResource *__nvoc_pbase_RsResource;
118     struct RmResourceCommon *__nvoc_pbase_RmResourceCommon;
119     struct RmResource *__nvoc_pbase_RmResource;
120     struct GpuResource *__nvoc_pbase_GpuResource;
121     struct INotifier *__nvoc_pbase_INotifier;
122     struct Notifier *__nvoc_pbase_Notifier;
123     struct ChannelDescendant *__nvoc_pbase_ChannelDescendant;
124     struct DispSwObject *__nvoc_pbase_DispSwObject;
125     NV_STATUS (*__dispswGetSwMethods__)(struct DispSwObject *, const METHOD **, NvU32 *);
126     NV_STATUS (*__dispswCtrlCmdNotifyOnVblank__)(struct DispSwObject *, NV9072_CTRL_CMD_NOTIFY_ON_VBLANK_PARAMS *);
127     NV_STATUS (*__dispswCheckMemInterUnmap__)(struct DispSwObject *, NvBool);
128     NvBool (*__dispswShareCallback__)(struct DispSwObject *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *);
129     NvBool (*__dispswAccessCallback__)(struct DispSwObject *, struct RsClient *, void *, RsAccessRight);
130     NV_STATUS (*__dispswMapTo__)(struct DispSwObject *, RS_RES_MAP_TO_PARAMS *);
131     NV_STATUS (*__dispswGetMapAddrSpace__)(struct DispSwObject *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *);
132     void (*__dispswSetNotificationShare__)(struct DispSwObject *, struct NotifShare *);
133     NvU32 (*__dispswGetRefCount__)(struct DispSwObject *);
134     void (*__dispswAddAdditionalDependants__)(struct RsClient *, struct DispSwObject *, RsResourceRef *);
135     NV_STATUS (*__dispswControl_Prologue__)(struct DispSwObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
136     NV_STATUS (*__dispswGetRegBaseOffsetAndSize__)(struct DispSwObject *, struct OBJGPU *, NvU32 *, NvU32 *);
137     NV_STATUS (*__dispswInternalControlForward__)(struct DispSwObject *, NvU32, void *, NvU32);
138     NV_STATUS (*__dispswUnmapFrom__)(struct DispSwObject *, RS_RES_UNMAP_FROM_PARAMS *);
139     void (*__dispswControl_Epilogue__)(struct DispSwObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
140     NV_STATUS (*__dispswControlLookup__)(struct DispSwObject *, struct RS_RES_CONTROL_PARAMS_INTERNAL *, const struct NVOC_EXPORTED_METHOD_DEF **);
141     NvHandle (*__dispswGetInternalObjectHandle__)(struct DispSwObject *);
142     NV_STATUS (*__dispswControl__)(struct DispSwObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
143     NV_STATUS (*__dispswUnmap__)(struct DispSwObject *, struct CALL_CONTEXT *, struct RsCpuMapping *);
144     NV_STATUS (*__dispswGetMemInterMapParams__)(struct DispSwObject *, RMRES_MEM_INTER_MAP_PARAMS *);
145     NV_STATUS (*__dispswGetMemoryMappingDescriptor__)(struct DispSwObject *, struct MEMORY_DESCRIPTOR **);
146     NvBool (*__dispswIsSwMethodStalling__)(struct DispSwObject *, NvU32);
147     NV_STATUS (*__dispswControlFilter__)(struct DispSwObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
148     NV_STATUS (*__dispswUnregisterEvent__)(struct DispSwObject *, NvHandle, NvHandle, NvHandle, NvHandle);
149     NV_STATUS (*__dispswControlSerialization_Prologue__)(struct DispSwObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
150     NvBool (*__dispswCanCopy__)(struct DispSwObject *);
151     void (*__dispswPreDestruct__)(struct DispSwObject *);
152     NV_STATUS (*__dispswIsDuplicate__)(struct DispSwObject *, NvHandle, NvBool *);
153     void (*__dispswControlSerialization_Epilogue__)(struct DispSwObject *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
154     PEVENTNOTIFICATION *(*__dispswGetNotificationListPtr__)(struct DispSwObject *);
155     struct NotifShare *(*__dispswGetNotificationShare__)(struct DispSwObject *);
156     NV_STATUS (*__dispswMap__)(struct DispSwObject *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *);
157     NV_STATUS (*__dispswGetOrAllocNotifShare__)(struct DispSwObject *, NvHandle, NvHandle, struct NotifShare **);
158     NvU32 Flags;
159     DISPCOMMONOBJECT DispCommon;
160     struct DISP_SW_OBJECT_NOTIFY NotifyOnVBlank;
161     NvU32 PresentInterval;
162 };
163 
164 #ifndef __NVOC_CLASS_DispSwObject_TYPEDEF__
165 #define __NVOC_CLASS_DispSwObject_TYPEDEF__
166 typedef struct DispSwObject DispSwObject;
167 #endif /* __NVOC_CLASS_DispSwObject_TYPEDEF__ */
168 
169 #ifndef __nvoc_class_id_DispSwObject
170 #define __nvoc_class_id_DispSwObject 0x99ad6d
171 #endif /* __nvoc_class_id_DispSwObject */
172 
173 extern const struct NVOC_CLASS_DEF __nvoc_class_def_DispSwObject;
174 
175 #define __staticCast_DispSwObject(pThis) \
176     ((pThis)->__nvoc_pbase_DispSwObject)
177 
178 #ifdef __nvoc_dispsw_h_disabled
179 #define __dynamicCast_DispSwObject(pThis) ((DispSwObject*)NULL)
180 #else //__nvoc_dispsw_h_disabled
181 #define __dynamicCast_DispSwObject(pThis) \
182     ((DispSwObject*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(DispSwObject)))
183 #endif //__nvoc_dispsw_h_disabled
184 
185 
186 NV_STATUS __nvoc_objCreateDynamic_DispSwObject(DispSwObject**, Dynamic*, NvU32, va_list);
187 
188 NV_STATUS __nvoc_objCreate_DispSwObject(DispSwObject**, Dynamic*, NvU32, CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams);
189 #define __objCreate_DispSwObject(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \
190     __nvoc_objCreate_DispSwObject((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams)
191 
192 #define dispswGetSwMethods(pDispSw, ppMethods, pNumMethods) dispswGetSwMethods_DISPATCH(pDispSw, ppMethods, pNumMethods)
193 #define dispswGetSwMethods_HAL(pDispSw, ppMethods, pNumMethods) dispswGetSwMethods_DISPATCH(pDispSw, ppMethods, pNumMethods)
194 #define dispswCtrlCmdNotifyOnVblank(pDispSwObject, pNotifyParams) dispswCtrlCmdNotifyOnVblank_DISPATCH(pDispSwObject, pNotifyParams)
195 #define dispswCheckMemInterUnmap(pChannelDescendant, bSubdeviceHandleProvided) dispswCheckMemInterUnmap_DISPATCH(pChannelDescendant, bSubdeviceHandleProvided)
196 #define dispswShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) dispswShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy)
197 #define dispswAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) dispswAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight)
198 #define dispswMapTo(pResource, pParams) dispswMapTo_DISPATCH(pResource, pParams)
199 #define dispswGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) dispswGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace)
200 #define dispswSetNotificationShare(pNotifier, pNotifShare) dispswSetNotificationShare_DISPATCH(pNotifier, pNotifShare)
201 #define dispswGetRefCount(pResource) dispswGetRefCount_DISPATCH(pResource)
202 #define dispswAddAdditionalDependants(pClient, pResource, pReference) dispswAddAdditionalDependants_DISPATCH(pClient, pResource, pReference)
203 #define dispswControl_Prologue(pResource, pCallContext, pParams) dispswControl_Prologue_DISPATCH(pResource, pCallContext, pParams)
204 #define dispswGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) dispswGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize)
205 #define dispswInternalControlForward(pGpuResource, command, pParams, size) dispswInternalControlForward_DISPATCH(pGpuResource, command, pParams, size)
206 #define dispswUnmapFrom(pResource, pParams) dispswUnmapFrom_DISPATCH(pResource, pParams)
207 #define dispswControl_Epilogue(pResource, pCallContext, pParams) dispswControl_Epilogue_DISPATCH(pResource, pCallContext, pParams)
208 #define dispswControlLookup(pResource, pParams, ppEntry) dispswControlLookup_DISPATCH(pResource, pParams, ppEntry)
209 #define dispswGetInternalObjectHandle(pGpuResource) dispswGetInternalObjectHandle_DISPATCH(pGpuResource)
210 #define dispswControl(pGpuResource, pCallContext, pParams) dispswControl_DISPATCH(pGpuResource, pCallContext, pParams)
211 #define dispswUnmap(pGpuResource, pCallContext, pCpuMapping) dispswUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping)
212 #define dispswGetMemInterMapParams(pRmResource, pParams) dispswGetMemInterMapParams_DISPATCH(pRmResource, pParams)
213 #define dispswGetMemoryMappingDescriptor(pRmResource, ppMemDesc) dispswGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc)
214 #define dispswIsSwMethodStalling(pChannelDescendant, hHandle) dispswIsSwMethodStalling_DISPATCH(pChannelDescendant, hHandle)
215 #define dispswControlFilter(pResource, pCallContext, pParams) dispswControlFilter_DISPATCH(pResource, pCallContext, pParams)
216 #define dispswUnregisterEvent(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) dispswUnregisterEvent_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent)
217 #define dispswControlSerialization_Prologue(pResource, pCallContext, pParams) dispswControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams)
218 #define dispswCanCopy(pResource) dispswCanCopy_DISPATCH(pResource)
219 #define dispswPreDestruct(pResource) dispswPreDestruct_DISPATCH(pResource)
220 #define dispswIsDuplicate(pResource, hMemory, pDuplicate) dispswIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate)
221 #define dispswControlSerialization_Epilogue(pResource, pCallContext, pParams) dispswControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams)
222 #define dispswGetNotificationListPtr(pNotifier) dispswGetNotificationListPtr_DISPATCH(pNotifier)
223 #define dispswGetNotificationShare(pNotifier) dispswGetNotificationShare_DISPATCH(pNotifier)
224 #define dispswMap(pGpuResource, pCallContext, pParams, pCpuMapping) dispswMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping)
225 #define dispswGetOrAllocNotifShare(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) dispswGetOrAllocNotifShare_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare)
226 static inline NV_STATUS dispswGetSwMethods_46f6a7(struct DispSwObject *pDispSw, const METHOD **ppMethods, NvU32 *pNumMethods) {
227     return NV_ERR_NOT_SUPPORTED;
228 }
229 
230 static inline NV_STATUS dispswGetSwMethods_DISPATCH(struct DispSwObject *pDispSw, const METHOD **ppMethods, NvU32 *pNumMethods) {
231     return pDispSw->__dispswGetSwMethods__(pDispSw, ppMethods, pNumMethods);
232 }
233 
234 NV_STATUS dispswCtrlCmdNotifyOnVblank_IMPL(struct DispSwObject *pDispSwObject, NV9072_CTRL_CMD_NOTIFY_ON_VBLANK_PARAMS *pNotifyParams);
235 
236 static inline NV_STATUS dispswCtrlCmdNotifyOnVblank_DISPATCH(struct DispSwObject *pDispSwObject, NV9072_CTRL_CMD_NOTIFY_ON_VBLANK_PARAMS *pNotifyParams) {
237     return pDispSwObject->__dispswCtrlCmdNotifyOnVblank__(pDispSwObject, pNotifyParams);
238 }
239 
240 static inline NV_STATUS dispswCheckMemInterUnmap_DISPATCH(struct DispSwObject *pChannelDescendant, NvBool bSubdeviceHandleProvided) {
241     return pChannelDescendant->__dispswCheckMemInterUnmap__(pChannelDescendant, bSubdeviceHandleProvided);
242 }
243 
244 static inline NvBool dispswShareCallback_DISPATCH(struct DispSwObject *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) {
245     return pGpuResource->__dispswShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy);
246 }
247 
248 static inline NvBool dispswAccessCallback_DISPATCH(struct DispSwObject *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) {
249     return pResource->__dispswAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight);
250 }
251 
252 static inline NV_STATUS dispswMapTo_DISPATCH(struct DispSwObject *pResource, RS_RES_MAP_TO_PARAMS *pParams) {
253     return pResource->__dispswMapTo__(pResource, pParams);
254 }
255 
256 static inline NV_STATUS dispswGetMapAddrSpace_DISPATCH(struct DispSwObject *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) {
257     return pGpuResource->__dispswGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace);
258 }
259 
260 static inline void dispswSetNotificationShare_DISPATCH(struct DispSwObject *pNotifier, struct NotifShare *pNotifShare) {
261     pNotifier->__dispswSetNotificationShare__(pNotifier, pNotifShare);
262 }
263 
264 static inline NvU32 dispswGetRefCount_DISPATCH(struct DispSwObject *pResource) {
265     return pResource->__dispswGetRefCount__(pResource);
266 }
267 
268 static inline void dispswAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct DispSwObject *pResource, RsResourceRef *pReference) {
269     pResource->__dispswAddAdditionalDependants__(pClient, pResource, pReference);
270 }
271 
272 static inline NV_STATUS dispswControl_Prologue_DISPATCH(struct DispSwObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
273     return pResource->__dispswControl_Prologue__(pResource, pCallContext, pParams);
274 }
275 
276 static inline NV_STATUS dispswGetRegBaseOffsetAndSize_DISPATCH(struct DispSwObject *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) {
277     return pGpuResource->__dispswGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize);
278 }
279 
280 static inline NV_STATUS dispswInternalControlForward_DISPATCH(struct DispSwObject *pGpuResource, NvU32 command, void *pParams, NvU32 size) {
281     return pGpuResource->__dispswInternalControlForward__(pGpuResource, command, pParams, size);
282 }
283 
284 static inline NV_STATUS dispswUnmapFrom_DISPATCH(struct DispSwObject *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) {
285     return pResource->__dispswUnmapFrom__(pResource, pParams);
286 }
287 
288 static inline void dispswControl_Epilogue_DISPATCH(struct DispSwObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
289     pResource->__dispswControl_Epilogue__(pResource, pCallContext, pParams);
290 }
291 
292 static inline NV_STATUS dispswControlLookup_DISPATCH(struct DispSwObject *pResource, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams, const struct NVOC_EXPORTED_METHOD_DEF **ppEntry) {
293     return pResource->__dispswControlLookup__(pResource, pParams, ppEntry);
294 }
295 
296 static inline NvHandle dispswGetInternalObjectHandle_DISPATCH(struct DispSwObject *pGpuResource) {
297     return pGpuResource->__dispswGetInternalObjectHandle__(pGpuResource);
298 }
299 
300 static inline NV_STATUS dispswControl_DISPATCH(struct DispSwObject *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
301     return pGpuResource->__dispswControl__(pGpuResource, pCallContext, pParams);
302 }
303 
304 static inline NV_STATUS dispswUnmap_DISPATCH(struct DispSwObject *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) {
305     return pGpuResource->__dispswUnmap__(pGpuResource, pCallContext, pCpuMapping);
306 }
307 
308 static inline NV_STATUS dispswGetMemInterMapParams_DISPATCH(struct DispSwObject *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) {
309     return pRmResource->__dispswGetMemInterMapParams__(pRmResource, pParams);
310 }
311 
312 static inline NV_STATUS dispswGetMemoryMappingDescriptor_DISPATCH(struct DispSwObject *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) {
313     return pRmResource->__dispswGetMemoryMappingDescriptor__(pRmResource, ppMemDesc);
314 }
315 
316 static inline NvBool dispswIsSwMethodStalling_DISPATCH(struct DispSwObject *pChannelDescendant, NvU32 hHandle) {
317     return pChannelDescendant->__dispswIsSwMethodStalling__(pChannelDescendant, hHandle);
318 }
319 
320 static inline NV_STATUS dispswControlFilter_DISPATCH(struct DispSwObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
321     return pResource->__dispswControlFilter__(pResource, pCallContext, pParams);
322 }
323 
324 static inline NV_STATUS dispswUnregisterEvent_DISPATCH(struct DispSwObject *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) {
325     return pNotifier->__dispswUnregisterEvent__(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent);
326 }
327 
328 static inline NV_STATUS dispswControlSerialization_Prologue_DISPATCH(struct DispSwObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
329     return pResource->__dispswControlSerialization_Prologue__(pResource, pCallContext, pParams);
330 }
331 
332 static inline NvBool dispswCanCopy_DISPATCH(struct DispSwObject *pResource) {
333     return pResource->__dispswCanCopy__(pResource);
334 }
335 
336 static inline void dispswPreDestruct_DISPATCH(struct DispSwObject *pResource) {
337     pResource->__dispswPreDestruct__(pResource);
338 }
339 
340 static inline NV_STATUS dispswIsDuplicate_DISPATCH(struct DispSwObject *pResource, NvHandle hMemory, NvBool *pDuplicate) {
341     return pResource->__dispswIsDuplicate__(pResource, hMemory, pDuplicate);
342 }
343 
344 static inline void dispswControlSerialization_Epilogue_DISPATCH(struct DispSwObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
345     pResource->__dispswControlSerialization_Epilogue__(pResource, pCallContext, pParams);
346 }
347 
348 static inline PEVENTNOTIFICATION *dispswGetNotificationListPtr_DISPATCH(struct DispSwObject *pNotifier) {
349     return pNotifier->__dispswGetNotificationListPtr__(pNotifier);
350 }
351 
352 static inline struct NotifShare *dispswGetNotificationShare_DISPATCH(struct DispSwObject *pNotifier) {
353     return pNotifier->__dispswGetNotificationShare__(pNotifier);
354 }
355 
356 static inline NV_STATUS dispswMap_DISPATCH(struct DispSwObject *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) {
357     return pGpuResource->__dispswMap__(pGpuResource, pCallContext, pParams, pCpuMapping);
358 }
359 
360 static inline NV_STATUS dispswGetOrAllocNotifShare_DISPATCH(struct DispSwObject *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) {
361     return pNotifier->__dispswGetOrAllocNotifShare__(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare);
362 }
363 
364 NV_STATUS dispswConstruct_IMPL(struct DispSwObject *arg_pDispSw, CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams);
365 
366 #define __nvoc_dispswConstruct(arg_pDispSw, arg_pCallContext, arg_pParams) dispswConstruct_IMPL(arg_pDispSw, arg_pCallContext, arg_pParams)
367 void dispswDestruct_IMPL(struct DispSwObject *pDispSw);
368 
369 #define __nvoc_dispswDestruct(pDispSw) dispswDestruct_IMPL(pDispSw)
370 #undef PRIVATE_FIELD
371 
372 
373 #endif // DISPSW_H
374 
375 #ifdef __cplusplus
376 } // extern "C"
377 #endif
378 #endif // _G_DISPSW_NVOC_H_
379