![]() |
![]() |
00001 00010 /* 00011 * ============================================================================ 00012 * 00013 * Copyright (c) 2008-2012, Texas Instruments Incorporated 00014 * 00015 * Redistribution and use in source and binary forms, with or without 00016 * modification, are permitted provided that the following conditions 00017 * are met: 00018 * 00019 * * Redistributions of source code must retain the above copyright 00020 * notice, this list of conditions and the following disclaimer. 00021 * 00022 * * Redistributions in binary form must reproduce the above copyright 00023 * notice, this list of conditions and the following disclaimer in the 00024 * documentation and/or other materials provided with the distribution. 00025 * 00026 * * Neither the name of Texas Instruments Incorporated nor the names of 00027 * its contributors may be used to endorse or promote products derived 00028 * from this software without specific prior written permission. 00029 * 00030 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00031 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00032 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00033 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00034 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00035 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00036 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00037 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00038 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00039 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00040 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00041 * Contact information for paper mail: 00042 * Texas Instruments 00043 * Post Office Box 655303 00044 * Dallas, Texas 75265 00045 * Contact information: 00046 * http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm? 00047 * DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact 00048 * ============================================================================ 00049 * 00050 */ 00051 00052 00053 #ifndef FRAMEQBUFMGR_SHMEM_H 00054 #define FRAMEQBUFMGR_SHMEM_H 00055 00056 #include <ti/ipc/GateMP.h> 00057 #include <ti/syslink/FrameQBufMgr.h> 00058 00059 00060 #if defined (__cplusplus) 00061 extern "C" { 00062 #endif 00063 00064 /* ============================================================================= 00065 * Macros & defines 00066 * ============================================================================= 00067 */ 00068 #define FrameQBufMgr_ShMem_BUFINTERFACE_SHAREDMEM FrameQBufMgr_BUFINTERFACE_SHAREDMEM 00069 #define FrameQBufMgr_ShMem_BUFINTERFACE_TILERMEM FrameQBufMgr_BUFINTERFACE_TILERMEM 00070 #define FrameQBufMgr_ShMem_HDRINTERFACE_SHAREDMEM FrameQBufMgr_HDRINTERFACE_SHAREDMEM 00071 #define FrameQBufMgr_ShMem_FrameBufParams FrameQBufMgr_FrameBufParams 00072 00073 00074 /* TODO - are different _internal_ vs _external types necessary? */ 00075 typedef FrameQBufMgr_Config FrameQBufMgr_ShMem_Config ; 00076 /* ============================================================================= 00077 * Structures & Enums 00078 * ============================================================================= 00079 */ 00080 00084 typedef struct FrameQBufMgr_ShMem_Params_tag { 00085 FrameQBufMgr_CreateParams commonCreateParams; 00088 GateMP_Handle gate; 00102 GateMP_LocalProtect localProtect; 00105 GateMP_RemoteProtect remoteProtect; 00108 Ptr sharedAddr; 00119 UInt32 sharedAddrSize; 00129 UInt32 regionId; 00137 UInt32 headerInterfaceType; 00143 UInt32 bufInterfaceType; 00150 Ptr sharedAddrHdrBuf; 00162 UInt32 sharedAddrHdrBufSize; 00165 UInt32 hdrBuf_regionId; 00173 Ptr sharedAddrFrmBuf; 00176 UInt32 sharedAddrFrmBufSize; 00179 UInt32 frmBuf_regionId; 00187 UInt32 numFreeFramePools; 00190 UInt32 numFreeFramesInPool[FrameQBufMgr_MAX_POOLS]; 00193 UInt32 numFreeHeaderBufsInPool[FrameQBufMgr_MAX_POOLS]; 00196 UInt32 frameHeaderBufSize[FrameQBufMgr_MAX_POOLS]; 00199 UInt32 numFrameBufsInFrame[FrameQBufMgr_MAX_POOLS]; 00204 FrameQBufMgr_ShMem_FrameBufParams *frameBufParams[FrameQBufMgr_MAX_POOLS]; 00207 UInt32 cpuAccessFlags; 00214 UInt32 numNotifyEntries; 00219 } FrameQBufMgr_ShMem_Params; 00220 00225 typedef struct FrameQBufMgr_ShMem_OpenParams_tag { 00226 FrameQBufMgr_CommonOpenParams commonOpenParams; 00228 } FrameQBufMgr_ShMem_OpenParams; 00229 00230 /* ============================================================================= 00231 * APIs 00232 * ============================================================================= 00233 */ 00234 00235 /* Initialize the FrameQBufMgr module, there would be some default values for 00236 * the parameters, but if any change is required, change the cfg before calling 00237 * this API. 00238 */ 00239 Int32 00240 FrameQBufMgr_ShMem_setup (FrameQBufMgr_ShMem_Config * cfg); 00241 00242 00243 /* Function to destroy(finalize) the FrameQBufMgr module.*/ 00244 Int32 00245 FrameQBufMgr_ShMem_destroy (Void); 00246 00256 void 00257 FrameQBufMgr_ShMem_Params_init(FrameQBufMgr_ShMem_Params * params); 00258 00275 UInt32 00276 FrameQBufMgr_ShMem_sharedMemReq (const FrameQBufMgr_ShMem_Params * params, 00277 UInt32 * hdrBufChunkSize, 00278 UInt32 * frmBufChunkSize); 00279 00280 Int32 FrameQBufMgr_ShMem_getConfig(FrameQBufMgr_ShMem_Config *cfg); 00281 00282 00283 00284 #if defined (__cplusplus) 00285 } 00286 #endif /* defined (__cplusplus) */ 00287 00288 00289 #endif /* HEAPBUF_H_0x4CD5 */ 00290