13084c044SBernhard Stoeckner 
21739a20eSAndy Ritger #ifndef _G_VASPACE_API_NVOC_H_
31739a20eSAndy Ritger #define _G_VASPACE_API_NVOC_H_
41739a20eSAndy Ritger #include "nvoc/runtime.h"
51739a20eSAndy Ritger 
63084c044SBernhard Stoeckner // Version of generated metadata structures
73084c044SBernhard Stoeckner #ifdef NVOC_METADATA_VERSION
83084c044SBernhard Stoeckner #undef NVOC_METADATA_VERSION
93084c044SBernhard Stoeckner #endif
10*d5a0858fSBernhard Stoeckner #define NVOC_METADATA_VERSION 1
113084c044SBernhard Stoeckner 
121739a20eSAndy Ritger #ifdef __cplusplus
131739a20eSAndy Ritger extern "C" {
141739a20eSAndy Ritger #endif
151739a20eSAndy Ritger 
161739a20eSAndy Ritger /*
17b5bf85a8SAndy Ritger  * SPDX-FileCopyrightText: Copyright (c) 1993-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
181739a20eSAndy Ritger  * SPDX-License-Identifier: MIT
191739a20eSAndy Ritger  *
201739a20eSAndy Ritger  * Permission is hereby granted, free of charge, to any person obtaining a
211739a20eSAndy Ritger  * copy of this software and associated documentation files (the "Software"),
221739a20eSAndy Ritger  * to deal in the Software without restriction, including without limitation
231739a20eSAndy Ritger  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
241739a20eSAndy Ritger  * and/or sell copies of the Software, and to permit persons to whom the
251739a20eSAndy Ritger  * Software is furnished to do so, subject to the following conditions:
261739a20eSAndy Ritger  *
271739a20eSAndy Ritger  * The above copyright notice and this permission notice shall be included in
281739a20eSAndy Ritger  * all copies or substantial portions of the Software.
291739a20eSAndy Ritger  *
301739a20eSAndy Ritger  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
311739a20eSAndy Ritger  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
321739a20eSAndy Ritger  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
331739a20eSAndy Ritger  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
341739a20eSAndy Ritger  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
351739a20eSAndy Ritger  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
361739a20eSAndy Ritger  * DEALINGS IN THE SOFTWARE.
371739a20eSAndy Ritger  */
381739a20eSAndy Ritger 
393084c044SBernhard Stoeckner #pragma once
401739a20eSAndy Ritger #include "g_vaspace_api_nvoc.h"
411739a20eSAndy Ritger 
421739a20eSAndy Ritger #ifndef VASPACE_API_H
431739a20eSAndy Ritger #define VASPACE_API_H
441739a20eSAndy Ritger 
451739a20eSAndy Ritger #include "core/core.h"
461739a20eSAndy Ritger #include "mem_mgr/vaspace.h"
471739a20eSAndy Ritger #include "rmapi/client.h"
481739a20eSAndy Ritger #include "gpu/gpu_resource.h"
491739a20eSAndy Ritger #include "ctrl/ctrl90f1.h"
501739a20eSAndy Ritger #include "rmapi/control.h" // for macro RMCTRL_EXPORT etc.
511739a20eSAndy Ritger 
521739a20eSAndy Ritger #define RM_INVALID_VASPACE_HANDLE 0xFFFFFFFF
531739a20eSAndy Ritger 
541739a20eSAndy Ritger /*!
551739a20eSAndy Ritger  * Actions to manage the Server RM page levels (only used by Split VAS mechanism)
561739a20eSAndy Ritger  */
571739a20eSAndy Ritger typedef enum
581739a20eSAndy Ritger {
591739a20eSAndy Ritger     VASPACEAPI_MANAGE_PAGE_LEVELS_RESERVE,
601739a20eSAndy Ritger     VASPACEAPI_MANAGE_PAGE_LEVELS_RELEASE,
611739a20eSAndy Ritger     VASPACEAPI_MANAGE_PAGE_LEVELS_TRIM,
621739a20eSAndy Ritger } VASPACEAPI_MANAGE_PAGE_LEVELS_ACTION;
631739a20eSAndy Ritger 
6491676d66SBernhard Stoeckner 
6591676d66SBernhard Stoeckner // Private field names are wrapped in PRIVATE_FIELD, which does nothing for
6691676d66SBernhard Stoeckner // the matching C source file, but causes diagnostics to be issued if another
6791676d66SBernhard Stoeckner // source file references the field.
681739a20eSAndy Ritger #ifdef NVOC_VASPACE_API_H_PRIVATE_ACCESS_ALLOWED
691739a20eSAndy Ritger #define PRIVATE_FIELD(x) x
701739a20eSAndy Ritger #else
711739a20eSAndy Ritger #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
721739a20eSAndy Ritger #endif
7391676d66SBernhard Stoeckner 
743084c044SBernhard Stoeckner 
75*d5a0858fSBernhard Stoeckner // Metadata including vtable
76*d5a0858fSBernhard Stoeckner struct NVOC_VTABLE__VaSpaceApi;
77*d5a0858fSBernhard Stoeckner 
78*d5a0858fSBernhard Stoeckner 
791739a20eSAndy Ritger struct VaSpaceApi {
803084c044SBernhard Stoeckner 
813084c044SBernhard Stoeckner     // Metadata
821739a20eSAndy Ritger     const struct NVOC_RTTI *__nvoc_rtti;
83*d5a0858fSBernhard Stoeckner     const struct NVOC_VTABLE__VaSpaceApi *__nvoc_vtable;
843084c044SBernhard Stoeckner 
853084c044SBernhard Stoeckner     // Parent (i.e. superclass or base class) object pointers
861739a20eSAndy Ritger     struct GpuResource __nvoc_base_GpuResource;
873084c044SBernhard Stoeckner 
883084c044SBernhard Stoeckner     // Ancestor object pointers for `staticCast` feature
893084c044SBernhard Stoeckner     struct Object *__nvoc_pbase_Object;    // obj super^4
903084c044SBernhard Stoeckner     struct RsResource *__nvoc_pbase_RsResource;    // res super^3
913084c044SBernhard Stoeckner     struct RmResourceCommon *__nvoc_pbase_RmResourceCommon;    // rmrescmn super^3
923084c044SBernhard Stoeckner     struct RmResource *__nvoc_pbase_RmResource;    // rmres super^2
933084c044SBernhard Stoeckner     struct GpuResource *__nvoc_pbase_GpuResource;    // gpures super
943084c044SBernhard Stoeckner     struct VaSpaceApi *__nvoc_pbase_VaSpaceApi;    // vaspaceapi
953084c044SBernhard Stoeckner 
96*d5a0858fSBernhard Stoeckner     // Vtable with 6 per-object function pointers
973084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiCtrlCmdVaspaceGetGmmuFormat__)(struct VaSpaceApi * /*this*/, NV90F1_CTRL_VASPACE_GET_GMMU_FORMAT_PARAMS *);  // exported (id=0x90f10101)
983084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiCtrlCmdVaspaceGetPageLevelInfo__)(struct VaSpaceApi * /*this*/, NV90F1_CTRL_VASPACE_GET_PAGE_LEVEL_INFO_PARAMS *);  // exported (id=0x90f10102)
993084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiCtrlCmdVaspaceReserveEntries__)(struct VaSpaceApi * /*this*/, NV90F1_CTRL_VASPACE_RESERVE_ENTRIES_PARAMS *);  // exported (id=0x90f10103)
1003084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiCtrlCmdVaspaceReleaseEntries__)(struct VaSpaceApi * /*this*/, NV90F1_CTRL_VASPACE_RELEASE_ENTRIES_PARAMS *);  // exported (id=0x90f10104)
1013084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiCtrlCmdVaspaceCopyServerReservedPdes__)(struct VaSpaceApi * /*this*/, NV90F1_CTRL_VASPACE_COPY_SERVER_RESERVED_PDES_PARAMS *);  // exported (id=0x90f10106)
1023084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiCtrlCmdVaspaceGetHostRmManagedSize__)(struct VaSpaceApi * /*this*/, NV90F1_CTRL_VASPACE_GET_HOST_RM_MANAGED_SIZE_PARAMS *);  // exported (id=0x90f10107)
103*d5a0858fSBernhard Stoeckner 
104*d5a0858fSBernhard Stoeckner     // Data members
105*d5a0858fSBernhard Stoeckner     struct OBJVASPACE *pVASpace;
106*d5a0858fSBernhard Stoeckner };
107*d5a0858fSBernhard Stoeckner 
108*d5a0858fSBernhard Stoeckner 
109*d5a0858fSBernhard Stoeckner // Metadata including vtable with 25 function pointers plus superclass metadata
110*d5a0858fSBernhard Stoeckner struct NVOC_VTABLE__VaSpaceApi {
111*d5a0858fSBernhard Stoeckner     const struct NVOC_VTABLE__GpuResource GpuResource;    // (gpures) 25 function pointers
112*d5a0858fSBernhard Stoeckner 
113*d5a0858fSBernhard Stoeckner     NvBool (*__vaspaceapiCanCopy__)(struct VaSpaceApi * /*this*/);  // virtual override (res) base (gpures)
1143084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiControl__)(struct VaSpaceApi * /*this*/, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);  // virtual inherited (gpures) base (gpures)
1153084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiMap__)(struct VaSpaceApi * /*this*/, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *);  // virtual inherited (gpures) base (gpures)
1163084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiUnmap__)(struct VaSpaceApi * /*this*/, struct CALL_CONTEXT *, struct RsCpuMapping *);  // virtual inherited (gpures) base (gpures)
1173084c044SBernhard Stoeckner     NvBool (*__vaspaceapiShareCallback__)(struct VaSpaceApi * /*this*/, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *);  // virtual inherited (gpures) base (gpures)
1183084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiGetRegBaseOffsetAndSize__)(struct VaSpaceApi * /*this*/, struct OBJGPU *, NvU32 *, NvU32 *);  // virtual inherited (gpures) base (gpures)
1193084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiGetMapAddrSpace__)(struct VaSpaceApi * /*this*/, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *);  // virtual inherited (gpures) base (gpures)
1203084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiInternalControlForward__)(struct VaSpaceApi * /*this*/, NvU32, void *, NvU32);  // virtual inherited (gpures) base (gpures)
1213084c044SBernhard Stoeckner     NvHandle (*__vaspaceapiGetInternalObjectHandle__)(struct VaSpaceApi * /*this*/);  // virtual inherited (gpures) base (gpures)
1223084c044SBernhard Stoeckner     NvBool (*__vaspaceapiAccessCallback__)(struct VaSpaceApi * /*this*/, struct RsClient *, void *, RsAccessRight);  // virtual inherited (rmres) base (gpures)
1233084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiGetMemInterMapParams__)(struct VaSpaceApi * /*this*/, RMRES_MEM_INTER_MAP_PARAMS *);  // virtual inherited (rmres) base (gpures)
1243084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiCheckMemInterUnmap__)(struct VaSpaceApi * /*this*/, NvBool);  // virtual inherited (rmres) base (gpures)
1253084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiGetMemoryMappingDescriptor__)(struct VaSpaceApi * /*this*/, struct MEMORY_DESCRIPTOR **);  // virtual inherited (rmres) base (gpures)
1263084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiControlSerialization_Prologue__)(struct VaSpaceApi * /*this*/, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);  // virtual inherited (rmres) base (gpures)
1273084c044SBernhard Stoeckner     void (*__vaspaceapiControlSerialization_Epilogue__)(struct VaSpaceApi * /*this*/, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);  // virtual inherited (rmres) base (gpures)
1283084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiControl_Prologue__)(struct VaSpaceApi * /*this*/, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);  // virtual inherited (rmres) base (gpures)
1293084c044SBernhard Stoeckner     void (*__vaspaceapiControl_Epilogue__)(struct VaSpaceApi * /*this*/, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);  // virtual inherited (rmres) base (gpures)
1303084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiIsDuplicate__)(struct VaSpaceApi * /*this*/, NvHandle, NvBool *);  // virtual inherited (res) base (gpures)
1313084c044SBernhard Stoeckner     void (*__vaspaceapiPreDestruct__)(struct VaSpaceApi * /*this*/);  // virtual inherited (res) base (gpures)
1323084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiControlFilter__)(struct VaSpaceApi * /*this*/, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);  // virtual inherited (res) base (gpures)
1333084c044SBernhard Stoeckner     NvBool (*__vaspaceapiIsPartialUnmapSupported__)(struct VaSpaceApi * /*this*/);  // inline virtual inherited (res) base (gpures) body
1343084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiMapTo__)(struct VaSpaceApi * /*this*/, RS_RES_MAP_TO_PARAMS *);  // virtual inherited (res) base (gpures)
1353084c044SBernhard Stoeckner     NV_STATUS (*__vaspaceapiUnmapFrom__)(struct VaSpaceApi * /*this*/, RS_RES_UNMAP_FROM_PARAMS *);  // virtual inherited (res) base (gpures)
1363084c044SBernhard Stoeckner     NvU32 (*__vaspaceapiGetRefCount__)(struct VaSpaceApi * /*this*/);  // virtual inherited (res) base (gpures)
1373084c044SBernhard Stoeckner     void (*__vaspaceapiAddAdditionalDependants__)(struct RsClient *, struct VaSpaceApi * /*this*/, RsResourceRef *);  // virtual inherited (res) base (gpures)
1381739a20eSAndy Ritger };
1391739a20eSAndy Ritger 
1401739a20eSAndy Ritger #ifndef __NVOC_CLASS_VaSpaceApi_TYPEDEF__
1411739a20eSAndy Ritger #define __NVOC_CLASS_VaSpaceApi_TYPEDEF__
1421739a20eSAndy Ritger typedef struct VaSpaceApi VaSpaceApi;
1431739a20eSAndy Ritger #endif /* __NVOC_CLASS_VaSpaceApi_TYPEDEF__ */
1441739a20eSAndy Ritger 
1451739a20eSAndy Ritger #ifndef __nvoc_class_id_VaSpaceApi
1461739a20eSAndy Ritger #define __nvoc_class_id_VaSpaceApi 0xcd048b
1471739a20eSAndy Ritger #endif /* __nvoc_class_id_VaSpaceApi */
1481739a20eSAndy Ritger 
1493084c044SBernhard Stoeckner // Casting support
1501739a20eSAndy Ritger extern const struct NVOC_CLASS_DEF __nvoc_class_def_VaSpaceApi;
1511739a20eSAndy Ritger 
1521739a20eSAndy Ritger #define __staticCast_VaSpaceApi(pThis) \
1531739a20eSAndy Ritger     ((pThis)->__nvoc_pbase_VaSpaceApi)
1541739a20eSAndy Ritger 
1551739a20eSAndy Ritger #ifdef __nvoc_vaspace_api_h_disabled
1561739a20eSAndy Ritger #define __dynamicCast_VaSpaceApi(pThis) ((VaSpaceApi*)NULL)
1571739a20eSAndy Ritger #else //__nvoc_vaspace_api_h_disabled
1581739a20eSAndy Ritger #define __dynamicCast_VaSpaceApi(pThis) \
1591739a20eSAndy Ritger     ((VaSpaceApi*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(VaSpaceApi)))
1601739a20eSAndy Ritger #endif //__nvoc_vaspace_api_h_disabled
1611739a20eSAndy Ritger 
1621739a20eSAndy Ritger NV_STATUS __nvoc_objCreateDynamic_VaSpaceApi(VaSpaceApi**, Dynamic*, NvU32, va_list);
1631739a20eSAndy Ritger 
1641739a20eSAndy Ritger NV_STATUS __nvoc_objCreate_VaSpaceApi(VaSpaceApi**, Dynamic*, NvU32, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams);
1651739a20eSAndy Ritger #define __objCreate_VaSpaceApi(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \
1661739a20eSAndy Ritger     __nvoc_objCreate_VaSpaceApi((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams)
1671739a20eSAndy Ritger 
1681739a20eSAndy Ritger 
1693084c044SBernhard Stoeckner // Wrapper macros
170*d5a0858fSBernhard Stoeckner #define vaspaceapiCanCopy_FNPTR(pResource) pResource->__nvoc_vtable->__vaspaceapiCanCopy__
1713084c044SBernhard Stoeckner #define vaspaceapiCanCopy(pResource) vaspaceapiCanCopy_DISPATCH(pResource)
1723084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceGetGmmuFormat_FNPTR(pVaspaceApi) pVaspaceApi->__vaspaceapiCtrlCmdVaspaceGetGmmuFormat__
1733084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceGetGmmuFormat(pVaspaceApi, pGmmuFormatParams) vaspaceapiCtrlCmdVaspaceGetGmmuFormat_DISPATCH(pVaspaceApi, pGmmuFormatParams)
1743084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceGetPageLevelInfo_FNPTR(pVaspaceApi) pVaspaceApi->__vaspaceapiCtrlCmdVaspaceGetPageLevelInfo__
1753084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceGetPageLevelInfo(pVaspaceApi, pPageLevelInfoParams) vaspaceapiCtrlCmdVaspaceGetPageLevelInfo_DISPATCH(pVaspaceApi, pPageLevelInfoParams)
1763084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceReserveEntries_FNPTR(pVaspaceApi) pVaspaceApi->__vaspaceapiCtrlCmdVaspaceReserveEntries__
1773084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceReserveEntries(pVaspaceApi, pReserveEntriesParams) vaspaceapiCtrlCmdVaspaceReserveEntries_DISPATCH(pVaspaceApi, pReserveEntriesParams)
1783084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceReleaseEntries_FNPTR(pVaspaceApi) pVaspaceApi->__vaspaceapiCtrlCmdVaspaceReleaseEntries__
1793084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceReleaseEntries(pVaspaceApi, pReleaseEntriesParams) vaspaceapiCtrlCmdVaspaceReleaseEntries_DISPATCH(pVaspaceApi, pReleaseEntriesParams)
1803084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceCopyServerReservedPdes_FNPTR(pVaspaceApi) pVaspaceApi->__vaspaceapiCtrlCmdVaspaceCopyServerReservedPdes__
1813084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceCopyServerReservedPdes(pVaspaceApi, pCopyServerReservedPdesParams) vaspaceapiCtrlCmdVaspaceCopyServerReservedPdes_DISPATCH(pVaspaceApi, pCopyServerReservedPdesParams)
1823084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceGetHostRmManagedSize_FNPTR(pVaspaceApi) pVaspaceApi->__vaspaceapiCtrlCmdVaspaceGetHostRmManagedSize__
1833084c044SBernhard Stoeckner #define vaspaceapiCtrlCmdVaspaceGetHostRmManagedSize(pVaspaceApi, pVaspaceGetHostRmManagedSizeParams) vaspaceapiCtrlCmdVaspaceGetHostRmManagedSize_DISPATCH(pVaspaceApi, pVaspaceGetHostRmManagedSizeParams)
184*d5a0858fSBernhard Stoeckner #define vaspaceapiControl_FNPTR(pGpuResource) pGpuResource->__nvoc_base_GpuResource.__nvoc_vtable->__gpuresControl__
1853084c044SBernhard Stoeckner #define vaspaceapiControl(pGpuResource, pCallContext, pParams) vaspaceapiControl_DISPATCH(pGpuResource, pCallContext, pParams)
186*d5a0858fSBernhard Stoeckner #define vaspaceapiMap_FNPTR(pGpuResource) pGpuResource->__nvoc_base_GpuResource.__nvoc_vtable->__gpuresMap__
1873084c044SBernhard Stoeckner #define vaspaceapiMap(pGpuResource, pCallContext, pParams, pCpuMapping) vaspaceapiMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping)
188*d5a0858fSBernhard Stoeckner #define vaspaceapiUnmap_FNPTR(pGpuResource) pGpuResource->__nvoc_base_GpuResource.__nvoc_vtable->__gpuresUnmap__
1893084c044SBernhard Stoeckner #define vaspaceapiUnmap(pGpuResource, pCallContext, pCpuMapping) vaspaceapiUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping)
190*d5a0858fSBernhard Stoeckner #define vaspaceapiShareCallback_FNPTR(pGpuResource) pGpuResource->__nvoc_base_GpuResource.__nvoc_vtable->__gpuresShareCallback__
1913084c044SBernhard Stoeckner #define vaspaceapiShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) vaspaceapiShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy)
192*d5a0858fSBernhard Stoeckner #define vaspaceapiGetRegBaseOffsetAndSize_FNPTR(pGpuResource) pGpuResource->__nvoc_base_GpuResource.__nvoc_vtable->__gpuresGetRegBaseOffsetAndSize__
1933084c044SBernhard Stoeckner #define vaspaceapiGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) vaspaceapiGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize)
194*d5a0858fSBernhard Stoeckner #define vaspaceapiGetMapAddrSpace_FNPTR(pGpuResource) pGpuResource->__nvoc_base_GpuResource.__nvoc_vtable->__gpuresGetMapAddrSpace__
1953084c044SBernhard Stoeckner #define vaspaceapiGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) vaspaceapiGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace)
196*d5a0858fSBernhard Stoeckner #define vaspaceapiInternalControlForward_FNPTR(pGpuResource) pGpuResource->__nvoc_base_GpuResource.__nvoc_vtable->__gpuresInternalControlForward__
1973084c044SBernhard Stoeckner #define vaspaceapiInternalControlForward(pGpuResource, command, pParams, size) vaspaceapiInternalControlForward_DISPATCH(pGpuResource, command, pParams, size)
198*d5a0858fSBernhard Stoeckner #define vaspaceapiGetInternalObjectHandle_FNPTR(pGpuResource) pGpuResource->__nvoc_base_GpuResource.__nvoc_vtable->__gpuresGetInternalObjectHandle__
1993084c044SBernhard Stoeckner #define vaspaceapiGetInternalObjectHandle(pGpuResource) vaspaceapiGetInternalObjectHandle_DISPATCH(pGpuResource)
200*d5a0858fSBernhard Stoeckner #define vaspaceapiAccessCallback_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_vtable->__rmresAccessCallback__
2013084c044SBernhard Stoeckner #define vaspaceapiAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) vaspaceapiAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight)
202*d5a0858fSBernhard Stoeckner #define vaspaceapiGetMemInterMapParams_FNPTR(pRmResource) pRmResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_vtable->__rmresGetMemInterMapParams__
2033084c044SBernhard Stoeckner #define vaspaceapiGetMemInterMapParams(pRmResource, pParams) vaspaceapiGetMemInterMapParams_DISPATCH(pRmResource, pParams)
204*d5a0858fSBernhard Stoeckner #define vaspaceapiCheckMemInterUnmap_FNPTR(pRmResource) pRmResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_vtable->__rmresCheckMemInterUnmap__
2053084c044SBernhard Stoeckner #define vaspaceapiCheckMemInterUnmap(pRmResource, bSubdeviceHandleProvided) vaspaceapiCheckMemInterUnmap_DISPATCH(pRmResource, bSubdeviceHandleProvided)
206*d5a0858fSBernhard Stoeckner #define vaspaceapiGetMemoryMappingDescriptor_FNPTR(pRmResource) pRmResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_vtable->__rmresGetMemoryMappingDescriptor__
2073084c044SBernhard Stoeckner #define vaspaceapiGetMemoryMappingDescriptor(pRmResource, ppMemDesc) vaspaceapiGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc)
208*d5a0858fSBernhard Stoeckner #define vaspaceapiControlSerialization_Prologue_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_vtable->__rmresControlSerialization_Prologue__
2093084c044SBernhard Stoeckner #define vaspaceapiControlSerialization_Prologue(pResource, pCallContext, pParams) vaspaceapiControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams)
210*d5a0858fSBernhard Stoeckner #define vaspaceapiControlSerialization_Epilogue_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_vtable->__rmresControlSerialization_Epilogue__
2113084c044SBernhard Stoeckner #define vaspaceapiControlSerialization_Epilogue(pResource, pCallContext, pParams) vaspaceapiControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams)
212*d5a0858fSBernhard Stoeckner #define vaspaceapiControl_Prologue_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_vtable->__rmresControl_Prologue__
2133084c044SBernhard Stoeckner #define vaspaceapiControl_Prologue(pResource, pCallContext, pParams) vaspaceapiControl_Prologue_DISPATCH(pResource, pCallContext, pParams)
214*d5a0858fSBernhard Stoeckner #define vaspaceapiControl_Epilogue_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_vtable->__rmresControl_Epilogue__
2153084c044SBernhard Stoeckner #define vaspaceapiControl_Epilogue(pResource, pCallContext, pParams) vaspaceapiControl_Epilogue_DISPATCH(pResource, pCallContext, pParams)
216*d5a0858fSBernhard Stoeckner #define vaspaceapiIsDuplicate_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_vtable->__resIsDuplicate__
2173084c044SBernhard Stoeckner #define vaspaceapiIsDuplicate(pResource, hMemory, pDuplicate) vaspaceapiIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate)
218*d5a0858fSBernhard Stoeckner #define vaspaceapiPreDestruct_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_vtable->__resPreDestruct__
2193084c044SBernhard Stoeckner #define vaspaceapiPreDestruct(pResource) vaspaceapiPreDestruct_DISPATCH(pResource)
220*d5a0858fSBernhard Stoeckner #define vaspaceapiControlFilter_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_vtable->__resControlFilter__
2213084c044SBernhard Stoeckner #define vaspaceapiControlFilter(pResource, pCallContext, pParams) vaspaceapiControlFilter_DISPATCH(pResource, pCallContext, pParams)
222*d5a0858fSBernhard Stoeckner #define vaspaceapiIsPartialUnmapSupported_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_vtable->__resIsPartialUnmapSupported__
2233084c044SBernhard Stoeckner #define vaspaceapiIsPartialUnmapSupported(pResource) vaspaceapiIsPartialUnmapSupported_DISPATCH(pResource)
224*d5a0858fSBernhard Stoeckner #define vaspaceapiMapTo_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_vtable->__resMapTo__
2253084c044SBernhard Stoeckner #define vaspaceapiMapTo(pResource, pParams) vaspaceapiMapTo_DISPATCH(pResource, pParams)
226*d5a0858fSBernhard Stoeckner #define vaspaceapiUnmapFrom_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_vtable->__resUnmapFrom__
2273084c044SBernhard Stoeckner #define vaspaceapiUnmapFrom(pResource, pParams) vaspaceapiUnmapFrom_DISPATCH(pResource, pParams)
228*d5a0858fSBernhard Stoeckner #define vaspaceapiGetRefCount_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_vtable->__resGetRefCount__
2293084c044SBernhard Stoeckner #define vaspaceapiGetRefCount(pResource) vaspaceapiGetRefCount_DISPATCH(pResource)
230*d5a0858fSBernhard Stoeckner #define vaspaceapiAddAdditionalDependants_FNPTR(pResource) pResource->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_vtable->__resAddAdditionalDependants__
2313084c044SBernhard Stoeckner #define vaspaceapiAddAdditionalDependants(pClient, pResource, pReference) vaspaceapiAddAdditionalDependants_DISPATCH(pClient, pResource, pReference)
2323084c044SBernhard Stoeckner 
2333084c044SBernhard Stoeckner // Dispatch functions
vaspaceapiCanCopy_DISPATCH(struct VaSpaceApi * pResource)2341739a20eSAndy Ritger static inline NvBool vaspaceapiCanCopy_DISPATCH(struct VaSpaceApi *pResource) {
235*d5a0858fSBernhard Stoeckner     return pResource->__nvoc_vtable->__vaspaceapiCanCopy__(pResource);
2361739a20eSAndy Ritger }
2371739a20eSAndy Ritger 
vaspaceapiCtrlCmdVaspaceGetGmmuFormat_DISPATCH(struct VaSpaceApi * pVaspaceApi,NV90F1_CTRL_VASPACE_GET_GMMU_FORMAT_PARAMS * pGmmuFormatParams)2381739a20eSAndy Ritger static inline NV_STATUS vaspaceapiCtrlCmdVaspaceGetGmmuFormat_DISPATCH(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_GET_GMMU_FORMAT_PARAMS *pGmmuFormatParams) {
2391739a20eSAndy Ritger     return pVaspaceApi->__vaspaceapiCtrlCmdVaspaceGetGmmuFormat__(pVaspaceApi, pGmmuFormatParams);
2401739a20eSAndy Ritger }
2411739a20eSAndy Ritger 
vaspaceapiCtrlCmdVaspaceGetPageLevelInfo_DISPATCH(struct VaSpaceApi * pVaspaceApi,NV90F1_CTRL_VASPACE_GET_PAGE_LEVEL_INFO_PARAMS * pPageLevelInfoParams)2421739a20eSAndy Ritger static inline NV_STATUS vaspaceapiCtrlCmdVaspaceGetPageLevelInfo_DISPATCH(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_GET_PAGE_LEVEL_INFO_PARAMS *pPageLevelInfoParams) {
2431739a20eSAndy Ritger     return pVaspaceApi->__vaspaceapiCtrlCmdVaspaceGetPageLevelInfo__(pVaspaceApi, pPageLevelInfoParams);
2441739a20eSAndy Ritger }
2451739a20eSAndy Ritger 
vaspaceapiCtrlCmdVaspaceReserveEntries_DISPATCH(struct VaSpaceApi * pVaspaceApi,NV90F1_CTRL_VASPACE_RESERVE_ENTRIES_PARAMS * pReserveEntriesParams)2461739a20eSAndy Ritger static inline NV_STATUS vaspaceapiCtrlCmdVaspaceReserveEntries_DISPATCH(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_RESERVE_ENTRIES_PARAMS *pReserveEntriesParams) {
2471739a20eSAndy Ritger     return pVaspaceApi->__vaspaceapiCtrlCmdVaspaceReserveEntries__(pVaspaceApi, pReserveEntriesParams);
2481739a20eSAndy Ritger }
2491739a20eSAndy Ritger 
vaspaceapiCtrlCmdVaspaceReleaseEntries_DISPATCH(struct VaSpaceApi * pVaspaceApi,NV90F1_CTRL_VASPACE_RELEASE_ENTRIES_PARAMS * pReleaseEntriesParams)2501739a20eSAndy Ritger static inline NV_STATUS vaspaceapiCtrlCmdVaspaceReleaseEntries_DISPATCH(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_RELEASE_ENTRIES_PARAMS *pReleaseEntriesParams) {
2511739a20eSAndy Ritger     return pVaspaceApi->__vaspaceapiCtrlCmdVaspaceReleaseEntries__(pVaspaceApi, pReleaseEntriesParams);
2521739a20eSAndy Ritger }
2531739a20eSAndy Ritger 
vaspaceapiCtrlCmdVaspaceCopyServerReservedPdes_DISPATCH(struct VaSpaceApi * pVaspaceApi,NV90F1_CTRL_VASPACE_COPY_SERVER_RESERVED_PDES_PARAMS * pCopyServerReservedPdesParams)2541739a20eSAndy Ritger static inline NV_STATUS vaspaceapiCtrlCmdVaspaceCopyServerReservedPdes_DISPATCH(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_COPY_SERVER_RESERVED_PDES_PARAMS *pCopyServerReservedPdesParams) {
2551739a20eSAndy Ritger     return pVaspaceApi->__vaspaceapiCtrlCmdVaspaceCopyServerReservedPdes__(pVaspaceApi, pCopyServerReservedPdesParams);
2561739a20eSAndy Ritger }
2571739a20eSAndy Ritger 
vaspaceapiCtrlCmdVaspaceGetHostRmManagedSize_DISPATCH(struct VaSpaceApi * pVaspaceApi,NV90F1_CTRL_VASPACE_GET_HOST_RM_MANAGED_SIZE_PARAMS * pVaspaceGetHostRmManagedSizeParams)258b5bf85a8SAndy Ritger static inline NV_STATUS vaspaceapiCtrlCmdVaspaceGetHostRmManagedSize_DISPATCH(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_GET_HOST_RM_MANAGED_SIZE_PARAMS *pVaspaceGetHostRmManagedSizeParams) {
259b5bf85a8SAndy Ritger     return pVaspaceApi->__vaspaceapiCtrlCmdVaspaceGetHostRmManagedSize__(pVaspaceApi, pVaspaceGetHostRmManagedSizeParams);
260b5bf85a8SAndy Ritger }
261b5bf85a8SAndy Ritger 
vaspaceapiControl_DISPATCH(struct VaSpaceApi * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)2623084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiControl_DISPATCH(struct VaSpaceApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
263*d5a0858fSBernhard Stoeckner     return pGpuResource->__nvoc_vtable->__vaspaceapiControl__(pGpuResource, pCallContext, pParams);
2643084c044SBernhard Stoeckner }
2653084c044SBernhard Stoeckner 
vaspaceapiMap_DISPATCH(struct VaSpaceApi * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_CPU_MAP_PARAMS * pParams,struct RsCpuMapping * pCpuMapping)2663084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiMap_DISPATCH(struct VaSpaceApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) {
267*d5a0858fSBernhard Stoeckner     return pGpuResource->__nvoc_vtable->__vaspaceapiMap__(pGpuResource, pCallContext, pParams, pCpuMapping);
2683084c044SBernhard Stoeckner }
2693084c044SBernhard Stoeckner 
vaspaceapiUnmap_DISPATCH(struct VaSpaceApi * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RsCpuMapping * pCpuMapping)2703084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiUnmap_DISPATCH(struct VaSpaceApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) {
271*d5a0858fSBernhard Stoeckner     return pGpuResource->__nvoc_vtable->__vaspaceapiUnmap__(pGpuResource, pCallContext, pCpuMapping);
2723084c044SBernhard Stoeckner }
2733084c044SBernhard Stoeckner 
vaspaceapiShareCallback_DISPATCH(struct VaSpaceApi * pGpuResource,struct RsClient * pInvokingClient,struct RsResourceRef * pParentRef,RS_SHARE_POLICY * pSharePolicy)2741739a20eSAndy Ritger static inline NvBool vaspaceapiShareCallback_DISPATCH(struct VaSpaceApi *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) {
275*d5a0858fSBernhard Stoeckner     return pGpuResource->__nvoc_vtable->__vaspaceapiShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy);
2761739a20eSAndy Ritger }
2771739a20eSAndy Ritger 
vaspaceapiGetRegBaseOffsetAndSize_DISPATCH(struct VaSpaceApi * pGpuResource,struct OBJGPU * pGpu,NvU32 * pOffset,NvU32 * pSize)2783084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiGetRegBaseOffsetAndSize_DISPATCH(struct VaSpaceApi *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) {
279*d5a0858fSBernhard Stoeckner     return pGpuResource->__nvoc_vtable->__vaspaceapiGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize);
2803084c044SBernhard Stoeckner }
2813084c044SBernhard Stoeckner 
vaspaceapiGetMapAddrSpace_DISPATCH(struct VaSpaceApi * pGpuResource,struct CALL_CONTEXT * pCallContext,NvU32 mapFlags,NV_ADDRESS_SPACE * pAddrSpace)2823084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiGetMapAddrSpace_DISPATCH(struct VaSpaceApi *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) {
283*d5a0858fSBernhard Stoeckner     return pGpuResource->__nvoc_vtable->__vaspaceapiGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace);
2843084c044SBernhard Stoeckner }
2853084c044SBernhard Stoeckner 
vaspaceapiInternalControlForward_DISPATCH(struct VaSpaceApi * pGpuResource,NvU32 command,void * pParams,NvU32 size)2863084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiInternalControlForward_DISPATCH(struct VaSpaceApi *pGpuResource, NvU32 command, void *pParams, NvU32 size) {
287*d5a0858fSBernhard Stoeckner     return pGpuResource->__nvoc_vtable->__vaspaceapiInternalControlForward__(pGpuResource, command, pParams, size);
2883084c044SBernhard Stoeckner }
2893084c044SBernhard Stoeckner 
vaspaceapiGetInternalObjectHandle_DISPATCH(struct VaSpaceApi * pGpuResource)2903084c044SBernhard Stoeckner static inline NvHandle vaspaceapiGetInternalObjectHandle_DISPATCH(struct VaSpaceApi *pGpuResource) {
291*d5a0858fSBernhard Stoeckner     return pGpuResource->__nvoc_vtable->__vaspaceapiGetInternalObjectHandle__(pGpuResource);
2923084c044SBernhard Stoeckner }
2933084c044SBernhard Stoeckner 
vaspaceapiAccessCallback_DISPATCH(struct VaSpaceApi * pResource,struct RsClient * pInvokingClient,void * pAllocParams,RsAccessRight accessRight)2943084c044SBernhard Stoeckner static inline NvBool vaspaceapiAccessCallback_DISPATCH(struct VaSpaceApi *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) {
295*d5a0858fSBernhard Stoeckner     return pResource->__nvoc_vtable->__vaspaceapiAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight);
2963084c044SBernhard Stoeckner }
2973084c044SBernhard Stoeckner 
vaspaceapiGetMemInterMapParams_DISPATCH(struct VaSpaceApi * pRmResource,RMRES_MEM_INTER_MAP_PARAMS * pParams)2983084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiGetMemInterMapParams_DISPATCH(struct VaSpaceApi *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) {
299*d5a0858fSBernhard Stoeckner     return pRmResource->__nvoc_vtable->__vaspaceapiGetMemInterMapParams__(pRmResource, pParams);
3003084c044SBernhard Stoeckner }
3013084c044SBernhard Stoeckner 
vaspaceapiCheckMemInterUnmap_DISPATCH(struct VaSpaceApi * pRmResource,NvBool bSubdeviceHandleProvided)3024397463eSAndy Ritger static inline NV_STATUS vaspaceapiCheckMemInterUnmap_DISPATCH(struct VaSpaceApi *pRmResource, NvBool bSubdeviceHandleProvided) {
303*d5a0858fSBernhard Stoeckner     return pRmResource->__nvoc_vtable->__vaspaceapiCheckMemInterUnmap__(pRmResource, bSubdeviceHandleProvided);
3044397463eSAndy Ritger }
3054397463eSAndy Ritger 
vaspaceapiGetMemoryMappingDescriptor_DISPATCH(struct VaSpaceApi * pRmResource,struct MEMORY_DESCRIPTOR ** ppMemDesc)3063084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiGetMemoryMappingDescriptor_DISPATCH(struct VaSpaceApi *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) {
307*d5a0858fSBernhard Stoeckner     return pRmResource->__nvoc_vtable->__vaspaceapiGetMemoryMappingDescriptor__(pRmResource, ppMemDesc);
3083084c044SBernhard Stoeckner }
3093084c044SBernhard Stoeckner 
vaspaceapiControlSerialization_Prologue_DISPATCH(struct VaSpaceApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)3103084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiControlSerialization_Prologue_DISPATCH(struct VaSpaceApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
311*d5a0858fSBernhard Stoeckner     return pResource->__nvoc_vtable->__vaspaceapiControlSerialization_Prologue__(pResource, pCallContext, pParams);
3123084c044SBernhard Stoeckner }
3133084c044SBernhard Stoeckner 
vaspaceapiControlSerialization_Epilogue_DISPATCH(struct VaSpaceApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)3143084c044SBernhard Stoeckner static inline void vaspaceapiControlSerialization_Epilogue_DISPATCH(struct VaSpaceApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
315*d5a0858fSBernhard Stoeckner     pResource->__nvoc_vtable->__vaspaceapiControlSerialization_Epilogue__(pResource, pCallContext, pParams);
3163084c044SBernhard Stoeckner }
3173084c044SBernhard Stoeckner 
vaspaceapiControl_Prologue_DISPATCH(struct VaSpaceApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)3183084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiControl_Prologue_DISPATCH(struct VaSpaceApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
319*d5a0858fSBernhard Stoeckner     return pResource->__nvoc_vtable->__vaspaceapiControl_Prologue__(pResource, pCallContext, pParams);
3203084c044SBernhard Stoeckner }
3213084c044SBernhard Stoeckner 
vaspaceapiControl_Epilogue_DISPATCH(struct VaSpaceApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)3223084c044SBernhard Stoeckner static inline void vaspaceapiControl_Epilogue_DISPATCH(struct VaSpaceApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
323*d5a0858fSBernhard Stoeckner     pResource->__nvoc_vtable->__vaspaceapiControl_Epilogue__(pResource, pCallContext, pParams);
3243084c044SBernhard Stoeckner }
3253084c044SBernhard Stoeckner 
vaspaceapiIsDuplicate_DISPATCH(struct VaSpaceApi * pResource,NvHandle hMemory,NvBool * pDuplicate)3263084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiIsDuplicate_DISPATCH(struct VaSpaceApi *pResource, NvHandle hMemory, NvBool *pDuplicate) {
327*d5a0858fSBernhard Stoeckner     return pResource->__nvoc_vtable->__vaspaceapiIsDuplicate__(pResource, hMemory, pDuplicate);
3283084c044SBernhard Stoeckner }
3293084c044SBernhard Stoeckner 
vaspaceapiPreDestruct_DISPATCH(struct VaSpaceApi * pResource)3303084c044SBernhard Stoeckner static inline void vaspaceapiPreDestruct_DISPATCH(struct VaSpaceApi *pResource) {
331*d5a0858fSBernhard Stoeckner     pResource->__nvoc_vtable->__vaspaceapiPreDestruct__(pResource);
3323084c044SBernhard Stoeckner }
3333084c044SBernhard Stoeckner 
vaspaceapiControlFilter_DISPATCH(struct VaSpaceApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)3343084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiControlFilter_DISPATCH(struct VaSpaceApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
335*d5a0858fSBernhard Stoeckner     return pResource->__nvoc_vtable->__vaspaceapiControlFilter__(pResource, pCallContext, pParams);
3363084c044SBernhard Stoeckner }
3373084c044SBernhard Stoeckner 
vaspaceapiIsPartialUnmapSupported_DISPATCH(struct VaSpaceApi * pResource)3383084c044SBernhard Stoeckner static inline NvBool vaspaceapiIsPartialUnmapSupported_DISPATCH(struct VaSpaceApi *pResource) {
339*d5a0858fSBernhard Stoeckner     return pResource->__nvoc_vtable->__vaspaceapiIsPartialUnmapSupported__(pResource);
3403084c044SBernhard Stoeckner }
3413084c044SBernhard Stoeckner 
vaspaceapiMapTo_DISPATCH(struct VaSpaceApi * pResource,RS_RES_MAP_TO_PARAMS * pParams)3424397463eSAndy Ritger static inline NV_STATUS vaspaceapiMapTo_DISPATCH(struct VaSpaceApi *pResource, RS_RES_MAP_TO_PARAMS *pParams) {
343*d5a0858fSBernhard Stoeckner     return pResource->__nvoc_vtable->__vaspaceapiMapTo__(pResource, pParams);
3444397463eSAndy Ritger }
3454397463eSAndy Ritger 
vaspaceapiUnmapFrom_DISPATCH(struct VaSpaceApi * pResource,RS_RES_UNMAP_FROM_PARAMS * pParams)3463084c044SBernhard Stoeckner static inline NV_STATUS vaspaceapiUnmapFrom_DISPATCH(struct VaSpaceApi *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) {
347*d5a0858fSBernhard Stoeckner     return pResource->__nvoc_vtable->__vaspaceapiUnmapFrom__(pResource, pParams);
3484397463eSAndy Ritger }
3494397463eSAndy Ritger 
vaspaceapiGetRefCount_DISPATCH(struct VaSpaceApi * pResource)3504397463eSAndy Ritger static inline NvU32 vaspaceapiGetRefCount_DISPATCH(struct VaSpaceApi *pResource) {
351*d5a0858fSBernhard Stoeckner     return pResource->__nvoc_vtable->__vaspaceapiGetRefCount__(pResource);
3524397463eSAndy Ritger }
3534397463eSAndy Ritger 
vaspaceapiAddAdditionalDependants_DISPATCH(struct RsClient * pClient,struct VaSpaceApi * pResource,RsResourceRef * pReference)3544397463eSAndy Ritger static inline void vaspaceapiAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct VaSpaceApi *pResource, RsResourceRef *pReference) {
355*d5a0858fSBernhard Stoeckner     pResource->__nvoc_vtable->__vaspaceapiAddAdditionalDependants__(pClient, pResource, pReference);
3564397463eSAndy Ritger }
3574397463eSAndy Ritger 
3583084c044SBernhard Stoeckner NvBool vaspaceapiCanCopy_IMPL(struct VaSpaceApi *pResource);
3594397463eSAndy Ritger 
3603084c044SBernhard Stoeckner NV_STATUS vaspaceapiCtrlCmdVaspaceGetGmmuFormat_IMPL(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_GET_GMMU_FORMAT_PARAMS *pGmmuFormatParams);
3614397463eSAndy Ritger 
3623084c044SBernhard Stoeckner NV_STATUS vaspaceapiCtrlCmdVaspaceGetPageLevelInfo_IMPL(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_GET_PAGE_LEVEL_INFO_PARAMS *pPageLevelInfoParams);
3634397463eSAndy Ritger 
3643084c044SBernhard Stoeckner NV_STATUS vaspaceapiCtrlCmdVaspaceReserveEntries_IMPL(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_RESERVE_ENTRIES_PARAMS *pReserveEntriesParams);
3654397463eSAndy Ritger 
3663084c044SBernhard Stoeckner NV_STATUS vaspaceapiCtrlCmdVaspaceReleaseEntries_IMPL(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_RELEASE_ENTRIES_PARAMS *pReleaseEntriesParams);
3674397463eSAndy Ritger 
3683084c044SBernhard Stoeckner NV_STATUS vaspaceapiCtrlCmdVaspaceCopyServerReservedPdes_IMPL(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_COPY_SERVER_RESERVED_PDES_PARAMS *pCopyServerReservedPdesParams);
3694397463eSAndy Ritger 
3703084c044SBernhard Stoeckner NV_STATUS vaspaceapiCtrlCmdVaspaceGetHostRmManagedSize_IMPL(struct VaSpaceApi *pVaspaceApi, NV90F1_CTRL_VASPACE_GET_HOST_RM_MANAGED_SIZE_PARAMS *pVaspaceGetHostRmManagedSizeParams);
3711739a20eSAndy Ritger 
3721739a20eSAndy Ritger NV_STATUS vaspaceapiConstruct_IMPL(struct VaSpaceApi *arg_pResource, struct CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams);
373758b4ee8SAndy Ritger 
3741739a20eSAndy Ritger #define __nvoc_vaspaceapiConstruct(arg_pResource, arg_pCallContext, arg_pParams) vaspaceapiConstruct_IMPL(arg_pResource, arg_pCallContext, arg_pParams)
3751739a20eSAndy Ritger NV_STATUS vaspaceapiCopyConstruct_IMPL(struct VaSpaceApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *pParams);
376758b4ee8SAndy Ritger 
3771739a20eSAndy Ritger #ifdef __nvoc_vaspace_api_h_disabled
vaspaceapiCopyConstruct(struct VaSpaceApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_ALLOC_PARAMS_INTERNAL * pParams)3781739a20eSAndy Ritger static inline NV_STATUS vaspaceapiCopyConstruct(struct VaSpaceApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *pParams) {
3791739a20eSAndy Ritger     NV_ASSERT_FAILED_PRECOMP("VaSpaceApi was disabled!");
3801739a20eSAndy Ritger     return NV_ERR_NOT_SUPPORTED;
3811739a20eSAndy Ritger }
3821739a20eSAndy Ritger #else //__nvoc_vaspace_api_h_disabled
3831739a20eSAndy Ritger #define vaspaceapiCopyConstruct(pResource, pCallContext, pParams) vaspaceapiCopyConstruct_IMPL(pResource, pCallContext, pParams)
3841739a20eSAndy Ritger #endif //__nvoc_vaspace_api_h_disabled
3851739a20eSAndy Ritger 
3861739a20eSAndy Ritger void vaspaceapiDestruct_IMPL(struct VaSpaceApi *pResource);
387758b4ee8SAndy Ritger 
3881739a20eSAndy Ritger #define __nvoc_vaspaceapiDestruct(pResource) vaspaceapiDestruct_IMPL(pResource)
3891739a20eSAndy Ritger #undef PRIVATE_FIELD
3901739a20eSAndy Ritger 
3911739a20eSAndy Ritger 
3921739a20eSAndy Ritger #endif // VASPACE_API_H
3931739a20eSAndy Ritger 
3941739a20eSAndy Ritger #ifdef __cplusplus
3951739a20eSAndy Ritger } // extern "C"
3961739a20eSAndy Ritger #endif
397b5bf85a8SAndy Ritger 
3981739a20eSAndy Ritger #endif // _G_VASPACE_API_NVOC_H_
399