1 #ifndef _G_ZBC_API_NVOC_H_
2 #define _G_ZBC_API_NVOC_H_
3 #include "nvoc/runtime.h"
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 /*
10 * SPDX-FileCopyrightText: Copyright (c) 2016-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_zbc_api_nvoc.h"
33
34 #ifndef _ZBCAPI_H_
35 #define _ZBCAPI_H_
36
37 #include "gpu/gpu_resource.h"
38 #include "gpu/gpu_halspec.h"
39 #include "rmapi/control.h"
40 #include "ctrl/ctrl9096.h"
41
42 /*!
43 * RM internal class representing GF100_ZBC_CLEAR
44 */
45
46 // Private field names are wrapped in PRIVATE_FIELD, which does nothing for
47 // the matching C source file, but causes diagnostics to be issued if another
48 // source file references the field.
49 #ifdef NVOC_ZBC_API_H_PRIVATE_ACCESS_ALLOWED
50 #define PRIVATE_FIELD(x) x
51 #else
52 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
53 #endif
54
55 struct ZbcApi {
56 const struct NVOC_RTTI *__nvoc_rtti;
57 struct GpuResource __nvoc_base_GpuResource;
58 struct Object *__nvoc_pbase_Object;
59 struct RsResource *__nvoc_pbase_RsResource;
60 struct RmResourceCommon *__nvoc_pbase_RmResourceCommon;
61 struct RmResource *__nvoc_pbase_RmResource;
62 struct GpuResource *__nvoc_pbase_GpuResource;
63 struct ZbcApi *__nvoc_pbase_ZbcApi;
64 NV_STATUS (*__zbcapiCtrlCmdSetZbcColorClear__)(struct ZbcApi *, NV9096_CTRL_SET_ZBC_COLOR_CLEAR_PARAMS *);
65 NV_STATUS (*__zbcapiCtrlCmdSetZbcDepthClear__)(struct ZbcApi *, NV9096_CTRL_SET_ZBC_DEPTH_CLEAR_PARAMS *);
66 NV_STATUS (*__zbcapiCtrlCmdGetZbcClearTable__)(struct ZbcApi *, NV9096_CTRL_GET_ZBC_CLEAR_TABLE_PARAMS *);
67 NV_STATUS (*__zbcapiCtrlCmdSetZbcClearTable__)(struct ZbcApi *, NV9096_CTRL_SET_ZBC_CLEAR_TABLE_PARAMS *);
68 NV_STATUS (*__zbcapiCtrlCmdSetZbcStencilClear__)(struct ZbcApi *, NV9096_CTRL_SET_ZBC_STENCIL_CLEAR_PARAMS *);
69 NV_STATUS (*__zbcapiCtrlCmdGetZbcClearTableSize__)(struct ZbcApi *, NV9096_CTRL_GET_ZBC_CLEAR_TABLE_SIZE_PARAMS *);
70 NV_STATUS (*__zbcapiCtrlCmdGetZbcClearTableEntry__)(struct ZbcApi *, NV9096_CTRL_GET_ZBC_CLEAR_TABLE_ENTRY_PARAMS *);
71 NvBool (*__zbcapiShareCallback__)(struct ZbcApi *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *);
72 NV_STATUS (*__zbcapiCheckMemInterUnmap__)(struct ZbcApi *, NvBool);
73 NV_STATUS (*__zbcapiMapTo__)(struct ZbcApi *, RS_RES_MAP_TO_PARAMS *);
74 NV_STATUS (*__zbcapiGetMapAddrSpace__)(struct ZbcApi *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *);
75 NvU32 (*__zbcapiGetRefCount__)(struct ZbcApi *);
76 void (*__zbcapiAddAdditionalDependants__)(struct RsClient *, struct ZbcApi *, RsResourceRef *);
77 NV_STATUS (*__zbcapiControl_Prologue__)(struct ZbcApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
78 NV_STATUS (*__zbcapiGetRegBaseOffsetAndSize__)(struct ZbcApi *, struct OBJGPU *, NvU32 *, NvU32 *);
79 NV_STATUS (*__zbcapiInternalControlForward__)(struct ZbcApi *, NvU32, void *, NvU32);
80 NV_STATUS (*__zbcapiUnmapFrom__)(struct ZbcApi *, RS_RES_UNMAP_FROM_PARAMS *);
81 void (*__zbcapiControl_Epilogue__)(struct ZbcApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
82 NvHandle (*__zbcapiGetInternalObjectHandle__)(struct ZbcApi *);
83 NV_STATUS (*__zbcapiControl__)(struct ZbcApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
84 NV_STATUS (*__zbcapiUnmap__)(struct ZbcApi *, struct CALL_CONTEXT *, struct RsCpuMapping *);
85 NV_STATUS (*__zbcapiGetMemInterMapParams__)(struct ZbcApi *, RMRES_MEM_INTER_MAP_PARAMS *);
86 NV_STATUS (*__zbcapiGetMemoryMappingDescriptor__)(struct ZbcApi *, struct MEMORY_DESCRIPTOR **);
87 NV_STATUS (*__zbcapiControlFilter__)(struct ZbcApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
88 NV_STATUS (*__zbcapiControlSerialization_Prologue__)(struct ZbcApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
89 NvBool (*__zbcapiCanCopy__)(struct ZbcApi *);
90 NvBool (*__zbcapiIsPartialUnmapSupported__)(struct ZbcApi *);
91 void (*__zbcapiPreDestruct__)(struct ZbcApi *);
92 NV_STATUS (*__zbcapiIsDuplicate__)(struct ZbcApi *, NvHandle, NvBool *);
93 void (*__zbcapiControlSerialization_Epilogue__)(struct ZbcApi *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *);
94 NV_STATUS (*__zbcapiMap__)(struct ZbcApi *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *);
95 NvBool (*__zbcapiAccessCallback__)(struct ZbcApi *, struct RsClient *, void *, RsAccessRight);
96 NvBool bZbcUsed;
97 };
98
99 #ifndef __NVOC_CLASS_ZbcApi_TYPEDEF__
100 #define __NVOC_CLASS_ZbcApi_TYPEDEF__
101 typedef struct ZbcApi ZbcApi;
102 #endif /* __NVOC_CLASS_ZbcApi_TYPEDEF__ */
103
104 #ifndef __nvoc_class_id_ZbcApi
105 #define __nvoc_class_id_ZbcApi 0x397ee3
106 #endif /* __nvoc_class_id_ZbcApi */
107
108 extern const struct NVOC_CLASS_DEF __nvoc_class_def_ZbcApi;
109
110 #define __staticCast_ZbcApi(pThis) \
111 ((pThis)->__nvoc_pbase_ZbcApi)
112
113 #ifdef __nvoc_zbc_api_h_disabled
114 #define __dynamicCast_ZbcApi(pThis) ((ZbcApi*)NULL)
115 #else //__nvoc_zbc_api_h_disabled
116 #define __dynamicCast_ZbcApi(pThis) \
117 ((ZbcApi*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(ZbcApi)))
118 #endif //__nvoc_zbc_api_h_disabled
119
120
121 NV_STATUS __nvoc_objCreateDynamic_ZbcApi(ZbcApi**, Dynamic*, NvU32, va_list);
122
123 NV_STATUS __nvoc_objCreate_ZbcApi(ZbcApi**, Dynamic*, NvU32, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams);
124 #define __objCreate_ZbcApi(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \
125 __nvoc_objCreate_ZbcApi((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams)
126
127 #define zbcapiCtrlCmdSetZbcColorClear(pZbcApi, pSetZBCClearParams) zbcapiCtrlCmdSetZbcColorClear_DISPATCH(pZbcApi, pSetZBCClearParams)
128 #define zbcapiCtrlCmdSetZbcDepthClear(pZbcApi, pSetZBCClearParams) zbcapiCtrlCmdSetZbcDepthClear_DISPATCH(pZbcApi, pSetZBCClearParams)
129 #define zbcapiCtrlCmdGetZbcClearTable(pZbcApi, pGetZBCClearTableParams) zbcapiCtrlCmdGetZbcClearTable_DISPATCH(pZbcApi, pGetZBCClearTableParams)
130 #define zbcapiCtrlCmdSetZbcClearTable(pZbcApi, pSetZBCClearTableParams) zbcapiCtrlCmdSetZbcClearTable_DISPATCH(pZbcApi, pSetZBCClearTableParams)
131 #define zbcapiCtrlCmdSetZbcStencilClear(pZbcApi, pSetZBCClearParams) zbcapiCtrlCmdSetZbcStencilClear_DISPATCH(pZbcApi, pSetZBCClearParams)
132 #define zbcapiCtrlCmdGetZbcClearTableSize(pZbcApi, pGetZBCClearTableSizeParams) zbcapiCtrlCmdGetZbcClearTableSize_DISPATCH(pZbcApi, pGetZBCClearTableSizeParams)
133 #define zbcapiCtrlCmdGetZbcClearTableSize_HAL(pZbcApi, pGetZBCClearTableSizeParams) zbcapiCtrlCmdGetZbcClearTableSize_DISPATCH(pZbcApi, pGetZBCClearTableSizeParams)
134 #define zbcapiCtrlCmdGetZbcClearTableEntry(pZbcApi, pGetZBCClearTableEntryParams) zbcapiCtrlCmdGetZbcClearTableEntry_DISPATCH(pZbcApi, pGetZBCClearTableEntryParams)
135 #define zbcapiShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) zbcapiShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy)
136 #define zbcapiCheckMemInterUnmap(pRmResource, bSubdeviceHandleProvided) zbcapiCheckMemInterUnmap_DISPATCH(pRmResource, bSubdeviceHandleProvided)
137 #define zbcapiMapTo(pResource, pParams) zbcapiMapTo_DISPATCH(pResource, pParams)
138 #define zbcapiGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) zbcapiGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace)
139 #define zbcapiGetRefCount(pResource) zbcapiGetRefCount_DISPATCH(pResource)
140 #define zbcapiAddAdditionalDependants(pClient, pResource, pReference) zbcapiAddAdditionalDependants_DISPATCH(pClient, pResource, pReference)
141 #define zbcapiControl_Prologue(pResource, pCallContext, pParams) zbcapiControl_Prologue_DISPATCH(pResource, pCallContext, pParams)
142 #define zbcapiGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) zbcapiGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize)
143 #define zbcapiInternalControlForward(pGpuResource, command, pParams, size) zbcapiInternalControlForward_DISPATCH(pGpuResource, command, pParams, size)
144 #define zbcapiUnmapFrom(pResource, pParams) zbcapiUnmapFrom_DISPATCH(pResource, pParams)
145 #define zbcapiControl_Epilogue(pResource, pCallContext, pParams) zbcapiControl_Epilogue_DISPATCH(pResource, pCallContext, pParams)
146 #define zbcapiGetInternalObjectHandle(pGpuResource) zbcapiGetInternalObjectHandle_DISPATCH(pGpuResource)
147 #define zbcapiControl(pGpuResource, pCallContext, pParams) zbcapiControl_DISPATCH(pGpuResource, pCallContext, pParams)
148 #define zbcapiUnmap(pGpuResource, pCallContext, pCpuMapping) zbcapiUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping)
149 #define zbcapiGetMemInterMapParams(pRmResource, pParams) zbcapiGetMemInterMapParams_DISPATCH(pRmResource, pParams)
150 #define zbcapiGetMemoryMappingDescriptor(pRmResource, ppMemDesc) zbcapiGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc)
151 #define zbcapiControlFilter(pResource, pCallContext, pParams) zbcapiControlFilter_DISPATCH(pResource, pCallContext, pParams)
152 #define zbcapiControlSerialization_Prologue(pResource, pCallContext, pParams) zbcapiControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams)
153 #define zbcapiCanCopy(pResource) zbcapiCanCopy_DISPATCH(pResource)
154 #define zbcapiIsPartialUnmapSupported(pResource) zbcapiIsPartialUnmapSupported_DISPATCH(pResource)
155 #define zbcapiPreDestruct(pResource) zbcapiPreDestruct_DISPATCH(pResource)
156 #define zbcapiIsDuplicate(pResource, hMemory, pDuplicate) zbcapiIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate)
157 #define zbcapiControlSerialization_Epilogue(pResource, pCallContext, pParams) zbcapiControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams)
158 #define zbcapiMap(pGpuResource, pCallContext, pParams, pCpuMapping) zbcapiMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping)
159 #define zbcapiAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) zbcapiAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight)
zbcapiConstructHal_56cd7a(struct ZbcApi * pZbcApi,struct CALL_CONTEXT * pCallContext,struct RS_RES_ALLOC_PARAMS_INTERNAL * pParams)160 static inline NV_STATUS zbcapiConstructHal_56cd7a(struct ZbcApi *pZbcApi, struct CALL_CONTEXT *pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *pParams) {
161 return NV_OK;
162 }
163
164
165 #ifdef __nvoc_zbc_api_h_disabled
zbcapiConstructHal(struct ZbcApi * pZbcApi,struct CALL_CONTEXT * pCallContext,struct RS_RES_ALLOC_PARAMS_INTERNAL * pParams)166 static inline NV_STATUS zbcapiConstructHal(struct ZbcApi *pZbcApi, struct CALL_CONTEXT *pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *pParams) {
167 NV_ASSERT_FAILED_PRECOMP("ZbcApi was disabled!");
168 return NV_ERR_NOT_SUPPORTED;
169 }
170 #else //__nvoc_zbc_api_h_disabled
171 #define zbcapiConstructHal(pZbcApi, pCallContext, pParams) zbcapiConstructHal_56cd7a(pZbcApi, pCallContext, pParams)
172 #endif //__nvoc_zbc_api_h_disabled
173
174 #define zbcapiConstructHal_HAL(pZbcApi, pCallContext, pParams) zbcapiConstructHal(pZbcApi, pCallContext, pParams)
175
zbcapiDestruct_b3696a(struct ZbcApi * pZbcApi)176 static inline void zbcapiDestruct_b3696a(struct ZbcApi *pZbcApi) {
177 return;
178 }
179
180
181 #define __nvoc_zbcapiDestruct(pZbcApi) zbcapiDestruct_b3696a(pZbcApi)
182 NV_STATUS zbcapiCtrlCmdSetZbcColorClear_IMPL(struct ZbcApi *pZbcApi, NV9096_CTRL_SET_ZBC_COLOR_CLEAR_PARAMS *pSetZBCClearParams);
183
zbcapiCtrlCmdSetZbcColorClear_DISPATCH(struct ZbcApi * pZbcApi,NV9096_CTRL_SET_ZBC_COLOR_CLEAR_PARAMS * pSetZBCClearParams)184 static inline NV_STATUS zbcapiCtrlCmdSetZbcColorClear_DISPATCH(struct ZbcApi *pZbcApi, NV9096_CTRL_SET_ZBC_COLOR_CLEAR_PARAMS *pSetZBCClearParams) {
185 return pZbcApi->__zbcapiCtrlCmdSetZbcColorClear__(pZbcApi, pSetZBCClearParams);
186 }
187
188 NV_STATUS zbcapiCtrlCmdSetZbcDepthClear_IMPL(struct ZbcApi *pZbcApi, NV9096_CTRL_SET_ZBC_DEPTH_CLEAR_PARAMS *pSetZBCClearParams);
189
zbcapiCtrlCmdSetZbcDepthClear_DISPATCH(struct ZbcApi * pZbcApi,NV9096_CTRL_SET_ZBC_DEPTH_CLEAR_PARAMS * pSetZBCClearParams)190 static inline NV_STATUS zbcapiCtrlCmdSetZbcDepthClear_DISPATCH(struct ZbcApi *pZbcApi, NV9096_CTRL_SET_ZBC_DEPTH_CLEAR_PARAMS *pSetZBCClearParams) {
191 return pZbcApi->__zbcapiCtrlCmdSetZbcDepthClear__(pZbcApi, pSetZBCClearParams);
192 }
193
194 NV_STATUS zbcapiCtrlCmdGetZbcClearTable_IMPL(struct ZbcApi *pZbcApi, NV9096_CTRL_GET_ZBC_CLEAR_TABLE_PARAMS *pGetZBCClearTableParams);
195
zbcapiCtrlCmdGetZbcClearTable_DISPATCH(struct ZbcApi * pZbcApi,NV9096_CTRL_GET_ZBC_CLEAR_TABLE_PARAMS * pGetZBCClearTableParams)196 static inline NV_STATUS zbcapiCtrlCmdGetZbcClearTable_DISPATCH(struct ZbcApi *pZbcApi, NV9096_CTRL_GET_ZBC_CLEAR_TABLE_PARAMS *pGetZBCClearTableParams) {
197 return pZbcApi->__zbcapiCtrlCmdGetZbcClearTable__(pZbcApi, pGetZBCClearTableParams);
198 }
199
200 NV_STATUS zbcapiCtrlCmdSetZbcClearTable_IMPL(struct ZbcApi *pZbcApi, NV9096_CTRL_SET_ZBC_CLEAR_TABLE_PARAMS *pSetZBCClearTableParams);
201
zbcapiCtrlCmdSetZbcClearTable_DISPATCH(struct ZbcApi * pZbcApi,NV9096_CTRL_SET_ZBC_CLEAR_TABLE_PARAMS * pSetZBCClearTableParams)202 static inline NV_STATUS zbcapiCtrlCmdSetZbcClearTable_DISPATCH(struct ZbcApi *pZbcApi, NV9096_CTRL_SET_ZBC_CLEAR_TABLE_PARAMS *pSetZBCClearTableParams) {
203 return pZbcApi->__zbcapiCtrlCmdSetZbcClearTable__(pZbcApi, pSetZBCClearTableParams);
204 }
205
206 NV_STATUS zbcapiCtrlCmdSetZbcStencilClear_IMPL(struct ZbcApi *pZbcApi, NV9096_CTRL_SET_ZBC_STENCIL_CLEAR_PARAMS *pSetZBCClearParams);
207
zbcapiCtrlCmdSetZbcStencilClear_DISPATCH(struct ZbcApi * pZbcApi,NV9096_CTRL_SET_ZBC_STENCIL_CLEAR_PARAMS * pSetZBCClearParams)208 static inline NV_STATUS zbcapiCtrlCmdSetZbcStencilClear_DISPATCH(struct ZbcApi *pZbcApi, NV9096_CTRL_SET_ZBC_STENCIL_CLEAR_PARAMS *pSetZBCClearParams) {
209 return pZbcApi->__zbcapiCtrlCmdSetZbcStencilClear__(pZbcApi, pSetZBCClearParams);
210 }
211
212 NV_STATUS zbcapiCtrlCmdGetZbcClearTableSize_VF(struct ZbcApi *pZbcApi, NV9096_CTRL_GET_ZBC_CLEAR_TABLE_SIZE_PARAMS *pGetZBCClearTableSizeParams);
213
zbcapiCtrlCmdGetZbcClearTableSize_5baef9(struct ZbcApi * pZbcApi,NV9096_CTRL_GET_ZBC_CLEAR_TABLE_SIZE_PARAMS * pGetZBCClearTableSizeParams)214 static inline NV_STATUS zbcapiCtrlCmdGetZbcClearTableSize_5baef9(struct ZbcApi *pZbcApi, NV9096_CTRL_GET_ZBC_CLEAR_TABLE_SIZE_PARAMS *pGetZBCClearTableSizeParams) {
215 NV_ASSERT_OR_RETURN_PRECOMP(0, NV_ERR_NOT_SUPPORTED);
216 }
217
zbcapiCtrlCmdGetZbcClearTableSize_DISPATCH(struct ZbcApi * pZbcApi,NV9096_CTRL_GET_ZBC_CLEAR_TABLE_SIZE_PARAMS * pGetZBCClearTableSizeParams)218 static inline NV_STATUS zbcapiCtrlCmdGetZbcClearTableSize_DISPATCH(struct ZbcApi *pZbcApi, NV9096_CTRL_GET_ZBC_CLEAR_TABLE_SIZE_PARAMS *pGetZBCClearTableSizeParams) {
219 return pZbcApi->__zbcapiCtrlCmdGetZbcClearTableSize__(pZbcApi, pGetZBCClearTableSizeParams);
220 }
221
222 NV_STATUS zbcapiCtrlCmdGetZbcClearTableEntry_IMPL(struct ZbcApi *pZbcApi, NV9096_CTRL_GET_ZBC_CLEAR_TABLE_ENTRY_PARAMS *pGetZBCClearTableEntryParams);
223
zbcapiCtrlCmdGetZbcClearTableEntry_DISPATCH(struct ZbcApi * pZbcApi,NV9096_CTRL_GET_ZBC_CLEAR_TABLE_ENTRY_PARAMS * pGetZBCClearTableEntryParams)224 static inline NV_STATUS zbcapiCtrlCmdGetZbcClearTableEntry_DISPATCH(struct ZbcApi *pZbcApi, NV9096_CTRL_GET_ZBC_CLEAR_TABLE_ENTRY_PARAMS *pGetZBCClearTableEntryParams) {
225 return pZbcApi->__zbcapiCtrlCmdGetZbcClearTableEntry__(pZbcApi, pGetZBCClearTableEntryParams);
226 }
227
zbcapiShareCallback_DISPATCH(struct ZbcApi * pGpuResource,struct RsClient * pInvokingClient,struct RsResourceRef * pParentRef,RS_SHARE_POLICY * pSharePolicy)228 static inline NvBool zbcapiShareCallback_DISPATCH(struct ZbcApi *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) {
229 return pGpuResource->__zbcapiShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy);
230 }
231
zbcapiCheckMemInterUnmap_DISPATCH(struct ZbcApi * pRmResource,NvBool bSubdeviceHandleProvided)232 static inline NV_STATUS zbcapiCheckMemInterUnmap_DISPATCH(struct ZbcApi *pRmResource, NvBool bSubdeviceHandleProvided) {
233 return pRmResource->__zbcapiCheckMemInterUnmap__(pRmResource, bSubdeviceHandleProvided);
234 }
235
zbcapiMapTo_DISPATCH(struct ZbcApi * pResource,RS_RES_MAP_TO_PARAMS * pParams)236 static inline NV_STATUS zbcapiMapTo_DISPATCH(struct ZbcApi *pResource, RS_RES_MAP_TO_PARAMS *pParams) {
237 return pResource->__zbcapiMapTo__(pResource, pParams);
238 }
239
zbcapiGetMapAddrSpace_DISPATCH(struct ZbcApi * pGpuResource,struct CALL_CONTEXT * pCallContext,NvU32 mapFlags,NV_ADDRESS_SPACE * pAddrSpace)240 static inline NV_STATUS zbcapiGetMapAddrSpace_DISPATCH(struct ZbcApi *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) {
241 return pGpuResource->__zbcapiGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace);
242 }
243
zbcapiGetRefCount_DISPATCH(struct ZbcApi * pResource)244 static inline NvU32 zbcapiGetRefCount_DISPATCH(struct ZbcApi *pResource) {
245 return pResource->__zbcapiGetRefCount__(pResource);
246 }
247
zbcapiAddAdditionalDependants_DISPATCH(struct RsClient * pClient,struct ZbcApi * pResource,RsResourceRef * pReference)248 static inline void zbcapiAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct ZbcApi *pResource, RsResourceRef *pReference) {
249 pResource->__zbcapiAddAdditionalDependants__(pClient, pResource, pReference);
250 }
251
zbcapiControl_Prologue_DISPATCH(struct ZbcApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)252 static inline NV_STATUS zbcapiControl_Prologue_DISPATCH(struct ZbcApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
253 return pResource->__zbcapiControl_Prologue__(pResource, pCallContext, pParams);
254 }
255
zbcapiGetRegBaseOffsetAndSize_DISPATCH(struct ZbcApi * pGpuResource,struct OBJGPU * pGpu,NvU32 * pOffset,NvU32 * pSize)256 static inline NV_STATUS zbcapiGetRegBaseOffsetAndSize_DISPATCH(struct ZbcApi *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) {
257 return pGpuResource->__zbcapiGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize);
258 }
259
zbcapiInternalControlForward_DISPATCH(struct ZbcApi * pGpuResource,NvU32 command,void * pParams,NvU32 size)260 static inline NV_STATUS zbcapiInternalControlForward_DISPATCH(struct ZbcApi *pGpuResource, NvU32 command, void *pParams, NvU32 size) {
261 return pGpuResource->__zbcapiInternalControlForward__(pGpuResource, command, pParams, size);
262 }
263
zbcapiUnmapFrom_DISPATCH(struct ZbcApi * pResource,RS_RES_UNMAP_FROM_PARAMS * pParams)264 static inline NV_STATUS zbcapiUnmapFrom_DISPATCH(struct ZbcApi *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) {
265 return pResource->__zbcapiUnmapFrom__(pResource, pParams);
266 }
267
zbcapiControl_Epilogue_DISPATCH(struct ZbcApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)268 static inline void zbcapiControl_Epilogue_DISPATCH(struct ZbcApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
269 pResource->__zbcapiControl_Epilogue__(pResource, pCallContext, pParams);
270 }
271
zbcapiGetInternalObjectHandle_DISPATCH(struct ZbcApi * pGpuResource)272 static inline NvHandle zbcapiGetInternalObjectHandle_DISPATCH(struct ZbcApi *pGpuResource) {
273 return pGpuResource->__zbcapiGetInternalObjectHandle__(pGpuResource);
274 }
275
zbcapiControl_DISPATCH(struct ZbcApi * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)276 static inline NV_STATUS zbcapiControl_DISPATCH(struct ZbcApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
277 return pGpuResource->__zbcapiControl__(pGpuResource, pCallContext, pParams);
278 }
279
zbcapiUnmap_DISPATCH(struct ZbcApi * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RsCpuMapping * pCpuMapping)280 static inline NV_STATUS zbcapiUnmap_DISPATCH(struct ZbcApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) {
281 return pGpuResource->__zbcapiUnmap__(pGpuResource, pCallContext, pCpuMapping);
282 }
283
zbcapiGetMemInterMapParams_DISPATCH(struct ZbcApi * pRmResource,RMRES_MEM_INTER_MAP_PARAMS * pParams)284 static inline NV_STATUS zbcapiGetMemInterMapParams_DISPATCH(struct ZbcApi *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) {
285 return pRmResource->__zbcapiGetMemInterMapParams__(pRmResource, pParams);
286 }
287
zbcapiGetMemoryMappingDescriptor_DISPATCH(struct ZbcApi * pRmResource,struct MEMORY_DESCRIPTOR ** ppMemDesc)288 static inline NV_STATUS zbcapiGetMemoryMappingDescriptor_DISPATCH(struct ZbcApi *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) {
289 return pRmResource->__zbcapiGetMemoryMappingDescriptor__(pRmResource, ppMemDesc);
290 }
291
zbcapiControlFilter_DISPATCH(struct ZbcApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)292 static inline NV_STATUS zbcapiControlFilter_DISPATCH(struct ZbcApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
293 return pResource->__zbcapiControlFilter__(pResource, pCallContext, pParams);
294 }
295
zbcapiControlSerialization_Prologue_DISPATCH(struct ZbcApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)296 static inline NV_STATUS zbcapiControlSerialization_Prologue_DISPATCH(struct ZbcApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
297 return pResource->__zbcapiControlSerialization_Prologue__(pResource, pCallContext, pParams);
298 }
299
zbcapiCanCopy_DISPATCH(struct ZbcApi * pResource)300 static inline NvBool zbcapiCanCopy_DISPATCH(struct ZbcApi *pResource) {
301 return pResource->__zbcapiCanCopy__(pResource);
302 }
303
zbcapiIsPartialUnmapSupported_DISPATCH(struct ZbcApi * pResource)304 static inline NvBool zbcapiIsPartialUnmapSupported_DISPATCH(struct ZbcApi *pResource) {
305 return pResource->__zbcapiIsPartialUnmapSupported__(pResource);
306 }
307
zbcapiPreDestruct_DISPATCH(struct ZbcApi * pResource)308 static inline void zbcapiPreDestruct_DISPATCH(struct ZbcApi *pResource) {
309 pResource->__zbcapiPreDestruct__(pResource);
310 }
311
zbcapiIsDuplicate_DISPATCH(struct ZbcApi * pResource,NvHandle hMemory,NvBool * pDuplicate)312 static inline NV_STATUS zbcapiIsDuplicate_DISPATCH(struct ZbcApi *pResource, NvHandle hMemory, NvBool *pDuplicate) {
313 return pResource->__zbcapiIsDuplicate__(pResource, hMemory, pDuplicate);
314 }
315
zbcapiControlSerialization_Epilogue_DISPATCH(struct ZbcApi * pResource,struct CALL_CONTEXT * pCallContext,struct RS_RES_CONTROL_PARAMS_INTERNAL * pParams)316 static inline void zbcapiControlSerialization_Epilogue_DISPATCH(struct ZbcApi *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
317 pResource->__zbcapiControlSerialization_Epilogue__(pResource, pCallContext, pParams);
318 }
319
zbcapiMap_DISPATCH(struct ZbcApi * pGpuResource,struct CALL_CONTEXT * pCallContext,struct RS_CPU_MAP_PARAMS * pParams,struct RsCpuMapping * pCpuMapping)320 static inline NV_STATUS zbcapiMap_DISPATCH(struct ZbcApi *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) {
321 return pGpuResource->__zbcapiMap__(pGpuResource, pCallContext, pParams, pCpuMapping);
322 }
323
zbcapiAccessCallback_DISPATCH(struct ZbcApi * pResource,struct RsClient * pInvokingClient,void * pAllocParams,RsAccessRight accessRight)324 static inline NvBool zbcapiAccessCallback_DISPATCH(struct ZbcApi *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) {
325 return pResource->__zbcapiAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight);
326 }
327
__nvoc_zbcapiConstruct(struct ZbcApi * arg_pZbcApi,struct CALL_CONTEXT * arg_pCallContext,struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams)328 static inline NV_STATUS __nvoc_zbcapiConstruct(struct ZbcApi *arg_pZbcApi, struct CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams) {
329 return zbcapiConstructHal(arg_pZbcApi, arg_pCallContext, arg_pParams);
330 }
331
332 #undef PRIVATE_FIELD
333
334
335 #endif // _ZBCAPI_H_
336
337 #ifdef __cplusplus
338 } // extern "C"
339 #endif
340
341 #endif // _G_ZBC_API_NVOC_H_
342