1 #ifndef _G_KERNEL_GRAPHICS_CONTEXT_NVOC_H_ 2 #define _G_KERNEL_GRAPHICS_CONTEXT_NVOC_H_ 3 #include "nvoc/runtime.h" 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 /* 10 * SPDX-FileCopyrightText: Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 11 * SPDX-License-Identifier: MIT 12 * 13 * Permission is hereby granted, free of charge, to any person obtaining a 14 * copy of this software and associated documentation files (the "Software"), 15 * to deal in the Software without restriction, including without limitation 16 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 * and/or sell copies of the Software, and to permit persons to whom the 18 * Software is furnished to do so, subject to the following conditions: 19 * 20 * The above copyright notice and this permission notice shall be included in 21 * all copies or substantial portions of the Software. 22 * 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 29 * DEALINGS IN THE SOFTWARE. 30 */ 31 32 #include "g_kernel_graphics_context_nvoc.h" 33 34 #ifndef _KERNEL_GRAPHICS_CONTEXT_H_ 35 #define _KERNEL_GRAPHICS_CONTEXT_H_ 36 37 #include "gpu/gpu_resource.h" 38 #include "resserv/rs_server.h" 39 #include "resserv/rs_resource.h" 40 #include "ctrl/ctrl83de.h" 41 #include "ctrl/ctrl0090.h" 42 #include "mmu/gmmu_fmt.h" 43 #include "gpu/gpu_halspec.h" 44 #include "mem_mgr/vaddr_list.h" 45 #include "kernel/gpu/gr/kernel_graphics_context_buffers.h" 46 47 struct KernelChannel; 48 49 #ifndef __NVOC_CLASS_KernelChannel_TYPEDEF__ 50 #define __NVOC_CLASS_KernelChannel_TYPEDEF__ 51 typedef struct KernelChannel KernelChannel; 52 #endif /* __NVOC_CLASS_KernelChannel_TYPEDEF__ */ 53 54 #ifndef __nvoc_class_id_KernelChannel 55 #define __nvoc_class_id_KernelChannel 0x5d8d70 56 #endif /* __nvoc_class_id_KernelChannel */ 57 58 59 struct KernelChannelGroupApi; 60 61 #ifndef __NVOC_CLASS_KernelChannelGroupApi_TYPEDEF__ 62 #define __NVOC_CLASS_KernelChannelGroupApi_TYPEDEF__ 63 typedef struct KernelChannelGroupApi KernelChannelGroupApi; 64 #endif /* __NVOC_CLASS_KernelChannelGroupApi_TYPEDEF__ */ 65 66 #ifndef __nvoc_class_id_KernelChannelGroupApi 67 #define __nvoc_class_id_KernelChannelGroupApi 0x2b5b80 68 #endif /* __nvoc_class_id_KernelChannelGroupApi */ 69 70 71 struct KernelSMDebuggerSession; 72 73 #ifndef __NVOC_CLASS_KernelSMDebuggerSession_TYPEDEF__ 74 #define __NVOC_CLASS_KernelSMDebuggerSession_TYPEDEF__ 75 typedef struct KernelSMDebuggerSession KernelSMDebuggerSession; 76 #endif /* __NVOC_CLASS_KernelSMDebuggerSession_TYPEDEF__ */ 77 78 #ifndef __nvoc_class_id_KernelSMDebuggerSession 79 #define __nvoc_class_id_KernelSMDebuggerSession 0x4adc81 80 #endif /* __nvoc_class_id_KernelSMDebuggerSession */ 81 82 83 MAKE_LIST(KernelSMDebuggerSessionList, KernelSMDebuggerSession *); 84 85 typedef struct 86 { 87 const NV_ADDRESS_SPACE *pAllocList; 88 NvU32 cpuAttr; 89 } GR_BUFFER_ATTR; 90 91 typedef struct NV_CONTEXT_BUFFER 92 { 93 MEMORY_DESCRIPTOR *pMemDesc; 94 VA_LIST vAddrList; 95 } NV_CONTEXT_BUFFER; 96 97 typedef enum 98 { 99 GR_OBJECT_TYPE_3D, 100 GR_OBJECT_TYPE_2D, 101 GR_OBJECT_TYPE_MEM, 102 GR_OBJECT_TYPE_COMPUTE, 103 GR_OBJECT_TYPE_INVALID, 104 } GR_OBJECT_TYPE; 105 106 /* Structure used when allocating/deallocating GFxP buffers for vGPU */ 107 typedef struct VGPU_GFXP_BUFFERS 108 { 109 NvBool bIsBufferAllocated; 110 NvU32 refCountChannel; /* count of channels using these buffers */ 111 NvHandle hMemory[NV2080_CTRL_CMD_GR_CTXSW_PREEMPTION_BIND_BUFFERS_CONTEXT_POOL]; 112 NvHandle hDma[NV2080_CTRL_CMD_GR_CTXSW_PREEMPTION_BIND_BUFFERS_CONTEXT_POOL]; 113 NvU64 dmaOffset[NV2080_CTRL_CMD_GR_CTXSW_PREEMPTION_BIND_BUFFERS_CONTEXT_POOL]; 114 } VGPU_GFXP_BUFFERS; 115 116 typedef struct 117 { 118 MEMORY_DESCRIPTOR *memDesc[GR_GLOBALCTX_BUFFER_COUNT]; 119 NvBool bAllocated; 120 121 // Tracks whether Physical has initialized the memory descriptor for the promoted Kernel buffer 122 NvBool bInitialized[GR_GLOBALCTX_BUFFER_COUNT]; 123 } GR_GLOBALCTX_BUFFERS; 124 125 struct KernelGraphicsContextUnicast; 126 typedef struct KernelGraphicsContextUnicast KernelGraphicsContextUnicast; 127 128 struct KernelGraphics; 129 130 #ifndef __NVOC_CLASS_KernelGraphics_TYPEDEF__ 131 #define __NVOC_CLASS_KernelGraphics_TYPEDEF__ 132 typedef struct KernelGraphics KernelGraphics; 133 #endif /* __NVOC_CLASS_KernelGraphics_TYPEDEF__ */ 134 135 #ifndef __nvoc_class_id_KernelGraphics 136 #define __nvoc_class_id_KernelGraphics 0xea3fa9 137 #endif /* __nvoc_class_id_KernelGraphics */ 138 139 140 struct KernelGraphicsContextShared; 141 142 #ifndef __NVOC_CLASS_KernelGraphicsContextShared_TYPEDEF__ 143 #define __NVOC_CLASS_KernelGraphicsContextShared_TYPEDEF__ 144 typedef struct KernelGraphicsContextShared KernelGraphicsContextShared; 145 #endif /* __NVOC_CLASS_KernelGraphicsContextShared_TYPEDEF__ */ 146 147 #ifndef __nvoc_class_id_KernelGraphicsContextShared 148 #define __nvoc_class_id_KernelGraphicsContextShared 0xe7abeb 149 #endif /* __nvoc_class_id_KernelGraphicsContextShared */ 150 151 152 struct KernelGraphicsObject; 153 154 #ifndef __NVOC_CLASS_KernelGraphicsObject_TYPEDEF__ 155 #define __NVOC_CLASS_KernelGraphicsObject_TYPEDEF__ 156 typedef struct KernelGraphicsObject KernelGraphicsObject; 157 #endif /* __NVOC_CLASS_KernelGraphicsObject_TYPEDEF__ */ 158 159 #ifndef __nvoc_class_id_KernelGraphicsObject 160 #define __nvoc_class_id_KernelGraphicsObject 0x097648 161 #endif /* __nvoc_class_id_KernelGraphicsObject */ 162 163 164 165 /*! 166 * KernelGraphicsContext is a logical abstraction of GrContext object (Per Channel or 167 * per ChannelGroup) in Kernel side. The Public API of the GrContext is exposed through 168 * this object, and any interfaces which do not manage the underlying HW can be managed 169 * by this object. 170 */ 171 172 // Private field names are wrapped in PRIVATE_FIELD, which does nothing for 173 // the matching C source file, but causes diagnostics to be issued if another 174 // source file references the field. 175 #ifdef NVOC_KERNEL_GRAPHICS_CONTEXT_H_PRIVATE_ACCESS_ALLOWED 176 #define PRIVATE_FIELD(x) x 177 #else 178 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x) 179 #endif 180 181 struct KernelGraphicsContext { 182 const struct NVOC_RTTI *__nvoc_rtti; 183 struct GpuResource __nvoc_base_GpuResource; 184 struct Object *__nvoc_pbase_Object; 185 struct RsResource *__nvoc_pbase_RsResource; 186 struct RmResourceCommon *__nvoc_pbase_RmResourceCommon; 187 struct RmResource *__nvoc_pbase_RmResource; 188 struct GpuResource *__nvoc_pbase_GpuResource; 189 struct KernelGraphicsContext *__nvoc_pbase_KernelGraphicsContext; 190 NvBool (*__kgrctxCanCopy__)(struct KernelGraphicsContext *); 191 NvHandle (*__kgrctxGetInternalObjectHandle__)(struct KernelGraphicsContext *); 192 NvBool (*__kgrctxShouldPreAllocPmBuffer__)(struct OBJGPU *, struct KernelGraphicsContext *, struct KernelChannel *); 193 GR_GLOBALCTX_BUFFER (*__kgrctxGetRegisterAccessMapId__)(struct OBJGPU *, struct KernelGraphicsContext *, struct KernelChannel *); 194 NV_STATUS (*__kgrctxCtrlGetTpcPartitionMode__)(struct KernelGraphicsContext *, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *); 195 NV_STATUS (*__kgrctxCtrlSetTpcPartitionMode__)(struct KernelGraphicsContext *, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *); 196 NV_STATUS (*__kgrctxCtrlGetMMUDebugMode__)(struct KernelGraphicsContext *, NV0090_CTRL_GET_MMU_DEBUG_MODE_PARAMS *); 197 NV_STATUS (*__kgrctxCtrlProgramVidmemPromote__)(struct KernelGraphicsContext *, NV0090_CTRL_PROGRAM_VIDMEM_PROMOTE_PARAMS *); 198 NvBool (*__kgrctxShareCallback__)(struct KernelGraphicsContext *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *); 199 NV_STATUS (*__kgrctxCheckMemInterUnmap__)(struct KernelGraphicsContext *, NvBool); 200 NV_STATUS (*__kgrctxMapTo__)(struct KernelGraphicsContext *, RS_RES_MAP_TO_PARAMS *); 201 NV_STATUS (*__kgrctxGetMapAddrSpace__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *); 202 NvU32 (*__kgrctxGetRefCount__)(struct KernelGraphicsContext *); 203 void (*__kgrctxAddAdditionalDependants__)(struct RsClient *, struct KernelGraphicsContext *, RsResourceRef *); 204 NV_STATUS (*__kgrctxControl_Prologue__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 205 NV_STATUS (*__kgrctxGetRegBaseOffsetAndSize__)(struct KernelGraphicsContext *, struct OBJGPU *, NvU32 *, NvU32 *); 206 NV_STATUS (*__kgrctxInternalControlForward__)(struct KernelGraphicsContext *, NvU32, void *, NvU32); 207 NV_STATUS (*__kgrctxUnmapFrom__)(struct KernelGraphicsContext *, RS_RES_UNMAP_FROM_PARAMS *); 208 void (*__kgrctxControl_Epilogue__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 209 NV_STATUS (*__kgrctxControl__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 210 NV_STATUS (*__kgrctxUnmap__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RsCpuMapping *); 211 NV_STATUS (*__kgrctxGetMemInterMapParams__)(struct KernelGraphicsContext *, RMRES_MEM_INTER_MAP_PARAMS *); 212 NV_STATUS (*__kgrctxGetMemoryMappingDescriptor__)(struct KernelGraphicsContext *, struct MEMORY_DESCRIPTOR **); 213 NV_STATUS (*__kgrctxControlFilter__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 214 NV_STATUS (*__kgrctxControlSerialization_Prologue__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 215 NvBool (*__kgrctxIsPartialUnmapSupported__)(struct KernelGraphicsContext *); 216 void (*__kgrctxPreDestruct__)(struct KernelGraphicsContext *); 217 NV_STATUS (*__kgrctxIsDuplicate__)(struct KernelGraphicsContext *, NvHandle, NvBool *); 218 void (*__kgrctxControlSerialization_Epilogue__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 219 NV_STATUS (*__kgrctxMap__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *); 220 NvBool (*__kgrctxAccessCallback__)(struct KernelGraphicsContext *, struct RsClient *, void *, RsAccessRight); 221 struct KernelGraphicsContextShared *PRIVATE_FIELD(pShared); 222 VGPU_GFXP_BUFFERS *PRIVATE_FIELD(pVgpuGfxpBuffers); 223 }; 224 225 struct KernelGraphicsContext_PRIVATE { 226 const struct NVOC_RTTI *__nvoc_rtti; 227 struct GpuResource __nvoc_base_GpuResource; 228 struct Object *__nvoc_pbase_Object; 229 struct RsResource *__nvoc_pbase_RsResource; 230 struct RmResourceCommon *__nvoc_pbase_RmResourceCommon; 231 struct RmResource *__nvoc_pbase_RmResource; 232 struct GpuResource *__nvoc_pbase_GpuResource; 233 struct KernelGraphicsContext *__nvoc_pbase_KernelGraphicsContext; 234 NvBool (*__kgrctxCanCopy__)(struct KernelGraphicsContext *); 235 NvHandle (*__kgrctxGetInternalObjectHandle__)(struct KernelGraphicsContext *); 236 NvBool (*__kgrctxShouldPreAllocPmBuffer__)(struct OBJGPU *, struct KernelGraphicsContext *, struct KernelChannel *); 237 GR_GLOBALCTX_BUFFER (*__kgrctxGetRegisterAccessMapId__)(struct OBJGPU *, struct KernelGraphicsContext *, struct KernelChannel *); 238 NV_STATUS (*__kgrctxCtrlGetTpcPartitionMode__)(struct KernelGraphicsContext *, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *); 239 NV_STATUS (*__kgrctxCtrlSetTpcPartitionMode__)(struct KernelGraphicsContext *, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *); 240 NV_STATUS (*__kgrctxCtrlGetMMUDebugMode__)(struct KernelGraphicsContext *, NV0090_CTRL_GET_MMU_DEBUG_MODE_PARAMS *); 241 NV_STATUS (*__kgrctxCtrlProgramVidmemPromote__)(struct KernelGraphicsContext *, NV0090_CTRL_PROGRAM_VIDMEM_PROMOTE_PARAMS *); 242 NvBool (*__kgrctxShareCallback__)(struct KernelGraphicsContext *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *); 243 NV_STATUS (*__kgrctxCheckMemInterUnmap__)(struct KernelGraphicsContext *, NvBool); 244 NV_STATUS (*__kgrctxMapTo__)(struct KernelGraphicsContext *, RS_RES_MAP_TO_PARAMS *); 245 NV_STATUS (*__kgrctxGetMapAddrSpace__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *); 246 NvU32 (*__kgrctxGetRefCount__)(struct KernelGraphicsContext *); 247 void (*__kgrctxAddAdditionalDependants__)(struct RsClient *, struct KernelGraphicsContext *, RsResourceRef *); 248 NV_STATUS (*__kgrctxControl_Prologue__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 249 NV_STATUS (*__kgrctxGetRegBaseOffsetAndSize__)(struct KernelGraphicsContext *, struct OBJGPU *, NvU32 *, NvU32 *); 250 NV_STATUS (*__kgrctxInternalControlForward__)(struct KernelGraphicsContext *, NvU32, void *, NvU32); 251 NV_STATUS (*__kgrctxUnmapFrom__)(struct KernelGraphicsContext *, RS_RES_UNMAP_FROM_PARAMS *); 252 void (*__kgrctxControl_Epilogue__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 253 NV_STATUS (*__kgrctxControl__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 254 NV_STATUS (*__kgrctxUnmap__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RsCpuMapping *); 255 NV_STATUS (*__kgrctxGetMemInterMapParams__)(struct KernelGraphicsContext *, RMRES_MEM_INTER_MAP_PARAMS *); 256 NV_STATUS (*__kgrctxGetMemoryMappingDescriptor__)(struct KernelGraphicsContext *, struct MEMORY_DESCRIPTOR **); 257 NV_STATUS (*__kgrctxControlFilter__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 258 NV_STATUS (*__kgrctxControlSerialization_Prologue__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 259 NvBool (*__kgrctxIsPartialUnmapSupported__)(struct KernelGraphicsContext *); 260 void (*__kgrctxPreDestruct__)(struct KernelGraphicsContext *); 261 NV_STATUS (*__kgrctxIsDuplicate__)(struct KernelGraphicsContext *, NvHandle, NvBool *); 262 void (*__kgrctxControlSerialization_Epilogue__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 263 NV_STATUS (*__kgrctxMap__)(struct KernelGraphicsContext *, struct CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, struct RsCpuMapping *); 264 NvBool (*__kgrctxAccessCallback__)(struct KernelGraphicsContext *, struct RsClient *, void *, RsAccessRight); 265 struct KernelGraphicsContextShared *pShared; 266 VGPU_GFXP_BUFFERS *pVgpuGfxpBuffers; 267 }; 268 269 #ifndef __NVOC_CLASS_KernelGraphicsContext_TYPEDEF__ 270 #define __NVOC_CLASS_KernelGraphicsContext_TYPEDEF__ 271 typedef struct KernelGraphicsContext KernelGraphicsContext; 272 #endif /* __NVOC_CLASS_KernelGraphicsContext_TYPEDEF__ */ 273 274 #ifndef __nvoc_class_id_KernelGraphicsContext 275 #define __nvoc_class_id_KernelGraphicsContext 0x7ead09 276 #endif /* __nvoc_class_id_KernelGraphicsContext */ 277 278 extern const struct NVOC_CLASS_DEF __nvoc_class_def_KernelGraphicsContext; 279 280 #define __staticCast_KernelGraphicsContext(pThis) \ 281 ((pThis)->__nvoc_pbase_KernelGraphicsContext) 282 283 #ifdef __nvoc_kernel_graphics_context_h_disabled 284 #define __dynamicCast_KernelGraphicsContext(pThis) ((KernelGraphicsContext*)NULL) 285 #else //__nvoc_kernel_graphics_context_h_disabled 286 #define __dynamicCast_KernelGraphicsContext(pThis) \ 287 ((KernelGraphicsContext*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(KernelGraphicsContext))) 288 #endif //__nvoc_kernel_graphics_context_h_disabled 289 290 291 NV_STATUS __nvoc_objCreateDynamic_KernelGraphicsContext(KernelGraphicsContext**, Dynamic*, NvU32, va_list); 292 293 NV_STATUS __nvoc_objCreate_KernelGraphicsContext(KernelGraphicsContext**, Dynamic*, NvU32, struct CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams); 294 #define __objCreate_KernelGraphicsContext(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \ 295 __nvoc_objCreate_KernelGraphicsContext((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams) 296 297 #define kgrctxCanCopy(arg0) kgrctxCanCopy_DISPATCH(arg0) 298 #define kgrctxGetInternalObjectHandle(arg0) kgrctxGetInternalObjectHandle_DISPATCH(arg0) 299 #define kgrctxShouldPreAllocPmBuffer(pGpu, pKernelGraphicsContext, pKernelChannel) kgrctxShouldPreAllocPmBuffer_DISPATCH(pGpu, pKernelGraphicsContext, pKernelChannel) 300 #define kgrctxShouldPreAllocPmBuffer_HAL(pGpu, pKernelGraphicsContext, pKernelChannel) kgrctxShouldPreAllocPmBuffer_DISPATCH(pGpu, pKernelGraphicsContext, pKernelChannel) 301 #define kgrctxGetRegisterAccessMapId(arg0, arg1, arg2) kgrctxGetRegisterAccessMapId_DISPATCH(arg0, arg1, arg2) 302 #define kgrctxGetRegisterAccessMapId_HAL(arg0, arg1, arg2) kgrctxGetRegisterAccessMapId_DISPATCH(arg0, arg1, arg2) 303 #define kgrctxCtrlGetTpcPartitionMode(pKernelGraphicsContext, pParams) kgrctxCtrlGetTpcPartitionMode_DISPATCH(pKernelGraphicsContext, pParams) 304 #define kgrctxCtrlSetTpcPartitionMode(pKernelGraphicsContext, pParams) kgrctxCtrlSetTpcPartitionMode_DISPATCH(pKernelGraphicsContext, pParams) 305 #define kgrctxCtrlGetMMUDebugMode(pKernelGraphicsContext, pParams) kgrctxCtrlGetMMUDebugMode_DISPATCH(pKernelGraphicsContext, pParams) 306 #define kgrctxCtrlProgramVidmemPromote(pKernelGraphicsContext, pParams) kgrctxCtrlProgramVidmemPromote_DISPATCH(pKernelGraphicsContext, pParams) 307 #define kgrctxShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) kgrctxShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) 308 #define kgrctxCheckMemInterUnmap(pRmResource, bSubdeviceHandleProvided) kgrctxCheckMemInterUnmap_DISPATCH(pRmResource, bSubdeviceHandleProvided) 309 #define kgrctxMapTo(pResource, pParams) kgrctxMapTo_DISPATCH(pResource, pParams) 310 #define kgrctxGetMapAddrSpace(pGpuResource, pCallContext, mapFlags, pAddrSpace) kgrctxGetMapAddrSpace_DISPATCH(pGpuResource, pCallContext, mapFlags, pAddrSpace) 311 #define kgrctxGetRefCount(pResource) kgrctxGetRefCount_DISPATCH(pResource) 312 #define kgrctxAddAdditionalDependants(pClient, pResource, pReference) kgrctxAddAdditionalDependants_DISPATCH(pClient, pResource, pReference) 313 #define kgrctxControl_Prologue(pResource, pCallContext, pParams) kgrctxControl_Prologue_DISPATCH(pResource, pCallContext, pParams) 314 #define kgrctxGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) kgrctxGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize) 315 #define kgrctxInternalControlForward(pGpuResource, command, pParams, size) kgrctxInternalControlForward_DISPATCH(pGpuResource, command, pParams, size) 316 #define kgrctxUnmapFrom(pResource, pParams) kgrctxUnmapFrom_DISPATCH(pResource, pParams) 317 #define kgrctxControl_Epilogue(pResource, pCallContext, pParams) kgrctxControl_Epilogue_DISPATCH(pResource, pCallContext, pParams) 318 #define kgrctxControl(pGpuResource, pCallContext, pParams) kgrctxControl_DISPATCH(pGpuResource, pCallContext, pParams) 319 #define kgrctxUnmap(pGpuResource, pCallContext, pCpuMapping) kgrctxUnmap_DISPATCH(pGpuResource, pCallContext, pCpuMapping) 320 #define kgrctxGetMemInterMapParams(pRmResource, pParams) kgrctxGetMemInterMapParams_DISPATCH(pRmResource, pParams) 321 #define kgrctxGetMemoryMappingDescriptor(pRmResource, ppMemDesc) kgrctxGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc) 322 #define kgrctxControlFilter(pResource, pCallContext, pParams) kgrctxControlFilter_DISPATCH(pResource, pCallContext, pParams) 323 #define kgrctxControlSerialization_Prologue(pResource, pCallContext, pParams) kgrctxControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams) 324 #define kgrctxIsPartialUnmapSupported(pResource) kgrctxIsPartialUnmapSupported_DISPATCH(pResource) 325 #define kgrctxPreDestruct(pResource) kgrctxPreDestruct_DISPATCH(pResource) 326 #define kgrctxIsDuplicate(pResource, hMemory, pDuplicate) kgrctxIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate) 327 #define kgrctxControlSerialization_Epilogue(pResource, pCallContext, pParams) kgrctxControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams) 328 #define kgrctxMap(pGpuResource, pCallContext, pParams, pCpuMapping) kgrctxMap_DISPATCH(pGpuResource, pCallContext, pParams, pCpuMapping) 329 #define kgrctxAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) kgrctxAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight) 330 NvBool kgrctxShouldManageCtxBuffers_KERNEL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NvU32 gfid); 331 332 333 #ifdef __nvoc_kernel_graphics_context_h_disabled 334 static inline NvBool kgrctxShouldManageCtxBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NvU32 gfid) { 335 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 336 return NV_FALSE; 337 } 338 #else //__nvoc_kernel_graphics_context_h_disabled 339 #define kgrctxShouldManageCtxBuffers(arg0, arg1, gfid) kgrctxShouldManageCtxBuffers_KERNEL(arg0, arg1, gfid) 340 #endif //__nvoc_kernel_graphics_context_h_disabled 341 342 #define kgrctxShouldManageCtxBuffers_HAL(arg0, arg1, gfid) kgrctxShouldManageCtxBuffers(arg0, arg1, gfid) 343 344 NvBool kgrctxShouldCleanup_KERNEL(struct OBJGPU *pGpu, struct KernelGraphicsContext *pKernelGraphicsContext); 345 346 347 #ifdef __nvoc_kernel_graphics_context_h_disabled 348 static inline NvBool kgrctxShouldCleanup(struct OBJGPU *pGpu, struct KernelGraphicsContext *pKernelGraphicsContext) { 349 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 350 return NV_FALSE; 351 } 352 #else //__nvoc_kernel_graphics_context_h_disabled 353 #define kgrctxShouldCleanup(pGpu, pKernelGraphicsContext) kgrctxShouldCleanup_KERNEL(pGpu, pKernelGraphicsContext) 354 #endif //__nvoc_kernel_graphics_context_h_disabled 355 356 #define kgrctxShouldCleanup_HAL(pGpu, pKernelGraphicsContext) kgrctxShouldCleanup(pGpu, pKernelGraphicsContext) 357 358 void kgrctxUnmapBuffers_KERNEL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, KernelGraphicsContextUnicast *arg2, struct KernelChannel *arg3); 359 360 361 #ifdef __nvoc_kernel_graphics_context_h_disabled 362 static inline void kgrctxUnmapBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, KernelGraphicsContextUnicast *arg2, struct KernelChannel *arg3) { 363 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 364 } 365 #else //__nvoc_kernel_graphics_context_h_disabled 366 #define kgrctxUnmapBuffers(arg0, arg1, arg2, arg3) kgrctxUnmapBuffers_KERNEL(arg0, arg1, arg2, arg3) 367 #endif //__nvoc_kernel_graphics_context_h_disabled 368 369 #define kgrctxUnmapBuffers_HAL(arg0, arg1, arg2, arg3) kgrctxUnmapBuffers(arg0, arg1, arg2, arg3) 370 371 NV_STATUS kgrctxUnmapCtxBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphicsObject *arg2, struct KernelGraphics *arg3, NvBool bDestructor); 372 373 374 #ifdef __nvoc_kernel_graphics_context_h_disabled 375 static inline NV_STATUS kgrctxUnmapCtxBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphicsObject *arg2, struct KernelGraphics *arg3, NvBool bDestructor) { 376 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 377 return NV_ERR_NOT_SUPPORTED; 378 } 379 #else //__nvoc_kernel_graphics_context_h_disabled 380 #define kgrctxUnmapCtxBuffers(arg0, arg1, arg2, arg3, bDestructor) kgrctxUnmapCtxBuffers_IMPL(arg0, arg1, arg2, arg3, bDestructor) 381 #endif //__nvoc_kernel_graphics_context_h_disabled 382 383 #define kgrctxUnmapCtxBuffers_HAL(arg0, arg1, arg2, arg3, bDestructor) kgrctxUnmapCtxBuffers(arg0, arg1, arg2, arg3, bDestructor) 384 385 void kgrctxIncObjectCount_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NvU32 classNum); 386 387 388 #ifdef __nvoc_kernel_graphics_context_h_disabled 389 static inline void kgrctxIncObjectCount(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NvU32 classNum) { 390 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 391 } 392 #else //__nvoc_kernel_graphics_context_h_disabled 393 #define kgrctxIncObjectCount(arg0, arg1, classNum) kgrctxIncObjectCount_IMPL(arg0, arg1, classNum) 394 #endif //__nvoc_kernel_graphics_context_h_disabled 395 396 #define kgrctxIncObjectCount_HAL(arg0, arg1, classNum) kgrctxIncObjectCount(arg0, arg1, classNum) 397 398 void kgrctxDecObjectCount_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NvU32 classNum); 399 400 401 #ifdef __nvoc_kernel_graphics_context_h_disabled 402 static inline void kgrctxDecObjectCount(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NvU32 classNum) { 403 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 404 } 405 #else //__nvoc_kernel_graphics_context_h_disabled 406 #define kgrctxDecObjectCount(arg0, arg1, classNum) kgrctxDecObjectCount_IMPL(arg0, arg1, classNum) 407 #endif //__nvoc_kernel_graphics_context_h_disabled 408 409 #define kgrctxDecObjectCount_HAL(arg0, arg1, classNum) kgrctxDecObjectCount(arg0, arg1, classNum) 410 411 static inline NvBool kgrctxCanCopy_0c883b(struct KernelGraphicsContext *arg0) { 412 return ((NvBool)(0 == 0)); 413 } 414 415 static inline NvBool kgrctxCanCopy_DISPATCH(struct KernelGraphicsContext *arg0) { 416 return arg0->__kgrctxCanCopy__(arg0); 417 } 418 419 NvHandle kgrctxGetInternalObjectHandle_IMPL(struct KernelGraphicsContext *arg0); 420 421 static inline NvHandle kgrctxGetInternalObjectHandle_DISPATCH(struct KernelGraphicsContext *arg0) { 422 return arg0->__kgrctxGetInternalObjectHandle__(arg0); 423 } 424 425 NvBool kgrctxShouldPreAllocPmBuffer_VF(struct OBJGPU *pGpu, struct KernelGraphicsContext *pKernelGraphicsContext, struct KernelChannel *pKernelChannel); 426 427 NvBool kgrctxShouldPreAllocPmBuffer_PF(struct OBJGPU *pGpu, struct KernelGraphicsContext *pKernelGraphicsContext, struct KernelChannel *pKernelChannel); 428 429 static inline NvBool kgrctxShouldPreAllocPmBuffer_DISPATCH(struct OBJGPU *pGpu, struct KernelGraphicsContext *pKernelGraphicsContext, struct KernelChannel *pKernelChannel) { 430 return pKernelGraphicsContext->__kgrctxShouldPreAllocPmBuffer__(pGpu, pKernelGraphicsContext, pKernelChannel); 431 } 432 433 static inline GR_GLOBALCTX_BUFFER kgrctxGetRegisterAccessMapId_aa21e9(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelChannel *arg2) { 434 return GR_GLOBALCTX_BUFFER_PRIV_ACCESS_MAP; 435 } 436 437 GR_GLOBALCTX_BUFFER kgrctxGetRegisterAccessMapId_PF(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelChannel *arg2); 438 439 static inline GR_GLOBALCTX_BUFFER kgrctxGetRegisterAccessMapId_DISPATCH(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelChannel *arg2) { 440 return arg1->__kgrctxGetRegisterAccessMapId__(arg0, arg1, arg2); 441 } 442 443 NV_STATUS kgrctxCtrlGetTpcPartitionMode_IMPL(struct KernelGraphicsContext *pKernelGraphicsContext, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *pParams); 444 445 static inline NV_STATUS kgrctxCtrlGetTpcPartitionMode_DISPATCH(struct KernelGraphicsContext *pKernelGraphicsContext, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *pParams) { 446 return pKernelGraphicsContext->__kgrctxCtrlGetTpcPartitionMode__(pKernelGraphicsContext, pParams); 447 } 448 449 NV_STATUS kgrctxCtrlSetTpcPartitionMode_IMPL(struct KernelGraphicsContext *pKernelGraphicsContext, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *pParams); 450 451 static inline NV_STATUS kgrctxCtrlSetTpcPartitionMode_DISPATCH(struct KernelGraphicsContext *pKernelGraphicsContext, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *pParams) { 452 return pKernelGraphicsContext->__kgrctxCtrlSetTpcPartitionMode__(pKernelGraphicsContext, pParams); 453 } 454 455 NV_STATUS kgrctxCtrlGetMMUDebugMode_IMPL(struct KernelGraphicsContext *pKernelGraphicsContext, NV0090_CTRL_GET_MMU_DEBUG_MODE_PARAMS *pParams); 456 457 static inline NV_STATUS kgrctxCtrlGetMMUDebugMode_DISPATCH(struct KernelGraphicsContext *pKernelGraphicsContext, NV0090_CTRL_GET_MMU_DEBUG_MODE_PARAMS *pParams) { 458 return pKernelGraphicsContext->__kgrctxCtrlGetMMUDebugMode__(pKernelGraphicsContext, pParams); 459 } 460 461 NV_STATUS kgrctxCtrlProgramVidmemPromote_IMPL(struct KernelGraphicsContext *pKernelGraphicsContext, NV0090_CTRL_PROGRAM_VIDMEM_PROMOTE_PARAMS *pParams); 462 463 static inline NV_STATUS kgrctxCtrlProgramVidmemPromote_DISPATCH(struct KernelGraphicsContext *pKernelGraphicsContext, NV0090_CTRL_PROGRAM_VIDMEM_PROMOTE_PARAMS *pParams) { 464 return pKernelGraphicsContext->__kgrctxCtrlProgramVidmemPromote__(pKernelGraphicsContext, pParams); 465 } 466 467 static inline NvBool kgrctxShareCallback_DISPATCH(struct KernelGraphicsContext *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) { 468 return pGpuResource->__kgrctxShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy); 469 } 470 471 static inline NV_STATUS kgrctxCheckMemInterUnmap_DISPATCH(struct KernelGraphicsContext *pRmResource, NvBool bSubdeviceHandleProvided) { 472 return pRmResource->__kgrctxCheckMemInterUnmap__(pRmResource, bSubdeviceHandleProvided); 473 } 474 475 static inline NV_STATUS kgrctxMapTo_DISPATCH(struct KernelGraphicsContext *pResource, RS_RES_MAP_TO_PARAMS *pParams) { 476 return pResource->__kgrctxMapTo__(pResource, pParams); 477 } 478 479 static inline NV_STATUS kgrctxGetMapAddrSpace_DISPATCH(struct KernelGraphicsContext *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) { 480 return pGpuResource->__kgrctxGetMapAddrSpace__(pGpuResource, pCallContext, mapFlags, pAddrSpace); 481 } 482 483 static inline NvU32 kgrctxGetRefCount_DISPATCH(struct KernelGraphicsContext *pResource) { 484 return pResource->__kgrctxGetRefCount__(pResource); 485 } 486 487 static inline void kgrctxAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct KernelGraphicsContext *pResource, RsResourceRef *pReference) { 488 pResource->__kgrctxAddAdditionalDependants__(pClient, pResource, pReference); 489 } 490 491 static inline NV_STATUS kgrctxControl_Prologue_DISPATCH(struct KernelGraphicsContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 492 return pResource->__kgrctxControl_Prologue__(pResource, pCallContext, pParams); 493 } 494 495 static inline NV_STATUS kgrctxGetRegBaseOffsetAndSize_DISPATCH(struct KernelGraphicsContext *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) { 496 return pGpuResource->__kgrctxGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize); 497 } 498 499 static inline NV_STATUS kgrctxInternalControlForward_DISPATCH(struct KernelGraphicsContext *pGpuResource, NvU32 command, void *pParams, NvU32 size) { 500 return pGpuResource->__kgrctxInternalControlForward__(pGpuResource, command, pParams, size); 501 } 502 503 static inline NV_STATUS kgrctxUnmapFrom_DISPATCH(struct KernelGraphicsContext *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) { 504 return pResource->__kgrctxUnmapFrom__(pResource, pParams); 505 } 506 507 static inline void kgrctxControl_Epilogue_DISPATCH(struct KernelGraphicsContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 508 pResource->__kgrctxControl_Epilogue__(pResource, pCallContext, pParams); 509 } 510 511 static inline NV_STATUS kgrctxControl_DISPATCH(struct KernelGraphicsContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 512 return pGpuResource->__kgrctxControl__(pGpuResource, pCallContext, pParams); 513 } 514 515 static inline NV_STATUS kgrctxUnmap_DISPATCH(struct KernelGraphicsContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) { 516 return pGpuResource->__kgrctxUnmap__(pGpuResource, pCallContext, pCpuMapping); 517 } 518 519 static inline NV_STATUS kgrctxGetMemInterMapParams_DISPATCH(struct KernelGraphicsContext *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) { 520 return pRmResource->__kgrctxGetMemInterMapParams__(pRmResource, pParams); 521 } 522 523 static inline NV_STATUS kgrctxGetMemoryMappingDescriptor_DISPATCH(struct KernelGraphicsContext *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) { 524 return pRmResource->__kgrctxGetMemoryMappingDescriptor__(pRmResource, ppMemDesc); 525 } 526 527 static inline NV_STATUS kgrctxControlFilter_DISPATCH(struct KernelGraphicsContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 528 return pResource->__kgrctxControlFilter__(pResource, pCallContext, pParams); 529 } 530 531 static inline NV_STATUS kgrctxControlSerialization_Prologue_DISPATCH(struct KernelGraphicsContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 532 return pResource->__kgrctxControlSerialization_Prologue__(pResource, pCallContext, pParams); 533 } 534 535 static inline NvBool kgrctxIsPartialUnmapSupported_DISPATCH(struct KernelGraphicsContext *pResource) { 536 return pResource->__kgrctxIsPartialUnmapSupported__(pResource); 537 } 538 539 static inline void kgrctxPreDestruct_DISPATCH(struct KernelGraphicsContext *pResource) { 540 pResource->__kgrctxPreDestruct__(pResource); 541 } 542 543 static inline NV_STATUS kgrctxIsDuplicate_DISPATCH(struct KernelGraphicsContext *pResource, NvHandle hMemory, NvBool *pDuplicate) { 544 return pResource->__kgrctxIsDuplicate__(pResource, hMemory, pDuplicate); 545 } 546 547 static inline void kgrctxControlSerialization_Epilogue_DISPATCH(struct KernelGraphicsContext *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 548 pResource->__kgrctxControlSerialization_Epilogue__(pResource, pCallContext, pParams); 549 } 550 551 static inline NV_STATUS kgrctxMap_DISPATCH(struct KernelGraphicsContext *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) { 552 return pGpuResource->__kgrctxMap__(pGpuResource, pCallContext, pParams, pCpuMapping); 553 } 554 555 static inline NvBool kgrctxAccessCallback_DISPATCH(struct KernelGraphicsContext *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) { 556 return pResource->__kgrctxAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight); 557 } 558 559 static inline struct KernelGraphicsContextShared *kgrctxGetShared(struct OBJGPU *pGpu, struct KernelGraphicsContext *pKernelGraphicsContext) { 560 struct KernelGraphicsContext_PRIVATE *pKernelGraphicsContext_PRIVATE = (struct KernelGraphicsContext_PRIVATE *)pKernelGraphicsContext; 561 return pKernelGraphicsContext_PRIVATE->pShared; 562 } 563 564 static inline VGPU_GFXP_BUFFERS *kgrctxGetVgpuGfxpBuffers(struct OBJGPU *pGpu, struct KernelGraphicsContext *pKernelGraphicsContext) { 565 struct KernelGraphicsContext_PRIVATE *pKernelGraphicsContext_PRIVATE = (struct KernelGraphicsContext_PRIVATE *)pKernelGraphicsContext; 566 return pKernelGraphicsContext_PRIVATE->pVgpuGfxpBuffers; 567 } 568 569 static inline void kgrctxSetVgpuGfxpBuffers(struct KernelGraphicsContext *pKernelGraphicsContext, VGPU_GFXP_BUFFERS *pBuffers) { 570 struct KernelGraphicsContext_PRIVATE *pKernelGraphicsContext_PRIVATE = (struct KernelGraphicsContext_PRIVATE *)pKernelGraphicsContext; 571 pKernelGraphicsContext_PRIVATE->pVgpuGfxpBuffers = pBuffers; 572 } 573 574 NV_STATUS kgrctxFromKernelChannel_IMPL(struct KernelChannel *arg0, struct KernelGraphicsContext **arg1); 575 576 #define kgrctxFromKernelChannel(arg0, arg1) kgrctxFromKernelChannel_IMPL(arg0, arg1) 577 NV_STATUS kgrctxFromKernelChannelGroupApi_IMPL(struct KernelChannelGroupApi *arg0, struct KernelGraphicsContext **arg1); 578 579 #define kgrctxFromKernelChannelGroupApi(arg0, arg1) kgrctxFromKernelChannelGroupApi_IMPL(arg0, arg1) 580 NV_STATUS kgrctxGetGlobalContextBufferExternalId_IMPL(GR_GLOBALCTX_BUFFER arg0, NvU32 *pExternalId); 581 582 #define kgrctxGetGlobalContextBufferExternalId(arg0, pExternalId) kgrctxGetGlobalContextBufferExternalId_IMPL(arg0, pExternalId) 583 NV_STATUS kgrctxGetGlobalContextBufferInternalId_IMPL(NvU32 externalId, GR_GLOBALCTX_BUFFER *arg0); 584 585 #define kgrctxGetGlobalContextBufferInternalId(externalId, arg0) kgrctxGetGlobalContextBufferInternalId_IMPL(externalId, arg0) 586 NV_STATUS kgrctxCtxBufferToFifoEngineId_IMPL(GR_CTX_BUFFER arg0, NvU32 *pFifoEngineId); 587 588 #define kgrctxCtxBufferToFifoEngineId(arg0, pFifoEngineId) kgrctxCtxBufferToFifoEngineId_IMPL(arg0, pFifoEngineId) 589 NV_STATUS kgrctxGlobalCtxBufferToFifoEngineId_IMPL(GR_GLOBALCTX_BUFFER arg0, NvU32 *pFifoEngineId); 590 591 #define kgrctxGlobalCtxBufferToFifoEngineId(arg0, pFifoEngineId) kgrctxGlobalCtxBufferToFifoEngineId_IMPL(arg0, pFifoEngineId) 592 NV_STATUS kgrctxGetGidInfoInPlace_IMPL(struct OBJGPU *pGpu, NvU8 *pUuidBuffer, NvU32 uuidBufferSize, NvU32 flags); 593 594 #define kgrctxGetGidInfoInPlace(pGpu, pUuidBuffer, uuidBufferSize, flags) kgrctxGetGidInfoInPlace_IMPL(pGpu, pUuidBuffer, uuidBufferSize, flags) 595 GMMU_APERTURE kgrctxGetExternalAllocAperture_IMPL(NvU32 addressSpace); 596 597 #define kgrctxGetExternalAllocAperture(addressSpace) kgrctxGetExternalAllocAperture_IMPL(addressSpace) 598 NV_STATUS kgrctxFillCtxBufferInfo_IMPL(struct MEMORY_DESCRIPTOR *arg0, NvU32 externalId, NvBool bBufferGlobal, NV2080_CTRL_GR_CTX_BUFFER_INFO *arg1); 599 600 #define kgrctxFillCtxBufferInfo(arg0, externalId, bBufferGlobal, arg1) kgrctxFillCtxBufferInfo_IMPL(arg0, externalId, bBufferGlobal, arg1) 601 NV_STATUS kgrctxConstruct_IMPL(struct KernelGraphicsContext *arg_pKernelGraphicsContext, struct CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams); 602 603 #define __nvoc_kgrctxConstruct(arg_pKernelGraphicsContext, arg_pCallContext, arg_pParams) kgrctxConstruct_IMPL(arg_pKernelGraphicsContext, arg_pCallContext, arg_pParams) 604 NV_STATUS kgrctxCopyConstruct_IMPL(struct KernelGraphicsContext *arg0, struct CALL_CONTEXT *arg1, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg2); 605 606 #ifdef __nvoc_kernel_graphics_context_h_disabled 607 static inline NV_STATUS kgrctxCopyConstruct(struct KernelGraphicsContext *arg0, struct CALL_CONTEXT *arg1, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg2) { 608 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 609 return NV_ERR_NOT_SUPPORTED; 610 } 611 #else //__nvoc_kernel_graphics_context_h_disabled 612 #define kgrctxCopyConstruct(arg0, arg1, arg2) kgrctxCopyConstruct_IMPL(arg0, arg1, arg2) 613 #endif //__nvoc_kernel_graphics_context_h_disabled 614 615 void kgrctxDestruct_IMPL(struct KernelGraphicsContext *arg0); 616 617 #define __nvoc_kgrctxDestruct(arg0) kgrctxDestruct_IMPL(arg0) 618 NV_STATUS kgrctxGetUnicast_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, KernelGraphicsContextUnicast **arg2); 619 620 #ifdef __nvoc_kernel_graphics_context_h_disabled 621 static inline NV_STATUS kgrctxGetUnicast(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, KernelGraphicsContextUnicast **arg2) { 622 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 623 return NV_ERR_NOT_SUPPORTED; 624 } 625 #else //__nvoc_kernel_graphics_context_h_disabled 626 #define kgrctxGetUnicast(arg0, arg1, arg2) kgrctxGetUnicast_IMPL(arg0, arg1, arg2) 627 #endif //__nvoc_kernel_graphics_context_h_disabled 628 629 NV_STATUS kgrctxLookupMmuFaultInfo_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NV83DE_CTRL_DEBUG_READ_MMU_FAULT_INFO_PARAMS *arg2); 630 631 #ifdef __nvoc_kernel_graphics_context_h_disabled 632 static inline NV_STATUS kgrctxLookupMmuFaultInfo(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NV83DE_CTRL_DEBUG_READ_MMU_FAULT_INFO_PARAMS *arg2) { 633 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 634 return NV_ERR_NOT_SUPPORTED; 635 } 636 #else //__nvoc_kernel_graphics_context_h_disabled 637 #define kgrctxLookupMmuFaultInfo(arg0, arg1, arg2) kgrctxLookupMmuFaultInfo_IMPL(arg0, arg1, arg2) 638 #endif //__nvoc_kernel_graphics_context_h_disabled 639 640 NV_STATUS kgrctxLookupMmuFault_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NV83DE_MMU_FAULT_INFO *arg2); 641 642 #ifdef __nvoc_kernel_graphics_context_h_disabled 643 static inline NV_STATUS kgrctxLookupMmuFault(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NV83DE_MMU_FAULT_INFO *arg2) { 644 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 645 return NV_ERR_NOT_SUPPORTED; 646 } 647 #else //__nvoc_kernel_graphics_context_h_disabled 648 #define kgrctxLookupMmuFault(arg0, arg1, arg2) kgrctxLookupMmuFault_IMPL(arg0, arg1, arg2) 649 #endif //__nvoc_kernel_graphics_context_h_disabled 650 651 NV_STATUS kgrctxClearMmuFault_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1); 652 653 #ifdef __nvoc_kernel_graphics_context_h_disabled 654 static inline NV_STATUS kgrctxClearMmuFault(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1) { 655 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 656 return NV_ERR_NOT_SUPPORTED; 657 } 658 #else //__nvoc_kernel_graphics_context_h_disabled 659 #define kgrctxClearMmuFault(arg0, arg1) kgrctxClearMmuFault_IMPL(arg0, arg1) 660 #endif //__nvoc_kernel_graphics_context_h_disabled 661 662 void kgrctxRecordMmuFault_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NvU32 mmuFaultInfo, NvU64 mmuFaultAddress, NvU32 mmuFaultType, NvU32 mmuFaultAccessType); 663 664 #ifdef __nvoc_kernel_graphics_context_h_disabled 665 static inline void kgrctxRecordMmuFault(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, NvU32 mmuFaultInfo, NvU64 mmuFaultAddress, NvU32 mmuFaultType, NvU32 mmuFaultAccessType) { 666 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 667 } 668 #else //__nvoc_kernel_graphics_context_h_disabled 669 #define kgrctxRecordMmuFault(arg0, arg1, mmuFaultInfo, mmuFaultAddress, mmuFaultType, mmuFaultAccessType) kgrctxRecordMmuFault_IMPL(arg0, arg1, mmuFaultInfo, mmuFaultAddress, mmuFaultType, mmuFaultAccessType) 670 #endif //__nvoc_kernel_graphics_context_h_disabled 671 672 KernelSMDebuggerSessionListIter kgrctxGetDebuggerSessionIter_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1); 673 674 #ifdef __nvoc_kernel_graphics_context_h_disabled 675 static inline KernelSMDebuggerSessionListIter kgrctxGetDebuggerSessionIter(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1) { 676 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 677 KernelSMDebuggerSessionListIter ret; 678 portMemSet(&ret, 0, sizeof(KernelSMDebuggerSessionListIter)); 679 return ret; 680 } 681 #else //__nvoc_kernel_graphics_context_h_disabled 682 #define kgrctxGetDebuggerSessionIter(arg0, arg1) kgrctxGetDebuggerSessionIter_IMPL(arg0, arg1) 683 #endif //__nvoc_kernel_graphics_context_h_disabled 684 685 NvBool kgrctxRegisterKernelSMDebuggerSession_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelSMDebuggerSession *arg2); 686 687 #ifdef __nvoc_kernel_graphics_context_h_disabled 688 static inline NvBool kgrctxRegisterKernelSMDebuggerSession(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelSMDebuggerSession *arg2) { 689 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 690 return NV_FALSE; 691 } 692 #else //__nvoc_kernel_graphics_context_h_disabled 693 #define kgrctxRegisterKernelSMDebuggerSession(arg0, arg1, arg2) kgrctxRegisterKernelSMDebuggerSession_IMPL(arg0, arg1, arg2) 694 #endif //__nvoc_kernel_graphics_context_h_disabled 695 696 void kgrctxDeregisterKernelSMDebuggerSession_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelSMDebuggerSession *arg2); 697 698 #ifdef __nvoc_kernel_graphics_context_h_disabled 699 static inline void kgrctxDeregisterKernelSMDebuggerSession(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelSMDebuggerSession *arg2) { 700 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 701 } 702 #else //__nvoc_kernel_graphics_context_h_disabled 703 #define kgrctxDeregisterKernelSMDebuggerSession(arg0, arg1, arg2) kgrctxDeregisterKernelSMDebuggerSession_IMPL(arg0, arg1, arg2) 704 #endif //__nvoc_kernel_graphics_context_h_disabled 705 706 NvBool kgrctxIsValid_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelChannel *arg2); 707 708 #ifdef __nvoc_kernel_graphics_context_h_disabled 709 static inline NvBool kgrctxIsValid(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelChannel *arg2) { 710 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 711 return NV_FALSE; 712 } 713 #else //__nvoc_kernel_graphics_context_h_disabled 714 #define kgrctxIsValid(arg0, arg1, arg2) kgrctxIsValid_IMPL(arg0, arg1, arg2) 715 #endif //__nvoc_kernel_graphics_context_h_disabled 716 717 NvBool kgrctxIsMainContextAllocated_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1); 718 719 #ifdef __nvoc_kernel_graphics_context_h_disabled 720 static inline NvBool kgrctxIsMainContextAllocated(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1) { 721 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 722 return NV_FALSE; 723 } 724 #else //__nvoc_kernel_graphics_context_h_disabled 725 #define kgrctxIsMainContextAllocated(arg0, arg1) kgrctxIsMainContextAllocated_IMPL(arg0, arg1) 726 #endif //__nvoc_kernel_graphics_context_h_disabled 727 728 NV_STATUS kgrctxGetMainContextBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct MEMORY_DESCRIPTOR **arg2); 729 730 #ifdef __nvoc_kernel_graphics_context_h_disabled 731 static inline NV_STATUS kgrctxGetMainContextBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct MEMORY_DESCRIPTOR **arg2) { 732 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 733 return NV_ERR_NOT_SUPPORTED; 734 } 735 #else //__nvoc_kernel_graphics_context_h_disabled 736 #define kgrctxGetMainContextBuffer(arg0, arg1, arg2) kgrctxGetMainContextBuffer_IMPL(arg0, arg1, arg2) 737 #endif //__nvoc_kernel_graphics_context_h_disabled 738 739 NV_STATUS kgrctxGetBufferCount_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, NvU32 *pBufferCount); 740 741 #ifdef __nvoc_kernel_graphics_context_h_disabled 742 static inline NV_STATUS kgrctxGetBufferCount(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, NvU32 *pBufferCount) { 743 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 744 return NV_ERR_NOT_SUPPORTED; 745 } 746 #else //__nvoc_kernel_graphics_context_h_disabled 747 #define kgrctxGetBufferCount(arg0, arg1, arg2, pBufferCount) kgrctxGetBufferCount_IMPL(arg0, arg1, arg2, pBufferCount) 748 #endif //__nvoc_kernel_graphics_context_h_disabled 749 750 NV_STATUS kgrctxGetCtxBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, NvU32 gfid, NvU32 bufferCount, struct MEMORY_DESCRIPTOR **arg3, NvU32 *pCtxBufferType, NvU32 *pBufferCountOut, NvU32 *pFirstGlobalBuffer); 751 752 #ifdef __nvoc_kernel_graphics_context_h_disabled 753 static inline NV_STATUS kgrctxGetCtxBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, NvU32 gfid, NvU32 bufferCount, struct MEMORY_DESCRIPTOR **arg3, NvU32 *pCtxBufferType, NvU32 *pBufferCountOut, NvU32 *pFirstGlobalBuffer) { 754 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 755 return NV_ERR_NOT_SUPPORTED; 756 } 757 #else //__nvoc_kernel_graphics_context_h_disabled 758 #define kgrctxGetCtxBuffers(arg0, arg1, arg2, gfid, bufferCount, arg3, pCtxBufferType, pBufferCountOut, pFirstGlobalBuffer) kgrctxGetCtxBuffers_IMPL(arg0, arg1, arg2, gfid, bufferCount, arg3, pCtxBufferType, pBufferCountOut, pFirstGlobalBuffer) 759 #endif //__nvoc_kernel_graphics_context_h_disabled 760 761 NV_STATUS kgrctxGetCtxBufferInfo_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, NvU32 gfid, NvU32 bufferMaxCount, NvU32 *pBufferCount, NV2080_CTRL_GR_CTX_BUFFER_INFO *arg3); 762 763 #ifdef __nvoc_kernel_graphics_context_h_disabled 764 static inline NV_STATUS kgrctxGetCtxBufferInfo(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, NvU32 gfid, NvU32 bufferMaxCount, NvU32 *pBufferCount, NV2080_CTRL_GR_CTX_BUFFER_INFO *arg3) { 765 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 766 return NV_ERR_NOT_SUPPORTED; 767 } 768 #else //__nvoc_kernel_graphics_context_h_disabled 769 #define kgrctxGetCtxBufferInfo(arg0, arg1, arg2, gfid, bufferMaxCount, pBufferCount, arg3) kgrctxGetCtxBufferInfo_IMPL(arg0, arg1, arg2, gfid, bufferMaxCount, pBufferCount, arg3) 770 #endif //__nvoc_kernel_graphics_context_h_disabled 771 772 NV_STATUS kgrctxGetCtxBufferPtes_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, NvU32 gfid, NvU32 bufferType, NvU32 firstPage, NvU64 *pPhysAddrs, NvU32 addrsSize, NvU32 *pNumPages, NvBool *pbNoMorePages); 773 774 #ifdef __nvoc_kernel_graphics_context_h_disabled 775 static inline NV_STATUS kgrctxGetCtxBufferPtes(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, NvU32 gfid, NvU32 bufferType, NvU32 firstPage, NvU64 *pPhysAddrs, NvU32 addrsSize, NvU32 *pNumPages, NvBool *pbNoMorePages) { 776 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 777 return NV_ERR_NOT_SUPPORTED; 778 } 779 #else //__nvoc_kernel_graphics_context_h_disabled 780 #define kgrctxGetCtxBufferPtes(arg0, arg1, arg2, gfid, bufferType, firstPage, pPhysAddrs, addrsSize, pNumPages, pbNoMorePages) kgrctxGetCtxBufferPtes_IMPL(arg0, arg1, arg2, gfid, bufferType, firstPage, pPhysAddrs, addrsSize, pNumPages, pbNoMorePages) 781 #endif //__nvoc_kernel_graphics_context_h_disabled 782 783 NV_STATUS kgrctxAllocMainCtxBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3); 784 785 #ifdef __nvoc_kernel_graphics_context_h_disabled 786 static inline NV_STATUS kgrctxAllocMainCtxBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3) { 787 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 788 return NV_ERR_NOT_SUPPORTED; 789 } 790 #else //__nvoc_kernel_graphics_context_h_disabled 791 #define kgrctxAllocMainCtxBuffer(arg0, arg1, arg2, arg3) kgrctxAllocMainCtxBuffer_IMPL(arg0, arg1, arg2, arg3) 792 #endif //__nvoc_kernel_graphics_context_h_disabled 793 794 NV_STATUS kgrctxAllocPatchBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3); 795 796 #ifdef __nvoc_kernel_graphics_context_h_disabled 797 static inline NV_STATUS kgrctxAllocPatchBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3) { 798 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 799 return NV_ERR_NOT_SUPPORTED; 800 } 801 #else //__nvoc_kernel_graphics_context_h_disabled 802 #define kgrctxAllocPatchBuffer(arg0, arg1, arg2, arg3) kgrctxAllocPatchBuffer_IMPL(arg0, arg1, arg2, arg3) 803 #endif //__nvoc_kernel_graphics_context_h_disabled 804 805 NV_STATUS kgrctxAllocPmBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3); 806 807 #ifdef __nvoc_kernel_graphics_context_h_disabled 808 static inline NV_STATUS kgrctxAllocPmBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3) { 809 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 810 return NV_ERR_NOT_SUPPORTED; 811 } 812 #else //__nvoc_kernel_graphics_context_h_disabled 813 #define kgrctxAllocPmBuffer(arg0, arg1, arg2, arg3) kgrctxAllocPmBuffer_IMPL(arg0, arg1, arg2, arg3) 814 #endif //__nvoc_kernel_graphics_context_h_disabled 815 816 NV_STATUS kgrctxAllocCtxBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelGraphicsObject *arg3); 817 818 #ifdef __nvoc_kernel_graphics_context_h_disabled 819 static inline NV_STATUS kgrctxAllocCtxBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelGraphicsObject *arg3) { 820 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 821 return NV_ERR_NOT_SUPPORTED; 822 } 823 #else //__nvoc_kernel_graphics_context_h_disabled 824 #define kgrctxAllocCtxBuffers(arg0, arg1, arg2, arg3) kgrctxAllocCtxBuffers_IMPL(arg0, arg1, arg2, arg3) 825 #endif //__nvoc_kernel_graphics_context_h_disabled 826 827 NV_STATUS kgrctxMapGlobalCtxBuffer_IMPL(struct OBJGPU *pGpu, struct KernelGraphicsContext *arg0, struct KernelGraphics *arg1, NvU32 gfid, struct OBJVASPACE *arg2, GR_GLOBALCTX_BUFFER arg3, NvBool bIsReadOnly); 828 829 #ifdef __nvoc_kernel_graphics_context_h_disabled 830 static inline NV_STATUS kgrctxMapGlobalCtxBuffer(struct OBJGPU *pGpu, struct KernelGraphicsContext *arg0, struct KernelGraphics *arg1, NvU32 gfid, struct OBJVASPACE *arg2, GR_GLOBALCTX_BUFFER arg3, NvBool bIsReadOnly) { 831 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 832 return NV_ERR_NOT_SUPPORTED; 833 } 834 #else //__nvoc_kernel_graphics_context_h_disabled 835 #define kgrctxMapGlobalCtxBuffer(pGpu, arg0, arg1, gfid, arg2, arg3, bIsReadOnly) kgrctxMapGlobalCtxBuffer_IMPL(pGpu, arg0, arg1, gfid, arg2, arg3, bIsReadOnly) 836 #endif //__nvoc_kernel_graphics_context_h_disabled 837 838 NV_STATUS kgrctxMapGlobalCtxBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, NvU32 gfid, struct KernelChannel *arg3); 839 840 #ifdef __nvoc_kernel_graphics_context_h_disabled 841 static inline NV_STATUS kgrctxMapGlobalCtxBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, NvU32 gfid, struct KernelChannel *arg3) { 842 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 843 return NV_ERR_NOT_SUPPORTED; 844 } 845 #else //__nvoc_kernel_graphics_context_h_disabled 846 #define kgrctxMapGlobalCtxBuffers(arg0, arg1, arg2, gfid, arg3) kgrctxMapGlobalCtxBuffers_IMPL(arg0, arg1, arg2, gfid, arg3) 847 #endif //__nvoc_kernel_graphics_context_h_disabled 848 849 NV_STATUS kgrctxMapCtxBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelGraphicsObject *arg3); 850 851 #ifdef __nvoc_kernel_graphics_context_h_disabled 852 static inline NV_STATUS kgrctxMapCtxBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelGraphicsObject *arg3) { 853 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 854 return NV_ERR_NOT_SUPPORTED; 855 } 856 #else //__nvoc_kernel_graphics_context_h_disabled 857 #define kgrctxMapCtxBuffers(arg0, arg1, arg2, arg3) kgrctxMapCtxBuffers_IMPL(arg0, arg1, arg2, arg3) 858 #endif //__nvoc_kernel_graphics_context_h_disabled 859 860 NV_STATUS kgrctxPrepareInitializeCtxBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3, NvU32 externalId, NV2080_CTRL_GPU_PROMOTE_CTX_BUFFER_ENTRY *arg4, NvBool *pbAddEntry); 861 862 #ifdef __nvoc_kernel_graphics_context_h_disabled 863 static inline NV_STATUS kgrctxPrepareInitializeCtxBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3, NvU32 externalId, NV2080_CTRL_GPU_PROMOTE_CTX_BUFFER_ENTRY *arg4, NvBool *pbAddEntry) { 864 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 865 return NV_ERR_NOT_SUPPORTED; 866 } 867 #else //__nvoc_kernel_graphics_context_h_disabled 868 #define kgrctxPrepareInitializeCtxBuffer(arg0, arg1, arg2, arg3, externalId, arg4, pbAddEntry) kgrctxPrepareInitializeCtxBuffer_IMPL(arg0, arg1, arg2, arg3, externalId, arg4, pbAddEntry) 869 #endif //__nvoc_kernel_graphics_context_h_disabled 870 871 NV_STATUS kgrctxPreparePromoteCtxBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelChannel *arg2, NvU32 externalId, NV2080_CTRL_GPU_PROMOTE_CTX_BUFFER_ENTRY *arg3, NvBool *pbAddEntry); 872 873 #ifdef __nvoc_kernel_graphics_context_h_disabled 874 static inline NV_STATUS kgrctxPreparePromoteCtxBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelChannel *arg2, NvU32 externalId, NV2080_CTRL_GPU_PROMOTE_CTX_BUFFER_ENTRY *arg3, NvBool *pbAddEntry) { 875 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 876 return NV_ERR_NOT_SUPPORTED; 877 } 878 #else //__nvoc_kernel_graphics_context_h_disabled 879 #define kgrctxPreparePromoteCtxBuffer(arg0, arg1, arg2, externalId, arg3, pbAddEntry) kgrctxPreparePromoteCtxBuffer_IMPL(arg0, arg1, arg2, externalId, arg3, pbAddEntry) 880 #endif //__nvoc_kernel_graphics_context_h_disabled 881 882 void kgrctxMarkCtxBufferInitialized_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3, NvU32 externalId); 883 884 #ifdef __nvoc_kernel_graphics_context_h_disabled 885 static inline void kgrctxMarkCtxBufferInitialized(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3, NvU32 externalId) { 886 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 887 } 888 #else //__nvoc_kernel_graphics_context_h_disabled 889 #define kgrctxMarkCtxBufferInitialized(arg0, arg1, arg2, arg3, externalId) kgrctxMarkCtxBufferInitialized_IMPL(arg0, arg1, arg2, arg3, externalId) 890 #endif //__nvoc_kernel_graphics_context_h_disabled 891 892 NV_STATUS kgrctxSetupDeferredPmBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3); 893 894 #ifdef __nvoc_kernel_graphics_context_h_disabled 895 static inline NV_STATUS kgrctxSetupDeferredPmBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3) { 896 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 897 return NV_ERR_NOT_SUPPORTED; 898 } 899 #else //__nvoc_kernel_graphics_context_h_disabled 900 #define kgrctxSetupDeferredPmBuffer(arg0, arg1, arg2, arg3) kgrctxSetupDeferredPmBuffer_IMPL(arg0, arg1, arg2, arg3) 901 #endif //__nvoc_kernel_graphics_context_h_disabled 902 903 void kgrctxUnmapGlobalCtxBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct OBJVASPACE *arg3, NvU32 gfid); 904 905 #ifdef __nvoc_kernel_graphics_context_h_disabled 906 static inline void kgrctxUnmapGlobalCtxBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct OBJVASPACE *arg3, NvU32 gfid) { 907 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 908 } 909 #else //__nvoc_kernel_graphics_context_h_disabled 910 #define kgrctxUnmapGlobalCtxBuffers(arg0, arg1, arg2, arg3, gfid) kgrctxUnmapGlobalCtxBuffers_IMPL(arg0, arg1, arg2, arg3, gfid) 911 #endif //__nvoc_kernel_graphics_context_h_disabled 912 913 void kgrctxUnmapGlobalCtxBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct OBJVASPACE *arg3, GR_GLOBALCTX_BUFFER arg4); 914 915 #ifdef __nvoc_kernel_graphics_context_h_disabled 916 static inline void kgrctxUnmapGlobalCtxBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct OBJVASPACE *arg3, GR_GLOBALCTX_BUFFER arg4) { 917 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 918 } 919 #else //__nvoc_kernel_graphics_context_h_disabled 920 #define kgrctxUnmapGlobalCtxBuffer(arg0, arg1, arg2, arg3, arg4) kgrctxUnmapGlobalCtxBuffer_IMPL(arg0, arg1, arg2, arg3, arg4) 921 #endif //__nvoc_kernel_graphics_context_h_disabled 922 923 void kgrctxUnmapMainCtxBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3); 924 925 #ifdef __nvoc_kernel_graphics_context_h_disabled 926 static inline void kgrctxUnmapMainCtxBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3) { 927 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 928 } 929 #else //__nvoc_kernel_graphics_context_h_disabled 930 #define kgrctxUnmapMainCtxBuffer(arg0, arg1, arg2, arg3) kgrctxUnmapMainCtxBuffer_IMPL(arg0, arg1, arg2, arg3) 931 #endif //__nvoc_kernel_graphics_context_h_disabled 932 933 void kgrctxUnmapCtxPmBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct OBJVASPACE *arg3); 934 935 #ifdef __nvoc_kernel_graphics_context_h_disabled 936 static inline void kgrctxUnmapCtxPmBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct OBJVASPACE *arg3) { 937 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 938 } 939 #else //__nvoc_kernel_graphics_context_h_disabled 940 #define kgrctxUnmapCtxPmBuffer(arg0, arg1, arg2, arg3) kgrctxUnmapCtxPmBuffer_IMPL(arg0, arg1, arg2, arg3) 941 #endif //__nvoc_kernel_graphics_context_h_disabled 942 943 void kgrctxUnmapCtxZcullBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct OBJVASPACE *arg3); 944 945 #ifdef __nvoc_kernel_graphics_context_h_disabled 946 static inline void kgrctxUnmapCtxZcullBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct OBJVASPACE *arg3) { 947 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 948 } 949 #else //__nvoc_kernel_graphics_context_h_disabled 950 #define kgrctxUnmapCtxZcullBuffer(arg0, arg1, arg2, arg3) kgrctxUnmapCtxZcullBuffer_IMPL(arg0, arg1, arg2, arg3) 951 #endif //__nvoc_kernel_graphics_context_h_disabled 952 953 void kgrctxUnmapCtxPreemptionBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct OBJVASPACE *arg3); 954 955 #ifdef __nvoc_kernel_graphics_context_h_disabled 956 static inline void kgrctxUnmapCtxPreemptionBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct OBJVASPACE *arg3) { 957 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 958 } 959 #else //__nvoc_kernel_graphics_context_h_disabled 960 #define kgrctxUnmapCtxPreemptionBuffers(arg0, arg1, arg2, arg3) kgrctxUnmapCtxPreemptionBuffers_IMPL(arg0, arg1, arg2, arg3) 961 #endif //__nvoc_kernel_graphics_context_h_disabled 962 963 void kgrctxUnmapAssociatedCtxBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3); 964 965 #ifdef __nvoc_kernel_graphics_context_h_disabled 966 static inline void kgrctxUnmapAssociatedCtxBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1, struct KernelGraphics *arg2, struct KernelChannel *arg3) { 967 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 968 } 969 #else //__nvoc_kernel_graphics_context_h_disabled 970 #define kgrctxUnmapAssociatedCtxBuffers(arg0, arg1, arg2, arg3) kgrctxUnmapAssociatedCtxBuffers_IMPL(arg0, arg1, arg2, arg3) 971 #endif //__nvoc_kernel_graphics_context_h_disabled 972 973 void kgrctxFreeMainCtxBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1); 974 975 #ifdef __nvoc_kernel_graphics_context_h_disabled 976 static inline void kgrctxFreeMainCtxBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1) { 977 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 978 } 979 #else //__nvoc_kernel_graphics_context_h_disabled 980 #define kgrctxFreeMainCtxBuffer(arg0, arg1) kgrctxFreeMainCtxBuffer_IMPL(arg0, arg1) 981 #endif //__nvoc_kernel_graphics_context_h_disabled 982 983 void kgrctxFreeZcullBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1); 984 985 #ifdef __nvoc_kernel_graphics_context_h_disabled 986 static inline void kgrctxFreeZcullBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1) { 987 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 988 } 989 #else //__nvoc_kernel_graphics_context_h_disabled 990 #define kgrctxFreeZcullBuffer(arg0, arg1) kgrctxFreeZcullBuffer_IMPL(arg0, arg1) 991 #endif //__nvoc_kernel_graphics_context_h_disabled 992 993 void kgrctxFreeCtxPreemptionBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1); 994 995 #ifdef __nvoc_kernel_graphics_context_h_disabled 996 static inline void kgrctxFreeCtxPreemptionBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1) { 997 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 998 } 999 #else //__nvoc_kernel_graphics_context_h_disabled 1000 #define kgrctxFreeCtxPreemptionBuffers(arg0, arg1) kgrctxFreeCtxPreemptionBuffers_IMPL(arg0, arg1) 1001 #endif //__nvoc_kernel_graphics_context_h_disabled 1002 1003 void kgrctxFreePatchBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1); 1004 1005 #ifdef __nvoc_kernel_graphics_context_h_disabled 1006 static inline void kgrctxFreePatchBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1) { 1007 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 1008 } 1009 #else //__nvoc_kernel_graphics_context_h_disabled 1010 #define kgrctxFreePatchBuffer(arg0, arg1) kgrctxFreePatchBuffer_IMPL(arg0, arg1) 1011 #endif //__nvoc_kernel_graphics_context_h_disabled 1012 1013 void kgrctxFreePmBuffer_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1); 1014 1015 #ifdef __nvoc_kernel_graphics_context_h_disabled 1016 static inline void kgrctxFreePmBuffer(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1) { 1017 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 1018 } 1019 #else //__nvoc_kernel_graphics_context_h_disabled 1020 #define kgrctxFreePmBuffer(arg0, arg1) kgrctxFreePmBuffer_IMPL(arg0, arg1) 1021 #endif //__nvoc_kernel_graphics_context_h_disabled 1022 1023 void kgrctxFreeLocalGlobalCtxBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1); 1024 1025 #ifdef __nvoc_kernel_graphics_context_h_disabled 1026 static inline void kgrctxFreeLocalGlobalCtxBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1) { 1027 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 1028 } 1029 #else //__nvoc_kernel_graphics_context_h_disabled 1030 #define kgrctxFreeLocalGlobalCtxBuffers(arg0, arg1) kgrctxFreeLocalGlobalCtxBuffers_IMPL(arg0, arg1) 1031 #endif //__nvoc_kernel_graphics_context_h_disabled 1032 1033 void kgrctxFreeAssociatedCtxBuffers_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1); 1034 1035 #ifdef __nvoc_kernel_graphics_context_h_disabled 1036 static inline void kgrctxFreeAssociatedCtxBuffers(struct OBJGPU *arg0, struct KernelGraphicsContext *arg1) { 1037 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContext was disabled!"); 1038 } 1039 #else //__nvoc_kernel_graphics_context_h_disabled 1040 #define kgrctxFreeAssociatedCtxBuffers(arg0, arg1) kgrctxFreeAssociatedCtxBuffers_IMPL(arg0, arg1) 1041 #endif //__nvoc_kernel_graphics_context_h_disabled 1042 1043 #undef PRIVATE_FIELD 1044 1045 1046 /** 1047 * This refcounted class encapsulates the context data that is shared when a 1048 * context is duped. 1049 */ 1050 1051 // Private field names are wrapped in PRIVATE_FIELD, which does nothing for 1052 // the matching C source file, but causes diagnostics to be issued if another 1053 // source file references the field. 1054 #ifdef NVOC_KERNEL_GRAPHICS_CONTEXT_H_PRIVATE_ACCESS_ALLOWED 1055 #define PRIVATE_FIELD(x) x 1056 #else 1057 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x) 1058 #endif 1059 1060 struct KernelGraphicsContextUnicast { 1061 NvU32 channelObjects; 1062 NvU32 objectCounts[4]; 1063 NV_CONTEXT_BUFFER ctxPatchBuffer; 1064 NV_CONTEXT_BUFFER zcullCtxswBuffer; 1065 NV_CONTEXT_BUFFER pmCtxswBuffer; 1066 struct MEMORY_DESCRIPTOR *pMainCtxBuffer; 1067 GR_GLOBALCTX_BUFFERS localCtxBuffer; 1068 VA_LIST globalCtxBufferVaList[10]; 1069 NvBool bKGrMainCtxBufferInitialized; 1070 NvBool bKGrPatchCtxBufferInitialized; 1071 NvBool bKGrPmCtxBufferInitialized; 1072 NV_CONTEXT_BUFFER preemptCtxswBuffer; 1073 NV_CONTEXT_BUFFER spillCtxswBuffer; 1074 NV_CONTEXT_BUFFER betaCBCtxswBuffer; 1075 NV_CONTEXT_BUFFER pagepoolCtxswBuffer; 1076 NV_CONTEXT_BUFFER rtvCbCtxswBuffer; 1077 NV_CONTEXT_BUFFER setupCtxswBuffer; 1078 NvBool bVprChannel; 1079 NvBool bSupportsPerSubctxHeader; 1080 struct MMU_FAULT_INFO { 1081 NV83DE_MMU_FAULT_INFO mmuFaultInfo; 1082 NV83DE_CTRL_DEBUG_READ_MMU_FAULT_INFO_ENTRY mmuFaultInfoList[4]; 1083 NvU32 head; 1084 NvU32 tail; 1085 } mmuFault; 1086 }; 1087 1088 1089 struct KernelGraphicsContextShared { 1090 const struct NVOC_RTTI *__nvoc_rtti; 1091 struct RsShared __nvoc_base_RsShared; 1092 struct Object *__nvoc_pbase_Object; 1093 struct RsShared *__nvoc_pbase_RsShared; 1094 struct KernelGraphicsContextShared *__nvoc_pbase_KernelGraphicsContextShared; 1095 struct KernelGraphicsContextUnicast PRIVATE_FIELD(kernelGraphicsContextUnicast); 1096 KernelSMDebuggerSessionList PRIVATE_FIELD(activeDebuggers); 1097 }; 1098 1099 #ifndef __NVOC_CLASS_KernelGraphicsContextShared_TYPEDEF__ 1100 #define __NVOC_CLASS_KernelGraphicsContextShared_TYPEDEF__ 1101 typedef struct KernelGraphicsContextShared KernelGraphicsContextShared; 1102 #endif /* __NVOC_CLASS_KernelGraphicsContextShared_TYPEDEF__ */ 1103 1104 #ifndef __nvoc_class_id_KernelGraphicsContextShared 1105 #define __nvoc_class_id_KernelGraphicsContextShared 0xe7abeb 1106 #endif /* __nvoc_class_id_KernelGraphicsContextShared */ 1107 1108 extern const struct NVOC_CLASS_DEF __nvoc_class_def_KernelGraphicsContextShared; 1109 1110 #define __staticCast_KernelGraphicsContextShared(pThis) \ 1111 ((pThis)->__nvoc_pbase_KernelGraphicsContextShared) 1112 1113 #ifdef __nvoc_kernel_graphics_context_h_disabled 1114 #define __dynamicCast_KernelGraphicsContextShared(pThis) ((KernelGraphicsContextShared*)NULL) 1115 #else //__nvoc_kernel_graphics_context_h_disabled 1116 #define __dynamicCast_KernelGraphicsContextShared(pThis) \ 1117 ((KernelGraphicsContextShared*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(KernelGraphicsContextShared))) 1118 #endif //__nvoc_kernel_graphics_context_h_disabled 1119 1120 1121 NV_STATUS __nvoc_objCreateDynamic_KernelGraphicsContextShared(KernelGraphicsContextShared**, Dynamic*, NvU32, va_list); 1122 1123 NV_STATUS __nvoc_objCreate_KernelGraphicsContextShared(KernelGraphicsContextShared**, Dynamic*, NvU32); 1124 #define __objCreate_KernelGraphicsContextShared(ppNewObj, pParent, createFlags) \ 1125 __nvoc_objCreate_KernelGraphicsContextShared((ppNewObj), staticCast((pParent), Dynamic), (createFlags)) 1126 1127 NV_STATUS shrkgrctxConstruct_IMPL(struct KernelGraphicsContextShared *arg_); 1128 1129 #define __nvoc_shrkgrctxConstruct(arg_) shrkgrctxConstruct_IMPL(arg_) 1130 NV_STATUS shrkgrctxInit_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContextShared *arg1, struct KernelGraphicsContext *arg2); 1131 1132 #ifdef __nvoc_kernel_graphics_context_h_disabled 1133 static inline NV_STATUS shrkgrctxInit(struct OBJGPU *arg0, struct KernelGraphicsContextShared *arg1, struct KernelGraphicsContext *arg2) { 1134 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContextShared was disabled!"); 1135 return NV_ERR_NOT_SUPPORTED; 1136 } 1137 #else //__nvoc_kernel_graphics_context_h_disabled 1138 #define shrkgrctxInit(arg0, arg1, arg2) shrkgrctxInit_IMPL(arg0, arg1, arg2) 1139 #endif //__nvoc_kernel_graphics_context_h_disabled 1140 1141 NV_STATUS shrkgrctxConstructUnicast_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContextShared *arg1, struct KernelGraphicsContext *arg2, struct KernelGraphics *arg3, KernelGraphicsContextUnicast *arg4); 1142 1143 #ifdef __nvoc_kernel_graphics_context_h_disabled 1144 static inline NV_STATUS shrkgrctxConstructUnicast(struct OBJGPU *arg0, struct KernelGraphicsContextShared *arg1, struct KernelGraphicsContext *arg2, struct KernelGraphics *arg3, KernelGraphicsContextUnicast *arg4) { 1145 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContextShared was disabled!"); 1146 return NV_ERR_NOT_SUPPORTED; 1147 } 1148 #else //__nvoc_kernel_graphics_context_h_disabled 1149 #define shrkgrctxConstructUnicast(arg0, arg1, arg2, arg3, arg4) shrkgrctxConstructUnicast_IMPL(arg0, arg1, arg2, arg3, arg4) 1150 #endif //__nvoc_kernel_graphics_context_h_disabled 1151 1152 void shrkgrctxDestruct_IMPL(struct KernelGraphicsContextShared *arg0); 1153 1154 #define __nvoc_shrkgrctxDestruct(arg0) shrkgrctxDestruct_IMPL(arg0) 1155 void shrkgrctxTeardown_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContextShared *arg1, struct KernelGraphicsContext *arg2); 1156 1157 #ifdef __nvoc_kernel_graphics_context_h_disabled 1158 static inline void shrkgrctxTeardown(struct OBJGPU *arg0, struct KernelGraphicsContextShared *arg1, struct KernelGraphicsContext *arg2) { 1159 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContextShared was disabled!"); 1160 } 1161 #else //__nvoc_kernel_graphics_context_h_disabled 1162 #define shrkgrctxTeardown(arg0, arg1, arg2) shrkgrctxTeardown_IMPL(arg0, arg1, arg2) 1163 #endif //__nvoc_kernel_graphics_context_h_disabled 1164 1165 void shrkgrctxDestructUnicast_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContextShared *arg1, struct KernelGraphicsContext *arg2, KernelGraphicsContextUnicast *arg3); 1166 1167 #ifdef __nvoc_kernel_graphics_context_h_disabled 1168 static inline void shrkgrctxDestructUnicast(struct OBJGPU *arg0, struct KernelGraphicsContextShared *arg1, struct KernelGraphicsContext *arg2, KernelGraphicsContextUnicast *arg3) { 1169 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContextShared was disabled!"); 1170 } 1171 #else //__nvoc_kernel_graphics_context_h_disabled 1172 #define shrkgrctxDestructUnicast(arg0, arg1, arg2, arg3) shrkgrctxDestructUnicast_IMPL(arg0, arg1, arg2, arg3) 1173 #endif //__nvoc_kernel_graphics_context_h_disabled 1174 1175 void shrkgrctxDetach_IMPL(struct OBJGPU *arg0, struct KernelGraphicsContextShared *arg1, struct KernelGraphicsContext *arg2, struct KernelChannel *arg3); 1176 1177 #ifdef __nvoc_kernel_graphics_context_h_disabled 1178 static inline void shrkgrctxDetach(struct OBJGPU *arg0, struct KernelGraphicsContextShared *arg1, struct KernelGraphicsContext *arg2, struct KernelChannel *arg3) { 1179 NV_ASSERT_FAILED_PRECOMP("KernelGraphicsContextShared was disabled!"); 1180 } 1181 #else //__nvoc_kernel_graphics_context_h_disabled 1182 #define shrkgrctxDetach(arg0, arg1, arg2, arg3) shrkgrctxDetach_IMPL(arg0, arg1, arg2, arg3) 1183 #endif //__nvoc_kernel_graphics_context_h_disabled 1184 1185 #undef PRIVATE_FIELD 1186 1187 1188 /*! Handle NV0090 ctrl call forwarding */ 1189 NV_STATUS kgrctxCtrlHandle 1190 ( 1191 CALL_CONTEXT *, 1192 NvHandle hKernelGraphicsContext 1193 ); 1194 1195 #endif // _KERNEL_GRAPHICS_CONTEXT_H_ 1196 1197 #ifdef __cplusplus 1198 } // extern "C" 1199 #endif 1200 1201 #endif // _G_KERNEL_GRAPHICS_CONTEXT_NVOC_H_ 1202