Ignore:
Timestamp:
Aug 7, 2015, 5:42:07 PM (9 years ago)
Author:
guerin
Message:

kernel: add fbf_cma release, call it on task kill

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_kernel/sys_handler.c

    r699 r700  
    16861686} // end sys_fbf_cma_alloc()
    16871687
     1688////////////////////////
     1689// NOTE: not a syscall
     1690int _sys_fbf_cma_release()
     1691{
     1692    unsigned int channel = _get_context_slot( CTX_CMA_FB_ID );
     1693
     1694    if ( channel >= NB_CMA_CHANNELS )
     1695    {
     1696        _printf("\n[GIET_ERROR] in _sys_fbf_cma_release() : CMA channel already released\n");
     1697        return -1;
     1698    }
     1699
     1700    // stop fb
     1701    _sys_fbf_cma_stop();
     1702
     1703    // reset CTX_CMA_FB_ID for task
     1704    _set_context_slot( CTX_CMA_FB_ID, -1 );
     1705
     1706    // release CMA channel
     1707    _cma_channel[channel] = 0;
     1708
     1709    return 0;
     1710}
    16881711
    16891712///////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.