mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-04-24 16:29:07 +00:00
550.40.07
This commit is contained in:
@@ -141,10 +141,6 @@ static void __nvoc_thunk_RmResource_semsurfControl_Epilogue(struct SemaphoreSurf
|
||||
rmresControl_Epilogue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_SemaphoreSurface_RmResource.offset), pCallContext, pParams);
|
||||
}
|
||||
|
||||
static NV_STATUS __nvoc_thunk_RsResource_semsurfControlLookup(struct SemaphoreSurface *pResource, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams, const struct NVOC_EXPORTED_METHOD_DEF **ppEntry) {
|
||||
return resControlLookup((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SemaphoreSurface_RsResource.offset), pParams, ppEntry);
|
||||
}
|
||||
|
||||
static NvHandle __nvoc_thunk_GpuResource_semsurfGetInternalObjectHandle(struct SemaphoreSurface *pGpuResource) {
|
||||
return gpuresGetInternalObjectHandle((struct GpuResource *)(((unsigned char *)pGpuResource) + __nvoc_rtti_SemaphoreSurface_GpuResource.offset));
|
||||
}
|
||||
@@ -173,6 +169,10 @@ static NV_STATUS __nvoc_thunk_RmResource_semsurfControlSerialization_Prologue(st
|
||||
return rmresControlSerialization_Prologue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_SemaphoreSurface_RmResource.offset), pCallContext, pParams);
|
||||
}
|
||||
|
||||
static NvBool __nvoc_thunk_RsResource_semsurfIsPartialUnmapSupported(struct SemaphoreSurface *pResource) {
|
||||
return resIsPartialUnmapSupported((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SemaphoreSurface_RsResource.offset));
|
||||
}
|
||||
|
||||
static void __nvoc_thunk_RsResource_semsurfPreDestruct(struct SemaphoreSurface *pResource) {
|
||||
resPreDestruct((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_SemaphoreSurface_RsResource.offset));
|
||||
}
|
||||
@@ -362,8 +362,6 @@ static void __nvoc_init_funcTable_SemaphoreSurface_1(SemaphoreSurface *pThis) {
|
||||
|
||||
pThis->__semsurfControl_Epilogue__ = &__nvoc_thunk_RmResource_semsurfControl_Epilogue;
|
||||
|
||||
pThis->__semsurfControlLookup__ = &__nvoc_thunk_RsResource_semsurfControlLookup;
|
||||
|
||||
pThis->__semsurfGetInternalObjectHandle__ = &__nvoc_thunk_GpuResource_semsurfGetInternalObjectHandle;
|
||||
|
||||
pThis->__semsurfControl__ = &__nvoc_thunk_GpuResource_semsurfControl;
|
||||
@@ -378,6 +376,8 @@ static void __nvoc_init_funcTable_SemaphoreSurface_1(SemaphoreSurface *pThis) {
|
||||
|
||||
pThis->__semsurfControlSerialization_Prologue__ = &__nvoc_thunk_RmResource_semsurfControlSerialization_Prologue;
|
||||
|
||||
pThis->__semsurfIsPartialUnmapSupported__ = &__nvoc_thunk_RsResource_semsurfIsPartialUnmapSupported;
|
||||
|
||||
pThis->__semsurfPreDestruct__ = &__nvoc_thunk_RsResource_semsurfPreDestruct;
|
||||
|
||||
pThis->__semsurfIsDuplicate__ = &__nvoc_thunk_RsResource_semsurfIsDuplicate;
|
||||
@@ -405,21 +405,26 @@ void __nvoc_init_SemaphoreSurface(SemaphoreSurface *pThis) {
|
||||
__nvoc_init_funcTable_SemaphoreSurface(pThis);
|
||||
}
|
||||
|
||||
NV_STATUS __nvoc_objCreate_SemaphoreSurface(SemaphoreSurface **ppThis, Dynamic *pParent, NvU32 createFlags, CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams) {
|
||||
NV_STATUS __nvoc_objCreate_SemaphoreSurface(SemaphoreSurface **ppThis, Dynamic *pParent, NvU32 createFlags, CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams)
|
||||
{
|
||||
NV_STATUS status;
|
||||
Object *pParentObj;
|
||||
Object *pParentObj = NULL;
|
||||
SemaphoreSurface *pThis;
|
||||
|
||||
// Assign `pThis`, allocating memory unless suppressed by flag.
|
||||
status = __nvoc_handleObjCreateMemAlloc(createFlags, sizeof(SemaphoreSurface), (void**)&pThis, (void**)ppThis);
|
||||
if (status != NV_OK)
|
||||
return status;
|
||||
|
||||
// Zero is the initial value for everything.
|
||||
portMemSet(pThis, 0, sizeof(SemaphoreSurface));
|
||||
|
||||
// Initialize runtime type information.
|
||||
__nvoc_initRtti(staticCast(pThis, Dynamic), &__nvoc_class_def_SemaphoreSurface);
|
||||
|
||||
pThis->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object.createFlags = createFlags;
|
||||
|
||||
// Link the child into the parent if there is one unless flagged not to do so.
|
||||
if (pParent != NULL && !(createFlags & NVOC_OBJ_CREATE_FLAGS_PARENT_HALSPEC_ONLY))
|
||||
{
|
||||
pParentObj = dynamicCast(pParent, Object);
|
||||
@@ -434,16 +439,25 @@ NV_STATUS __nvoc_objCreate_SemaphoreSurface(SemaphoreSurface **ppThis, Dynamic *
|
||||
status = __nvoc_ctor_SemaphoreSurface(pThis, arg_pCallContext, arg_pParams);
|
||||
if (status != NV_OK) goto __nvoc_objCreate_SemaphoreSurface_cleanup;
|
||||
|
||||
// Assignment has no effect if NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT is set.
|
||||
*ppThis = pThis;
|
||||
|
||||
return NV_OK;
|
||||
|
||||
__nvoc_objCreate_SemaphoreSurface_cleanup:
|
||||
// do not call destructors here since the constructor already called them
|
||||
|
||||
// Unlink the child from the parent if it was linked above.
|
||||
if (pParentObj != NULL)
|
||||
objRemoveChild(pParentObj, &pThis->__nvoc_base_GpuResource.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object);
|
||||
|
||||
// Do not call destructors here since the constructor already called them.
|
||||
if (createFlags & NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT)
|
||||
portMemSet(pThis, 0, sizeof(SemaphoreSurface));
|
||||
else
|
||||
{
|
||||
portMemFree(pThis);
|
||||
*ppThis = NULL;
|
||||
}
|
||||
|
||||
// coverity[leaked_storage:FALSE]
|
||||
return status;
|
||||
|
||||
Reference in New Issue
Block a user