1 #ifndef _G_KERNEL_CHANNEL_NVOC_H_ 2 #define _G_KERNEL_CHANNEL_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_channel_nvoc.h" 33 34 #ifndef KERNEL_CHANNEL_H 35 #define KERNEL_CHANNEL_H 36 37 #include "core/core.h" 38 #include "os/os.h" 39 #include "resserv/resserv.h" 40 #include "nvoc/prelude.h" 41 #include "gpu/gpu_resource.h" 42 #include "kernel/gpu/gpu_engine_type.h" 43 #include "kernel/gpu/fifo/kernel_ctxshare.h" 44 #include "kernel/gpu/fifo/kernel_fifo.h" 45 #include "kernel/gpu/gr/kernel_graphics_context.h" 46 #include "kernel/gpu/intr/intr_service.h" 47 #include "kernel/gpu/mig_mgr/kernel_mig_manager.h" 48 49 #include "ctrl/ctrl0090.h" 50 #include "ctrl/ctrl208f/ctrl208ffifo.h" 51 #include "ctrl/ctrl506f.h" 52 #include "ctrl/ctrl906f.h" 53 #include "ctrl/ctrla06f.h" 54 #include "ctrl/ctrla16f.h" 55 #include "ctrl/ctrla26f.h" 56 #include "ctrl/ctrlb06f.h" 57 #include "ctrl/ctrlc06f.h" 58 #include "ctrl/ctrlc36f.h" 59 #include "ctrl/ctrlc56f.h" 60 61 #include "cc_drv.h" 62 63 struct OBJGPU; 64 65 #ifndef __NVOC_CLASS_OBJGPU_TYPEDEF__ 66 #define __NVOC_CLASS_OBJGPU_TYPEDEF__ 67 typedef struct OBJGPU OBJGPU; 68 #endif /* __NVOC_CLASS_OBJGPU_TYPEDEF__ */ 69 70 #ifndef __nvoc_class_id_OBJGPU 71 #define __nvoc_class_id_OBJGPU 0x7ef3cb 72 #endif /* __nvoc_class_id_OBJGPU */ 73 74 75 struct UserInfo; 76 77 #ifndef __NVOC_CLASS_UserInfo_TYPEDEF__ 78 #define __NVOC_CLASS_UserInfo_TYPEDEF__ 79 typedef struct UserInfo UserInfo; 80 #endif /* __NVOC_CLASS_UserInfo_TYPEDEF__ */ 81 82 #ifndef __nvoc_class_id_UserInfo 83 #define __nvoc_class_id_UserInfo 0x21d236 84 #endif /* __nvoc_class_id_UserInfo */ 85 86 87 /*! 88 * @brief Type of hErrorContext or hEccErrorContext 89 * 90 * This is RPCed to GSP in #NV_CHANNEL_ALLOC_PARAMS.internalFlags 91 * along with the actual memdesc in 92 * #NV_CHANNEL_ALLOC_PARAMS.errorNotifierMem and 93 * #NV_CHANNEL_ALLOC_PARAMS.eccErrorNotifierMem. 94 */ 95 typedef enum { 96 /*! 97 * Initial state as passed in NV_CHANNEL_ALLOC_PARAMS by 98 * kernel CPU-RM clients. 99 */ 100 ERROR_NOTIFIER_TYPE_UNKNOWN = 0, 101 /*! @brief Error notifier is explicitly not set. 102 * 103 * The corresponding hErrorContext or hEccErrorContext must be 104 * NV01_NULL_OBJECT. 105 */ 106 ERROR_NOTIFIER_TYPE_NONE, 107 /*! @brief Error notifier is a ContextDma */ 108 ERROR_NOTIFIER_TYPE_CTXDMA, 109 /*! @brief Error notifier is a NvNotification array in sysmem/vidmem */ 110 ERROR_NOTIFIER_TYPE_MEMORY 111 } ErrorNotifierType; 112 113 // 114 // Iterates over the ChannelDescendants on a channel 115 // Uses an RS_ORDERED_ITERATOR and filters it by EngineID / ClassID 116 // 117 typedef struct { 118 RS_ORDERED_ITERATOR rsIter; 119 RM_ENGINE_TYPE engineID; 120 NvU32 classID; 121 } KernelChannelChildIterator; 122 123 typedef enum 124 { 125 CHANNEL_CLASS_TYPE_DMA, 126 CHANNEL_CLASS_TYPE_GPFIFO, 127 } CHANNEL_CLASS_TYPE; 128 129 // 130 // Channel class info structure. 131 // 132 // Filled in by CliGetChannelClassInfo() routine. 133 // 134 typedef struct 135 { 136 NvU32 notifiersMaxCount; // max# of notifiers for class 137 NvU32 eventActionDisable; // event disable action cmd value 138 NvU32 eventActionSingle; // event single-shot enable action cmd value 139 NvU32 eventActionRepeat; // event repeat enable action cmd value 140 NvU32 rcNotifierIndex; // RC notifier index differs depending on the channel class 141 CHANNEL_CLASS_TYPE classType; 142 } CLI_CHANNEL_CLASS_INFO; 143 144 void CliGetChannelClassInfo(NvU32, CLI_CHANNEL_CLASS_INFO*); 145 146 /*! 147 * This structure represents an iterator for all objects 148 * with given class number or engine tag on a channel or TSG. 149 * It is created by function @ref kchannelGetChildIterOverGroup. 150 */ 151 typedef struct 152 { 153 NvU32 engDesc; 154 NvU32 classNum; 155 156 // 157 // During iteration, a copy of the current channel/TSG as well as the 158 // next object node to start iterating from is tracked. 159 // 160 CHANNEL_NODE channelNode; 161 KernelChannelChildIterator kchannelIter; 162 } KernelChannelChildIterOverGroup; 163 164 typedef struct _def_instance_block 165 { 166 MEMORY_DESCRIPTOR *pInstanceBlockDesc; 167 MEMORY_DESCRIPTOR *pRamfcDesc; 168 /*! 169 * Used only for Suspend Resume RM internal channel. 170 * Will be moved to the Host context RL infolist. 171 */ 172 MEMORY_DESCRIPTOR *pRLMemDesc; 173 } FIFO_INSTANCE_BLOCK; 174 175 /* Bitfields in NV_CHANNEL_ALLOC_PARAMS.internalFlags */ 176 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_PRIVILEGE 1:0 177 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_PRIVILEGE_USER 0x0 178 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_PRIVILEGE_ADMIN 0x1 179 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_PRIVILEGE_KERNEL 0x2 180 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_ERROR_NOTIFIER_TYPE 3:2 181 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_ERROR_NOTIFIER_TYPE_UNKNOWN ERROR_NOTIFIER_TYPE_UNKNOWN 182 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_ERROR_NOTIFIER_TYPE_NONE ERROR_NOTIFIER_TYPE_NONE 183 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_ERROR_NOTIFIER_TYPE_CTXDMA ERROR_NOTIFIER_TYPE_CTXDMA 184 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_ERROR_NOTIFIER_TYPE_MEMORY ERROR_NOTIFIER_TYPE_MEMORY 185 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_ECC_ERROR_NOTIFIER_TYPE 5:4 186 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_ECC_ERROR_NOTIFIER_TYPE_UNKNOWN ERROR_NOTIFIER_TYPE_UNKNOWN 187 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_ECC_ERROR_NOTIFIER_TYPE_NONE ERROR_NOTIFIER_TYPE_NONE 188 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_ECC_ERROR_NOTIFIER_TYPE_CTXDMA ERROR_NOTIFIER_TYPE_CTXDMA 189 #define NV_KERNELCHANNEL_ALLOC_INTERNALFLAGS_ECC_ERROR_NOTIFIER_TYPE_MEMORY ERROR_NOTIFIER_TYPE_MEMORY 190 191 /*! 192 * Class for the kernel side of a Channel object. 193 */ 194 #ifdef NVOC_KERNEL_CHANNEL_H_PRIVATE_ACCESS_ALLOWED 195 #define PRIVATE_FIELD(x) x 196 #else 197 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x) 198 #endif 199 struct KernelChannel { 200 const struct NVOC_RTTI *__nvoc_rtti; 201 struct GpuResource __nvoc_base_GpuResource; 202 struct Notifier __nvoc_base_Notifier; 203 struct Object *__nvoc_pbase_Object; 204 struct RsResource *__nvoc_pbase_RsResource; 205 struct RmResourceCommon *__nvoc_pbase_RmResourceCommon; 206 struct RmResource *__nvoc_pbase_RmResource; 207 struct GpuResource *__nvoc_pbase_GpuResource; 208 struct INotifier *__nvoc_pbase_INotifier; 209 struct Notifier *__nvoc_pbase_Notifier; 210 struct KernelChannel *__nvoc_pbase_KernelChannel; 211 NV_STATUS (*__kchannelMap__)(struct KernelChannel *, CALL_CONTEXT *, struct RS_CPU_MAP_PARAMS *, RsCpuMapping *); 212 NV_STATUS (*__kchannelUnmap__)(struct KernelChannel *, CALL_CONTEXT *, RsCpuMapping *); 213 NV_STATUS (*__kchannelGetMapAddrSpace__)(struct KernelChannel *, CALL_CONTEXT *, NvU32, NV_ADDRESS_SPACE *); 214 NV_STATUS (*__kchannelGetMemInterMapParams__)(struct KernelChannel *, RMRES_MEM_INTER_MAP_PARAMS *); 215 NV_STATUS (*__kchannelCheckMemInterUnmap__)(struct KernelChannel *, NvBool); 216 NV_STATUS (*__kchannelCreateUserMemDesc__)(struct OBJGPU *, struct KernelChannel *); 217 NvBool (*__kchannelIsUserdAddrSizeValid__)(struct KernelChannel *, NvU32, NvU32); 218 NV_STATUS (*__kchannelCtrlCmdResetIsolatedChannel__)(struct KernelChannel *, NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL_PARAMS *); 219 NV_STATUS (*__kchannelCtrlCmdGetClassEngineid__)(struct KernelChannel *, NV906F_CTRL_GET_CLASS_ENGINEID_PARAMS *); 220 NV_STATUS (*__kchannelCtrlCmdResetChannel__)(struct KernelChannel *, NV906F_CTRL_CMD_RESET_CHANNEL_PARAMS *); 221 NV_STATUS (*__kchannelCtrlCmdGetDeferRCState__)(struct KernelChannel *, NV906F_CTRL_CMD_GET_DEFER_RC_STATE_PARAMS *); 222 NV_STATUS (*__kchannelCtrlCmdGetMmuFaultInfo__)(struct KernelChannel *, NV906F_CTRL_GET_MMU_FAULT_INFO_PARAMS *); 223 NV_STATUS (*__kchannelCtrlCmdEventSetNotification__)(struct KernelChannel *, NV906F_CTRL_EVENT_SET_NOTIFICATION_PARAMS *); 224 NV_STATUS (*__kchannelCtrlCmdGetClassEngineidA06F__)(struct KernelChannel *, NVA06F_CTRL_GET_CLASS_ENGINEID_PARAMS *); 225 NV_STATUS (*__kchannelCtrlCmdResetChannelA06F__)(struct KernelChannel *, NVA06F_CTRL_CMD_RESET_CHANNEL_PARAMS *); 226 NV_STATUS (*__kchannelCtrlCmdGpFifoSchedule__)(struct KernelChannel *, NVA06F_CTRL_GPFIFO_SCHEDULE_PARAMS *); 227 NV_STATUS (*__kchannelCtrlCmdBind__)(struct KernelChannel *, NVA06F_CTRL_BIND_PARAMS *); 228 NV_STATUS (*__kchannelCtrlCmdGetMmuFaultInfoA06F__)(struct KernelChannel *, NVA06F_CTRL_GET_MMU_FAULT_INFO_PARAMS *); 229 NV_STATUS (*__kchannelCtrlCmdSetErrorNotifier__)(struct KernelChannel *, NVA06F_CTRL_SET_ERROR_NOTIFIER_PARAMS *); 230 NV_STATUS (*__kchannelCtrlCmdSetInterleaveLevel__)(struct KernelChannel *, NVA06F_CTRL_INTERLEAVE_LEVEL_PARAMS *); 231 NV_STATUS (*__kchannelCtrlCmdRestartRunlist__)(struct KernelChannel *, NVA06F_CTRL_RESTART_RUNLIST_PARAMS *); 232 NV_STATUS (*__kchannelCtrlCmdGetClassEngineidA16F__)(struct KernelChannel *, NVA16F_CTRL_GET_CLASS_ENGINEID_PARAMS *); 233 NV_STATUS (*__kchannelCtrlCmdResetChannelA16F__)(struct KernelChannel *, NVA16F_CTRL_CMD_RESET_CHANNEL_PARAMS *); 234 NV_STATUS (*__kchannelCtrlCmdGpFifoScheduleA16F__)(struct KernelChannel *, NVA16F_CTRL_GPFIFO_SCHEDULE_PARAMS *); 235 NV_STATUS (*__kchannelCtrlCmdGetClassEngineidA26F__)(struct KernelChannel *, NVA26F_CTRL_GET_CLASS_ENGINEID_PARAMS *); 236 NV_STATUS (*__kchannelCtrlCmdResetChannelA26F__)(struct KernelChannel *, NVA26F_CTRL_CMD_RESET_CHANNEL_PARAMS *); 237 NV_STATUS (*__kchannelFCtrlCmdGpFifoScheduleA26F__)(struct KernelChannel *, NVA26F_CTRL_GPFIFO_SCHEDULE_PARAMS *); 238 NV_STATUS (*__kchannelCtrlCmdGetClassEngineidB06F__)(struct KernelChannel *, NVB06F_CTRL_GET_CLASS_ENGINEID_PARAMS *); 239 NV_STATUS (*__kchannelCtrlCmdResetChannelB06F__)(struct KernelChannel *, NVB06F_CTRL_CMD_RESET_CHANNEL_PARAMS *); 240 NV_STATUS (*__kchannelCtrlCmdGpFifoScheduleB06F__)(struct KernelChannel *, NVB06F_CTRL_GPFIFO_SCHEDULE_PARAMS *); 241 NV_STATUS (*__kchannelCtrlCmdBindB06F__)(struct KernelChannel *, NVB06F_CTRL_BIND_PARAMS *); 242 NV_STATUS (*__kchannelCtrlCmdGetEngineCtxSize__)(struct KernelChannel *, NVB06F_CTRL_GET_ENGINE_CTX_SIZE_PARAMS *); 243 NV_STATUS (*__kchannelCtrlCmdGetEngineCtxData__)(struct KernelChannel *, NVB06F_CTRL_GET_ENGINE_CTX_DATA_PARAMS *); 244 NV_STATUS (*__kchannelCtrlCmdMigrateEngineCtxData__)(struct KernelChannel *, NVB06F_CTRL_MIGRATE_ENGINE_CTX_DATA_PARAMS *); 245 NV_STATUS (*__kchannelCtrlCmdGetEngineCtxState__)(struct KernelChannel *, NVB06F_CTRL_GET_ENGINE_CTX_STATE_PARAMS *); 246 NV_STATUS (*__kchannelCtrlCmdGetChannelHwState__)(struct KernelChannel *, NVB06F_CTRL_GET_CHANNEL_HW_STATE_PARAMS *); 247 NV_STATUS (*__kchannelCtrlCmdSetChannelHwState__)(struct KernelChannel *, NVB06F_CTRL_SET_CHANNEL_HW_STATE_PARAMS *); 248 NV_STATUS (*__kchannelCtrlCmdSaveEngineCtxData__)(struct KernelChannel *, NVB06F_CTRL_SAVE_ENGINE_CTX_DATA_PARAMS *); 249 NV_STATUS (*__kchannelCtrlCmdRestoreEngineCtxData__)(struct KernelChannel *, NVB06F_CTRL_RESTORE_ENGINE_CTX_DATA_PARAMS *); 250 NV_STATUS (*__kchannelCtrlCmdGetClassEngineidC06F__)(struct KernelChannel *, NVC06F_CTRL_GET_CLASS_ENGINEID_PARAMS *); 251 NV_STATUS (*__kchannelCtrlCmdResetChannelC06F__)(struct KernelChannel *, NVC06F_CTRL_CMD_RESET_CHANNEL_PARAMS *); 252 NV_STATUS (*__kchannelCtrlCmdGpFifoScheduleC06F__)(struct KernelChannel *, NVC06F_CTRL_GPFIFO_SCHEDULE_PARAMS *); 253 NV_STATUS (*__kchannelCtrlCmdBindC06F__)(struct KernelChannel *, NVC06F_CTRL_BIND_PARAMS *); 254 NV_STATUS (*__kchannelCtrlCmdGetClassEngineidC36F__)(struct KernelChannel *, NVC36F_CTRL_GET_CLASS_ENGINEID_PARAMS *); 255 NV_STATUS (*__kchannelCtrlCmdResetChannelC36F__)(struct KernelChannel *, NVC36F_CTRL_CMD_RESET_CHANNEL_PARAMS *); 256 NV_STATUS (*__kchannelCtrlCmdGpFifoScheduleC36F__)(struct KernelChannel *, NVC36F_CTRL_GPFIFO_SCHEDULE_PARAMS *); 257 NV_STATUS (*__kchannelCtrlCmdBindC36F__)(struct KernelChannel *, NVC36F_CTRL_BIND_PARAMS *); 258 NV_STATUS (*__kchannelCtrlCmdGpfifoGetWorkSubmitToken__)(struct KernelChannel *, NVC36F_CTRL_CMD_GPFIFO_GET_WORK_SUBMIT_TOKEN_PARAMS *); 259 NV_STATUS (*__kchannelCtrlCmdGpfifoUpdateFaultMethodBuffer__)(struct KernelChannel *, NVC36F_CTRL_GPFIFO_UPDATE_FAULT_METHOD_BUFFER_PARAMS *); 260 NV_STATUS (*__kchannelCtrlCmdGpfifoSetWorkSubmitTokenNotifIndex__)(struct KernelChannel *, NVC36F_CTRL_GPFIFO_SET_WORK_SUBMIT_TOKEN_NOTIF_INDEX_PARAMS *); 261 NV_STATUS (*__kchannelCtrlCmdStopChannel__)(struct KernelChannel *, NVA06F_CTRL_STOP_CHANNEL_PARAMS *); 262 NV_STATUS (*__kchannelCtrlCmdGetKmb__)(struct KernelChannel *, NVC56F_CTRL_CMD_GET_KMB_PARAMS *); 263 NV_STATUS (*__kchannelCtrlRotateSecureChannelIv__)(struct KernelChannel *, NVC56F_CTRL_ROTATE_SECURE_CHANNEL_IV_PARAMS *); 264 NV_STATUS (*__kchannelCtrlGetTpcPartitionMode__)(struct KernelChannel *, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *); 265 NV_STATUS (*__kchannelCtrlSetTpcPartitionMode__)(struct KernelChannel *, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *); 266 NV_STATUS (*__kchannelCtrlGetMMUDebugMode__)(struct KernelChannel *, NV0090_CTRL_GET_MMU_DEBUG_MODE_PARAMS *); 267 NV_STATUS (*__kchannelCtrlProgramVidmemPromote__)(struct KernelChannel *, NV0090_CTRL_PROGRAM_VIDMEM_PROMOTE_PARAMS *); 268 NvBool (*__kchannelShareCallback__)(struct KernelChannel *, struct RsClient *, struct RsResourceRef *, RS_SHARE_POLICY *); 269 NV_STATUS (*__kchannelGetOrAllocNotifShare__)(struct KernelChannel *, NvHandle, NvHandle, struct NotifShare **); 270 NV_STATUS (*__kchannelMapTo__)(struct KernelChannel *, RS_RES_MAP_TO_PARAMS *); 271 void (*__kchannelSetNotificationShare__)(struct KernelChannel *, struct NotifShare *); 272 NvU32 (*__kchannelGetRefCount__)(struct KernelChannel *); 273 void (*__kchannelAddAdditionalDependants__)(struct RsClient *, struct KernelChannel *, RsResourceRef *); 274 NV_STATUS (*__kchannelControl_Prologue__)(struct KernelChannel *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 275 NV_STATUS (*__kchannelGetRegBaseOffsetAndSize__)(struct KernelChannel *, struct OBJGPU *, NvU32 *, NvU32 *); 276 NV_STATUS (*__kchannelInternalControlForward__)(struct KernelChannel *, NvU32, void *, NvU32); 277 NV_STATUS (*__kchannelUnmapFrom__)(struct KernelChannel *, RS_RES_UNMAP_FROM_PARAMS *); 278 void (*__kchannelControl_Epilogue__)(struct KernelChannel *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 279 NV_STATUS (*__kchannelControlLookup__)(struct KernelChannel *, struct RS_RES_CONTROL_PARAMS_INTERNAL *, const struct NVOC_EXPORTED_METHOD_DEF **); 280 NvHandle (*__kchannelGetInternalObjectHandle__)(struct KernelChannel *); 281 NV_STATUS (*__kchannelControl__)(struct KernelChannel *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 282 NV_STATUS (*__kchannelGetMemoryMappingDescriptor__)(struct KernelChannel *, struct MEMORY_DESCRIPTOR **); 283 NV_STATUS (*__kchannelControlFilter__)(struct KernelChannel *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 284 NV_STATUS (*__kchannelUnregisterEvent__)(struct KernelChannel *, NvHandle, NvHandle, NvHandle, NvHandle); 285 NV_STATUS (*__kchannelControlSerialization_Prologue__)(struct KernelChannel *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 286 NvBool (*__kchannelCanCopy__)(struct KernelChannel *); 287 void (*__kchannelPreDestruct__)(struct KernelChannel *); 288 NV_STATUS (*__kchannelIsDuplicate__)(struct KernelChannel *, NvHandle, NvBool *); 289 void (*__kchannelControlSerialization_Epilogue__)(struct KernelChannel *, struct CALL_CONTEXT *, struct RS_RES_CONTROL_PARAMS_INTERNAL *); 290 PEVENTNOTIFICATION *(*__kchannelGetNotificationListPtr__)(struct KernelChannel *); 291 struct NotifShare *(*__kchannelGetNotificationShare__)(struct KernelChannel *); 292 NvBool (*__kchannelAccessCallback__)(struct KernelChannel *, struct RsClient *, void *, RsAccessRight); 293 NvU16 nextObjectClassID; 294 struct KernelChannel *pNextBindKernelChannel; 295 NvHandle hErrorContext; 296 MEMORY_DESCRIPTOR *pErrContextMemDesc; 297 ErrorNotifierType errorContextType; 298 NvU64 errorContextOffset; 299 NvHandle hEccErrorContext; 300 MEMORY_DESCRIPTOR *pEccErrContextMemDesc; 301 ErrorNotifierType eccErrorContextType; 302 NvU64 eccErrorContextOffset; 303 struct UserInfo *pUserInfo; 304 NvHandle hVASpace; 305 struct OBJVASPACE *pVAS; 306 NvHandle hKernelGraphicsContext; 307 NvU8 privilegeLevel; 308 NvU32 runlistId; 309 NvU32 ChID; 310 struct KernelChannelGroupApi *pKernelChannelGroupApi; 311 struct KernelCtxShareApi *pKernelCtxShareApi; 312 NvU32 refCount; 313 NvBool bIsContextBound; 314 FIFO_INSTANCE_BLOCK *pFifoHalData[8]; 315 MEMORY_DESCRIPTOR *pInstSubDeviceMemDesc[8]; 316 MEMORY_DESCRIPTOR *pUserdSubDeviceMemDesc[8]; 317 NvBool bClientAllocatedUserD; 318 NvU32 swState[8]; 319 NvU32 ProcessID; 320 NvU32 SubProcessID; 321 NvU32 bcStateCurrent; 322 NvU32 notifyIndex[2]; 323 NvU32 *pNotifyActions; 324 NvU64 userdLength; 325 NvBool bSkipCtxBufferAlloc; 326 NvU32 subctxId; 327 NvU32 cid; 328 struct MIG_INSTANCE_REF partitionRef; 329 NvU32 runqueue; 330 RM_ENGINE_TYPE engineType; 331 CC_KMB clientKmb; 332 NvBool bCCSecureChannel; 333 }; 334 335 #ifndef __NVOC_CLASS_KernelChannel_TYPEDEF__ 336 #define __NVOC_CLASS_KernelChannel_TYPEDEF__ 337 typedef struct KernelChannel KernelChannel; 338 #endif /* __NVOC_CLASS_KernelChannel_TYPEDEF__ */ 339 340 #ifndef __nvoc_class_id_KernelChannel 341 #define __nvoc_class_id_KernelChannel 0x5d8d70 342 #endif /* __nvoc_class_id_KernelChannel */ 343 344 extern const struct NVOC_CLASS_DEF __nvoc_class_def_KernelChannel; 345 346 #define __staticCast_KernelChannel(pThis) \ 347 ((pThis)->__nvoc_pbase_KernelChannel) 348 349 #ifdef __nvoc_kernel_channel_h_disabled 350 #define __dynamicCast_KernelChannel(pThis) ((KernelChannel*)NULL) 351 #else //__nvoc_kernel_channel_h_disabled 352 #define __dynamicCast_KernelChannel(pThis) \ 353 ((KernelChannel*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(KernelChannel))) 354 #endif //__nvoc_kernel_channel_h_disabled 355 356 357 NV_STATUS __nvoc_objCreateDynamic_KernelChannel(KernelChannel**, Dynamic*, NvU32, va_list); 358 359 NV_STATUS __nvoc_objCreate_KernelChannel(KernelChannel**, Dynamic*, NvU32, CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams); 360 #define __objCreate_KernelChannel(ppNewObj, pParent, createFlags, arg_pCallContext, arg_pParams) \ 361 __nvoc_objCreate_KernelChannel((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pCallContext, arg_pParams) 362 363 #define kchannelMap(pKernelChannel, pCallContext, pParams, pCpuMapping) kchannelMap_DISPATCH(pKernelChannel, pCallContext, pParams, pCpuMapping) 364 #define kchannelUnmap(pKernelChannel, pCallContext, pCpuMapping) kchannelUnmap_DISPATCH(pKernelChannel, pCallContext, pCpuMapping) 365 #define kchannelGetMapAddrSpace(pKernelChannel, pCallContext, mapFlags, pAddrSpace) kchannelGetMapAddrSpace_DISPATCH(pKernelChannel, pCallContext, mapFlags, pAddrSpace) 366 #define kchannelGetMemInterMapParams(pKernelChannel, pParams) kchannelGetMemInterMapParams_DISPATCH(pKernelChannel, pParams) 367 #define kchannelCheckMemInterUnmap(pKernelChannel, bSubdeviceHandleProvided) kchannelCheckMemInterUnmap_DISPATCH(pKernelChannel, bSubdeviceHandleProvided) 368 #define kchannelCreateUserMemDesc(pGpu, arg0) kchannelCreateUserMemDesc_DISPATCH(pGpu, arg0) 369 #define kchannelCreateUserMemDesc_HAL(pGpu, arg0) kchannelCreateUserMemDesc_DISPATCH(pGpu, arg0) 370 #define kchannelIsUserdAddrSizeValid(pKernelChannel, userdAddrLo, userdAddrHi) kchannelIsUserdAddrSizeValid_DISPATCH(pKernelChannel, userdAddrLo, userdAddrHi) 371 #define kchannelIsUserdAddrSizeValid_HAL(pKernelChannel, userdAddrLo, userdAddrHi) kchannelIsUserdAddrSizeValid_DISPATCH(pKernelChannel, userdAddrLo, userdAddrHi) 372 #define kchannelCtrlCmdResetIsolatedChannel(pKernelChannel, pResetParams) kchannelCtrlCmdResetIsolatedChannel_DISPATCH(pKernelChannel, pResetParams) 373 #define kchannelCtrlCmdGetClassEngineid(pKernelChannel, pParams) kchannelCtrlCmdGetClassEngineid_DISPATCH(pKernelChannel, pParams) 374 #define kchannelCtrlCmdResetChannel(pKernelChannel, pResetChannelParams) kchannelCtrlCmdResetChannel_DISPATCH(pKernelChannel, pResetChannelParams) 375 #define kchannelCtrlCmdGetDeferRCState(pKernelChannel, pStateParams) kchannelCtrlCmdGetDeferRCState_DISPATCH(pKernelChannel, pStateParams) 376 #define kchannelCtrlCmdGetMmuFaultInfo(pKernelChannel, pFaultInfoParams) kchannelCtrlCmdGetMmuFaultInfo_DISPATCH(pKernelChannel, pFaultInfoParams) 377 #define kchannelCtrlCmdEventSetNotification(pKernelChannel, pSetEventParams) kchannelCtrlCmdEventSetNotification_DISPATCH(pKernelChannel, pSetEventParams) 378 #define kchannelCtrlCmdGetClassEngineidA06F(pKernelChannel, pParams) kchannelCtrlCmdGetClassEngineidA06F_DISPATCH(pKernelChannel, pParams) 379 #define kchannelCtrlCmdResetChannelA06F(pKernelChannel, pResetChannelParams) kchannelCtrlCmdResetChannelA06F_DISPATCH(pKernelChannel, pResetChannelParams) 380 #define kchannelCtrlCmdGpFifoSchedule(pKernelChannel, pSchedParams) kchannelCtrlCmdGpFifoSchedule_DISPATCH(pKernelChannel, pSchedParams) 381 #define kchannelCtrlCmdBind(pKernelChannel, pParams) kchannelCtrlCmdBind_DISPATCH(pKernelChannel, pParams) 382 #define kchannelCtrlCmdGetMmuFaultInfoA06F(pKernelChannel, pFaultInfoParams) kchannelCtrlCmdGetMmuFaultInfoA06F_DISPATCH(pKernelChannel, pFaultInfoParams) 383 #define kchannelCtrlCmdSetErrorNotifier(pKernelChannel, pSetErrorNotifierParams) kchannelCtrlCmdSetErrorNotifier_DISPATCH(pKernelChannel, pSetErrorNotifierParams) 384 #define kchannelCtrlCmdSetInterleaveLevel(pKernelChannel, pParams) kchannelCtrlCmdSetInterleaveLevel_DISPATCH(pKernelChannel, pParams) 385 #define kchannelCtrlCmdRestartRunlist(pKernelChannel, pParams) kchannelCtrlCmdRestartRunlist_DISPATCH(pKernelChannel, pParams) 386 #define kchannelCtrlCmdGetClassEngineidA16F(pKernelChannel, pParams) kchannelCtrlCmdGetClassEngineidA16F_DISPATCH(pKernelChannel, pParams) 387 #define kchannelCtrlCmdResetChannelA16F(pKernelChannel, pResetChannelParams) kchannelCtrlCmdResetChannelA16F_DISPATCH(pKernelChannel, pResetChannelParams) 388 #define kchannelCtrlCmdGpFifoScheduleA16F(pKernelChannel, pSchedParams) kchannelCtrlCmdGpFifoScheduleA16F_DISPATCH(pKernelChannel, pSchedParams) 389 #define kchannelCtrlCmdGetClassEngineidA26F(pKernelChannel, pParams) kchannelCtrlCmdGetClassEngineidA26F_DISPATCH(pKernelChannel, pParams) 390 #define kchannelCtrlCmdResetChannelA26F(pKernelChannel, pResetChannelParams) kchannelCtrlCmdResetChannelA26F_DISPATCH(pKernelChannel, pResetChannelParams) 391 #define kchannelFCtrlCmdGpFifoScheduleA26F(pKernelChannel, pSchedParams) kchannelFCtrlCmdGpFifoScheduleA26F_DISPATCH(pKernelChannel, pSchedParams) 392 #define kchannelCtrlCmdGetClassEngineidB06F(pKernelChannel, pParams) kchannelCtrlCmdGetClassEngineidB06F_DISPATCH(pKernelChannel, pParams) 393 #define kchannelCtrlCmdResetChannelB06F(pKernelChannel, pResetChannelParams) kchannelCtrlCmdResetChannelB06F_DISPATCH(pKernelChannel, pResetChannelParams) 394 #define kchannelCtrlCmdGpFifoScheduleB06F(pKernelChannel, pSchedParams) kchannelCtrlCmdGpFifoScheduleB06F_DISPATCH(pKernelChannel, pSchedParams) 395 #define kchannelCtrlCmdBindB06F(pKernelChannel, pParams) kchannelCtrlCmdBindB06F_DISPATCH(pKernelChannel, pParams) 396 #define kchannelCtrlCmdGetEngineCtxSize(pKernelChannel, pCtxSizeParams) kchannelCtrlCmdGetEngineCtxSize_DISPATCH(pKernelChannel, pCtxSizeParams) 397 #define kchannelCtrlCmdGetEngineCtxData(pKernelChannel, pCtxBuffParams) kchannelCtrlCmdGetEngineCtxData_DISPATCH(pKernelChannel, pCtxBuffParams) 398 #define kchannelCtrlCmdMigrateEngineCtxData(pKernelChannel, pCtxBuffParams) kchannelCtrlCmdMigrateEngineCtxData_DISPATCH(pKernelChannel, pCtxBuffParams) 399 #define kchannelCtrlCmdGetEngineCtxState(pKernelChannel, pCtxStateParams) kchannelCtrlCmdGetEngineCtxState_DISPATCH(pKernelChannel, pCtxStateParams) 400 #define kchannelCtrlCmdGetChannelHwState(pKernelChannel, pParams) kchannelCtrlCmdGetChannelHwState_DISPATCH(pKernelChannel, pParams) 401 #define kchannelCtrlCmdSetChannelHwState(pKernelChannel, pParams) kchannelCtrlCmdSetChannelHwState_DISPATCH(pKernelChannel, pParams) 402 #define kchannelCtrlCmdSaveEngineCtxData(pKernelChannel, pCtxBuffParams) kchannelCtrlCmdSaveEngineCtxData_DISPATCH(pKernelChannel, pCtxBuffParams) 403 #define kchannelCtrlCmdRestoreEngineCtxData(pKernelChannel, pCtxBuffParams) kchannelCtrlCmdRestoreEngineCtxData_DISPATCH(pKernelChannel, pCtxBuffParams) 404 #define kchannelCtrlCmdGetClassEngineidC06F(pKernelChannel, pParams) kchannelCtrlCmdGetClassEngineidC06F_DISPATCH(pKernelChannel, pParams) 405 #define kchannelCtrlCmdResetChannelC06F(pKernelChannel, pResetChannelParams) kchannelCtrlCmdResetChannelC06F_DISPATCH(pKernelChannel, pResetChannelParams) 406 #define kchannelCtrlCmdGpFifoScheduleC06F(pKernelChannel, pSchedParams) kchannelCtrlCmdGpFifoScheduleC06F_DISPATCH(pKernelChannel, pSchedParams) 407 #define kchannelCtrlCmdBindC06F(pKernelChannel, pParams) kchannelCtrlCmdBindC06F_DISPATCH(pKernelChannel, pParams) 408 #define kchannelCtrlCmdGetClassEngineidC36F(pKernelChannel, pParams) kchannelCtrlCmdGetClassEngineidC36F_DISPATCH(pKernelChannel, pParams) 409 #define kchannelCtrlCmdResetChannelC36F(pKernelChannel, pResetChannelParams) kchannelCtrlCmdResetChannelC36F_DISPATCH(pKernelChannel, pResetChannelParams) 410 #define kchannelCtrlCmdGpFifoScheduleC36F(pKernelChannel, pSchedParams) kchannelCtrlCmdGpFifoScheduleC36F_DISPATCH(pKernelChannel, pSchedParams) 411 #define kchannelCtrlCmdBindC36F(pKernelChannel, pParams) kchannelCtrlCmdBindC36F_DISPATCH(pKernelChannel, pParams) 412 #define kchannelCtrlCmdGpfifoGetWorkSubmitToken(pKernelChannel, pTokenParams) kchannelCtrlCmdGpfifoGetWorkSubmitToken_DISPATCH(pKernelChannel, pTokenParams) 413 #define kchannelCtrlCmdGpfifoUpdateFaultMethodBuffer(pKernelChannel, pFaultMthdBufferParams) kchannelCtrlCmdGpfifoUpdateFaultMethodBuffer_DISPATCH(pKernelChannel, pFaultMthdBufferParams) 414 #define kchannelCtrlCmdGpfifoSetWorkSubmitTokenNotifIndex(pKernelChannel, pParams) kchannelCtrlCmdGpfifoSetWorkSubmitTokenNotifIndex_DISPATCH(pKernelChannel, pParams) 415 #define kchannelCtrlCmdStopChannel(pKernelChannel, pStopChannelParams) kchannelCtrlCmdStopChannel_DISPATCH(pKernelChannel, pStopChannelParams) 416 #define kchannelCtrlCmdGetKmb(pKernelChannel, pGetKmbParams) kchannelCtrlCmdGetKmb_DISPATCH(pKernelChannel, pGetKmbParams) 417 #define kchannelCtrlCmdGetKmb_HAL(pKernelChannel, pGetKmbParams) kchannelCtrlCmdGetKmb_DISPATCH(pKernelChannel, pGetKmbParams) 418 #define kchannelCtrlRotateSecureChannelIv(pKernelChannel, pRotateIvParams) kchannelCtrlRotateSecureChannelIv_DISPATCH(pKernelChannel, pRotateIvParams) 419 #define kchannelCtrlRotateSecureChannelIv_HAL(pKernelChannel, pRotateIvParams) kchannelCtrlRotateSecureChannelIv_DISPATCH(pKernelChannel, pRotateIvParams) 420 #define kchannelCtrlGetTpcPartitionMode(pKernelChannel, pParams) kchannelCtrlGetTpcPartitionMode_DISPATCH(pKernelChannel, pParams) 421 #define kchannelCtrlSetTpcPartitionMode(pKernelChannel, pParams) kchannelCtrlSetTpcPartitionMode_DISPATCH(pKernelChannel, pParams) 422 #define kchannelCtrlGetMMUDebugMode(pKernelChannel, pParams) kchannelCtrlGetMMUDebugMode_DISPATCH(pKernelChannel, pParams) 423 #define kchannelCtrlProgramVidmemPromote(pKernelChannel, pParams) kchannelCtrlProgramVidmemPromote_DISPATCH(pKernelChannel, pParams) 424 #define kchannelShareCallback(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) kchannelShareCallback_DISPATCH(pGpuResource, pInvokingClient, pParentRef, pSharePolicy) 425 #define kchannelGetOrAllocNotifShare(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) kchannelGetOrAllocNotifShare_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare) 426 #define kchannelMapTo(pResource, pParams) kchannelMapTo_DISPATCH(pResource, pParams) 427 #define kchannelSetNotificationShare(pNotifier, pNotifShare) kchannelSetNotificationShare_DISPATCH(pNotifier, pNotifShare) 428 #define kchannelGetRefCount(pResource) kchannelGetRefCount_DISPATCH(pResource) 429 #define kchannelAddAdditionalDependants(pClient, pResource, pReference) kchannelAddAdditionalDependants_DISPATCH(pClient, pResource, pReference) 430 #define kchannelControl_Prologue(pResource, pCallContext, pParams) kchannelControl_Prologue_DISPATCH(pResource, pCallContext, pParams) 431 #define kchannelGetRegBaseOffsetAndSize(pGpuResource, pGpu, pOffset, pSize) kchannelGetRegBaseOffsetAndSize_DISPATCH(pGpuResource, pGpu, pOffset, pSize) 432 #define kchannelInternalControlForward(pGpuResource, command, pParams, size) kchannelInternalControlForward_DISPATCH(pGpuResource, command, pParams, size) 433 #define kchannelUnmapFrom(pResource, pParams) kchannelUnmapFrom_DISPATCH(pResource, pParams) 434 #define kchannelControl_Epilogue(pResource, pCallContext, pParams) kchannelControl_Epilogue_DISPATCH(pResource, pCallContext, pParams) 435 #define kchannelControlLookup(pResource, pParams, ppEntry) kchannelControlLookup_DISPATCH(pResource, pParams, ppEntry) 436 #define kchannelGetInternalObjectHandle(pGpuResource) kchannelGetInternalObjectHandle_DISPATCH(pGpuResource) 437 #define kchannelControl(pGpuResource, pCallContext, pParams) kchannelControl_DISPATCH(pGpuResource, pCallContext, pParams) 438 #define kchannelGetMemoryMappingDescriptor(pRmResource, ppMemDesc) kchannelGetMemoryMappingDescriptor_DISPATCH(pRmResource, ppMemDesc) 439 #define kchannelControlFilter(pResource, pCallContext, pParams) kchannelControlFilter_DISPATCH(pResource, pCallContext, pParams) 440 #define kchannelUnregisterEvent(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) kchannelUnregisterEvent_DISPATCH(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent) 441 #define kchannelControlSerialization_Prologue(pResource, pCallContext, pParams) kchannelControlSerialization_Prologue_DISPATCH(pResource, pCallContext, pParams) 442 #define kchannelCanCopy(pResource) kchannelCanCopy_DISPATCH(pResource) 443 #define kchannelPreDestruct(pResource) kchannelPreDestruct_DISPATCH(pResource) 444 #define kchannelIsDuplicate(pResource, hMemory, pDuplicate) kchannelIsDuplicate_DISPATCH(pResource, hMemory, pDuplicate) 445 #define kchannelControlSerialization_Epilogue(pResource, pCallContext, pParams) kchannelControlSerialization_Epilogue_DISPATCH(pResource, pCallContext, pParams) 446 #define kchannelGetNotificationListPtr(pNotifier) kchannelGetNotificationListPtr_DISPATCH(pNotifier) 447 #define kchannelGetNotificationShare(pNotifier) kchannelGetNotificationShare_DISPATCH(pNotifier) 448 #define kchannelAccessCallback(pResource, pInvokingClient, pAllocParams, accessRight) kchannelAccessCallback_DISPATCH(pResource, pInvokingClient, pAllocParams, accessRight) 449 NV_STATUS kchannelNotifyRc_IMPL(struct KernelChannel *pKernelChannel); 450 451 452 #ifdef __nvoc_kernel_channel_h_disabled 453 static inline NV_STATUS kchannelNotifyRc(struct KernelChannel *pKernelChannel) { 454 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 455 return NV_ERR_NOT_SUPPORTED; 456 } 457 #else //__nvoc_kernel_channel_h_disabled 458 #define kchannelNotifyRc(pKernelChannel) kchannelNotifyRc_IMPL(pKernelChannel) 459 #endif //__nvoc_kernel_channel_h_disabled 460 461 #define kchannelNotifyRc_HAL(pKernelChannel) kchannelNotifyRc(pKernelChannel) 462 463 NvBool kchannelIsSchedulable_IMPL(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel); 464 465 466 #ifdef __nvoc_kernel_channel_h_disabled 467 static inline NvBool kchannelIsSchedulable(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel) { 468 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 469 return NV_FALSE; 470 } 471 #else //__nvoc_kernel_channel_h_disabled 472 #define kchannelIsSchedulable(pGpu, pKernelChannel) kchannelIsSchedulable_IMPL(pGpu, pKernelChannel) 473 #endif //__nvoc_kernel_channel_h_disabled 474 475 #define kchannelIsSchedulable_HAL(pGpu, pKernelChannel) kchannelIsSchedulable(pGpu, pKernelChannel) 476 477 NV_STATUS kchannelAllocMem_GM107(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 Flags, NvU32 verifFlags); 478 479 480 #ifdef __nvoc_kernel_channel_h_disabled 481 static inline NV_STATUS kchannelAllocMem(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 Flags, NvU32 verifFlags) { 482 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 483 return NV_ERR_NOT_SUPPORTED; 484 } 485 #else //__nvoc_kernel_channel_h_disabled 486 #define kchannelAllocMem(pGpu, pKernelChannel, Flags, verifFlags) kchannelAllocMem_GM107(pGpu, pKernelChannel, Flags, verifFlags) 487 #endif //__nvoc_kernel_channel_h_disabled 488 489 #define kchannelAllocMem_HAL(pGpu, pKernelChannel, Flags, verifFlags) kchannelAllocMem(pGpu, pKernelChannel, Flags, verifFlags) 490 491 void kchannelDestroyMem_GM107(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel); 492 493 494 #ifdef __nvoc_kernel_channel_h_disabled 495 static inline void kchannelDestroyMem(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel) { 496 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 497 } 498 #else //__nvoc_kernel_channel_h_disabled 499 #define kchannelDestroyMem(pGpu, pKernelChannel) kchannelDestroyMem_GM107(pGpu, pKernelChannel) 500 #endif //__nvoc_kernel_channel_h_disabled 501 502 #define kchannelDestroyMem_HAL(pGpu, pKernelChannel) kchannelDestroyMem(pGpu, pKernelChannel) 503 504 NV_STATUS kchannelGetChannelPhysicalState_KERNEL(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NV208F_CTRL_FIFO_GET_CHANNEL_STATE_PARAMS *pChannelStateParams); 505 506 507 #ifdef __nvoc_kernel_channel_h_disabled 508 static inline NV_STATUS kchannelGetChannelPhysicalState(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NV208F_CTRL_FIFO_GET_CHANNEL_STATE_PARAMS *pChannelStateParams) { 509 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 510 return NV_ERR_NOT_SUPPORTED; 511 } 512 #else //__nvoc_kernel_channel_h_disabled 513 #define kchannelGetChannelPhysicalState(pGpu, pKernelChannel, pChannelStateParams) kchannelGetChannelPhysicalState_KERNEL(pGpu, pKernelChannel, pChannelStateParams) 514 #endif //__nvoc_kernel_channel_h_disabled 515 516 #define kchannelGetChannelPhysicalState_HAL(pGpu, pKernelChannel, pChannelStateParams) kchannelGetChannelPhysicalState(pGpu, pKernelChannel, pChannelStateParams) 517 518 static inline NvU32 kchannelEmbedRunlistIDForSMC_13cd8d(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel) { 519 NV_ASSERT_PRECOMP(0); 520 return 0; 521 } 522 523 524 #ifdef __nvoc_kernel_channel_h_disabled 525 static inline NvU32 kchannelEmbedRunlistIDForSMC(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel) { 526 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 527 return 0; 528 } 529 #else //__nvoc_kernel_channel_h_disabled 530 #define kchannelEmbedRunlistIDForSMC(pGpu, pKernelChannel) kchannelEmbedRunlistIDForSMC_13cd8d(pGpu, pKernelChannel) 531 #endif //__nvoc_kernel_channel_h_disabled 532 533 #define kchannelEmbedRunlistIDForSMC_HAL(pGpu, pKernelChannel) kchannelEmbedRunlistIDForSMC(pGpu, pKernelChannel) 534 535 NV_STATUS kchannelAllocHwID_GM107(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvHandle hClient, NvU32 Flags, NvU32 verifFlags2, NvU32 ChID); 536 537 538 #ifdef __nvoc_kernel_channel_h_disabled 539 static inline NV_STATUS kchannelAllocHwID(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvHandle hClient, NvU32 Flags, NvU32 verifFlags2, NvU32 ChID) { 540 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 541 return NV_ERR_NOT_SUPPORTED; 542 } 543 #else //__nvoc_kernel_channel_h_disabled 544 #define kchannelAllocHwID(pGpu, pKernelChannel, hClient, Flags, verifFlags2, ChID) kchannelAllocHwID_GM107(pGpu, pKernelChannel, hClient, Flags, verifFlags2, ChID) 545 #endif //__nvoc_kernel_channel_h_disabled 546 547 #define kchannelAllocHwID_HAL(pGpu, pKernelChannel, hClient, Flags, verifFlags2, ChID) kchannelAllocHwID(pGpu, pKernelChannel, hClient, Flags, verifFlags2, ChID) 548 549 NV_STATUS kchannelFreeHwID_GM107(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel); 550 551 552 #ifdef __nvoc_kernel_channel_h_disabled 553 static inline NV_STATUS kchannelFreeHwID(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel) { 554 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 555 return NV_ERR_NOT_SUPPORTED; 556 } 557 #else //__nvoc_kernel_channel_h_disabled 558 #define kchannelFreeHwID(pGpu, pKernelChannel) kchannelFreeHwID_GM107(pGpu, pKernelChannel) 559 #endif //__nvoc_kernel_channel_h_disabled 560 561 #define kchannelFreeHwID_HAL(pGpu, pKernelChannel) kchannelFreeHwID(pGpu, pKernelChannel) 562 563 NV_STATUS kchannelGetUserdInfo_GM107(struct OBJGPU *pGpu, struct KernelChannel *arg0, NvU64 *userBase, NvU64 *offset, NvU64 *length); 564 565 566 #ifdef __nvoc_kernel_channel_h_disabled 567 static inline NV_STATUS kchannelGetUserdInfo(struct OBJGPU *pGpu, struct KernelChannel *arg0, NvU64 *userBase, NvU64 *offset, NvU64 *length) { 568 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 569 return NV_ERR_NOT_SUPPORTED; 570 } 571 #else //__nvoc_kernel_channel_h_disabled 572 #define kchannelGetUserdInfo(pGpu, arg0, userBase, offset, length) kchannelGetUserdInfo_GM107(pGpu, arg0, userBase, offset, length) 573 #endif //__nvoc_kernel_channel_h_disabled 574 575 #define kchannelGetUserdInfo_HAL(pGpu, arg0, userBase, offset, length) kchannelGetUserdInfo(pGpu, arg0, userBase, offset, length) 576 577 NV_STATUS kchannelGetUserdBar1MapOffset_GM107(struct OBJGPU *pGpu, struct KernelChannel *arg0, NvU64 *bar1Offset, NvU32 *bar1MapSize); 578 579 580 #ifdef __nvoc_kernel_channel_h_disabled 581 static inline NV_STATUS kchannelGetUserdBar1MapOffset(struct OBJGPU *pGpu, struct KernelChannel *arg0, NvU64 *bar1Offset, NvU32 *bar1MapSize) { 582 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 583 return NV_ERR_NOT_SUPPORTED; 584 } 585 #else //__nvoc_kernel_channel_h_disabled 586 #define kchannelGetUserdBar1MapOffset(pGpu, arg0, bar1Offset, bar1MapSize) kchannelGetUserdBar1MapOffset_GM107(pGpu, arg0, bar1Offset, bar1MapSize) 587 #endif //__nvoc_kernel_channel_h_disabled 588 589 #define kchannelGetUserdBar1MapOffset_HAL(pGpu, arg0, bar1Offset, bar1MapSize) kchannelGetUserdBar1MapOffset(pGpu, arg0, bar1Offset, bar1MapSize) 590 591 NV_STATUS kchannelCreateUserdMemDescBc_GV100(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvHandle arg0, NvHandle *arg1, NvU64 *arg2); 592 593 594 #ifdef __nvoc_kernel_channel_h_disabled 595 static inline NV_STATUS kchannelCreateUserdMemDescBc(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvHandle arg0, NvHandle *arg1, NvU64 *arg2) { 596 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 597 return NV_ERR_NOT_SUPPORTED; 598 } 599 #else //__nvoc_kernel_channel_h_disabled 600 #define kchannelCreateUserdMemDescBc(pGpu, pKernelChannel, arg0, arg1, arg2) kchannelCreateUserdMemDescBc_GV100(pGpu, pKernelChannel, arg0, arg1, arg2) 601 #endif //__nvoc_kernel_channel_h_disabled 602 603 #define kchannelCreateUserdMemDescBc_HAL(pGpu, pKernelChannel, arg0, arg1, arg2) kchannelCreateUserdMemDescBc(pGpu, pKernelChannel, arg0, arg1, arg2) 604 605 NV_STATUS kchannelCreateUserdMemDesc_GV100(struct OBJGPU *pGpu, struct KernelChannel *arg0, NvHandle arg1, NvHandle arg2, NvU64 arg3, NvU64 *arg4, NvU32 *arg5); 606 607 608 #ifdef __nvoc_kernel_channel_h_disabled 609 static inline NV_STATUS kchannelCreateUserdMemDesc(struct OBJGPU *pGpu, struct KernelChannel *arg0, NvHandle arg1, NvHandle arg2, NvU64 arg3, NvU64 *arg4, NvU32 *arg5) { 610 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 611 return NV_ERR_NOT_SUPPORTED; 612 } 613 #else //__nvoc_kernel_channel_h_disabled 614 #define kchannelCreateUserdMemDesc(pGpu, arg0, arg1, arg2, arg3, arg4, arg5) kchannelCreateUserdMemDesc_GV100(pGpu, arg0, arg1, arg2, arg3, arg4, arg5) 615 #endif //__nvoc_kernel_channel_h_disabled 616 617 #define kchannelCreateUserdMemDesc_HAL(pGpu, arg0, arg1, arg2, arg3, arg4, arg5) kchannelCreateUserdMemDesc(pGpu, arg0, arg1, arg2, arg3, arg4, arg5) 618 619 void kchannelDestroyUserdMemDesc_GV100(struct OBJGPU *pGpu, struct KernelChannel *arg0); 620 621 622 #ifdef __nvoc_kernel_channel_h_disabled 623 static inline void kchannelDestroyUserdMemDesc(struct OBJGPU *pGpu, struct KernelChannel *arg0) { 624 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 625 } 626 #else //__nvoc_kernel_channel_h_disabled 627 #define kchannelDestroyUserdMemDesc(pGpu, arg0) kchannelDestroyUserdMemDesc_GV100(pGpu, arg0) 628 #endif //__nvoc_kernel_channel_h_disabled 629 630 #define kchannelDestroyUserdMemDesc_HAL(pGpu, arg0) kchannelDestroyUserdMemDesc(pGpu, arg0) 631 632 NV_STATUS kchannelGetEngine_GM107(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 *engDesc); 633 634 635 #ifdef __nvoc_kernel_channel_h_disabled 636 static inline NV_STATUS kchannelGetEngine(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 *engDesc) { 637 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 638 return NV_ERR_NOT_SUPPORTED; 639 } 640 #else //__nvoc_kernel_channel_h_disabled 641 #define kchannelGetEngine(pGpu, pKernelChannel, engDesc) kchannelGetEngine_GM107(pGpu, pKernelChannel, engDesc) 642 #endif //__nvoc_kernel_channel_h_disabled 643 644 #define kchannelGetEngine_HAL(pGpu, pKernelChannel, engDesc) kchannelGetEngine(pGpu, pKernelChannel, engDesc) 645 646 static inline NV_STATUS kchannelFwdToInternalCtrl_56cd7a(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 internalCmd, RmCtrlParams *pRmCtrlParams) { 647 return NV_OK; 648 } 649 650 651 #ifdef __nvoc_kernel_channel_h_disabled 652 static inline NV_STATUS kchannelFwdToInternalCtrl(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 internalCmd, RmCtrlParams *pRmCtrlParams) { 653 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 654 return NV_ERR_NOT_SUPPORTED; 655 } 656 #else //__nvoc_kernel_channel_h_disabled 657 #define kchannelFwdToInternalCtrl(pGpu, pKernelChannel, internalCmd, pRmCtrlParams) kchannelFwdToInternalCtrl_56cd7a(pGpu, pKernelChannel, internalCmd, pRmCtrlParams) 658 #endif //__nvoc_kernel_channel_h_disabled 659 660 #define kchannelFwdToInternalCtrl_HAL(pGpu, pKernelChannel, internalCmd, pRmCtrlParams) kchannelFwdToInternalCtrl(pGpu, pKernelChannel, internalCmd, pRmCtrlParams) 661 662 static inline NV_STATUS kchannelAllocChannel_56cd7a(struct KernelChannel *pKernelChannel, NV_CHANNEL_ALLOC_PARAMS *pChannelGpfifoParams) { 663 return NV_OK; 664 } 665 666 667 #ifdef __nvoc_kernel_channel_h_disabled 668 static inline NV_STATUS kchannelAllocChannel(struct KernelChannel *pKernelChannel, NV_CHANNEL_ALLOC_PARAMS *pChannelGpfifoParams) { 669 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 670 return NV_ERR_NOT_SUPPORTED; 671 } 672 #else //__nvoc_kernel_channel_h_disabled 673 #define kchannelAllocChannel(pKernelChannel, pChannelGpfifoParams) kchannelAllocChannel_56cd7a(pKernelChannel, pChannelGpfifoParams) 674 #endif //__nvoc_kernel_channel_h_disabled 675 676 #define kchannelAllocChannel_HAL(pKernelChannel, pChannelGpfifoParams) kchannelAllocChannel(pKernelChannel, pChannelGpfifoParams) 677 678 static inline NvBool kchannelIsValid_cbe027(struct KernelChannel *pKernelChannel) { 679 return ((NvBool)(0 == 0)); 680 } 681 682 683 #ifdef __nvoc_kernel_channel_h_disabled 684 static inline NvBool kchannelIsValid(struct KernelChannel *pKernelChannel) { 685 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 686 return NV_FALSE; 687 } 688 #else //__nvoc_kernel_channel_h_disabled 689 #define kchannelIsValid(pKernelChannel) kchannelIsValid_cbe027(pKernelChannel) 690 #endif //__nvoc_kernel_channel_h_disabled 691 692 #define kchannelIsValid_HAL(pKernelChannel) kchannelIsValid(pKernelChannel) 693 694 NV_STATUS kchannelGetClassEngineID_GM107(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvHandle handle, NvU32 *classEngineID, NvU32 *classID, RM_ENGINE_TYPE *rmEngineID); 695 696 697 #ifdef __nvoc_kernel_channel_h_disabled 698 static inline NV_STATUS kchannelGetClassEngineID(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvHandle handle, NvU32 *classEngineID, NvU32 *classID, RM_ENGINE_TYPE *rmEngineID) { 699 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 700 return NV_ERR_NOT_SUPPORTED; 701 } 702 #else //__nvoc_kernel_channel_h_disabled 703 #define kchannelGetClassEngineID(pGpu, pKernelChannel, handle, classEngineID, classID, rmEngineID) kchannelGetClassEngineID_GM107(pGpu, pKernelChannel, handle, classEngineID, classID, rmEngineID) 704 #endif //__nvoc_kernel_channel_h_disabled 705 706 #define kchannelGetClassEngineID_HAL(pGpu, pKernelChannel, handle, classEngineID, classID, rmEngineID) kchannelGetClassEngineID(pGpu, pKernelChannel, handle, classEngineID, classID, rmEngineID) 707 708 NV_STATUS kchannelEnableVirtualContext_GM107(struct KernelChannel *arg0); 709 710 711 #ifdef __nvoc_kernel_channel_h_disabled 712 static inline NV_STATUS kchannelEnableVirtualContext(struct KernelChannel *arg0) { 713 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 714 return NV_ERR_NOT_SUPPORTED; 715 } 716 #else //__nvoc_kernel_channel_h_disabled 717 #define kchannelEnableVirtualContext(arg0) kchannelEnableVirtualContext_GM107(arg0) 718 #endif //__nvoc_kernel_channel_h_disabled 719 720 #define kchannelEnableVirtualContext_HAL(arg0) kchannelEnableVirtualContext(arg0) 721 722 static inline NV_STATUS kchannelRotateSecureChannelIv_46f6a7(struct KernelChannel *pKernelChannel, ROTATE_IV_TYPE rotateOperation, NvU32 *encryptIv, NvU32 *decryptIv) { 723 return NV_ERR_NOT_SUPPORTED; 724 } 725 726 727 #ifdef __nvoc_kernel_channel_h_disabled 728 static inline NV_STATUS kchannelRotateSecureChannelIv(struct KernelChannel *pKernelChannel, ROTATE_IV_TYPE rotateOperation, NvU32 *encryptIv, NvU32 *decryptIv) { 729 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 730 return NV_ERR_NOT_SUPPORTED; 731 } 732 #else //__nvoc_kernel_channel_h_disabled 733 #define kchannelRotateSecureChannelIv(pKernelChannel, rotateOperation, encryptIv, decryptIv) kchannelRotateSecureChannelIv_46f6a7(pKernelChannel, rotateOperation, encryptIv, decryptIv) 734 #endif //__nvoc_kernel_channel_h_disabled 735 736 #define kchannelRotateSecureChannelIv_HAL(pKernelChannel, rotateOperation, encryptIv, decryptIv) kchannelRotateSecureChannelIv(pKernelChannel, rotateOperation, encryptIv, decryptIv) 737 738 NV_STATUS kchannelRetrieveKmb_KERNEL(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, ROTATE_IV_TYPE rotateOperation, NvBool includeSecrets, CC_KMB *keyMaterialBundle); 739 740 741 #ifdef __nvoc_kernel_channel_h_disabled 742 static inline NV_STATUS kchannelRetrieveKmb(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, ROTATE_IV_TYPE rotateOperation, NvBool includeSecrets, CC_KMB *keyMaterialBundle) { 743 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 744 return NV_ERR_NOT_SUPPORTED; 745 } 746 #else //__nvoc_kernel_channel_h_disabled 747 #define kchannelRetrieveKmb(pGpu, pKernelChannel, rotateOperation, includeSecrets, keyMaterialBundle) kchannelRetrieveKmb_KERNEL(pGpu, pKernelChannel, rotateOperation, includeSecrets, keyMaterialBundle) 748 #endif //__nvoc_kernel_channel_h_disabled 749 750 #define kchannelRetrieveKmb_HAL(pGpu, pKernelChannel, rotateOperation, includeSecrets, keyMaterialBundle) kchannelRetrieveKmb(pGpu, pKernelChannel, rotateOperation, includeSecrets, keyMaterialBundle) 751 752 NV_STATUS kchannelMap_IMPL(struct KernelChannel *pKernelChannel, CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, RsCpuMapping *pCpuMapping); 753 754 static inline NV_STATUS kchannelMap_DISPATCH(struct KernelChannel *pKernelChannel, CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, RsCpuMapping *pCpuMapping) { 755 return pKernelChannel->__kchannelMap__(pKernelChannel, pCallContext, pParams, pCpuMapping); 756 } 757 758 NV_STATUS kchannelUnmap_IMPL(struct KernelChannel *pKernelChannel, CALL_CONTEXT *pCallContext, RsCpuMapping *pCpuMapping); 759 760 static inline NV_STATUS kchannelUnmap_DISPATCH(struct KernelChannel *pKernelChannel, CALL_CONTEXT *pCallContext, RsCpuMapping *pCpuMapping) { 761 return pKernelChannel->__kchannelUnmap__(pKernelChannel, pCallContext, pCpuMapping); 762 } 763 764 NV_STATUS kchannelGetMapAddrSpace_IMPL(struct KernelChannel *pKernelChannel, CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace); 765 766 static inline NV_STATUS kchannelGetMapAddrSpace_DISPATCH(struct KernelChannel *pKernelChannel, CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) { 767 return pKernelChannel->__kchannelGetMapAddrSpace__(pKernelChannel, pCallContext, mapFlags, pAddrSpace); 768 } 769 770 NV_STATUS kchannelGetMemInterMapParams_IMPL(struct KernelChannel *pKernelChannel, RMRES_MEM_INTER_MAP_PARAMS *pParams); 771 772 static inline NV_STATUS kchannelGetMemInterMapParams_DISPATCH(struct KernelChannel *pKernelChannel, RMRES_MEM_INTER_MAP_PARAMS *pParams) { 773 return pKernelChannel->__kchannelGetMemInterMapParams__(pKernelChannel, pParams); 774 } 775 776 NV_STATUS kchannelCheckMemInterUnmap_IMPL(struct KernelChannel *pKernelChannel, NvBool bSubdeviceHandleProvided); 777 778 static inline NV_STATUS kchannelCheckMemInterUnmap_DISPATCH(struct KernelChannel *pKernelChannel, NvBool bSubdeviceHandleProvided) { 779 return pKernelChannel->__kchannelCheckMemInterUnmap__(pKernelChannel, bSubdeviceHandleProvided); 780 } 781 782 NV_STATUS kchannelCreateUserMemDesc_GM107(struct OBJGPU *pGpu, struct KernelChannel *arg0); 783 784 NV_STATUS kchannelCreateUserMemDesc_GA10B(struct OBJGPU *pGpu, struct KernelChannel *arg0); 785 786 static inline NV_STATUS kchannelCreateUserMemDesc_DISPATCH(struct OBJGPU *pGpu, struct KernelChannel *arg0) { 787 return arg0->__kchannelCreateUserMemDesc__(pGpu, arg0); 788 } 789 790 NvBool kchannelIsUserdAddrSizeValid_GV100(struct KernelChannel *pKernelChannel, NvU32 userdAddrLo, NvU32 userdAddrHi); 791 792 NvBool kchannelIsUserdAddrSizeValid_GA100(struct KernelChannel *pKernelChannel, NvU32 userdAddrLo, NvU32 userdAddrHi); 793 794 NvBool kchannelIsUserdAddrSizeValid_GH100(struct KernelChannel *pKernelChannel, NvU32 userdAddrLo, NvU32 userdAddrHi); 795 796 static inline NvBool kchannelIsUserdAddrSizeValid_DISPATCH(struct KernelChannel *pKernelChannel, NvU32 userdAddrLo, NvU32 userdAddrHi) { 797 return pKernelChannel->__kchannelIsUserdAddrSizeValid__(pKernelChannel, userdAddrLo, userdAddrHi); 798 } 799 800 NV_STATUS kchannelCtrlCmdResetIsolatedChannel_IMPL(struct KernelChannel *pKernelChannel, NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL_PARAMS *pResetParams); 801 802 static inline NV_STATUS kchannelCtrlCmdResetIsolatedChannel_DISPATCH(struct KernelChannel *pKernelChannel, NV506F_CTRL_CMD_RESET_ISOLATED_CHANNEL_PARAMS *pResetParams) { 803 return pKernelChannel->__kchannelCtrlCmdResetIsolatedChannel__(pKernelChannel, pResetParams); 804 } 805 806 NV_STATUS kchannelCtrlCmdGetClassEngineid_IMPL(struct KernelChannel *pKernelChannel, NV906F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams); 807 808 static inline NV_STATUS kchannelCtrlCmdGetClassEngineid_DISPATCH(struct KernelChannel *pKernelChannel, NV906F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 809 return pKernelChannel->__kchannelCtrlCmdGetClassEngineid__(pKernelChannel, pParams); 810 } 811 812 NV_STATUS kchannelCtrlCmdResetChannel_IMPL(struct KernelChannel *pKernelChannel, NV906F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams); 813 814 static inline NV_STATUS kchannelCtrlCmdResetChannel_DISPATCH(struct KernelChannel *pKernelChannel, NV906F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 815 return pKernelChannel->__kchannelCtrlCmdResetChannel__(pKernelChannel, pResetChannelParams); 816 } 817 818 NV_STATUS kchannelCtrlCmdGetDeferRCState_IMPL(struct KernelChannel *pKernelChannel, NV906F_CTRL_CMD_GET_DEFER_RC_STATE_PARAMS *pStateParams); 819 820 static inline NV_STATUS kchannelCtrlCmdGetDeferRCState_DISPATCH(struct KernelChannel *pKernelChannel, NV906F_CTRL_CMD_GET_DEFER_RC_STATE_PARAMS *pStateParams) { 821 return pKernelChannel->__kchannelCtrlCmdGetDeferRCState__(pKernelChannel, pStateParams); 822 } 823 824 NV_STATUS kchannelCtrlCmdGetMmuFaultInfo_IMPL(struct KernelChannel *pKernelChannel, NV906F_CTRL_GET_MMU_FAULT_INFO_PARAMS *pFaultInfoParams); 825 826 static inline NV_STATUS kchannelCtrlCmdGetMmuFaultInfo_DISPATCH(struct KernelChannel *pKernelChannel, NV906F_CTRL_GET_MMU_FAULT_INFO_PARAMS *pFaultInfoParams) { 827 return pKernelChannel->__kchannelCtrlCmdGetMmuFaultInfo__(pKernelChannel, pFaultInfoParams); 828 } 829 830 NV_STATUS kchannelCtrlCmdEventSetNotification_IMPL(struct KernelChannel *pKernelChannel, NV906F_CTRL_EVENT_SET_NOTIFICATION_PARAMS *pSetEventParams); 831 832 static inline NV_STATUS kchannelCtrlCmdEventSetNotification_DISPATCH(struct KernelChannel *pKernelChannel, NV906F_CTRL_EVENT_SET_NOTIFICATION_PARAMS *pSetEventParams) { 833 return pKernelChannel->__kchannelCtrlCmdEventSetNotification__(pKernelChannel, pSetEventParams); 834 } 835 836 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidA06F_6a9a13(struct KernelChannel *pKernelChannel, NVA06F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 837 return kchannelCtrlCmdGetClassEngineid(pKernelChannel, pParams); 838 } 839 840 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidA06F_DISPATCH(struct KernelChannel *pKernelChannel, NVA06F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 841 return pKernelChannel->__kchannelCtrlCmdGetClassEngineidA06F__(pKernelChannel, pParams); 842 } 843 844 static inline NV_STATUS kchannelCtrlCmdResetChannelA06F_ef73a1(struct KernelChannel *pKernelChannel, NVA06F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 845 return kchannelCtrlCmdResetChannel(pKernelChannel, pResetChannelParams); 846 } 847 848 static inline NV_STATUS kchannelCtrlCmdResetChannelA06F_DISPATCH(struct KernelChannel *pKernelChannel, NVA06F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 849 return pKernelChannel->__kchannelCtrlCmdResetChannelA06F__(pKernelChannel, pResetChannelParams); 850 } 851 852 NV_STATUS kchannelCtrlCmdGpFifoSchedule_IMPL(struct KernelChannel *pKernelChannel, NVA06F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams); 853 854 static inline NV_STATUS kchannelCtrlCmdGpFifoSchedule_DISPATCH(struct KernelChannel *pKernelChannel, NVA06F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 855 return pKernelChannel->__kchannelCtrlCmdGpFifoSchedule__(pKernelChannel, pSchedParams); 856 } 857 858 NV_STATUS kchannelCtrlCmdBind_IMPL(struct KernelChannel *pKernelChannel, NVA06F_CTRL_BIND_PARAMS *pParams); 859 860 static inline NV_STATUS kchannelCtrlCmdBind_DISPATCH(struct KernelChannel *pKernelChannel, NVA06F_CTRL_BIND_PARAMS *pParams) { 861 return pKernelChannel->__kchannelCtrlCmdBind__(pKernelChannel, pParams); 862 } 863 864 static inline NV_STATUS kchannelCtrlCmdGetMmuFaultInfoA06F_a7f9ac(struct KernelChannel *pKernelChannel, NVA06F_CTRL_GET_MMU_FAULT_INFO_PARAMS *pFaultInfoParams) { 865 return kchannelCtrlCmdGetMmuFaultInfo(pKernelChannel, pFaultInfoParams); 866 } 867 868 static inline NV_STATUS kchannelCtrlCmdGetMmuFaultInfoA06F_DISPATCH(struct KernelChannel *pKernelChannel, NVA06F_CTRL_GET_MMU_FAULT_INFO_PARAMS *pFaultInfoParams) { 869 return pKernelChannel->__kchannelCtrlCmdGetMmuFaultInfoA06F__(pKernelChannel, pFaultInfoParams); 870 } 871 872 NV_STATUS kchannelCtrlCmdSetErrorNotifier_IMPL(struct KernelChannel *pKernelChannel, NVA06F_CTRL_SET_ERROR_NOTIFIER_PARAMS *pSetErrorNotifierParams); 873 874 static inline NV_STATUS kchannelCtrlCmdSetErrorNotifier_DISPATCH(struct KernelChannel *pKernelChannel, NVA06F_CTRL_SET_ERROR_NOTIFIER_PARAMS *pSetErrorNotifierParams) { 875 return pKernelChannel->__kchannelCtrlCmdSetErrorNotifier__(pKernelChannel, pSetErrorNotifierParams); 876 } 877 878 NV_STATUS kchannelCtrlCmdSetInterleaveLevel_IMPL(struct KernelChannel *pKernelChannel, NVA06F_CTRL_INTERLEAVE_LEVEL_PARAMS *pParams); 879 880 static inline NV_STATUS kchannelCtrlCmdSetInterleaveLevel_DISPATCH(struct KernelChannel *pKernelChannel, NVA06F_CTRL_INTERLEAVE_LEVEL_PARAMS *pParams) { 881 return pKernelChannel->__kchannelCtrlCmdSetInterleaveLevel__(pKernelChannel, pParams); 882 } 883 884 NV_STATUS kchannelCtrlCmdRestartRunlist_IMPL(struct KernelChannel *pKernelChannel, NVA06F_CTRL_RESTART_RUNLIST_PARAMS *pParams); 885 886 static inline NV_STATUS kchannelCtrlCmdRestartRunlist_DISPATCH(struct KernelChannel *pKernelChannel, NVA06F_CTRL_RESTART_RUNLIST_PARAMS *pParams) { 887 return pKernelChannel->__kchannelCtrlCmdRestartRunlist__(pKernelChannel, pParams); 888 } 889 890 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidA16F_6a9a13(struct KernelChannel *pKernelChannel, NVA16F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 891 return kchannelCtrlCmdGetClassEngineid(pKernelChannel, pParams); 892 } 893 894 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidA16F_DISPATCH(struct KernelChannel *pKernelChannel, NVA16F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 895 return pKernelChannel->__kchannelCtrlCmdGetClassEngineidA16F__(pKernelChannel, pParams); 896 } 897 898 static inline NV_STATUS kchannelCtrlCmdResetChannelA16F_ef73a1(struct KernelChannel *pKernelChannel, NVA16F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 899 return kchannelCtrlCmdResetChannel(pKernelChannel, pResetChannelParams); 900 } 901 902 static inline NV_STATUS kchannelCtrlCmdResetChannelA16F_DISPATCH(struct KernelChannel *pKernelChannel, NVA16F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 903 return pKernelChannel->__kchannelCtrlCmdResetChannelA16F__(pKernelChannel, pResetChannelParams); 904 } 905 906 static inline NV_STATUS kchannelCtrlCmdGpFifoScheduleA16F_6546a6(struct KernelChannel *pKernelChannel, NVA16F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 907 return kchannelCtrlCmdGpFifoSchedule(pKernelChannel, pSchedParams); 908 } 909 910 static inline NV_STATUS kchannelCtrlCmdGpFifoScheduleA16F_DISPATCH(struct KernelChannel *pKernelChannel, NVA16F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 911 return pKernelChannel->__kchannelCtrlCmdGpFifoScheduleA16F__(pKernelChannel, pSchedParams); 912 } 913 914 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidA26F_6a9a13(struct KernelChannel *pKernelChannel, NVA26F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 915 return kchannelCtrlCmdGetClassEngineid(pKernelChannel, pParams); 916 } 917 918 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidA26F_DISPATCH(struct KernelChannel *pKernelChannel, NVA26F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 919 return pKernelChannel->__kchannelCtrlCmdGetClassEngineidA26F__(pKernelChannel, pParams); 920 } 921 922 static inline NV_STATUS kchannelCtrlCmdResetChannelA26F_ef73a1(struct KernelChannel *pKernelChannel, NVA26F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 923 return kchannelCtrlCmdResetChannel(pKernelChannel, pResetChannelParams); 924 } 925 926 static inline NV_STATUS kchannelCtrlCmdResetChannelA26F_DISPATCH(struct KernelChannel *pKernelChannel, NVA26F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 927 return pKernelChannel->__kchannelCtrlCmdResetChannelA26F__(pKernelChannel, pResetChannelParams); 928 } 929 930 static inline NV_STATUS kchannelFCtrlCmdGpFifoScheduleA26F_6546a6(struct KernelChannel *pKernelChannel, NVA26F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 931 return kchannelCtrlCmdGpFifoSchedule(pKernelChannel, pSchedParams); 932 } 933 934 static inline NV_STATUS kchannelFCtrlCmdGpFifoScheduleA26F_DISPATCH(struct KernelChannel *pKernelChannel, NVA26F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 935 return pKernelChannel->__kchannelFCtrlCmdGpFifoScheduleA26F__(pKernelChannel, pSchedParams); 936 } 937 938 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidB06F_6a9a13(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 939 return kchannelCtrlCmdGetClassEngineid(pKernelChannel, pParams); 940 } 941 942 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidB06F_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 943 return pKernelChannel->__kchannelCtrlCmdGetClassEngineidB06F__(pKernelChannel, pParams); 944 } 945 946 static inline NV_STATUS kchannelCtrlCmdResetChannelB06F_ef73a1(struct KernelChannel *pKernelChannel, NVB06F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 947 return kchannelCtrlCmdResetChannel(pKernelChannel, pResetChannelParams); 948 } 949 950 static inline NV_STATUS kchannelCtrlCmdResetChannelB06F_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 951 return pKernelChannel->__kchannelCtrlCmdResetChannelB06F__(pKernelChannel, pResetChannelParams); 952 } 953 954 static inline NV_STATUS kchannelCtrlCmdGpFifoScheduleB06F_6546a6(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 955 return kchannelCtrlCmdGpFifoSchedule(pKernelChannel, pSchedParams); 956 } 957 958 static inline NV_STATUS kchannelCtrlCmdGpFifoScheduleB06F_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 959 return pKernelChannel->__kchannelCtrlCmdGpFifoScheduleB06F__(pKernelChannel, pSchedParams); 960 } 961 962 static inline NV_STATUS kchannelCtrlCmdBindB06F_2c1c21(struct KernelChannel *pKernelChannel, NVB06F_CTRL_BIND_PARAMS *pParams) { 963 return kchannelCtrlCmdBind(pKernelChannel, pParams); 964 } 965 966 static inline NV_STATUS kchannelCtrlCmdBindB06F_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_BIND_PARAMS *pParams) { 967 return pKernelChannel->__kchannelCtrlCmdBindB06F__(pKernelChannel, pParams); 968 } 969 970 NV_STATUS kchannelCtrlCmdGetEngineCtxSize_IMPL(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GET_ENGINE_CTX_SIZE_PARAMS *pCtxSizeParams); 971 972 static inline NV_STATUS kchannelCtrlCmdGetEngineCtxSize_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GET_ENGINE_CTX_SIZE_PARAMS *pCtxSizeParams) { 973 return pKernelChannel->__kchannelCtrlCmdGetEngineCtxSize__(pKernelChannel, pCtxSizeParams); 974 } 975 976 NV_STATUS kchannelCtrlCmdGetEngineCtxData_IMPL(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GET_ENGINE_CTX_DATA_PARAMS *pCtxBuffParams); 977 978 static inline NV_STATUS kchannelCtrlCmdGetEngineCtxData_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GET_ENGINE_CTX_DATA_PARAMS *pCtxBuffParams) { 979 return pKernelChannel->__kchannelCtrlCmdGetEngineCtxData__(pKernelChannel, pCtxBuffParams); 980 } 981 982 NV_STATUS kchannelCtrlCmdMigrateEngineCtxData_IMPL(struct KernelChannel *pKernelChannel, NVB06F_CTRL_MIGRATE_ENGINE_CTX_DATA_PARAMS *pCtxBuffParams); 983 984 static inline NV_STATUS kchannelCtrlCmdMigrateEngineCtxData_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_MIGRATE_ENGINE_CTX_DATA_PARAMS *pCtxBuffParams) { 985 return pKernelChannel->__kchannelCtrlCmdMigrateEngineCtxData__(pKernelChannel, pCtxBuffParams); 986 } 987 988 NV_STATUS kchannelCtrlCmdGetEngineCtxState_IMPL(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GET_ENGINE_CTX_STATE_PARAMS *pCtxStateParams); 989 990 static inline NV_STATUS kchannelCtrlCmdGetEngineCtxState_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GET_ENGINE_CTX_STATE_PARAMS *pCtxStateParams) { 991 return pKernelChannel->__kchannelCtrlCmdGetEngineCtxState__(pKernelChannel, pCtxStateParams); 992 } 993 994 NV_STATUS kchannelCtrlCmdGetChannelHwState_IMPL(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GET_CHANNEL_HW_STATE_PARAMS *pParams); 995 996 static inline NV_STATUS kchannelCtrlCmdGetChannelHwState_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_GET_CHANNEL_HW_STATE_PARAMS *pParams) { 997 return pKernelChannel->__kchannelCtrlCmdGetChannelHwState__(pKernelChannel, pParams); 998 } 999 1000 NV_STATUS kchannelCtrlCmdSetChannelHwState_IMPL(struct KernelChannel *pKernelChannel, NVB06F_CTRL_SET_CHANNEL_HW_STATE_PARAMS *pParams); 1001 1002 static inline NV_STATUS kchannelCtrlCmdSetChannelHwState_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_SET_CHANNEL_HW_STATE_PARAMS *pParams) { 1003 return pKernelChannel->__kchannelCtrlCmdSetChannelHwState__(pKernelChannel, pParams); 1004 } 1005 1006 NV_STATUS kchannelCtrlCmdSaveEngineCtxData_IMPL(struct KernelChannel *pKernelChannel, NVB06F_CTRL_SAVE_ENGINE_CTX_DATA_PARAMS *pCtxBuffParams); 1007 1008 static inline NV_STATUS kchannelCtrlCmdSaveEngineCtxData_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_SAVE_ENGINE_CTX_DATA_PARAMS *pCtxBuffParams) { 1009 return pKernelChannel->__kchannelCtrlCmdSaveEngineCtxData__(pKernelChannel, pCtxBuffParams); 1010 } 1011 1012 NV_STATUS kchannelCtrlCmdRestoreEngineCtxData_IMPL(struct KernelChannel *pKernelChannel, NVB06F_CTRL_RESTORE_ENGINE_CTX_DATA_PARAMS *pCtxBuffParams); 1013 1014 static inline NV_STATUS kchannelCtrlCmdRestoreEngineCtxData_DISPATCH(struct KernelChannel *pKernelChannel, NVB06F_CTRL_RESTORE_ENGINE_CTX_DATA_PARAMS *pCtxBuffParams) { 1015 return pKernelChannel->__kchannelCtrlCmdRestoreEngineCtxData__(pKernelChannel, pCtxBuffParams); 1016 } 1017 1018 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidC06F_6a9a13(struct KernelChannel *pKernelChannel, NVC06F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 1019 return kchannelCtrlCmdGetClassEngineid(pKernelChannel, pParams); 1020 } 1021 1022 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidC06F_DISPATCH(struct KernelChannel *pKernelChannel, NVC06F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 1023 return pKernelChannel->__kchannelCtrlCmdGetClassEngineidC06F__(pKernelChannel, pParams); 1024 } 1025 1026 static inline NV_STATUS kchannelCtrlCmdResetChannelC06F_ef73a1(struct KernelChannel *pKernelChannel, NVC06F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 1027 return kchannelCtrlCmdResetChannel(pKernelChannel, pResetChannelParams); 1028 } 1029 1030 static inline NV_STATUS kchannelCtrlCmdResetChannelC06F_DISPATCH(struct KernelChannel *pKernelChannel, NVC06F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 1031 return pKernelChannel->__kchannelCtrlCmdResetChannelC06F__(pKernelChannel, pResetChannelParams); 1032 } 1033 1034 static inline NV_STATUS kchannelCtrlCmdGpFifoScheduleC06F_6546a6(struct KernelChannel *pKernelChannel, NVC06F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 1035 return kchannelCtrlCmdGpFifoSchedule(pKernelChannel, pSchedParams); 1036 } 1037 1038 static inline NV_STATUS kchannelCtrlCmdGpFifoScheduleC06F_DISPATCH(struct KernelChannel *pKernelChannel, NVC06F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 1039 return pKernelChannel->__kchannelCtrlCmdGpFifoScheduleC06F__(pKernelChannel, pSchedParams); 1040 } 1041 1042 static inline NV_STATUS kchannelCtrlCmdBindC06F_2c1c21(struct KernelChannel *pKernelChannel, NVC06F_CTRL_BIND_PARAMS *pParams) { 1043 return kchannelCtrlCmdBind(pKernelChannel, pParams); 1044 } 1045 1046 static inline NV_STATUS kchannelCtrlCmdBindC06F_DISPATCH(struct KernelChannel *pKernelChannel, NVC06F_CTRL_BIND_PARAMS *pParams) { 1047 return pKernelChannel->__kchannelCtrlCmdBindC06F__(pKernelChannel, pParams); 1048 } 1049 1050 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidC36F_6a9a13(struct KernelChannel *pKernelChannel, NVC36F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 1051 return kchannelCtrlCmdGetClassEngineid(pKernelChannel, pParams); 1052 } 1053 1054 static inline NV_STATUS kchannelCtrlCmdGetClassEngineidC36F_DISPATCH(struct KernelChannel *pKernelChannel, NVC36F_CTRL_GET_CLASS_ENGINEID_PARAMS *pParams) { 1055 return pKernelChannel->__kchannelCtrlCmdGetClassEngineidC36F__(pKernelChannel, pParams); 1056 } 1057 1058 static inline NV_STATUS kchannelCtrlCmdResetChannelC36F_ef73a1(struct KernelChannel *pKernelChannel, NVC36F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 1059 return kchannelCtrlCmdResetChannel(pKernelChannel, pResetChannelParams); 1060 } 1061 1062 static inline NV_STATUS kchannelCtrlCmdResetChannelC36F_DISPATCH(struct KernelChannel *pKernelChannel, NVC36F_CTRL_CMD_RESET_CHANNEL_PARAMS *pResetChannelParams) { 1063 return pKernelChannel->__kchannelCtrlCmdResetChannelC36F__(pKernelChannel, pResetChannelParams); 1064 } 1065 1066 static inline NV_STATUS kchannelCtrlCmdGpFifoScheduleC36F_6546a6(struct KernelChannel *pKernelChannel, NVC36F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 1067 return kchannelCtrlCmdGpFifoSchedule(pKernelChannel, pSchedParams); 1068 } 1069 1070 static inline NV_STATUS kchannelCtrlCmdGpFifoScheduleC36F_DISPATCH(struct KernelChannel *pKernelChannel, NVC36F_CTRL_GPFIFO_SCHEDULE_PARAMS *pSchedParams) { 1071 return pKernelChannel->__kchannelCtrlCmdGpFifoScheduleC36F__(pKernelChannel, pSchedParams); 1072 } 1073 1074 static inline NV_STATUS kchannelCtrlCmdBindC36F_2c1c21(struct KernelChannel *pKernelChannel, NVC36F_CTRL_BIND_PARAMS *pParams) { 1075 return kchannelCtrlCmdBind(pKernelChannel, pParams); 1076 } 1077 1078 static inline NV_STATUS kchannelCtrlCmdBindC36F_DISPATCH(struct KernelChannel *pKernelChannel, NVC36F_CTRL_BIND_PARAMS *pParams) { 1079 return pKernelChannel->__kchannelCtrlCmdBindC36F__(pKernelChannel, pParams); 1080 } 1081 1082 NV_STATUS kchannelCtrlCmdGpfifoGetWorkSubmitToken_IMPL(struct KernelChannel *pKernelChannel, NVC36F_CTRL_CMD_GPFIFO_GET_WORK_SUBMIT_TOKEN_PARAMS *pTokenParams); 1083 1084 static inline NV_STATUS kchannelCtrlCmdGpfifoGetWorkSubmitToken_DISPATCH(struct KernelChannel *pKernelChannel, NVC36F_CTRL_CMD_GPFIFO_GET_WORK_SUBMIT_TOKEN_PARAMS *pTokenParams) { 1085 return pKernelChannel->__kchannelCtrlCmdGpfifoGetWorkSubmitToken__(pKernelChannel, pTokenParams); 1086 } 1087 1088 NV_STATUS kchannelCtrlCmdGpfifoUpdateFaultMethodBuffer_IMPL(struct KernelChannel *pKernelChannel, NVC36F_CTRL_GPFIFO_UPDATE_FAULT_METHOD_BUFFER_PARAMS *pFaultMthdBufferParams); 1089 1090 static inline NV_STATUS kchannelCtrlCmdGpfifoUpdateFaultMethodBuffer_DISPATCH(struct KernelChannel *pKernelChannel, NVC36F_CTRL_GPFIFO_UPDATE_FAULT_METHOD_BUFFER_PARAMS *pFaultMthdBufferParams) { 1091 return pKernelChannel->__kchannelCtrlCmdGpfifoUpdateFaultMethodBuffer__(pKernelChannel, pFaultMthdBufferParams); 1092 } 1093 1094 NV_STATUS kchannelCtrlCmdGpfifoSetWorkSubmitTokenNotifIndex_IMPL(struct KernelChannel *pKernelChannel, NVC36F_CTRL_GPFIFO_SET_WORK_SUBMIT_TOKEN_NOTIF_INDEX_PARAMS *pParams); 1095 1096 static inline NV_STATUS kchannelCtrlCmdGpfifoSetWorkSubmitTokenNotifIndex_DISPATCH(struct KernelChannel *pKernelChannel, NVC36F_CTRL_GPFIFO_SET_WORK_SUBMIT_TOKEN_NOTIF_INDEX_PARAMS *pParams) { 1097 return pKernelChannel->__kchannelCtrlCmdGpfifoSetWorkSubmitTokenNotifIndex__(pKernelChannel, pParams); 1098 } 1099 1100 NV_STATUS kchannelCtrlCmdStopChannel_IMPL(struct KernelChannel *pKernelChannel, NVA06F_CTRL_STOP_CHANNEL_PARAMS *pStopChannelParams); 1101 1102 static inline NV_STATUS kchannelCtrlCmdStopChannel_DISPATCH(struct KernelChannel *pKernelChannel, NVA06F_CTRL_STOP_CHANNEL_PARAMS *pStopChannelParams) { 1103 return pKernelChannel->__kchannelCtrlCmdStopChannel__(pKernelChannel, pStopChannelParams); 1104 } 1105 1106 NV_STATUS kchannelCtrlCmdGetKmb_KERNEL(struct KernelChannel *pKernelChannel, NVC56F_CTRL_CMD_GET_KMB_PARAMS *pGetKmbParams); 1107 1108 static inline NV_STATUS kchannelCtrlCmdGetKmb_DISPATCH(struct KernelChannel *pKernelChannel, NVC56F_CTRL_CMD_GET_KMB_PARAMS *pGetKmbParams) { 1109 return pKernelChannel->__kchannelCtrlCmdGetKmb__(pKernelChannel, pGetKmbParams); 1110 } 1111 1112 NV_STATUS kchannelCtrlRotateSecureChannelIv_KERNEL(struct KernelChannel *pKernelChannel, NVC56F_CTRL_ROTATE_SECURE_CHANNEL_IV_PARAMS *pRotateIvParams); 1113 1114 static inline NV_STATUS kchannelCtrlRotateSecureChannelIv_DISPATCH(struct KernelChannel *pKernelChannel, NVC56F_CTRL_ROTATE_SECURE_CHANNEL_IV_PARAMS *pRotateIvParams) { 1115 return pKernelChannel->__kchannelCtrlRotateSecureChannelIv__(pKernelChannel, pRotateIvParams); 1116 } 1117 1118 static inline NV_STATUS kchannelCtrlGetTpcPartitionMode_a094e1(struct KernelChannel *pKernelChannel, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *pParams) { 1119 return kgrctxCtrlHandle(resservGetTlsCallContext(), pKernelChannel->hKernelGraphicsContext); 1120 } 1121 1122 static inline NV_STATUS kchannelCtrlGetTpcPartitionMode_DISPATCH(struct KernelChannel *pKernelChannel, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *pParams) { 1123 return pKernelChannel->__kchannelCtrlGetTpcPartitionMode__(pKernelChannel, pParams); 1124 } 1125 1126 static inline NV_STATUS kchannelCtrlSetTpcPartitionMode_a094e1(struct KernelChannel *pKernelChannel, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *pParams) { 1127 return kgrctxCtrlHandle(resservGetTlsCallContext(), pKernelChannel->hKernelGraphicsContext); 1128 } 1129 1130 static inline NV_STATUS kchannelCtrlSetTpcPartitionMode_DISPATCH(struct KernelChannel *pKernelChannel, NV0090_CTRL_TPC_PARTITION_MODE_PARAMS *pParams) { 1131 return pKernelChannel->__kchannelCtrlSetTpcPartitionMode__(pKernelChannel, pParams); 1132 } 1133 1134 static inline NV_STATUS kchannelCtrlGetMMUDebugMode_a094e1(struct KernelChannel *pKernelChannel, NV0090_CTRL_GET_MMU_DEBUG_MODE_PARAMS *pParams) { 1135 return kgrctxCtrlHandle(resservGetTlsCallContext(), pKernelChannel->hKernelGraphicsContext); 1136 } 1137 1138 static inline NV_STATUS kchannelCtrlGetMMUDebugMode_DISPATCH(struct KernelChannel *pKernelChannel, NV0090_CTRL_GET_MMU_DEBUG_MODE_PARAMS *pParams) { 1139 return pKernelChannel->__kchannelCtrlGetMMUDebugMode__(pKernelChannel, pParams); 1140 } 1141 1142 static inline NV_STATUS kchannelCtrlProgramVidmemPromote_a094e1(struct KernelChannel *pKernelChannel, NV0090_CTRL_PROGRAM_VIDMEM_PROMOTE_PARAMS *pParams) { 1143 return kgrctxCtrlHandle(resservGetTlsCallContext(), pKernelChannel->hKernelGraphicsContext); 1144 } 1145 1146 static inline NV_STATUS kchannelCtrlProgramVidmemPromote_DISPATCH(struct KernelChannel *pKernelChannel, NV0090_CTRL_PROGRAM_VIDMEM_PROMOTE_PARAMS *pParams) { 1147 return pKernelChannel->__kchannelCtrlProgramVidmemPromote__(pKernelChannel, pParams); 1148 } 1149 1150 static inline NvBool kchannelShareCallback_DISPATCH(struct KernelChannel *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) { 1151 return pGpuResource->__kchannelShareCallback__(pGpuResource, pInvokingClient, pParentRef, pSharePolicy); 1152 } 1153 1154 static inline NV_STATUS kchannelGetOrAllocNotifShare_DISPATCH(struct KernelChannel *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) { 1155 return pNotifier->__kchannelGetOrAllocNotifShare__(pNotifier, hNotifierClient, hNotifierResource, ppNotifShare); 1156 } 1157 1158 static inline NV_STATUS kchannelMapTo_DISPATCH(struct KernelChannel *pResource, RS_RES_MAP_TO_PARAMS *pParams) { 1159 return pResource->__kchannelMapTo__(pResource, pParams); 1160 } 1161 1162 static inline void kchannelSetNotificationShare_DISPATCH(struct KernelChannel *pNotifier, struct NotifShare *pNotifShare) { 1163 pNotifier->__kchannelSetNotificationShare__(pNotifier, pNotifShare); 1164 } 1165 1166 static inline NvU32 kchannelGetRefCount_DISPATCH(struct KernelChannel *pResource) { 1167 return pResource->__kchannelGetRefCount__(pResource); 1168 } 1169 1170 static inline void kchannelAddAdditionalDependants_DISPATCH(struct RsClient *pClient, struct KernelChannel *pResource, RsResourceRef *pReference) { 1171 pResource->__kchannelAddAdditionalDependants__(pClient, pResource, pReference); 1172 } 1173 1174 static inline NV_STATUS kchannelControl_Prologue_DISPATCH(struct KernelChannel *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 1175 return pResource->__kchannelControl_Prologue__(pResource, pCallContext, pParams); 1176 } 1177 1178 static inline NV_STATUS kchannelGetRegBaseOffsetAndSize_DISPATCH(struct KernelChannel *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) { 1179 return pGpuResource->__kchannelGetRegBaseOffsetAndSize__(pGpuResource, pGpu, pOffset, pSize); 1180 } 1181 1182 static inline NV_STATUS kchannelInternalControlForward_DISPATCH(struct KernelChannel *pGpuResource, NvU32 command, void *pParams, NvU32 size) { 1183 return pGpuResource->__kchannelInternalControlForward__(pGpuResource, command, pParams, size); 1184 } 1185 1186 static inline NV_STATUS kchannelUnmapFrom_DISPATCH(struct KernelChannel *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) { 1187 return pResource->__kchannelUnmapFrom__(pResource, pParams); 1188 } 1189 1190 static inline void kchannelControl_Epilogue_DISPATCH(struct KernelChannel *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 1191 pResource->__kchannelControl_Epilogue__(pResource, pCallContext, pParams); 1192 } 1193 1194 static inline NV_STATUS kchannelControlLookup_DISPATCH(struct KernelChannel *pResource, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams, const struct NVOC_EXPORTED_METHOD_DEF **ppEntry) { 1195 return pResource->__kchannelControlLookup__(pResource, pParams, ppEntry); 1196 } 1197 1198 static inline NvHandle kchannelGetInternalObjectHandle_DISPATCH(struct KernelChannel *pGpuResource) { 1199 return pGpuResource->__kchannelGetInternalObjectHandle__(pGpuResource); 1200 } 1201 1202 static inline NV_STATUS kchannelControl_DISPATCH(struct KernelChannel *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 1203 return pGpuResource->__kchannelControl__(pGpuResource, pCallContext, pParams); 1204 } 1205 1206 static inline NV_STATUS kchannelGetMemoryMappingDescriptor_DISPATCH(struct KernelChannel *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) { 1207 return pRmResource->__kchannelGetMemoryMappingDescriptor__(pRmResource, ppMemDesc); 1208 } 1209 1210 static inline NV_STATUS kchannelControlFilter_DISPATCH(struct KernelChannel *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 1211 return pResource->__kchannelControlFilter__(pResource, pCallContext, pParams); 1212 } 1213 1214 static inline NV_STATUS kchannelUnregisterEvent_DISPATCH(struct KernelChannel *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) { 1215 return pNotifier->__kchannelUnregisterEvent__(pNotifier, hNotifierClient, hNotifierResource, hEventClient, hEvent); 1216 } 1217 1218 static inline NV_STATUS kchannelControlSerialization_Prologue_DISPATCH(struct KernelChannel *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 1219 return pResource->__kchannelControlSerialization_Prologue__(pResource, pCallContext, pParams); 1220 } 1221 1222 static inline NvBool kchannelCanCopy_DISPATCH(struct KernelChannel *pResource) { 1223 return pResource->__kchannelCanCopy__(pResource); 1224 } 1225 1226 static inline void kchannelPreDestruct_DISPATCH(struct KernelChannel *pResource) { 1227 pResource->__kchannelPreDestruct__(pResource); 1228 } 1229 1230 static inline NV_STATUS kchannelIsDuplicate_DISPATCH(struct KernelChannel *pResource, NvHandle hMemory, NvBool *pDuplicate) { 1231 return pResource->__kchannelIsDuplicate__(pResource, hMemory, pDuplicate); 1232 } 1233 1234 static inline void kchannelControlSerialization_Epilogue_DISPATCH(struct KernelChannel *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 1235 pResource->__kchannelControlSerialization_Epilogue__(pResource, pCallContext, pParams); 1236 } 1237 1238 static inline PEVENTNOTIFICATION *kchannelGetNotificationListPtr_DISPATCH(struct KernelChannel *pNotifier) { 1239 return pNotifier->__kchannelGetNotificationListPtr__(pNotifier); 1240 } 1241 1242 static inline struct NotifShare *kchannelGetNotificationShare_DISPATCH(struct KernelChannel *pNotifier) { 1243 return pNotifier->__kchannelGetNotificationShare__(pNotifier); 1244 } 1245 1246 static inline NvBool kchannelAccessCallback_DISPATCH(struct KernelChannel *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) { 1247 return pResource->__kchannelAccessCallback__(pResource, pInvokingClient, pAllocParams, accessRight); 1248 } 1249 1250 static inline NvU32 kchannelGetDebugTag(const struct KernelChannel *pKernelChannel) { 1251 if (pKernelChannel == ((void *)0)) 1252 return 4294967295U; 1253 return pKernelChannel->ChID; 1254 } 1255 1256 static inline NvBool kchannelIsCtxBufferAllocSkipped(struct KernelChannel *pKernelChannel) { 1257 return pKernelChannel->bSkipCtxBufferAlloc; 1258 } 1259 1260 static inline NvU32 kchannelGetSubctxId(struct KernelChannel *pKernelChannel) { 1261 return pKernelChannel->subctxId; 1262 } 1263 1264 static inline NvU32 kchannelGetCid(struct KernelChannel *pKernelChannel) { 1265 return pKernelChannel->cid; 1266 } 1267 1268 static inline struct MIG_INSTANCE_REF *kchannelGetMIGReference(struct KernelChannel *pKernelChannel) { 1269 return &pKernelChannel->partitionRef; 1270 } 1271 1272 static inline NvU32 kchannelGetRunqueue(struct KernelChannel *pKernelChannel) { 1273 return pKernelChannel->runqueue; 1274 } 1275 1276 static inline NvU32 kchannelGetRunlistId(struct KernelChannel *pKernelChannel) { 1277 return pKernelChannel->runlistId; 1278 } 1279 1280 static inline void kchannelSetRunlistId(struct KernelChannel *pKernelChannel, NvU32 runlistId) { 1281 pKernelChannel->runlistId = runlistId; 1282 } 1283 1284 static inline RM_ENGINE_TYPE kchannelGetEngineType(struct KernelChannel *pKernelChannel) { 1285 return pKernelChannel->engineType; 1286 } 1287 1288 NV_STATUS kchannelConstruct_IMPL(struct KernelChannel *arg_pKernelChannel, CALL_CONTEXT *arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL *arg_pParams); 1289 1290 #define __nvoc_kchannelConstruct(arg_pKernelChannel, arg_pCallContext, arg_pParams) kchannelConstruct_IMPL(arg_pKernelChannel, arg_pCallContext, arg_pParams) 1291 void kchannelDestruct_IMPL(struct KernelChannel *pResource); 1292 1293 #define __nvoc_kchannelDestruct(pResource) kchannelDestruct_IMPL(pResource) 1294 NV_STATUS kchannelRegisterChild_IMPL(struct KernelChannel *pKernelChannel, ChannelDescendant *pObject); 1295 1296 #ifdef __nvoc_kernel_channel_h_disabled 1297 static inline NV_STATUS kchannelRegisterChild(struct KernelChannel *pKernelChannel, ChannelDescendant *pObject) { 1298 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1299 return NV_ERR_NOT_SUPPORTED; 1300 } 1301 #else //__nvoc_kernel_channel_h_disabled 1302 #define kchannelRegisterChild(pKernelChannel, pObject) kchannelRegisterChild_IMPL(pKernelChannel, pObject) 1303 #endif //__nvoc_kernel_channel_h_disabled 1304 1305 NV_STATUS kchannelDeregisterChild_IMPL(struct KernelChannel *pKernelChannel, ChannelDescendant *pObject); 1306 1307 #ifdef __nvoc_kernel_channel_h_disabled 1308 static inline NV_STATUS kchannelDeregisterChild(struct KernelChannel *pKernelChannel, ChannelDescendant *pObject) { 1309 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1310 return NV_ERR_NOT_SUPPORTED; 1311 } 1312 #else //__nvoc_kernel_channel_h_disabled 1313 #define kchannelDeregisterChild(pKernelChannel, pObject) kchannelDeregisterChild_IMPL(pKernelChannel, pObject) 1314 #endif //__nvoc_kernel_channel_h_disabled 1315 1316 void kchannelNotifyGeneric_IMPL(struct KernelChannel *pKernelChannel, NvU32 notifyIndex, void *pNotifyParams, NvU32 notifyParamsSize); 1317 1318 #ifdef __nvoc_kernel_channel_h_disabled 1319 static inline void kchannelNotifyGeneric(struct KernelChannel *pKernelChannel, NvU32 notifyIndex, void *pNotifyParams, NvU32 notifyParamsSize) { 1320 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1321 } 1322 #else //__nvoc_kernel_channel_h_disabled 1323 #define kchannelNotifyGeneric(pKernelChannel, notifyIndex, pNotifyParams, notifyParamsSize) kchannelNotifyGeneric_IMPL(pKernelChannel, notifyIndex, pNotifyParams, notifyParamsSize) 1324 #endif //__nvoc_kernel_channel_h_disabled 1325 1326 NvBool kchannelCheckIsUserMode_IMPL(struct KernelChannel *pKernelChannel); 1327 1328 #ifdef __nvoc_kernel_channel_h_disabled 1329 static inline NvBool kchannelCheckIsUserMode(struct KernelChannel *pKernelChannel) { 1330 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1331 return NV_FALSE; 1332 } 1333 #else //__nvoc_kernel_channel_h_disabled 1334 #define kchannelCheckIsUserMode(pKernelChannel) kchannelCheckIsUserMode_IMPL(pKernelChannel) 1335 #endif //__nvoc_kernel_channel_h_disabled 1336 1337 NvBool kchannelCheckIsKernel_IMPL(struct KernelChannel *pKernelChannel); 1338 1339 #ifdef __nvoc_kernel_channel_h_disabled 1340 static inline NvBool kchannelCheckIsKernel(struct KernelChannel *pKernelChannel) { 1341 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1342 return NV_FALSE; 1343 } 1344 #else //__nvoc_kernel_channel_h_disabled 1345 #define kchannelCheckIsKernel(pKernelChannel) kchannelCheckIsKernel_IMPL(pKernelChannel) 1346 #endif //__nvoc_kernel_channel_h_disabled 1347 1348 NvBool kchannelCheckIsAdmin_IMPL(struct KernelChannel *pKernelChannel); 1349 1350 #ifdef __nvoc_kernel_channel_h_disabled 1351 static inline NvBool kchannelCheckIsAdmin(struct KernelChannel *pKernelChannel) { 1352 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1353 return NV_FALSE; 1354 } 1355 #else //__nvoc_kernel_channel_h_disabled 1356 #define kchannelCheckIsAdmin(pKernelChannel) kchannelCheckIsAdmin_IMPL(pKernelChannel) 1357 #endif //__nvoc_kernel_channel_h_disabled 1358 1359 NV_STATUS kchannelBindToRunlist_IMPL(struct KernelChannel *pKernelChannel, RM_ENGINE_TYPE localRmEngineType, ENGDESCRIPTOR engineDesc); 1360 1361 #ifdef __nvoc_kernel_channel_h_disabled 1362 static inline NV_STATUS kchannelBindToRunlist(struct KernelChannel *pKernelChannel, RM_ENGINE_TYPE localRmEngineType, ENGDESCRIPTOR engineDesc) { 1363 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1364 return NV_ERR_NOT_SUPPORTED; 1365 } 1366 #else //__nvoc_kernel_channel_h_disabled 1367 #define kchannelBindToRunlist(pKernelChannel, localRmEngineType, engineDesc) kchannelBindToRunlist_IMPL(pKernelChannel, localRmEngineType, engineDesc) 1368 #endif //__nvoc_kernel_channel_h_disabled 1369 1370 NV_STATUS kchannelSetEngineContextMemDesc_IMPL(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 engine, MEMORY_DESCRIPTOR *pMemDesc); 1371 1372 #ifdef __nvoc_kernel_channel_h_disabled 1373 static inline NV_STATUS kchannelSetEngineContextMemDesc(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 engine, MEMORY_DESCRIPTOR *pMemDesc) { 1374 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1375 return NV_ERR_NOT_SUPPORTED; 1376 } 1377 #else //__nvoc_kernel_channel_h_disabled 1378 #define kchannelSetEngineContextMemDesc(pGpu, pKernelChannel, engine, pMemDesc) kchannelSetEngineContextMemDesc_IMPL(pGpu, pKernelChannel, engine, pMemDesc) 1379 #endif //__nvoc_kernel_channel_h_disabled 1380 1381 NV_STATUS kchannelMapEngineCtxBuf_IMPL(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 engine); 1382 1383 #ifdef __nvoc_kernel_channel_h_disabled 1384 static inline NV_STATUS kchannelMapEngineCtxBuf(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 engine) { 1385 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1386 return NV_ERR_NOT_SUPPORTED; 1387 } 1388 #else //__nvoc_kernel_channel_h_disabled 1389 #define kchannelMapEngineCtxBuf(pGpu, pKernelChannel, engine) kchannelMapEngineCtxBuf_IMPL(pGpu, pKernelChannel, engine) 1390 #endif //__nvoc_kernel_channel_h_disabled 1391 1392 NV_STATUS kchannelUnmapEngineCtxBuf_IMPL(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 engine); 1393 1394 #ifdef __nvoc_kernel_channel_h_disabled 1395 static inline NV_STATUS kchannelUnmapEngineCtxBuf(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvU32 engine) { 1396 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1397 return NV_ERR_NOT_SUPPORTED; 1398 } 1399 #else //__nvoc_kernel_channel_h_disabled 1400 #define kchannelUnmapEngineCtxBuf(pGpu, pKernelChannel, engine) kchannelUnmapEngineCtxBuf_IMPL(pGpu, pKernelChannel, engine) 1401 #endif //__nvoc_kernel_channel_h_disabled 1402 1403 NV_STATUS kchannelCheckBcStateCurrent_IMPL(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel); 1404 1405 #ifdef __nvoc_kernel_channel_h_disabled 1406 static inline NV_STATUS kchannelCheckBcStateCurrent(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel) { 1407 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1408 return NV_ERR_NOT_SUPPORTED; 1409 } 1410 #else //__nvoc_kernel_channel_h_disabled 1411 #define kchannelCheckBcStateCurrent(pGpu, pKernelChannel) kchannelCheckBcStateCurrent_IMPL(pGpu, pKernelChannel) 1412 #endif //__nvoc_kernel_channel_h_disabled 1413 1414 NV_STATUS kchannelUpdateWorkSubmitTokenNotifIndex_IMPL(struct OBJGPU *pGpu, struct KernelChannel *arg0, NvU32 index); 1415 1416 #ifdef __nvoc_kernel_channel_h_disabled 1417 static inline NV_STATUS kchannelUpdateWorkSubmitTokenNotifIndex(struct OBJGPU *pGpu, struct KernelChannel *arg0, NvU32 index) { 1418 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1419 return NV_ERR_NOT_SUPPORTED; 1420 } 1421 #else //__nvoc_kernel_channel_h_disabled 1422 #define kchannelUpdateWorkSubmitTokenNotifIndex(pGpu, arg0, index) kchannelUpdateWorkSubmitTokenNotifIndex_IMPL(pGpu, arg0, index) 1423 #endif //__nvoc_kernel_channel_h_disabled 1424 1425 NV_STATUS kchannelNotifyWorkSubmitToken_IMPL(struct OBJGPU *pGpu, struct KernelChannel *arg0, NvU32 token); 1426 1427 #ifdef __nvoc_kernel_channel_h_disabled 1428 static inline NV_STATUS kchannelNotifyWorkSubmitToken(struct OBJGPU *pGpu, struct KernelChannel *arg0, NvU32 token) { 1429 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1430 return NV_ERR_NOT_SUPPORTED; 1431 } 1432 #else //__nvoc_kernel_channel_h_disabled 1433 #define kchannelNotifyWorkSubmitToken(pGpu, arg0, token) kchannelNotifyWorkSubmitToken_IMPL(pGpu, arg0, token) 1434 #endif //__nvoc_kernel_channel_h_disabled 1435 1436 NV_STATUS kchannelMapUserD_IMPL(struct OBJGPU *pGpu, struct KernelChannel *arg0, RS_PRIV_LEVEL arg1, NvU64 arg2, NvU32 arg3, NvP64 *arg4, NvP64 *arg5); 1437 1438 #ifdef __nvoc_kernel_channel_h_disabled 1439 static inline NV_STATUS kchannelMapUserD(struct OBJGPU *pGpu, struct KernelChannel *arg0, RS_PRIV_LEVEL arg1, NvU64 arg2, NvU32 arg3, NvP64 *arg4, NvP64 *arg5) { 1440 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1441 return NV_ERR_NOT_SUPPORTED; 1442 } 1443 #else //__nvoc_kernel_channel_h_disabled 1444 #define kchannelMapUserD(pGpu, arg0, arg1, arg2, arg3, arg4, arg5) kchannelMapUserD_IMPL(pGpu, arg0, arg1, arg2, arg3, arg4, arg5) 1445 #endif //__nvoc_kernel_channel_h_disabled 1446 1447 void kchannelUnmapUserD_IMPL(struct OBJGPU *pGpu, struct KernelChannel *arg0, RS_PRIV_LEVEL arg1, NvP64 *arg2, NvP64 *arg3); 1448 1449 #ifdef __nvoc_kernel_channel_h_disabled 1450 static inline void kchannelUnmapUserD(struct OBJGPU *pGpu, struct KernelChannel *arg0, RS_PRIV_LEVEL arg1, NvP64 *arg2, NvP64 *arg3) { 1451 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1452 } 1453 #else //__nvoc_kernel_channel_h_disabled 1454 #define kchannelUnmapUserD(pGpu, arg0, arg1, arg2, arg3) kchannelUnmapUserD_IMPL(pGpu, arg0, arg1, arg2, arg3) 1455 #endif //__nvoc_kernel_channel_h_disabled 1456 1457 NV_STATUS kchannelGetFromDualHandle_IMPL(struct RsClient *arg0, NvHandle arg1, struct KernelChannel **arg2); 1458 1459 #define kchannelGetFromDualHandle(arg0, arg1, arg2) kchannelGetFromDualHandle_IMPL(arg0, arg1, arg2) 1460 NV_STATUS kchannelGetFromDualHandleRestricted_IMPL(struct RsClient *arg0, NvHandle arg1, struct KernelChannel **arg2); 1461 1462 #define kchannelGetFromDualHandleRestricted(arg0, arg1, arg2) kchannelGetFromDualHandleRestricted_IMPL(arg0, arg1, arg2) 1463 NvU32 kchannelGetGfid_IMPL(struct KernelChannel *pKernelChannel); 1464 1465 #ifdef __nvoc_kernel_channel_h_disabled 1466 static inline NvU32 kchannelGetGfid(struct KernelChannel *pKernelChannel) { 1467 NV_ASSERT_FAILED_PRECOMP("KernelChannel was disabled!"); 1468 return 0; 1469 } 1470 #else //__nvoc_kernel_channel_h_disabled 1471 #define kchannelGetGfid(pKernelChannel) kchannelGetGfid_IMPL(pKernelChannel) 1472 #endif //__nvoc_kernel_channel_h_disabled 1473 1474 #undef PRIVATE_FIELD 1475 1476 #ifndef NVOC_KERNEL_CHANNEL_H_PRIVATE_ACCESS_ALLOWED 1477 #ifndef __nvoc_kernel_channel_h_disabled 1478 #undef kchannelRotateSecureChannelIv 1479 NV_STATUS NVOC_PRIVATE_FUNCTION(kchannelRotateSecureChannelIv)(struct KernelChannel *pKernelChannel, ROTATE_IV_TYPE rotateOperation, NvU32 *encryptIv, NvU32 *decryptIv); 1480 #endif //__nvoc_kernel_channel_h_disabled 1481 1482 #ifndef __nvoc_kernel_channel_h_disabled 1483 #undef kchannelRetrieveKmb 1484 NV_STATUS NVOC_PRIVATE_FUNCTION(kchannelRetrieveKmb)(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, ROTATE_IV_TYPE rotateOperation, NvBool includeSecrets, CC_KMB *keyMaterialBundle); 1485 #endif //__nvoc_kernel_channel_h_disabled 1486 1487 #endif // NVOC_KERNEL_CHANNEL_H_PRIVATE_ACCESS_ALLOWED 1488 1489 1490 RS_ORDERED_ITERATOR kchannelGetIter( 1491 struct RsClient *pClient, 1492 RsResourceRef *pScopeRef); 1493 1494 NV_STATUS kchannelGetNextKernelChannel( 1495 struct OBJGPU *pGpu, 1496 CHANNEL_ITERATOR *pIt, 1497 struct KernelChannel **ppKernelChannel); 1498 1499 NV_STATUS CliGetKernelChannelWithDevice(struct RsClient *pClient, 1500 NvHandle hParent, 1501 NvHandle hKernelChannel, 1502 struct KernelChannel **ppKernelChannel); 1503 1504 NV_STATUS CliGetKernelChannel(struct RsClient *pClient, 1505 NvHandle hKernelChannel, 1506 struct KernelChannel **ppKernelChannel); 1507 1508 /*! 1509 * @brief Helper to get type and memdesc of a channel notifier (memory/ctxdma) 1510 */ 1511 NV_STATUS kchannelGetNotifierInfo(struct OBJGPU *pGpu, 1512 Device *pDevice, 1513 NvHandle hErrorContext, 1514 MEMORY_DESCRIPTOR **ppMemDesc, 1515 ErrorNotifierType *pNotifierType, 1516 NvU64 *pOffset); 1517 1518 // Utils to iterate over ChannelDescendants on one Channels 1519 void kchannelGetChildIterator(struct KernelChannel *pKernelChannel, 1520 NvU32 classID, 1521 RM_ENGINE_TYPE engineID, 1522 KernelChannelChildIterator *pIter); 1523 ChannelDescendant *kchannelGetNextChild(KernelChannelChildIterator *pIter); 1524 // Simpler function to call if you just need one result 1525 ChannelDescendant *kchannelGetOneChild(struct KernelChannel *pKernelChannel, 1526 NvU32 classID, 1527 NvU32 engineID); 1528 1529 // Utils to iterate over ChannelDescendants on all Channels in the same ChannelGroup 1530 void kchannelGetChildIterOverGroup(struct KernelChannel *pKernelChannel, 1531 NvU32 classNum, 1532 NvU32 engDesc, 1533 KernelChannelChildIterOverGroup *pIt); 1534 ChannelDescendant *kchannelGetNextChildOverGroup(KernelChannelChildIterOverGroup *pIt); 1535 1536 NV_STATUS kchannelFindChildByHandle(struct KernelChannel *pKernelChannel, NvHandle hResource, ChannelDescendant **ppObject); 1537 1538 // Bitmap for KernelChannel->swState 1539 #define KERNEL_CHANNEL_SW_STATE_CPU_MAP NVBIT(0) //UserD is mapped 1540 #define KERNEL_CHANNEL_SW_STATE_RUNLIST_SET NVBIT(1) // RunlistId is set 1541 1542 NvBool kchannelIsCpuMapped(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel); 1543 void kchannelSetCpuMapped(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvBool bCpuMapped); 1544 NvBool kchannelIsRunlistSet(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel); 1545 void kchannelSetRunlistSet(struct OBJGPU *pGpu, struct KernelChannel *pKernelChannel, NvBool bRunlistSet); 1546 1547 #endif // KERNEL_CHANNEL_H 1548 1549 #ifdef __cplusplus 1550 } // extern "C" 1551 #endif 1552 1553 #endif // _G_KERNEL_CHANNEL_NVOC_H_ 1554