1 #define NVOC_DISPSW_H_PRIVATE_ACCESS_ALLOWED 2 #include "nvoc/runtime.h" 3 #include "nvoc/rtti.h" 4 #include "nvtypes.h" 5 #include "nvport/nvport.h" 6 #include "nvport/inline/util_valist.h" 7 #include "utils/nvassert.h" 8 #include "g_dispsw_nvoc.h" 9 10 #ifdef DEBUG 11 char __nvoc_class_id_uniqueness_check_0x99ad6d = 1; 12 #endif 13 14 extern const struct NVOC_CLASS_DEF __nvoc_class_def_DispSwObject; 15 16 extern const struct NVOC_CLASS_DEF __nvoc_class_def_Object; 17 18 extern const struct NVOC_CLASS_DEF __nvoc_class_def_RsResource; 19 20 extern const struct NVOC_CLASS_DEF __nvoc_class_def_RmResourceCommon; 21 22 extern const struct NVOC_CLASS_DEF __nvoc_class_def_RmResource; 23 24 extern const struct NVOC_CLASS_DEF __nvoc_class_def_GpuResource; 25 26 extern const struct NVOC_CLASS_DEF __nvoc_class_def_INotifier; 27 28 extern const struct NVOC_CLASS_DEF __nvoc_class_def_Notifier; 29 30 extern const struct NVOC_CLASS_DEF __nvoc_class_def_ChannelDescendant; 31 32 void __nvoc_init_DispSwObject(DispSwObject*, RmHalspecOwner* ); 33 void __nvoc_init_funcTable_DispSwObject(DispSwObject*, RmHalspecOwner* ); 34 NV_STATUS __nvoc_ctor_DispSwObject(DispSwObject*, RmHalspecOwner* , CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams); 35 void __nvoc_init_dataField_DispSwObject(DispSwObject*, RmHalspecOwner* ); 36 void __nvoc_dtor_DispSwObject(DispSwObject*); 37 extern const struct NVOC_EXPORT_INFO __nvoc_export_info_DispSwObject; 38 39 static const struct NVOC_RTTI __nvoc_rtti_DispSwObject_DispSwObject = { 40 /*pClassDef=*/ &__nvoc_class_def_DispSwObject, 41 /*dtor=*/ (NVOC_DYNAMIC_DTOR) &__nvoc_dtor_DispSwObject, 42 /*offset=*/ 0, 43 }; 44 45 static const struct NVOC_RTTI __nvoc_rtti_DispSwObject_Object = { 46 /*pClassDef=*/ &__nvoc_class_def_Object, 47 /*dtor=*/ &__nvoc_destructFromBase, 48 /*offset=*/ NV_OFFSETOF(DispSwObject, __nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object), 49 }; 50 51 static const struct NVOC_RTTI __nvoc_rtti_DispSwObject_RsResource = { 52 /*pClassDef=*/ &__nvoc_class_def_RsResource, 53 /*dtor=*/ &__nvoc_destructFromBase, 54 /*offset=*/ NV_OFFSETOF(DispSwObject, __nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource), 55 }; 56 57 static const struct NVOC_RTTI __nvoc_rtti_DispSwObject_RmResourceCommon = { 58 /*pClassDef=*/ &__nvoc_class_def_RmResourceCommon, 59 /*dtor=*/ &__nvoc_destructFromBase, 60 /*offset=*/ NV_OFFSETOF(DispSwObject, __nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RmResourceCommon), 61 }; 62 63 static const struct NVOC_RTTI __nvoc_rtti_DispSwObject_RmResource = { 64 /*pClassDef=*/ &__nvoc_class_def_RmResource, 65 /*dtor=*/ &__nvoc_destructFromBase, 66 /*offset=*/ NV_OFFSETOF(DispSwObject, __nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource), 67 }; 68 69 static const struct NVOC_RTTI __nvoc_rtti_DispSwObject_GpuResource = { 70 /*pClassDef=*/ &__nvoc_class_def_GpuResource, 71 /*dtor=*/ &__nvoc_destructFromBase, 72 /*offset=*/ NV_OFFSETOF(DispSwObject, __nvoc_base_ChannelDescendant.__nvoc_base_GpuResource), 73 }; 74 75 static const struct NVOC_RTTI __nvoc_rtti_DispSwObject_INotifier = { 76 /*pClassDef=*/ &__nvoc_class_def_INotifier, 77 /*dtor=*/ &__nvoc_destructFromBase, 78 /*offset=*/ NV_OFFSETOF(DispSwObject, __nvoc_base_ChannelDescendant.__nvoc_base_Notifier.__nvoc_base_INotifier), 79 }; 80 81 static const struct NVOC_RTTI __nvoc_rtti_DispSwObject_Notifier = { 82 /*pClassDef=*/ &__nvoc_class_def_Notifier, 83 /*dtor=*/ &__nvoc_destructFromBase, 84 /*offset=*/ NV_OFFSETOF(DispSwObject, __nvoc_base_ChannelDescendant.__nvoc_base_Notifier), 85 }; 86 87 static const struct NVOC_RTTI __nvoc_rtti_DispSwObject_ChannelDescendant = { 88 /*pClassDef=*/ &__nvoc_class_def_ChannelDescendant, 89 /*dtor=*/ &__nvoc_destructFromBase, 90 /*offset=*/ NV_OFFSETOF(DispSwObject, __nvoc_base_ChannelDescendant), 91 }; 92 93 static const struct NVOC_CASTINFO __nvoc_castinfo_DispSwObject = { 94 /*numRelatives=*/ 9, 95 /*relatives=*/ { 96 &__nvoc_rtti_DispSwObject_DispSwObject, 97 &__nvoc_rtti_DispSwObject_ChannelDescendant, 98 &__nvoc_rtti_DispSwObject_Notifier, 99 &__nvoc_rtti_DispSwObject_INotifier, 100 &__nvoc_rtti_DispSwObject_GpuResource, 101 &__nvoc_rtti_DispSwObject_RmResource, 102 &__nvoc_rtti_DispSwObject_RmResourceCommon, 103 &__nvoc_rtti_DispSwObject_RsResource, 104 &__nvoc_rtti_DispSwObject_Object, 105 }, 106 }; 107 108 const struct NVOC_CLASS_DEF __nvoc_class_def_DispSwObject = 109 { 110 /*classInfo=*/ { 111 /*size=*/ sizeof(DispSwObject), 112 /*classId=*/ classId(DispSwObject), 113 /*providerId=*/ &__nvoc_rtti_provider, 114 #if NV_PRINTF_STRINGS_ALLOWED 115 /*name=*/ "DispSwObject", 116 #endif 117 }, 118 /*objCreatefn=*/ (NVOC_DYNAMIC_OBJ_CREATE) &__nvoc_objCreateDynamic_DispSwObject, 119 /*pCastInfo=*/ &__nvoc_castinfo_DispSwObject, 120 /*pExportInfo=*/ &__nvoc_export_info_DispSwObject 121 }; 122 123 static NV_STATUS __nvoc_thunk_DispSwObject_chandesGetSwMethods(struct ChannelDescendant *pDispSw, const METHOD **ppMethods, NvU32 *pNumMethods) { 124 return dispswGetSwMethods((struct DispSwObject *)(((unsigned char *)pDispSw) - __nvoc_rtti_DispSwObject_ChannelDescendant.offset), ppMethods, pNumMethods); 125 } 126 127 static NV_STATUS __nvoc_thunk_ChannelDescendant_dispswCheckMemInterUnmap(struct DispSwObject *pChannelDescendant, NvBool bSubdeviceHandleProvided) { 128 return chandesCheckMemInterUnmap((struct ChannelDescendant *)(((unsigned char *)pChannelDescendant) + __nvoc_rtti_DispSwObject_ChannelDescendant.offset), bSubdeviceHandleProvided); 129 } 130 131 static NvBool __nvoc_thunk_GpuResource_dispswShareCallback(struct DispSwObject *pGpuResource, struct RsClient *pInvokingClient, struct RsResourceRef *pParentRef, RS_SHARE_POLICY *pSharePolicy) { 132 return gpuresShareCallback((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_DispSwObject_GpuResource.offset), pInvokingClient, pParentRef, pSharePolicy); 133 } 134 135 static NvBool __nvoc_thunk_RmResource_dispswAccessCallback(struct DispSwObject *pResource, struct RsClient *pInvokingClient, void *pAllocParams, RsAccessRight accessRight) { 136 return rmresAccessCallback((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RmResource.offset), pInvokingClient, pAllocParams, accessRight); 137 } 138 139 static NV_STATUS __nvoc_thunk_RsResource_dispswMapTo(struct DispSwObject *pResource, RS_RES_MAP_TO_PARAMS *pParams) { 140 return resMapTo((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RsResource.offset), pParams); 141 } 142 143 static NV_STATUS __nvoc_thunk_GpuResource_dispswGetMapAddrSpace(struct DispSwObject *pGpuResource, struct CALL_CONTEXT *pCallContext, NvU32 mapFlags, NV_ADDRESS_SPACE *pAddrSpace) { 144 return gpuresGetMapAddrSpace((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_DispSwObject_GpuResource.offset), pCallContext, mapFlags, pAddrSpace); 145 } 146 147 static void __nvoc_thunk_Notifier_dispswSetNotificationShare(struct DispSwObject *pNotifier, struct NotifShare *pNotifShare) { 148 notifySetNotificationShare((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_DispSwObject_Notifier.offset), pNotifShare); 149 } 150 151 static NvU32 __nvoc_thunk_RsResource_dispswGetRefCount(struct DispSwObject *pResource) { 152 return resGetRefCount((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RsResource.offset)); 153 } 154 155 static void __nvoc_thunk_RsResource_dispswAddAdditionalDependants(struct RsClient *pClient, struct DispSwObject *pResource, RsResourceRef *pReference) { 156 resAddAdditionalDependants(pClient, (struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RsResource.offset), pReference); 157 } 158 159 static NV_STATUS __nvoc_thunk_RmResource_dispswControl_Prologue(struct DispSwObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 160 return rmresControl_Prologue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RmResource.offset), pCallContext, pParams); 161 } 162 163 static NV_STATUS __nvoc_thunk_GpuResource_dispswGetRegBaseOffsetAndSize(struct DispSwObject *pGpuResource, struct OBJGPU *pGpu, NvU32 *pOffset, NvU32 *pSize) { 164 return gpuresGetRegBaseOffsetAndSize((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_DispSwObject_GpuResource.offset), pGpu, pOffset, pSize); 165 } 166 167 static NV_STATUS __nvoc_thunk_GpuResource_dispswInternalControlForward(struct DispSwObject *pGpuResource, NvU32 command, void *pParams, NvU32 size) { 168 return gpuresInternalControlForward((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_DispSwObject_GpuResource.offset), command, pParams, size); 169 } 170 171 static NV_STATUS __nvoc_thunk_RsResource_dispswUnmapFrom(struct DispSwObject *pResource, RS_RES_UNMAP_FROM_PARAMS *pParams) { 172 return resUnmapFrom((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RsResource.offset), pParams); 173 } 174 175 static void __nvoc_thunk_RmResource_dispswControl_Epilogue(struct DispSwObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 176 rmresControl_Epilogue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RmResource.offset), pCallContext, pParams); 177 } 178 179 static NV_STATUS __nvoc_thunk_RsResource_dispswControlLookup(struct DispSwObject *pResource, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams, const struct NVOC_EXPORTED_METHOD_DEF **ppEntry) { 180 return resControlLookup((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RsResource.offset), pParams, ppEntry); 181 } 182 183 static NvHandle __nvoc_thunk_GpuResource_dispswGetInternalObjectHandle(struct DispSwObject *pGpuResource) { 184 return gpuresGetInternalObjectHandle((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_DispSwObject_GpuResource.offset)); 185 } 186 187 static NV_STATUS __nvoc_thunk_GpuResource_dispswControl(struct DispSwObject *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 188 return gpuresControl((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_DispSwObject_GpuResource.offset), pCallContext, pParams); 189 } 190 191 static NV_STATUS __nvoc_thunk_GpuResource_dispswUnmap(struct DispSwObject *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RsCpuMapping *pCpuMapping) { 192 return gpuresUnmap((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_DispSwObject_GpuResource.offset), pCallContext, pCpuMapping); 193 } 194 195 static NV_STATUS __nvoc_thunk_RmResource_dispswGetMemInterMapParams(struct DispSwObject *pRmResource, RMRES_MEM_INTER_MAP_PARAMS *pParams) { 196 return rmresGetMemInterMapParams((struct RmResource *)(((unsigned char *)pRmResource) + __nvoc_rtti_DispSwObject_RmResource.offset), pParams); 197 } 198 199 static NV_STATUS __nvoc_thunk_RmResource_dispswGetMemoryMappingDescriptor(struct DispSwObject *pRmResource, struct MEMORY_DESCRIPTOR **ppMemDesc) { 200 return rmresGetMemoryMappingDescriptor((struct RmResource *)(((unsigned char *)pRmResource) + __nvoc_rtti_DispSwObject_RmResource.offset), ppMemDesc); 201 } 202 203 static NvBool __nvoc_thunk_ChannelDescendant_dispswIsSwMethodStalling(struct DispSwObject *pChannelDescendant, NvU32 hHandle) { 204 return chandesIsSwMethodStalling((struct ChannelDescendant *)(((unsigned char *)pChannelDescendant) + __nvoc_rtti_DispSwObject_ChannelDescendant.offset), hHandle); 205 } 206 207 static NV_STATUS __nvoc_thunk_RsResource_dispswControlFilter(struct DispSwObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 208 return resControlFilter((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RsResource.offset), pCallContext, pParams); 209 } 210 211 static NV_STATUS __nvoc_thunk_Notifier_dispswUnregisterEvent(struct DispSwObject *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, NvHandle hEventClient, NvHandle hEvent) { 212 return notifyUnregisterEvent((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_DispSwObject_Notifier.offset), hNotifierClient, hNotifierResource, hEventClient, hEvent); 213 } 214 215 static NV_STATUS __nvoc_thunk_RmResource_dispswControlSerialization_Prologue(struct DispSwObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 216 return rmresControlSerialization_Prologue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RmResource.offset), pCallContext, pParams); 217 } 218 219 static NvBool __nvoc_thunk_RsResource_dispswCanCopy(struct DispSwObject *pResource) { 220 return resCanCopy((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RsResource.offset)); 221 } 222 223 static void __nvoc_thunk_RsResource_dispswPreDestruct(struct DispSwObject *pResource) { 224 resPreDestruct((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RsResource.offset)); 225 } 226 227 static NV_STATUS __nvoc_thunk_RsResource_dispswIsDuplicate(struct DispSwObject *pResource, NvHandle hMemory, NvBool *pDuplicate) { 228 return resIsDuplicate((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RsResource.offset), hMemory, pDuplicate); 229 } 230 231 static void __nvoc_thunk_RmResource_dispswControlSerialization_Epilogue(struct DispSwObject *pResource, struct CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) { 232 rmresControlSerialization_Epilogue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_DispSwObject_RmResource.offset), pCallContext, pParams); 233 } 234 235 static PEVENTNOTIFICATION *__nvoc_thunk_Notifier_dispswGetNotificationListPtr(struct DispSwObject *pNotifier) { 236 return notifyGetNotificationListPtr((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_DispSwObject_Notifier.offset)); 237 } 238 239 static struct NotifShare *__nvoc_thunk_Notifier_dispswGetNotificationShare(struct DispSwObject *pNotifier) { 240 return notifyGetNotificationShare((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_DispSwObject_Notifier.offset)); 241 } 242 243 static NV_STATUS __nvoc_thunk_GpuResource_dispswMap(struct DispSwObject *pGpuResource, struct CALL_CONTEXT *pCallContext, struct RS_CPU_MAP_PARAMS *pParams, struct RsCpuMapping *pCpuMapping) { 244 return gpuresMap((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_DispSwObject_GpuResource.offset), pCallContext, pParams, pCpuMapping); 245 } 246 247 static NV_STATUS __nvoc_thunk_Notifier_dispswGetOrAllocNotifShare(struct DispSwObject *pNotifier, NvHandle hNotifierClient, NvHandle hNotifierResource, struct NotifShare **ppNotifShare) { 248 return notifyGetOrAllocNotifShare((struct Notifier *)(((unsigned char *)pNotifier) + __nvoc_rtti_DispSwObject_Notifier.offset), hNotifierClient, hNotifierResource, ppNotifShare); 249 } 250 251 #if !defined(NVOC_EXPORTED_METHOD_DISABLED_BY_FLAG) 252 #define NVOC_EXPORTED_METHOD_DISABLED_BY_FLAG(x) (0) 253 #endif 254 255 static const struct NVOC_EXPORTED_METHOD_DEF __nvoc_exported_method_def_DispSwObject[] = 256 { 257 { /* [0] */ 258 #if NVOC_EXPORTED_METHOD_DISABLED_BY_FLAG(0x210u) 259 /*pFunc=*/ (void (*)(void)) NULL, 260 #else 261 /*pFunc=*/ (void (*)(void)) dispswCtrlCmdNotifyOnVblank_IMPL, 262 #endif // NVOC_EXPORTED_METHOD_DISABLED_BY_FLAG(0x210u) 263 /*flags=*/ 0x210u, 264 /*accessRight=*/0x0u, 265 /*methodId=*/ 0x90720101u, 266 /*paramSize=*/ sizeof(NV9072_CTRL_CMD_NOTIFY_ON_VBLANK_PARAMS), 267 /*pClassInfo=*/ &(__nvoc_class_def_DispSwObject.classInfo), 268 #if NV_PRINTF_STRINGS_ALLOWED 269 /*func=*/ "dispswCtrlCmdNotifyOnVblank" 270 #endif 271 }, 272 273 }; 274 275 const struct NVOC_EXPORT_INFO __nvoc_export_info_DispSwObject = 276 { 277 /*numEntries=*/ 1, 278 /*pExportEntries=*/ __nvoc_exported_method_def_DispSwObject 279 }; 280 281 void __nvoc_dtor_ChannelDescendant(ChannelDescendant*); 282 void __nvoc_dtor_DispSwObject(DispSwObject *pThis) { 283 __nvoc_dispswDestruct(pThis); 284 __nvoc_dtor_ChannelDescendant(&pThis->__nvoc_base_ChannelDescendant); 285 PORT_UNREFERENCED_VARIABLE(pThis); 286 } 287 288 void __nvoc_init_dataField_DispSwObject(DispSwObject *pThis, RmHalspecOwner *pRmhalspecowner) { 289 RmVariantHal *rmVariantHal = &pRmhalspecowner->rmVariantHal; 290 const unsigned long rmVariantHal_HalVarIdx = (unsigned long)rmVariantHal->__nvoc_HalVarIdx; 291 PORT_UNREFERENCED_VARIABLE(pThis); 292 PORT_UNREFERENCED_VARIABLE(pRmhalspecowner); 293 PORT_UNREFERENCED_VARIABLE(rmVariantHal); 294 PORT_UNREFERENCED_VARIABLE(rmVariantHal_HalVarIdx); 295 } 296 297 NV_STATUS __nvoc_ctor_ChannelDescendant(ChannelDescendant* , RmHalspecOwner* , CALL_CONTEXT *, struct RS_RES_ALLOC_PARAMS_INTERNAL *, PARAM_TO_ENGDESC_FUNCTION *); 298 NV_STATUS __nvoc_ctor_DispSwObject(DispSwObject *pThis, RmHalspecOwner *pRmhalspecowner, CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams) { 299 NV_STATUS status = NV_OK; 300 status = __nvoc_ctor_ChannelDescendant(&pThis->__nvoc_base_ChannelDescendant, pRmhalspecowner, arg_pCallContext, arg_pParams, ((void *)0)); 301 if (status != NV_OK) goto __nvoc_ctor_DispSwObject_fail_ChannelDescendant; 302 __nvoc_init_dataField_DispSwObject(pThis, pRmhalspecowner); 303 304 status = __nvoc_dispswConstruct(pThis, arg_pCallContext, arg_pParams); 305 if (status != NV_OK) goto __nvoc_ctor_DispSwObject_fail__init; 306 goto __nvoc_ctor_DispSwObject_exit; // Success 307 308 __nvoc_ctor_DispSwObject_fail__init: 309 __nvoc_dtor_ChannelDescendant(&pThis->__nvoc_base_ChannelDescendant); 310 __nvoc_ctor_DispSwObject_fail_ChannelDescendant: 311 __nvoc_ctor_DispSwObject_exit: 312 313 return status; 314 } 315 316 static void __nvoc_init_funcTable_DispSwObject_1(DispSwObject *pThis, RmHalspecOwner *pRmhalspecowner) { 317 RmVariantHal *rmVariantHal = &pRmhalspecowner->rmVariantHal; 318 const unsigned long rmVariantHal_HalVarIdx = (unsigned long)rmVariantHal->__nvoc_HalVarIdx; 319 PORT_UNREFERENCED_VARIABLE(pThis); 320 PORT_UNREFERENCED_VARIABLE(pRmhalspecowner); 321 PORT_UNREFERENCED_VARIABLE(rmVariantHal); 322 PORT_UNREFERENCED_VARIABLE(rmVariantHal_HalVarIdx); 323 324 // Hal function -- dispswGetSwMethods 325 pThis->__dispswGetSwMethods__ = &dispswGetSwMethods_46f6a7; 326 327 #if !NVOC_EXPORTED_METHOD_DISABLED_BY_FLAG(0x210u) 328 pThis->__dispswCtrlCmdNotifyOnVblank__ = &dispswCtrlCmdNotifyOnVblank_IMPL; 329 #endif 330 331 pThis->__nvoc_base_ChannelDescendant.__chandesGetSwMethods__ = &__nvoc_thunk_DispSwObject_chandesGetSwMethods; 332 333 pThis->__dispswCheckMemInterUnmap__ = &__nvoc_thunk_ChannelDescendant_dispswCheckMemInterUnmap; 334 335 pThis->__dispswShareCallback__ = &__nvoc_thunk_GpuResource_dispswShareCallback; 336 337 pThis->__dispswAccessCallback__ = &__nvoc_thunk_RmResource_dispswAccessCallback; 338 339 pThis->__dispswMapTo__ = &__nvoc_thunk_RsResource_dispswMapTo; 340 341 pThis->__dispswGetMapAddrSpace__ = &__nvoc_thunk_GpuResource_dispswGetMapAddrSpace; 342 343 pThis->__dispswSetNotificationShare__ = &__nvoc_thunk_Notifier_dispswSetNotificationShare; 344 345 pThis->__dispswGetRefCount__ = &__nvoc_thunk_RsResource_dispswGetRefCount; 346 347 pThis->__dispswAddAdditionalDependants__ = &__nvoc_thunk_RsResource_dispswAddAdditionalDependants; 348 349 pThis->__dispswControl_Prologue__ = &__nvoc_thunk_RmResource_dispswControl_Prologue; 350 351 pThis->__dispswGetRegBaseOffsetAndSize__ = &__nvoc_thunk_GpuResource_dispswGetRegBaseOffsetAndSize; 352 353 pThis->__dispswInternalControlForward__ = &__nvoc_thunk_GpuResource_dispswInternalControlForward; 354 355 pThis->__dispswUnmapFrom__ = &__nvoc_thunk_RsResource_dispswUnmapFrom; 356 357 pThis->__dispswControl_Epilogue__ = &__nvoc_thunk_RmResource_dispswControl_Epilogue; 358 359 pThis->__dispswControlLookup__ = &__nvoc_thunk_RsResource_dispswControlLookup; 360 361 pThis->__dispswGetInternalObjectHandle__ = &__nvoc_thunk_GpuResource_dispswGetInternalObjectHandle; 362 363 pThis->__dispswControl__ = &__nvoc_thunk_GpuResource_dispswControl; 364 365 pThis->__dispswUnmap__ = &__nvoc_thunk_GpuResource_dispswUnmap; 366 367 pThis->__dispswGetMemInterMapParams__ = &__nvoc_thunk_RmResource_dispswGetMemInterMapParams; 368 369 pThis->__dispswGetMemoryMappingDescriptor__ = &__nvoc_thunk_RmResource_dispswGetMemoryMappingDescriptor; 370 371 pThis->__dispswIsSwMethodStalling__ = &__nvoc_thunk_ChannelDescendant_dispswIsSwMethodStalling; 372 373 pThis->__dispswControlFilter__ = &__nvoc_thunk_RsResource_dispswControlFilter; 374 375 pThis->__dispswUnregisterEvent__ = &__nvoc_thunk_Notifier_dispswUnregisterEvent; 376 377 pThis->__dispswControlSerialization_Prologue__ = &__nvoc_thunk_RmResource_dispswControlSerialization_Prologue; 378 379 pThis->__dispswCanCopy__ = &__nvoc_thunk_RsResource_dispswCanCopy; 380 381 pThis->__dispswPreDestruct__ = &__nvoc_thunk_RsResource_dispswPreDestruct; 382 383 pThis->__dispswIsDuplicate__ = &__nvoc_thunk_RsResource_dispswIsDuplicate; 384 385 pThis->__dispswControlSerialization_Epilogue__ = &__nvoc_thunk_RmResource_dispswControlSerialization_Epilogue; 386 387 pThis->__dispswGetNotificationListPtr__ = &__nvoc_thunk_Notifier_dispswGetNotificationListPtr; 388 389 pThis->__dispswGetNotificationShare__ = &__nvoc_thunk_Notifier_dispswGetNotificationShare; 390 391 pThis->__dispswMap__ = &__nvoc_thunk_GpuResource_dispswMap; 392 393 pThis->__dispswGetOrAllocNotifShare__ = &__nvoc_thunk_Notifier_dispswGetOrAllocNotifShare; 394 } 395 396 void __nvoc_init_funcTable_DispSwObject(DispSwObject *pThis, RmHalspecOwner *pRmhalspecowner) { 397 __nvoc_init_funcTable_DispSwObject_1(pThis, pRmhalspecowner); 398 } 399 400 void __nvoc_init_ChannelDescendant(ChannelDescendant*, RmHalspecOwner* ); 401 void __nvoc_init_DispSwObject(DispSwObject *pThis, RmHalspecOwner *pRmhalspecowner) { 402 pThis->__nvoc_pbase_DispSwObject = pThis; 403 pThis->__nvoc_pbase_Object = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object; 404 pThis->__nvoc_pbase_RsResource = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource; 405 pThis->__nvoc_pbase_RmResourceCommon = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RmResourceCommon; 406 pThis->__nvoc_pbase_RmResource = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource; 407 pThis->__nvoc_pbase_GpuResource = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource; 408 pThis->__nvoc_pbase_INotifier = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_Notifier.__nvoc_base_INotifier; 409 pThis->__nvoc_pbase_Notifier = &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_Notifier; 410 pThis->__nvoc_pbase_ChannelDescendant = &pThis->__nvoc_base_ChannelDescendant; 411 __nvoc_init_ChannelDescendant(&pThis->__nvoc_base_ChannelDescendant, pRmhalspecowner); 412 __nvoc_init_funcTable_DispSwObject(pThis, pRmhalspecowner); 413 } 414 415 NV_STATUS __nvoc_objCreate_DispSwObject(DispSwObject **ppThis, Dynamic *pParent, NvU32 createFlags, CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams) { 416 NV_STATUS status; 417 Object *pParentObj; 418 DispSwObject *pThis; 419 RmHalspecOwner *pRmhalspecowner; 420 421 status = __nvoc_handleObjCreateMemAlloc(createFlags, sizeof(DispSwObject), (void**)&pThis, (void**)ppThis); 422 if (status != NV_OK) 423 return status; 424 425 portMemSet(pThis, 0, sizeof(DispSwObject)); 426 427 __nvoc_initRtti(staticCast(pThis, Dynamic), &__nvoc_class_def_DispSwObject); 428 429 pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object.createFlags = createFlags; 430 431 if (pParent != NULL && !(createFlags & NVOC_OBJ_CREATE_FLAGS_PARENT_HALSPEC_ONLY)) 432 { 433 pParentObj = dynamicCast(pParent, Object); 434 objAddChild(pParentObj, &pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object); 435 } 436 else 437 { 438 pThis->__nvoc_base_ChannelDescendant.__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object.pParent = NULL; 439 } 440 441 if ((pRmhalspecowner = dynamicCast(pParent, RmHalspecOwner)) == NULL) 442 pRmhalspecowner = objFindAncestorOfType(RmHalspecOwner, pParent); 443 NV_ASSERT_OR_RETURN(pRmhalspecowner != NULL, NV_ERR_INVALID_ARGUMENT); 444 445 __nvoc_init_DispSwObject(pThis, pRmhalspecowner); 446 status = __nvoc_ctor_DispSwObject(pThis, pRmhalspecowner, arg_pCallContext, arg_pParams); 447 if (status != NV_OK) goto __nvoc_objCreate_DispSwObject_cleanup; 448 449 *ppThis = pThis; 450 451 return NV_OK; 452 453 __nvoc_objCreate_DispSwObject_cleanup: 454 // do not call destructors here since the constructor already called them 455 if (createFlags & NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT) 456 portMemSet(pThis, 0, sizeof(DispSwObject)); 457 else 458 portMemFree(pThis); 459 460 // coverity[leaked_storage:FALSE] 461 return status; 462 } 463 464 NV_STATUS __nvoc_objCreateDynamic_DispSwObject(DispSwObject **ppThis, Dynamic *pParent, NvU32 createFlags, va_list args) { 465 NV_STATUS status; 466 CALL_CONTEXT * arg_pCallContext = va_arg(args, CALL_CONTEXT *); 467 struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams = va_arg(args, struct RS_RES_ALLOC_PARAMS_INTERNAL *); 468 469 status = __nvoc_objCreate_DispSwObject(ppThis, pParent, createFlags, arg_pCallContext, arg_pParams); 470 471 return status; 472 } 473 474