1 #ifndef _G_KERNEL_GRAPHICS_NVOC_H_ 2 #define _G_KERNEL_GRAPHICS_NVOC_H_ 3 #include "nvoc/runtime.h" 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 /* 10 * SPDX-FileCopyrightText: Copyright (c) 2020-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 11 * SPDX-License-Identifier: MIT 12 * 13 * Permission is hereby granted, free of charge, to any person obtaining a 14 * copy of this software and associated documentation files (the "Software"), 15 * to deal in the Software without restriction, including without limitation 16 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 * and/or sell copies of the Software, and to permit persons to whom the 18 * Software is furnished to do so, subject to the following conditions: 19 * 20 * The above copyright notice and this permission notice shall be included in 21 * all copies or substantial portions of the Software. 22 * 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 29 * DEALINGS IN THE SOFTWARE. 30 */ 31 32 #include "g_kernel_graphics_nvoc.h" 33 34 #ifndef _KERNEL_GRAPHICS_H_ 35 #define _KERNEL_GRAPHICS_H_ 36 37 #include "core/core.h" 38 #include "gpu/eng_state.h" 39 #include "gpu/gpu.h" 40 #include "kernel/gpu/gr/kernel_graphics_object.h" 41 #include "kernel/gpu/gr/kernel_graphics_context.h" 42 #include "kernel/mem_mgr/ctx_buf_pool.h" 43 #include "kernel/gpu/gr/fecs_event_list.h" 44 #include "eventbufferproducer.h" 45 #include "kernel/gpu/intr/intr_service.h" 46 47 #include "ctrl/ctrl2080/ctrl2080internal.h" 48 49 50 #define GR_VERTEX_CACHE_SIZE 16 51 52 struct KGRAPHICS_STATIC_INFO; 53 typedef struct KGRAPHICS_STATIC_INFO KGRAPHICS_STATIC_INFO; 54 typedef struct KGRAPHICS_FECS_TRACE_INFO KGRAPHICS_FECS_TRACE_INFO; 55 typedef struct KGRAPHICS_GLOBAL_CTX_BUFFERS_INFO KGRAPHICS_GLOBAL_CTX_BUFFERS_INFO; 56 57 /*! 58 * Static info retrieved from Physical RM detailing the configuration of the 59 * visible portions of this graphics engine. This data is mostly used to service 60 * control calls which export data from RM. 61 */ 62 struct KGRAPHICS_STATIC_INFO 63 { 64 // 65 // @ref NV0080_CTRL_CMD_GR_GET_INFO 66 // @ref NV0080_CTRL_CMD_GR_GET_INFO_V2 67 // @ref NV2080_CTRL_CMD_GR_GET_INFO 68 // @ref NV2080_CTRL_CMD_GR_GET_INFO_V2 69 // 70 NV2080_CTRL_INTERNAL_STATIC_GR_INFO *pGrInfo; 71 72 // 73 // @ref NV0080_CTRL_CMD_GR_GET_CAPS 74 // @ref NV0080_CTRL_CMD_GR_GET_CAPS_V2 75 // @ref NV2080_CTRL_CMD_GR_GET_CAPS 76 // @ref NV2080_CTRL_CMD_GR_GET_CAPS_V2 77 // 78 NV2080_CTRL_INTERNAL_STATIC_GR_CAPS grCaps; 79 80 // 81 // @ref NV2080_CTRL_CMD_GR_GET_GLOBAL_SM_ORDER 82 // @ref NV2080_CTRL_CMD_GR_GET_SM_TO_GPC_TPC_MAPPINGS 83 // 84 NV2080_CTRL_INTERNAL_STATIC_GR_GLOBAL_SM_ORDER globalSmOrder; 85 86 // 87 // @ref NV2080_CTRL_CMD_GR_GET_GPC_MASK 88 // @ref NV2080_CTRL_CMD_GR_GET_TPC_MASK 89 // @ref NV2080_CTRL_CMD_GR_GET_PHYS_GPC_MASK 90 // 91 NV2080_CTRL_INTERNAL_STATIC_GR_FLOORSWEEPING_MASKS floorsweepingMasks; 92 93 // @ref NV2080_CTRL_CMD_GR_GET_PPC_MASK 94 NV2080_CTRL_INTERNAL_STATIC_GR_PPC_MASKS *pPpcMasks; 95 96 // @ref NV2080_CTRL_CMD_GR_GET_ZCULL_INFO 97 NV2080_CTRL_INTERNAL_STATIC_GR_ZCULL_INFO *pZcullInfo; 98 99 // @ref NV2080_CTRL_CMD_GR_GET_ROP_INFO 100 NV2080_CTRL_INTERNAL_STATIC_GR_ROP_INFO *pRopInfo; 101 102 // 103 // @ref NV2080_CTRL_CMD_GR_GET_ENGINE_CONTEXT_PROPERTIES 104 // @ref NV2080_CTRL_CMD_GR_GET_ATTRIBUTE_BUFFER_SIZE 105 // 106 NV2080_CTRL_INTERNAL_STATIC_GR_CONTEXT_BUFFERS_INFO *pContextBuffersInfo; 107 108 // @ref NV2080_CTRL_CMD_GR_GET_SM_ISSUE_RATE_MODIFIER 109 NV2080_CTRL_INTERNAL_STATIC_GR_SM_ISSUE_RATE_MODIFIER *pSmIssueRateModifier; 110 111 // 112 // @ref NV2080_CTRL_CMD_INTERNAL_STATIC_KGR_GET_FECS_RECORD_SIZE 113 // @ref NV2080_CTRL_CMD_INTERNAL_STATIC_GR_GET_FECS_RECORD_SIZE 114 // 115 NV2080_CTRL_INTERNAL_STATIC_GR_GET_FECS_RECORD_SIZE fecsRecordSize; 116 117 // 118 // @ref NV2080_CTRL_CMD_INTERNAL_STATIC_KGR_GET_FECS_TRACE_DEFINES 119 // @ref NV2080_CTRL_CMD_INTERNAL_STATIC_GR_GET_FECS_TRACE_DEFINES 120 // 121 NV2080_CTRL_INTERNAL_STATIC_GR_GET_FECS_TRACE_DEFINES *pFecsTraceDefines; 122 123 // @ref bPerSubcontextContextHeaderSupported 124 NV2080_CTRL_INTERNAL_STATIC_GR_PDB_PROPERTIES pdbTable; 125 }; 126 127 struct KGRAPHICS_GLOBAL_CTX_BUFFERS_INFO 128 { 129 NvU32 globalCtxBufferSize; 130 131 GR_GLOBALCTX_BUFFERS *pGlobalCtxBuffers; 132 NvBool bSizeAligned[GR_GLOBALCTX_BUFFER_COUNT]; 133 GR_BUFFER_ATTR globalCtxAttr[GR_GLOBALCTX_BUFFER_COUNT]; 134 GR_BUFFER_ATTR localCtxAttr[GR_GLOBALCTX_BUFFER_COUNT]; 135 GR_BUFFER_ATTR vfGlobalCtxAttr[GR_GLOBALCTX_BUFFER_COUNT]; 136 }; 137 138 // Opaque forward declarations 139 typedef struct KGRAPHICS_PRIVATE_DATA KGRAPHICS_PRIVATE_DATA; 140 typedef struct KGRAPHICS_FECS_TRACE_INFO KGRAPHICS_FECS_TRACE_INFO; 141 142 /*! 143 * KernelGraphics is a logical abstraction of the GPU Graphics Engine. The 144 * Public API of the Graphics Engine is exposed through this object, and any 145 * interfaces which do not manage the underlying Graphics hardware can be 146 * managed by this object. 147 */ 148 #ifdef NVOC_KERNEL_GRAPHICS_H_PRIVATE_ACCESS_ALLOWED 149 #define PRIVATE_FIELD(x) x 150 #else 151 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x) 152 #endif 153 struct KernelGraphics { 154 const struct NVOC_RTTI *__nvoc_rtti; 155 struct OBJENGSTATE __nvoc_base_OBJENGSTATE; 156 struct IntrService __nvoc_base_IntrService; 157 struct Object *__nvoc_pbase_Object; 158 struct OBJENGSTATE *__nvoc_pbase_OBJENGSTATE; 159 struct IntrService *__nvoc_pbase_IntrService; 160 struct KernelGraphics *__nvoc_pbase_KernelGraphics; 161 NV_STATUS (*__kgraphicsConstructEngine__)(OBJGPU *, struct KernelGraphics *, ENGDESCRIPTOR); 162 NV_STATUS (*__kgraphicsStateInitLocked__)(OBJGPU *, struct KernelGraphics *); 163 NV_STATUS (*__kgraphicsStateLoad__)(OBJGPU *, struct KernelGraphics *, NvU32); 164 NV_STATUS (*__kgraphicsStatePreUnload__)(OBJGPU *, struct KernelGraphics *, NvU32); 165 NV_STATUS (*__kgraphicsStateUnload__)(OBJGPU *, struct KernelGraphics *, NvU32); 166 void (*__kgraphicsStateDestroy__)(OBJGPU *, struct KernelGraphics *); 167 NvBool (*__kgraphicsIsPresent__)(OBJGPU *, struct KernelGraphics *); 168 NV_STATUS (*__kgraphicsStatePostLoad__)(OBJGPU *, struct KernelGraphics *, NvU32); 169 void (*__kgraphicsRegisterIntrService__)(OBJGPU *, struct KernelGraphics *, IntrServiceRecord *); 170 NV_STATUS (*__kgraphicsServiceNotificationInterrupt__)(OBJGPU *, struct KernelGraphics *, IntrServiceServiceNotificationInterruptArguments *); 171 NvBool (*__kgraphicsClearInterrupt__)(OBJGPU *, struct KernelGraphics *, IntrServiceClearInterruptArguments *); 172 NvU32 (*__kgraphicsServiceInterrupt__)(OBJGPU *, struct KernelGraphics *, IntrServiceServiceInterruptArguments *); 173 NV_STATUS (*__kgraphicsStatePreLoad__)(POBJGPU, struct KernelGraphics *, NvU32); 174 NV_STATUS (*__kgraphicsStatePostUnload__)(POBJGPU, struct KernelGraphics *, NvU32); 175 NV_STATUS (*__kgraphicsStateInitUnlocked__)(POBJGPU, struct KernelGraphics *); 176 void (*__kgraphicsInitMissing__)(POBJGPU, struct KernelGraphics *); 177 NV_STATUS (*__kgraphicsStatePreInitLocked__)(POBJGPU, struct KernelGraphics *); 178 NV_STATUS (*__kgraphicsStatePreInitUnlocked__)(POBJGPU, struct KernelGraphics *); 179 NvBool PRIVATE_FIELD(bCtxswLoggingSupported); 180 NvBool PRIVATE_FIELD(bIntrDrivenCtxswLoggingEnabled); 181 NvBool PRIVATE_FIELD(bBottomHalfCtxswLoggingEnabled); 182 NvBool PRIVATE_FIELD(bDeferContextInit); 183 NvBool PRIVATE_FIELD(bPerSubcontextContextHeaderSupported); 184 NvBool PRIVATE_FIELD(bSetContextBuffersGPUPrivileged); 185 NvBool PRIVATE_FIELD(bUcodeSupportsPrivAccessMap); 186 NvBool PRIVATE_FIELD(bRtvCbSupported); 187 NvBool PRIVATE_FIELD(bFecsRecordUcodeSeqnoSupported); 188 NvU32 PRIVATE_FIELD(instance); 189 KGRAPHICS_PRIVATE_DATA *PRIVATE_FIELD(pPrivate); 190 NvBool PRIVATE_FIELD(bCollectingDeferredStaticData); 191 KGRAPHICS_FECS_TRACE_INFO *PRIVATE_FIELD(pFecsTraceInfo); 192 struct KGRAPHICS_GLOBAL_CTX_BUFFERS_INFO PRIVATE_FIELD(globalCtxBuffersInfo); 193 struct CTX_BUF_POOL_INFO *PRIVATE_FIELD(pCtxBufPool); 194 CTX_BUF_INFO PRIVATE_FIELD(maxCtxBufSize)[9]; 195 GR_BUFFER_ATTR PRIVATE_FIELD(ctxAttr)[9]; 196 }; 197 struct KernelGraphics_PRIVATE { 198 const struct NVOC_RTTI *__nvoc_rtti; 199 struct OBJENGSTATE __nvoc_base_OBJENGSTATE; 200 struct IntrService __nvoc_base_IntrService; 201 struct Object *__nvoc_pbase_Object; 202 struct OBJENGSTATE *__nvoc_pbase_OBJENGSTATE; 203 struct IntrService *__nvoc_pbase_IntrService; 204 struct KernelGraphics *__nvoc_pbase_KernelGraphics; 205 NV_STATUS (*__kgraphicsConstructEngine__)(OBJGPU *, struct KernelGraphics *, ENGDESCRIPTOR); 206 NV_STATUS (*__kgraphicsStateInitLocked__)(OBJGPU *, struct KernelGraphics *); 207 NV_STATUS (*__kgraphicsStateLoad__)(OBJGPU *, struct KernelGraphics *, NvU32); 208 NV_STATUS (*__kgraphicsStatePreUnload__)(OBJGPU *, struct KernelGraphics *, NvU32); 209 NV_STATUS (*__kgraphicsStateUnload__)(OBJGPU *, struct KernelGraphics *, NvU32); 210 void (*__kgraphicsStateDestroy__)(OBJGPU *, struct KernelGraphics *); 211 NvBool (*__kgraphicsIsPresent__)(OBJGPU *, struct KernelGraphics *); 212 NV_STATUS (*__kgraphicsStatePostLoad__)(OBJGPU *, struct KernelGraphics *, NvU32); 213 void (*__kgraphicsRegisterIntrService__)(OBJGPU *, struct KernelGraphics *, IntrServiceRecord *); 214 NV_STATUS (*__kgraphicsServiceNotificationInterrupt__)(OBJGPU *, struct KernelGraphics *, IntrServiceServiceNotificationInterruptArguments *); 215 NvBool (*__kgraphicsClearInterrupt__)(OBJGPU *, struct KernelGraphics *, IntrServiceClearInterruptArguments *); 216 NvU32 (*__kgraphicsServiceInterrupt__)(OBJGPU *, struct KernelGraphics *, IntrServiceServiceInterruptArguments *); 217 NV_STATUS (*__kgraphicsStatePreLoad__)(POBJGPU, struct KernelGraphics *, NvU32); 218 NV_STATUS (*__kgraphicsStatePostUnload__)(POBJGPU, struct KernelGraphics *, NvU32); 219 NV_STATUS (*__kgraphicsStateInitUnlocked__)(POBJGPU, struct KernelGraphics *); 220 void (*__kgraphicsInitMissing__)(POBJGPU, struct KernelGraphics *); 221 NV_STATUS (*__kgraphicsStatePreInitLocked__)(POBJGPU, struct KernelGraphics *); 222 NV_STATUS (*__kgraphicsStatePreInitUnlocked__)(POBJGPU, struct KernelGraphics *); 223 NvBool bCtxswLoggingSupported; 224 NvBool bIntrDrivenCtxswLoggingEnabled; 225 NvBool bBottomHalfCtxswLoggingEnabled; 226 NvBool bDeferContextInit; 227 NvBool bPerSubcontextContextHeaderSupported; 228 NvBool bSetContextBuffersGPUPrivileged; 229 NvBool bUcodeSupportsPrivAccessMap; 230 NvBool bRtvCbSupported; 231 NvBool bFecsRecordUcodeSeqnoSupported; 232 NvU32 instance; 233 KGRAPHICS_PRIVATE_DATA *pPrivate; 234 NvBool bCollectingDeferredStaticData; 235 KGRAPHICS_FECS_TRACE_INFO *pFecsTraceInfo; 236 struct KGRAPHICS_GLOBAL_CTX_BUFFERS_INFO globalCtxBuffersInfo; 237 struct CTX_BUF_POOL_INFO *pCtxBufPool; 238 CTX_BUF_INFO maxCtxBufSize[9]; 239 GR_BUFFER_ATTR ctxAttr[9]; 240 }; 241 242 #ifndef __NVOC_CLASS_KernelGraphics_TYPEDEF__ 243 #define __NVOC_CLASS_KernelGraphics_TYPEDEF__ 244 typedef struct KernelGraphics KernelGraphics; 245 #endif /* __NVOC_CLASS_KernelGraphics_TYPEDEF__ */ 246 247 #ifndef __nvoc_class_id_KernelGraphics 248 #define __nvoc_class_id_KernelGraphics 0xea3fa9 249 #endif /* __nvoc_class_id_KernelGraphics */ 250 251 extern const struct NVOC_CLASS_DEF __nvoc_class_def_KernelGraphics; 252 253 #define __staticCast_KernelGraphics(pThis) \ 254 ((pThis)->__nvoc_pbase_KernelGraphics) 255 256 #ifdef __nvoc_kernel_graphics_h_disabled 257 #define __dynamicCast_KernelGraphics(pThis) ((KernelGraphics*)NULL) 258 #else //__nvoc_kernel_graphics_h_disabled 259 #define __dynamicCast_KernelGraphics(pThis) \ 260 ((KernelGraphics*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(KernelGraphics))) 261 #endif //__nvoc_kernel_graphics_h_disabled 262 263 #define PDB_PROP_KGRAPHICS_IS_MISSING_BASE_CAST __nvoc_base_OBJENGSTATE. 264 #define PDB_PROP_KGRAPHICS_IS_MISSING_BASE_NAME PDB_PROP_ENGSTATE_IS_MISSING 265 266 NV_STATUS __nvoc_objCreateDynamic_KernelGraphics(KernelGraphics**, Dynamic*, NvU32, va_list); 267 268 NV_STATUS __nvoc_objCreate_KernelGraphics(KernelGraphics**, Dynamic*, NvU32); 269 #define __objCreate_KernelGraphics(ppNewObj, pParent, createFlags) \ 270 __nvoc_objCreate_KernelGraphics((ppNewObj), staticCast((pParent), Dynamic), (createFlags)) 271 272 #define kgraphicsConstructEngine(arg0, arg1, arg2) kgraphicsConstructEngine_DISPATCH(arg0, arg1, arg2) 273 #define kgraphicsStateInitLocked(arg0, arg1) kgraphicsStateInitLocked_DISPATCH(arg0, arg1) 274 #define kgraphicsStateLoad(arg0, arg1, flags) kgraphicsStateLoad_DISPATCH(arg0, arg1, flags) 275 #define kgraphicsStatePreUnload(pGpu, arg0, flags) kgraphicsStatePreUnload_DISPATCH(pGpu, arg0, flags) 276 #define kgraphicsStateUnload(arg0, arg1, flags) kgraphicsStateUnload_DISPATCH(arg0, arg1, flags) 277 #define kgraphicsStateDestroy(arg0, arg1) kgraphicsStateDestroy_DISPATCH(arg0, arg1) 278 #define kgraphicsIsPresent(arg0, arg1) kgraphicsIsPresent_DISPATCH(arg0, arg1) 279 #define kgraphicsStatePostLoad(arg0, arg1, flags) kgraphicsStatePostLoad_DISPATCH(arg0, arg1, flags) 280 #define kgraphicsRegisterIntrService(arg0, arg1, arg2) kgraphicsRegisterIntrService_DISPATCH(arg0, arg1, arg2) 281 #define kgraphicsServiceNotificationInterrupt(arg0, arg1, arg2) kgraphicsServiceNotificationInterrupt_DISPATCH(arg0, arg1, arg2) 282 #define kgraphicsClearInterrupt(arg0, arg1, arg2) kgraphicsClearInterrupt_DISPATCH(arg0, arg1, arg2) 283 #define kgraphicsClearInterrupt_HAL(arg0, arg1, arg2) kgraphicsClearInterrupt_DISPATCH(arg0, arg1, arg2) 284 #define kgraphicsServiceInterrupt(arg0, arg1, arg2) kgraphicsServiceInterrupt_DISPATCH(arg0, arg1, arg2) 285 #define kgraphicsServiceInterrupt_HAL(arg0, arg1, arg2) kgraphicsServiceInterrupt_DISPATCH(arg0, arg1, arg2) 286 #define kgraphicsStatePreLoad(pGpu, pEngstate, arg0) kgraphicsStatePreLoad_DISPATCH(pGpu, pEngstate, arg0) 287 #define kgraphicsStatePostUnload(pGpu, pEngstate, arg0) kgraphicsStatePostUnload_DISPATCH(pGpu, pEngstate, arg0) 288 #define kgraphicsStateInitUnlocked(pGpu, pEngstate) kgraphicsStateInitUnlocked_DISPATCH(pGpu, pEngstate) 289 #define kgraphicsInitMissing(pGpu, pEngstate) kgraphicsInitMissing_DISPATCH(pGpu, pEngstate) 290 #define kgraphicsStatePreInitLocked(pGpu, pEngstate) kgraphicsStatePreInitLocked_DISPATCH(pGpu, pEngstate) 291 #define kgraphicsStatePreInitUnlocked(pGpu, pEngstate) kgraphicsStatePreInitUnlocked_DISPATCH(pGpu, pEngstate) 292 static inline NvBool kgraphicsShouldForceMainCtxContiguity_cbe027(OBJGPU *arg0, struct KernelGraphics *arg1) { 293 return ((NvBool)(0 == 0)); 294 } 295 296 297 #ifdef __nvoc_kernel_graphics_h_disabled 298 static inline NvBool kgraphicsShouldForceMainCtxContiguity(OBJGPU *arg0, struct KernelGraphics *arg1) { 299 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 300 return NV_FALSE; 301 } 302 #else //__nvoc_kernel_graphics_h_disabled 303 #define kgraphicsShouldForceMainCtxContiguity(arg0, arg1) kgraphicsShouldForceMainCtxContiguity_cbe027(arg0, arg1) 304 #endif //__nvoc_kernel_graphics_h_disabled 305 306 #define kgraphicsShouldForceMainCtxContiguity_HAL(arg0, arg1) kgraphicsShouldForceMainCtxContiguity(arg0, arg1) 307 308 NV_STATUS kgraphicsAllocKgraphicsBuffers_KERNEL(OBJGPU *arg0, struct KernelGraphics *arg1, struct KernelGraphicsContext *arg2, struct KernelChannel *arg3); 309 310 311 #ifdef __nvoc_kernel_graphics_h_disabled 312 static inline NV_STATUS kgraphicsAllocKgraphicsBuffers(OBJGPU *arg0, struct KernelGraphics *arg1, struct KernelGraphicsContext *arg2, struct KernelChannel *arg3) { 313 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 314 return NV_ERR_NOT_SUPPORTED; 315 } 316 #else //__nvoc_kernel_graphics_h_disabled 317 #define kgraphicsAllocKgraphicsBuffers(arg0, arg1, arg2, arg3) kgraphicsAllocKgraphicsBuffers_KERNEL(arg0, arg1, arg2, arg3) 318 #endif //__nvoc_kernel_graphics_h_disabled 319 320 #define kgraphicsAllocKgraphicsBuffers_HAL(arg0, arg1, arg2, arg3) kgraphicsAllocKgraphicsBuffers(arg0, arg1, arg2, arg3) 321 322 NV_STATUS kgraphicsAllocGrGlobalCtxBuffers_TU102(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 gfid, struct KernelGraphicsContext *arg2); 323 324 325 #ifdef __nvoc_kernel_graphics_h_disabled 326 static inline NV_STATUS kgraphicsAllocGrGlobalCtxBuffers(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 gfid, struct KernelGraphicsContext *arg2) { 327 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 328 return NV_ERR_NOT_SUPPORTED; 329 } 330 #else //__nvoc_kernel_graphics_h_disabled 331 #define kgraphicsAllocGrGlobalCtxBuffers(arg0, arg1, gfid, arg2) kgraphicsAllocGrGlobalCtxBuffers_TU102(arg0, arg1, gfid, arg2) 332 #endif //__nvoc_kernel_graphics_h_disabled 333 334 #define kgraphicsAllocGrGlobalCtxBuffers_HAL(arg0, arg1, gfid, arg2) kgraphicsAllocGrGlobalCtxBuffers(arg0, arg1, gfid, arg2) 335 336 NV_STATUS kgraphicsAllocGlobalCtxBuffers_GP100(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 gfid); 337 338 339 #ifdef __nvoc_kernel_graphics_h_disabled 340 static inline NV_STATUS kgraphicsAllocGlobalCtxBuffers(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 gfid) { 341 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 342 return NV_ERR_NOT_SUPPORTED; 343 } 344 #else //__nvoc_kernel_graphics_h_disabled 345 #define kgraphicsAllocGlobalCtxBuffers(arg0, arg1, gfid) kgraphicsAllocGlobalCtxBuffers_GP100(arg0, arg1, gfid) 346 #endif //__nvoc_kernel_graphics_h_disabled 347 348 #define kgraphicsAllocGlobalCtxBuffers_HAL(arg0, arg1, gfid) kgraphicsAllocGlobalCtxBuffers(arg0, arg1, gfid) 349 350 NV_STATUS kgraphicsLoadStaticInfo_KERNEL(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 swizzId); 351 352 353 #ifdef __nvoc_kernel_graphics_h_disabled 354 static inline NV_STATUS kgraphicsLoadStaticInfo(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 swizzId) { 355 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 356 return NV_ERR_NOT_SUPPORTED; 357 } 358 #else //__nvoc_kernel_graphics_h_disabled 359 #define kgraphicsLoadStaticInfo(arg0, arg1, swizzId) kgraphicsLoadStaticInfo_KERNEL(arg0, arg1, swizzId) 360 #endif //__nvoc_kernel_graphics_h_disabled 361 362 #define kgraphicsLoadStaticInfo_HAL(arg0, arg1, swizzId) kgraphicsLoadStaticInfo(arg0, arg1, swizzId) 363 364 static inline void kgraphicsNonstallIntrCheckAndClear_b3696a(OBJGPU *arg0, struct KernelGraphics *arg1, struct THREAD_STATE_NODE *arg2) { 365 return; 366 } 367 368 369 #ifdef __nvoc_kernel_graphics_h_disabled 370 static inline void kgraphicsNonstallIntrCheckAndClear(OBJGPU *arg0, struct KernelGraphics *arg1, struct THREAD_STATE_NODE *arg2) { 371 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 372 } 373 #else //__nvoc_kernel_graphics_h_disabled 374 #define kgraphicsNonstallIntrCheckAndClear(arg0, arg1, arg2) kgraphicsNonstallIntrCheckAndClear_b3696a(arg0, arg1, arg2) 375 #endif //__nvoc_kernel_graphics_h_disabled 376 377 #define kgraphicsNonstallIntrCheckAndClear_HAL(arg0, arg1, arg2) kgraphicsNonstallIntrCheckAndClear(arg0, arg1, arg2) 378 379 void kgraphicsInitFecsRegistryOverrides_GP100(OBJGPU *arg0, struct KernelGraphics *arg1); 380 381 382 #ifdef __nvoc_kernel_graphics_h_disabled 383 static inline void kgraphicsInitFecsRegistryOverrides(OBJGPU *arg0, struct KernelGraphics *arg1) { 384 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 385 } 386 #else //__nvoc_kernel_graphics_h_disabled 387 #define kgraphicsInitFecsRegistryOverrides(arg0, arg1) kgraphicsInitFecsRegistryOverrides_GP100(arg0, arg1) 388 #endif //__nvoc_kernel_graphics_h_disabled 389 390 #define kgraphicsInitFecsRegistryOverrides_HAL(arg0, arg1) kgraphicsInitFecsRegistryOverrides(arg0, arg1) 391 392 NvBool kgraphicsIsUnrestrictedAccessMapSupported_PF(OBJGPU *arg0, struct KernelGraphics *arg1); 393 394 395 #ifdef __nvoc_kernel_graphics_h_disabled 396 static inline NvBool kgraphicsIsUnrestrictedAccessMapSupported(OBJGPU *arg0, struct KernelGraphics *arg1) { 397 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 398 return NV_FALSE; 399 } 400 #else //__nvoc_kernel_graphics_h_disabled 401 #define kgraphicsIsUnrestrictedAccessMapSupported(arg0, arg1) kgraphicsIsUnrestrictedAccessMapSupported_PF(arg0, arg1) 402 #endif //__nvoc_kernel_graphics_h_disabled 403 404 #define kgraphicsIsUnrestrictedAccessMapSupported_HAL(arg0, arg1) kgraphicsIsUnrestrictedAccessMapSupported(arg0, arg1) 405 406 NV_STATUS kgraphicsConstructEngine_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, ENGDESCRIPTOR arg2); 407 408 static inline NV_STATUS kgraphicsConstructEngine_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1, ENGDESCRIPTOR arg2) { 409 return arg1->__kgraphicsConstructEngine__(arg0, arg1, arg2); 410 } 411 412 NV_STATUS kgraphicsStateInitLocked_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 413 414 static inline NV_STATUS kgraphicsStateInitLocked_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1) { 415 return arg1->__kgraphicsStateInitLocked__(arg0, arg1); 416 } 417 418 NV_STATUS kgraphicsStateLoad_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 flags); 419 420 static inline NV_STATUS kgraphicsStateLoad_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 flags) { 421 return arg1->__kgraphicsStateLoad__(arg0, arg1, flags); 422 } 423 424 NV_STATUS kgraphicsStatePreUnload_IMPL(OBJGPU *pGpu, struct KernelGraphics *arg0, NvU32 flags); 425 426 static inline NV_STATUS kgraphicsStatePreUnload_DISPATCH(OBJGPU *pGpu, struct KernelGraphics *arg0, NvU32 flags) { 427 return arg0->__kgraphicsStatePreUnload__(pGpu, arg0, flags); 428 } 429 430 NV_STATUS kgraphicsStateUnload_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 flags); 431 432 static inline NV_STATUS kgraphicsStateUnload_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 flags) { 433 return arg1->__kgraphicsStateUnload__(arg0, arg1, flags); 434 } 435 436 void kgraphicsStateDestroy_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 437 438 static inline void kgraphicsStateDestroy_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1) { 439 arg1->__kgraphicsStateDestroy__(arg0, arg1); 440 } 441 442 NvBool kgraphicsIsPresent_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 443 444 static inline NvBool kgraphicsIsPresent_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1) { 445 return arg1->__kgraphicsIsPresent__(arg0, arg1); 446 } 447 448 NV_STATUS kgraphicsStatePostLoad_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 flags); 449 450 static inline NV_STATUS kgraphicsStatePostLoad_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 flags) { 451 return arg1->__kgraphicsStatePostLoad__(arg0, arg1, flags); 452 } 453 454 void kgraphicsRegisterIntrService_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, IntrServiceRecord arg2[167]); 455 456 static inline void kgraphicsRegisterIntrService_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1, IntrServiceRecord arg2[167]) { 457 arg1->__kgraphicsRegisterIntrService__(arg0, arg1, arg2); 458 } 459 460 NV_STATUS kgraphicsServiceNotificationInterrupt_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, IntrServiceServiceNotificationInterruptArguments *arg2); 461 462 static inline NV_STATUS kgraphicsServiceNotificationInterrupt_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1, IntrServiceServiceNotificationInterruptArguments *arg2) { 463 return arg1->__kgraphicsServiceNotificationInterrupt__(arg0, arg1, arg2); 464 } 465 466 NvBool kgraphicsClearInterrupt_GP100(OBJGPU *arg0, struct KernelGraphics *arg1, IntrServiceClearInterruptArguments *arg2); 467 468 static inline NvBool kgraphicsClearInterrupt_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1, IntrServiceClearInterruptArguments *arg2) { 469 return arg1->__kgraphicsClearInterrupt__(arg0, arg1, arg2); 470 } 471 472 NvU32 kgraphicsServiceInterrupt_GP100(OBJGPU *arg0, struct KernelGraphics *arg1, IntrServiceServiceInterruptArguments *arg2); 473 474 static inline NvU32 kgraphicsServiceInterrupt_DISPATCH(OBJGPU *arg0, struct KernelGraphics *arg1, IntrServiceServiceInterruptArguments *arg2) { 475 return arg1->__kgraphicsServiceInterrupt__(arg0, arg1, arg2); 476 } 477 478 static inline NV_STATUS kgraphicsStatePreLoad_DISPATCH(POBJGPU pGpu, struct KernelGraphics *pEngstate, NvU32 arg0) { 479 return pEngstate->__kgraphicsStatePreLoad__(pGpu, pEngstate, arg0); 480 } 481 482 static inline NV_STATUS kgraphicsStatePostUnload_DISPATCH(POBJGPU pGpu, struct KernelGraphics *pEngstate, NvU32 arg0) { 483 return pEngstate->__kgraphicsStatePostUnload__(pGpu, pEngstate, arg0); 484 } 485 486 static inline NV_STATUS kgraphicsStateInitUnlocked_DISPATCH(POBJGPU pGpu, struct KernelGraphics *pEngstate) { 487 return pEngstate->__kgraphicsStateInitUnlocked__(pGpu, pEngstate); 488 } 489 490 static inline void kgraphicsInitMissing_DISPATCH(POBJGPU pGpu, struct KernelGraphics *pEngstate) { 491 pEngstate->__kgraphicsInitMissing__(pGpu, pEngstate); 492 } 493 494 static inline NV_STATUS kgraphicsStatePreInitLocked_DISPATCH(POBJGPU pGpu, struct KernelGraphics *pEngstate) { 495 return pEngstate->__kgraphicsStatePreInitLocked__(pGpu, pEngstate); 496 } 497 498 static inline NV_STATUS kgraphicsStatePreInitUnlocked_DISPATCH(POBJGPU pGpu, struct KernelGraphics *pEngstate) { 499 return pEngstate->__kgraphicsStatePreInitUnlocked__(pGpu, pEngstate); 500 } 501 502 static inline KGRAPHICS_FECS_TRACE_INFO *kgraphicsGetFecsTraceInfo(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 503 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 504 return pKernelGraphics_PRIVATE->pFecsTraceInfo; 505 } 506 507 static inline NvU32 kgraphicsGetInstance(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 508 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 509 return pKernelGraphics_PRIVATE->instance; 510 } 511 512 static inline NvBool kgraphicsIsCtxswLoggingSupported(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 513 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 514 return pKernelGraphics_PRIVATE->bCtxswLoggingSupported; 515 } 516 517 static inline void kgraphicsSetCtxswLoggingSupported(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics, NvBool bProp) { 518 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 519 pKernelGraphics_PRIVATE->bCtxswLoggingSupported = bProp; 520 } 521 522 static inline NvBool kgraphicsIsIntrDrivenCtxswLoggingEnabled(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 523 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 524 return pKernelGraphics_PRIVATE->bIntrDrivenCtxswLoggingEnabled; 525 } 526 527 static inline void kgraphicsSetIntrDrivenCtxswLoggingEnabled(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics, NvBool bProp) { 528 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 529 pKernelGraphics_PRIVATE->bIntrDrivenCtxswLoggingEnabled = bProp; 530 } 531 532 static inline NvBool kgraphicsIsBottomHalfCtxswLoggingEnabled(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 533 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 534 return pKernelGraphics_PRIVATE->bBottomHalfCtxswLoggingEnabled; 535 } 536 537 static inline void kgraphicsSetBottomHalfCtxswLoggingEnabled(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics, NvBool bProp) { 538 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 539 pKernelGraphics_PRIVATE->bBottomHalfCtxswLoggingEnabled = bProp; 540 } 541 542 static inline NvBool kgraphicsShouldDeferContextInit(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 543 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 544 return pKernelGraphics_PRIVATE->bDeferContextInit; 545 } 546 547 static inline NvBool kgraphicsIsPerSubcontextContextHeaderSupported(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 548 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 549 return pKernelGraphics_PRIVATE->bPerSubcontextContextHeaderSupported; 550 } 551 552 static inline void kgraphicsSetPerSubcontextContextHeaderSupported(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics, NvBool bProp) { 553 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 554 pKernelGraphics_PRIVATE->bPerSubcontextContextHeaderSupported = bProp; 555 } 556 557 static inline NvBool kgraphicsShouldSetContextBuffersGPUPrivileged(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 558 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 559 return pKernelGraphics_PRIVATE->bSetContextBuffersGPUPrivileged; 560 } 561 562 static inline NvBool kgraphicsDoesUcodeSupportPrivAccessMap(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 563 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 564 return pKernelGraphics_PRIVATE->bUcodeSupportsPrivAccessMap; 565 } 566 567 static inline NvBool kgraphicsIsRtvCbSupported(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 568 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 569 return pKernelGraphics_PRIVATE->bRtvCbSupported; 570 } 571 572 static inline NvBool kgraphicsIsFecsRecordUcodeSeqnoSupported(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 573 struct KernelGraphics_PRIVATE *pKernelGraphics_PRIVATE = (struct KernelGraphics_PRIVATE *)pKernelGraphics; 574 return pKernelGraphics_PRIVATE->bFecsRecordUcodeSeqnoSupported; 575 } 576 577 void kgraphicsDestruct_IMPL(struct KernelGraphics *arg0); 578 579 #define __nvoc_kgraphicsDestruct(arg0) kgraphicsDestruct_IMPL(arg0) 580 void kgraphicsInvalidateStaticInfo_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 581 582 #ifdef __nvoc_kernel_graphics_h_disabled 583 static inline void kgraphicsInvalidateStaticInfo(OBJGPU *arg0, struct KernelGraphics *arg1) { 584 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 585 } 586 #else //__nvoc_kernel_graphics_h_disabled 587 #define kgraphicsInvalidateStaticInfo(arg0, arg1) kgraphicsInvalidateStaticInfo_IMPL(arg0, arg1) 588 #endif //__nvoc_kernel_graphics_h_disabled 589 590 const CTX_BUF_INFO *kgraphicsGetCtxBufferInfo_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, GR_CTX_BUFFER arg2); 591 592 #ifdef __nvoc_kernel_graphics_h_disabled 593 static inline const CTX_BUF_INFO *kgraphicsGetCtxBufferInfo(OBJGPU *arg0, struct KernelGraphics *arg1, GR_CTX_BUFFER arg2) { 594 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 595 return NULL; 596 } 597 #else //__nvoc_kernel_graphics_h_disabled 598 #define kgraphicsGetCtxBufferInfo(arg0, arg1, arg2) kgraphicsGetCtxBufferInfo_IMPL(arg0, arg1, arg2) 599 #endif //__nvoc_kernel_graphics_h_disabled 600 601 void kgraphicsSetCtxBufferInfo_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, GR_CTX_BUFFER arg2, NvU64 size, NvU64 align, RM_ATTR_PAGE_SIZE attr, NvBool bContiguous); 602 603 #ifdef __nvoc_kernel_graphics_h_disabled 604 static inline void kgraphicsSetCtxBufferInfo(OBJGPU *arg0, struct KernelGraphics *arg1, GR_CTX_BUFFER arg2, NvU64 size, NvU64 align, RM_ATTR_PAGE_SIZE attr, NvBool bContiguous) { 605 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 606 } 607 #else //__nvoc_kernel_graphics_h_disabled 608 #define kgraphicsSetCtxBufferInfo(arg0, arg1, arg2, size, align, attr, bContiguous) kgraphicsSetCtxBufferInfo_IMPL(arg0, arg1, arg2, size, align, attr, bContiguous) 609 #endif //__nvoc_kernel_graphics_h_disabled 610 611 void kgraphicsClearCtxBufferInfo_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 612 613 #ifdef __nvoc_kernel_graphics_h_disabled 614 static inline void kgraphicsClearCtxBufferInfo(OBJGPU *arg0, struct KernelGraphics *arg1) { 615 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 616 } 617 #else //__nvoc_kernel_graphics_h_disabled 618 #define kgraphicsClearCtxBufferInfo(arg0, arg1) kgraphicsClearCtxBufferInfo_IMPL(arg0, arg1) 619 #endif //__nvoc_kernel_graphics_h_disabled 620 621 NV_STATUS kgraphicsInitCtxBufPool_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, struct Heap *arg2); 622 623 #ifdef __nvoc_kernel_graphics_h_disabled 624 static inline NV_STATUS kgraphicsInitCtxBufPool(OBJGPU *arg0, struct KernelGraphics *arg1, struct Heap *arg2) { 625 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 626 return NV_ERR_NOT_SUPPORTED; 627 } 628 #else //__nvoc_kernel_graphics_h_disabled 629 #define kgraphicsInitCtxBufPool(arg0, arg1, arg2) kgraphicsInitCtxBufPool_IMPL(arg0, arg1, arg2) 630 #endif //__nvoc_kernel_graphics_h_disabled 631 632 struct CTX_BUF_POOL_INFO *kgraphicsGetCtxBufPool_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 633 634 #ifdef __nvoc_kernel_graphics_h_disabled 635 static inline struct CTX_BUF_POOL_INFO *kgraphicsGetCtxBufPool(OBJGPU *arg0, struct KernelGraphics *arg1) { 636 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 637 return NULL; 638 } 639 #else //__nvoc_kernel_graphics_h_disabled 640 #define kgraphicsGetCtxBufPool(arg0, arg1) kgraphicsGetCtxBufPool_IMPL(arg0, arg1) 641 #endif //__nvoc_kernel_graphics_h_disabled 642 643 void kgraphicsDestroyCtxBufPool_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 644 645 #ifdef __nvoc_kernel_graphics_h_disabled 646 static inline void kgraphicsDestroyCtxBufPool(OBJGPU *arg0, struct KernelGraphics *arg1) { 647 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 648 } 649 #else //__nvoc_kernel_graphics_h_disabled 650 #define kgraphicsDestroyCtxBufPool(arg0, arg1) kgraphicsDestroyCtxBufPool_IMPL(arg0, arg1) 651 #endif //__nvoc_kernel_graphics_h_disabled 652 653 GR_GLOBALCTX_BUFFERS *kgraphicsGetGlobalCtxBuffers_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 gfid); 654 655 #ifdef __nvoc_kernel_graphics_h_disabled 656 static inline GR_GLOBALCTX_BUFFERS *kgraphicsGetGlobalCtxBuffers(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 gfid) { 657 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 658 return NULL; 659 } 660 #else //__nvoc_kernel_graphics_h_disabled 661 #define kgraphicsGetGlobalCtxBuffers(arg0, arg1, gfid) kgraphicsGetGlobalCtxBuffers_IMPL(arg0, arg1, gfid) 662 #endif //__nvoc_kernel_graphics_h_disabled 663 664 NvBool kgraphicsIsGlobalCtxBufferSizeAligned_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, GR_GLOBALCTX_BUFFER arg2); 665 666 #ifdef __nvoc_kernel_graphics_h_disabled 667 static inline NvBool kgraphicsIsGlobalCtxBufferSizeAligned(OBJGPU *arg0, struct KernelGraphics *arg1, GR_GLOBALCTX_BUFFER arg2) { 668 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 669 return NV_FALSE; 670 } 671 #else //__nvoc_kernel_graphics_h_disabled 672 #define kgraphicsIsGlobalCtxBufferSizeAligned(arg0, arg1, arg2) kgraphicsIsGlobalCtxBufferSizeAligned_IMPL(arg0, arg1, arg2) 673 #endif //__nvoc_kernel_graphics_h_disabled 674 675 const GR_BUFFER_ATTR *kgraphicsGetGlobalPrivAccessMapAttr_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 676 677 #ifdef __nvoc_kernel_graphics_h_disabled 678 static inline const GR_BUFFER_ATTR *kgraphicsGetGlobalPrivAccessMapAttr(OBJGPU *arg0, struct KernelGraphics *arg1) { 679 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 680 return NULL; 681 } 682 #else //__nvoc_kernel_graphics_h_disabled 683 #define kgraphicsGetGlobalPrivAccessMapAttr(arg0, arg1) kgraphicsGetGlobalPrivAccessMapAttr_IMPL(arg0, arg1) 684 #endif //__nvoc_kernel_graphics_h_disabled 685 686 NV_STATUS kgraphicsMapCtxBuffer_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, MEMORY_DESCRIPTOR *arg2, struct OBJVASPACE *arg3, VA_LIST *arg4, NvBool bAlignSize, NvBool bIsReadOnly); 687 688 #ifdef __nvoc_kernel_graphics_h_disabled 689 static inline NV_STATUS kgraphicsMapCtxBuffer(OBJGPU *arg0, struct KernelGraphics *arg1, MEMORY_DESCRIPTOR *arg2, struct OBJVASPACE *arg3, VA_LIST *arg4, NvBool bAlignSize, NvBool bIsReadOnly) { 690 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 691 return NV_ERR_NOT_SUPPORTED; 692 } 693 #else //__nvoc_kernel_graphics_h_disabled 694 #define kgraphicsMapCtxBuffer(arg0, arg1, arg2, arg3, arg4, bAlignSize, bIsReadOnly) kgraphicsMapCtxBuffer_IMPL(arg0, arg1, arg2, arg3, arg4, bAlignSize, bIsReadOnly) 695 #endif //__nvoc_kernel_graphics_h_disabled 696 697 void kgraphicsUnmapCtxBuffer_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, struct OBJVASPACE *arg2, VA_LIST *arg3); 698 699 #ifdef __nvoc_kernel_graphics_h_disabled 700 static inline void kgraphicsUnmapCtxBuffer(OBJGPU *arg0, struct KernelGraphics *arg1, struct OBJVASPACE *arg2, VA_LIST *arg3) { 701 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 702 } 703 #else //__nvoc_kernel_graphics_h_disabled 704 #define kgraphicsUnmapCtxBuffer(arg0, arg1, arg2, arg3) kgraphicsUnmapCtxBuffer_IMPL(arg0, arg1, arg2, arg3) 705 #endif //__nvoc_kernel_graphics_h_disabled 706 707 void kgraphicsFreeGlobalCtxBuffers_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 gfid); 708 709 #ifdef __nvoc_kernel_graphics_h_disabled 710 static inline void kgraphicsFreeGlobalCtxBuffers(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 gfid) { 711 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 712 } 713 #else //__nvoc_kernel_graphics_h_disabled 714 #define kgraphicsFreeGlobalCtxBuffers(arg0, arg1, gfid) kgraphicsFreeGlobalCtxBuffers_IMPL(arg0, arg1, gfid) 715 #endif //__nvoc_kernel_graphics_h_disabled 716 717 NV_STATUS kgraphicsGetMainCtxBufferSize_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, NvBool bIncludeSubctxHdrs, NvU32 *pSize); 718 719 #ifdef __nvoc_kernel_graphics_h_disabled 720 static inline NV_STATUS kgraphicsGetMainCtxBufferSize(OBJGPU *arg0, struct KernelGraphics *arg1, NvBool bIncludeSubctxHdrs, NvU32 *pSize) { 721 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 722 return NV_ERR_NOT_SUPPORTED; 723 } 724 #else //__nvoc_kernel_graphics_h_disabled 725 #define kgraphicsGetMainCtxBufferSize(arg0, arg1, bIncludeSubctxHdrs, pSize) kgraphicsGetMainCtxBufferSize_IMPL(arg0, arg1, bIncludeSubctxHdrs, pSize) 726 #endif //__nvoc_kernel_graphics_h_disabled 727 728 NV_STATUS kgraphicsGetClassByType_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 objectType, NvU32 *pClass); 729 730 #ifdef __nvoc_kernel_graphics_h_disabled 731 static inline NV_STATUS kgraphicsGetClassByType(OBJGPU *arg0, struct KernelGraphics *arg1, NvU32 objectType, NvU32 *pClass) { 732 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 733 return NV_ERR_NOT_SUPPORTED; 734 } 735 #else //__nvoc_kernel_graphics_h_disabled 736 #define kgraphicsGetClassByType(arg0, arg1, objectType, pClass) kgraphicsGetClassByType_IMPL(arg0, arg1, objectType, pClass) 737 #endif //__nvoc_kernel_graphics_h_disabled 738 739 const GR_BUFFER_ATTR *kgraphicsGetContextBufferAttr_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, GR_CTX_BUFFER arg2); 740 741 #ifdef __nvoc_kernel_graphics_h_disabled 742 static inline const GR_BUFFER_ATTR *kgraphicsGetContextBufferAttr(OBJGPU *arg0, struct KernelGraphics *arg1, GR_CTX_BUFFER arg2) { 743 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 744 return NULL; 745 } 746 #else //__nvoc_kernel_graphics_h_disabled 747 #define kgraphicsGetContextBufferAttr(arg0, arg1, arg2) kgraphicsGetContextBufferAttr_IMPL(arg0, arg1, arg2) 748 #endif //__nvoc_kernel_graphics_h_disabled 749 750 NV_STATUS kgraphicsCreateGoldenImageChannel_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 751 752 #ifdef __nvoc_kernel_graphics_h_disabled 753 static inline NV_STATUS kgraphicsCreateGoldenImageChannel(OBJGPU *arg0, struct KernelGraphics *arg1) { 754 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 755 return NV_ERR_NOT_SUPPORTED; 756 } 757 #else //__nvoc_kernel_graphics_h_disabled 758 #define kgraphicsCreateGoldenImageChannel(arg0, arg1) kgraphicsCreateGoldenImageChannel_IMPL(arg0, arg1) 759 #endif //__nvoc_kernel_graphics_h_disabled 760 761 NvBool kgraphicsIsGFXSupported_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 762 763 #ifdef __nvoc_kernel_graphics_h_disabled 764 static inline NvBool kgraphicsIsGFXSupported(OBJGPU *arg0, struct KernelGraphics *arg1) { 765 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 766 return NV_FALSE; 767 } 768 #else //__nvoc_kernel_graphics_h_disabled 769 #define kgraphicsIsGFXSupported(arg0, arg1) kgraphicsIsGFXSupported_IMPL(arg0, arg1) 770 #endif //__nvoc_kernel_graphics_h_disabled 771 772 NV_STATUS kgraphicsDiscoverMaxLocalCtxBufferSize_IMPL(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics); 773 774 #ifdef __nvoc_kernel_graphics_h_disabled 775 static inline NV_STATUS kgraphicsDiscoverMaxLocalCtxBufferSize(OBJGPU *pGpu, struct KernelGraphics *pKernelGraphics) { 776 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 777 return NV_ERR_NOT_SUPPORTED; 778 } 779 #else //__nvoc_kernel_graphics_h_disabled 780 #define kgraphicsDiscoverMaxLocalCtxBufferSize(pGpu, pKernelGraphics) kgraphicsDiscoverMaxLocalCtxBufferSize_IMPL(pGpu, pKernelGraphics) 781 #endif //__nvoc_kernel_graphics_h_disabled 782 783 NV_STATUS kgraphicsInitializeDeferredStaticData_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, NvHandle hClient, NvHandle hSubdevice); 784 785 #ifdef __nvoc_kernel_graphics_h_disabled 786 static inline NV_STATUS kgraphicsInitializeDeferredStaticData(OBJGPU *arg0, struct KernelGraphics *arg1, NvHandle hClient, NvHandle hSubdevice) { 787 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 788 return NV_ERR_NOT_SUPPORTED; 789 } 790 #else //__nvoc_kernel_graphics_h_disabled 791 #define kgraphicsInitializeDeferredStaticData(arg0, arg1, hClient, hSubdevice) kgraphicsInitializeDeferredStaticData_IMPL(arg0, arg1, hClient, hSubdevice) 792 #endif //__nvoc_kernel_graphics_h_disabled 793 794 const struct KGRAPHICS_STATIC_INFO *kgraphicsGetStaticInfo_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1); 795 796 #ifdef __nvoc_kernel_graphics_h_disabled 797 static inline const struct KGRAPHICS_STATIC_INFO *kgraphicsGetStaticInfo(OBJGPU *arg0, struct KernelGraphics *arg1) { 798 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 799 return NULL; 800 } 801 #else //__nvoc_kernel_graphics_h_disabled 802 #define kgraphicsGetStaticInfo(arg0, arg1) kgraphicsGetStaticInfo_IMPL(arg0, arg1) 803 #endif //__nvoc_kernel_graphics_h_disabled 804 805 NV_STATUS kgraphicsGetCaps_IMPL(OBJGPU *arg0, struct KernelGraphics *arg1, NvU8 *pGrCaps); 806 807 #ifdef __nvoc_kernel_graphics_h_disabled 808 static inline NV_STATUS kgraphicsGetCaps(OBJGPU *arg0, struct KernelGraphics *arg1, NvU8 *pGrCaps) { 809 NV_ASSERT_FAILED_PRECOMP("KernelGraphics was disabled!"); 810 return NV_ERR_NOT_SUPPORTED; 811 } 812 #else //__nvoc_kernel_graphics_h_disabled 813 #define kgraphicsGetCaps(arg0, arg1, pGrCaps) kgraphicsGetCaps_IMPL(arg0, arg1, pGrCaps) 814 #endif //__nvoc_kernel_graphics_h_disabled 815 816 #undef PRIVATE_FIELD 817 818 819 #endif // _KERNEL_GRAPHICS_H_ 820 821 #ifdef __cplusplus 822 } // extern "C" 823 #endif 824 #endif // _G_KERNEL_GRAPHICS_NVOC_H_ 825