static MME_ERROR termTransformer(void* context)
{
	OSDEV_Free(intraQuantizerMatrix);
	OSDEV_Free(nonIntraQuantizerMatrix);
	OSDEV_Free(context);
	return MME_SUCCESS;
}
Esempio n. 2
0
OS_Status_t OS_TerminateEvent(OS_Event_t *Event)
{
	OS_TerminateMutex(&((*Event)->Mutex));
	OSDEV_DeInitializeWaitQueue((*Event)->Queue);
	OSDEV_Free(*Event);
	return OS_NO_ERROR;
}
Esempio n. 3
0
static OSDEV_CloseEntrypoint(  AllocatorClose )
{
AllocatorContext_t      *AllocatorContext;

//

    OSDEV_CloseEntry();
    AllocatorContext    = (AllocatorContext_t  *)OSDEV_PrivateData;

    //
    // Perform the release activity
    //

    if( AllocatorContext->Memory != NULL )
    {
        // Do what is necessary to free up any mapping here
        
//        OSDEV_Print( "Freeing up bpa 2 partition - phys %p - C %p - UC %p\n", AllocatorContext->PhysicalAddress,AllocatorContext->CachedAddress,AllocatorContext->UnCachedAddress);
        OSDEV_IOUnMap( (unsigned int)AllocatorContext->UnCachedAddress );
        OSDEV_IOUnMap( (unsigned int)AllocatorContext->CachedAddress );
        OSDEV_FreePartitioned( AllocatorContext->PartitionName, AllocatorContext->PhysicalAddress );
        
    }

    OSDEV_Free( AllocatorContext );

//

    OSDEV_CloseExit( OSDEV_NoError );
}
Esempio n. 4
0
static OSDEV_CloseEntrypoint(  H264ppClose )
{
unsigned int             i;
H264ppContext_t         *H264ppContext;
unsigned int             N;

//

    OSDEV_CloseEntry();
    H264ppContext               = (H264ppContext_t  *)OSDEV_PrivateData;

    H264ppContext->Closing      = true;

    OSDEV_ClaimSemaphore( &Lock );

    //
    // Turn off interrupts
    //

    for( i=0; i<H264_PP_PER_INSTANCE; i++ )
    {
	N               = H264ppContext->Index + i;

	OSDEV_WriteLong( PP_ITM(N),             0x00000000 );
	OSDEV_WriteLong( PP_ITS(N),             0xffffffff );           // Clear interrupt status

	free_irq( H264_PP_INTERRUPT(N), (void *)((unsigned int)H264ppContext + i) );
    }

    //
    // Make sure everyone exits
    //

    OSDEV_ReleaseSemaphore( &H264ppContext->PreProcessor );
    OSDEV_ReleaseSemaphore( &H264ppContext->ProcessedBufferListEntry );
    OSDEV_ReleaseSemaphore( &H264ppContext->ProcessedBuffer );

    OSDEV_SleepMilliSeconds( 2 );

    //
    // De-initialize the semaphores
    //

    OSDEV_DeInitializeSemaphore( &H264ppContext->PreProcessor );
    OSDEV_DeInitializeSemaphore( &H264ppContext->ProcessedBufferListEntry );
    OSDEV_DeInitializeSemaphore( &H264ppContext->ProcessedBuffer );

    //
    // Free up the particular PP cells, and free the context memory
    //

    OpenMask    ^= (H264_PP_PER_INSTANCE_MASK<<H264ppContext->Index);

    OSDEV_Free( H264ppContext );

//

    OSDEV_ReleaseSemaphore( &Lock );
    OSDEV_CloseExit( OSDEV_NoError );
}
Esempio n. 5
0
// -----------------------------------------------------------------------------------------------
// The event functions
OS_Status_t OS_InitializeEvent(OS_Event_t *Event)
{
	*Event = (OS_Event_t)OSDEV_Malloc(sizeof(struct OS_Event_s));
	if (*Event != NULL)
	{
		OS_InitializeMutex(&((*Event)->Mutex));
		if (OSDEV_InitializeWaitQueue(&((*Event)->Queue)) == OSDEV_NoError)
		{
			(*Event)->Valid = false;
			return OS_NO_ERROR;
		}
		else
			OSDEV_Free(*Event);
	}
	return OS_ERROR;
}
Esempio n. 6
0
static OSDEV_CloseEntrypoint(  AllocatorClose )
{
AllocatorContext_t      *AllocatorContext;

//

    OSDEV_CloseEntry();
    AllocatorContext    = (AllocatorContext_t  *)OSDEV_PrivateData;

    //
    // Perform the release activity
    //

    if( AllocatorContext->Memory != NULL )
    {
        // Do what is necessary to free up any mapping here
        
//        OSDEV_Print( "Freeing up bpa 2 partition - phys %p - C %p - UC %p\n", AllocatorContext->PhysicalAddress,AllocatorContext->CachedAddress,AllocatorContext->UnCachedAddress);
#if defined(MULTICOM406)
        ICS_ERROR IcsErr;

        IcsErr = ICS_region_remove(AllocatorContext->CachedRegion, 0);
        if( IcsErr != ICS_SUCCESS )
        {
            OSDEV_Print( "Close Entry Point - Unable to remove Cached ICS region.\n" );
       }

        IcsErr = ICS_region_remove(AllocatorContext->UnCachedRegion, 0);
        if( IcsErr != ICS_SUCCESS )
        {
            OSDEV_Print( "Close Entry Point - Unable to remove Uncached ICS region.\n" );
        }
#endif
        OSDEV_IOUnMap( (unsigned int)AllocatorContext->UnCachedAddress );
        OSDEV_IOUnMap( (unsigned int)AllocatorContext->CachedAddress );
        OSDEV_FreePartitioned( AllocatorContext->PartitionName, AllocatorContext->PhysicalAddress );
        
    }

    OSDEV_Free( AllocatorContext );

//

    OSDEV_CloseExit( OSDEV_NoError );
}
Esempio n. 7
0
OS_Status_t OS_Free(void *Address)
{
	return OSDEV_Free(Address);
}