Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

FrameQBufMgr.h

Go to the documentation of this file.
00001 /** 
00002  *  @file   FrameQBufMgr.h
00003  *
00004  *  @brief      Defines for interfaces for FrameQBufMgr module.
00005  *
00006  *
00007  *
00008  *  @ver        02.00.00.68_beta1
00009  *  
00010  *  ============================================================================
00011  *  
00012  *  Copyright (c) 2008-2009, Texas Instruments Incorporated
00013  *
00014  *  Redistribution and use in source and binary forms, with or without
00015  *  modification, are permitted provided that the following conditions
00016  *  are met:
00017  *  
00018  *  *  Redistributions of source code must retain the above copyright
00019  *     notice, this list of conditions and the following disclaimer.
00020  *  
00021  *  *  Redistributions in binary form must reproduce the above copyright
00022  *     notice, this list of conditions and the following disclaimer in the
00023  *     documentation and/or other materials provided with the distribution.
00024  *  
00025  *  *  Neither the name of Texas Instruments Incorporated nor the names of
00026  *     its contributors may be used to endorse or promote products derived
00027  *     from this software without specific prior written permission.
00028  *  
00029  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00030  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00031  *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00032  *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00033  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00034  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00035  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00036  *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00037  *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00038  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00039  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00040  *  Contact information for paper mail:
00041  *  Texas Instruments
00042  *  Post Office Box 655303
00043  *  Dallas, Texas 75265
00044  *  Contact information: 
00045  *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
00046  *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
00047  *  ============================================================================
00048  *  
00049  */
00050 
00051 
00052 #ifndef FRAMEQBUFMGR_H
00053 #define FRAMEQBUFMGR_H
00054 
00055 
00056 /* Module headers */
00057 #include <ti/syslink/FrameQDefs.h>
00058 #include <ti/syslink/SysLink.h>
00059 #include <ti/ipc/Notify.h>
00060 
00061 #if defined (__cplusplus)
00062 extern "C" {
00063 #endif
00064 
00065 /*!
00066  *  @brief  Indicates module has been already destroyed.
00067  */
00068 #define FrameQBufMgr_S_ALREADYDESTROYED              2
00069 
00070 /*!
00071  *  @brief  Indicates module is already setup.
00072  */
00073 #define FrameQBufMgr_S_ALREADYSETUP                   1
00074 
00075 /*!
00076  *  @brief  Operation successful.
00077  */
00078 #define  FrameQBufMgr_S_SUCCESS                       0
00079 
00080 /*!
00081  *  @brief  General Failure
00082  */
00083 #define FrameQBufMgr_E_FAIL                          -1
00084 
00085 /*!
00086  *  @brief  Invalid arguments are passed to  FrameQBufMgr API.
00087  */
00088 #define FrameQBufMgr_E_INVALIDARG                    -2
00089 
00090 /*!
00091  *  @brief  Instance not found.
00092  */
00093 #define FrameQBufMgr_E_NOTFOUND                      -3
00094 
00095 /*!
00096  *  @brief  FrameQBufMgr instance  already exists
00097  */
00098 #define FrameQBufMgr_E_INST_EXISTS                   -4
00099 
00100 /*!
00101  *  @brief  Failed to allocate buffer
00102  */
00103 #define FrameQBufMgr_E_ALLOC_BUF                     -5
00104 
00105 /*!
00106  *  @brief  Failed to allocate memory.
00107  */
00108 #define FrameQBufMgr_E_ALLOC_MEMORY                  -6
00109 
00110 /*!
00111  *  @brief  Name server create failed for the module.
00112  */
00113 #define FrameQBufMgr_E_CREATE_NAMESERVER             -7
00114 
00115 /*!
00116  *  @brief  ClientNotifyMgr create failed.
00117  */
00118 #define FrameQBufMgr_E_FAIL_CLIENTN0TIFYMGR_CREATE   -8
00119 
00120 /*!
00121  *  @brief  ClientNotifyMgr open failed.
00122  */
00123 #define FrameQBufMgr_E_CLIENTN0TIFYMGR_OPEN         -9
00124 
00125 /*!
00126  *  @brief  Creation of  GateMP failed.
00127  */
00128 #define FrameQBufMgr_E_CREATE_GATEMP                 -10
00129 
00130 /*!
00131  *  @brief  GateMP open failed.
00132  */
00133 #define FrameQBufMgr_E_OPEN_GATEMP                   -11
00134 
00135 /*!
00136  *  @brief  Maximum instances limit reached.
00137  */
00138 #define FrameQBufMgr_E_MAX_CLIENTS                   -12
00139 
00140 /*!
00141  *  @brief  Operation can not be permitted or not implemented.
00142  */
00143 #define FrameQBufMgr_E_ACCESSDENIED                  -13
00144 
00145 /*!
00146  *  @brief  API is not implemented.
00147  */
00148 #define FrameQBufMgr_E_NOTIMPLEMENTED                -14
00149 
00150 /*!
00151  *  @brief  Module is not initialized.
00152  */
00153 #define FrameQBufMgr_E_INVALIDSTATE                  -15
00154 
00155 /*!
00156  *  @brief  Failure in OS call.
00157  */
00158 #define FrameQBufMgr_E_OSFAILURE                     -16
00159 
00160 /*!
00161  *  @brief  Max instances limit reached. Can not create  instance.
00162  */
00163 #define FrameQBufMgr_E_MAXINSTANCES                  -17
00164 
00165 /*!
00166  *  @brief  Unsupported interface type.
00167  */
00168 #define FrameQBufMgr_E_INVALID_INTERFACE             -18
00169 
00170 /*!
00171  *  @brief  Failed to open NameServer.
00172  */
00173 #define FrameQBufMgr_E_OPEN_NAMESERVER               -19
00174 
00175 /*!
00176  *  @brief  Insufficient header buffers.
00177  */
00178 #define FrameQBufMgr_E_INSUFFICIENT_HDRBUFS          -20
00179 
00180 /*!
00181  *  @brief  Failed to allocate frame.
00182  */
00183 #define FrameQBufMgr_E_ALLOC_FRAME                   -21
00184 
00185 /*!
00186  *  @brief  Not able to allocate the requested frames.Able to allocate
00187  *          only few frames
00188  */
00189 #define FrameQBufMgr_E_ALLOC_ALLFRAMES               -22
00190 
00191 /*!
00192  *  @brief  Invalid MemMgr type specified.
00193  */
00194 #define FrameQBufMgr_E_INVALID_MEMMGRTYPE            -23
00195 
00196 /*!
00197  *  @brief  Invalid Header buffer interface type specified.see
00198  *          enum FrameQBufMgr_FrameHeaderInterface for the supported types.
00199  */
00200 #define FrameQBufMgr_E_INVALID_HDRINTERFACETYPE      -24
00201 
00202 /*!
00203  *  @brief  Invalid frame buffer interface type specified.see
00204  *          enum FrameQBufMgr_FrameBufferInterface for the supported types.
00205  */
00206 #define FrameQBufMgr_E_INVALID_BUFINTERFACETYPE      -25
00207 
00208 /*!
00209  *  @brief  NameServer_add failed.
00210  */
00211 #define FrameQBufMgr_E_NAMESERVERADD                 -33
00212 
00213 /*!
00214  *  @brief  Handle for the FrameQBufMgr instance.
00215  */
00216 typedef struct FrameQBufMgr_Object* FrameQBufMgr_Handle;
00217 
00218 
00219 /* =============================================================================
00220  * macros & defines
00221  * =============================================================================
00222  */
00223 #define FrameQBufMgr_FrameBufInfo       Frame_FrameBufInfo
00224 
00225 /*!
00226  *  @brief  Defines the frame header structure
00227  */
00228 #define FrameQBufMgr_FrameHeader        Frame_FrameHeader
00229 
00230 /*!
00231  *  @brief  Defines the type for a frame pointer
00232  */
00233 typedef Frame_FrameHeader *             FrameQBufMgr_Frame;
00234 
00235 /*!
00236  *  @brief  Maximum length of the  name string in bytes.
00237  */
00238 #define FrameQBufMgr_MAXNAMELEN                 (32u)
00239 
00240 /*!
00241  *  @brief  Maximum number of instances managed by FrameQBufMgr module.
00242  */
00243 #define FrameQBufMgr_MAXINSTANCES               (64u)
00244 
00245 /*!
00246  *  @brief  Maximum number of free frame pools to be maintained in a instance.
00247  */
00248 #define FrameQBufMgr_MAX_POOLS                  (64u)
00249 
00250 /*!
00251  *  @brief  Maximum number of frame buffers in a frame managed by in
00252  *          FrameQBufMgr instance.
00253  */
00254 #define FrameQBufMgr_MAX_FRAMEBUFS              (8)
00255 
00256 /*!
00257  *  @brief  Maximum number of static free Frames  managed by FrameQBufMgr
00258  *          instance Free Frame pool.
00259  */
00260 #define FrameQBufMgr_POOL_MAXFRAMES             (32)
00261 
00262 /*!
00263  *  @brief  Maximum number of additional static free headers  managed by
00264  *          FrameQBufMgr instance for each Free Frame pool.
00265  */
00266 #define FrameQBufMgr_POOL_MAXHDRS               (64)
00267 
00268 /*!
00269  *  @brief  Maximum number of dynbuffers managed by each buffer pool in
00270  *          FrameQBufMgr instance.
00271  */
00272 #define FrameQBufMgr_POOL_DYNAMIC_MAXFRAMES     (1)
00273 
00274 /*!
00275  *  @brief  Maximum number of additional dynamic free headers  managed by
00276  *          FrameQBufMgr instance for each Free Frame pool.
00277  */
00278 #define FrameQBufMgr_POOL_DYNAMIC_MAXHDRS       (1)
00279 
00280 /*!
00281  *  @brief  Notify Event Number to be used by  FrameQBufMgr module.
00282  */
00283 #define FrameQBufMgr_NOTIFY_RESERVED_EVENTNO   (0u)
00284 
00285 
00286 /*!
00287  *  @brief  Macro used in FrameQ for sorting of passed parameters in V API.
00288  *          In FrameQBufMgr_allocv case this denotes the number of frames that
00289  *          can be allocated in one call.
00290  */
00291 #define FrameQBufMgr_MAX_FRAMESINVAPI           (FrameQ_MAX_FRAMESINVAPI)
00292 
00293 /* =============================================================================
00294  * Structures & Enums
00295  * =============================================================================
00296  */
00297 
00298 /*!
00299  *  @brief  Enumeration of CPU access flags for frame buffers. For frame headers
00300  *          CPUACCESS is assumed to be TRUE..
00301  */
00302 typedef enum FrameQBufMgr_CpuAccessFlags_Tag {
00303         FrameQBufMgr_FRAMEBUF0_CPUACCESS    =  0x10000,
00304         /*!< If specified first frame buffer is accessed  through CPU
00305          *  (direct memory access).
00306          */
00307         FrameQBufMgr_FRAMEBUF1_CPUACCESS    =  0x20000,
00308         /*!< If specified second frame buffer is accessed  through CPU
00309          *   (direct memory access).
00310          */
00311         FrameQBufMgr_FRAMEBUF2_CPUACCESS    =  0x40000,
00312         /*!< If specified third frame buffer is accessed  through CPU
00313          *   (direct memory access).
00314          */
00315         FrameQBufMgr_FRAMEBUF3_CPUACCESS    =  0x80000,
00316         /*!< If specified fourth frame buffer is accessed  through CPU
00317          *   (direct memory access).
00318          */
00319         FrameQBufMgr_FRAMEBUF4_CPUACCESS    = 0x100000,
00320         /*!< If specified fifth frame buffer is accessed  through CPU
00321          *   (direct memory access).
00322          */
00323         FrameQBufMgr_FRAMEBUF5_CPUACCESS    = 0x200000,
00324         /*!< If specified sixth frame buffer is accessed  through CPU
00325          *   (direct memory access).
00326          */
00327         FrameQBufMgr_FRAMEBUF6_CPUACCESS    = 0x400000,
00328         /*!< If specified seventh frame buffer is accessed  through CPU
00329          *   (direct memory access).
00330          */
00331         FrameQBufMgr_FRAMEBUF7_CPUACCESS    = 0x800000
00332         /*!< If specified eighth frame buffer is accessed  through CPU
00333          *   (direct memory access).
00334          */
00335 } FrameQBufMgr_CpuAccessFlags;
00336 
00337 /*!
00338  *  @brief   Denotes the type of buffer.
00339  */
00340 typedef enum FrameQBufMgr_BufType_Tag {
00341     FrameQBufMgr_BUF_FRAMEHEADER = 0u,
00342     /*!< Denotes buffer is  of type used for frame headers. */
00343     FrameQBufMgr_BUF_FRAMEBUF    = 1u,
00344     /*!< Denotes buffer is  of type used for frame buffers */
00345     FrameQBufMgr_BUF_ENDVALUE    = 2u
00346     /*!< End delimiter indicating start of invalid values for this enum */
00347 }FrameQBufMgr_BufType;
00348 
00349 /*!
00350  *  @brief   Enumerations to indicate address types used for translation.
00351  */
00352 typedef enum FrameQBufMgr_AddrType_Tag{
00353     FrameQBufMgr_AddrType_Virtual  = 0u,
00354     /*!< Virtual address on calling process on DSP where MMU is not configured
00355      *   it could be the physical address.
00356      */
00357     FrameQBufMgr_AddrType_Portable = 1u,
00358     /*!< This is the shared region address incase sharedmemory manager plugged
00359      *   in to frameQbufMgr. In case of tiler it could be the tiler specific
00360      *   portable address
00361      */
00362     FrameQBufMgr_AddrType_EndValue = 2u
00363     /*!< End delimiter indicating start of invalid values for this enum*/
00364 }FrameQBufMgr_AddrType;
00365 
00366 /*!
00367  *  @brief  Enumeration of FrameQBufMgr interface types.Denotes different
00368  *          implementation types.
00369  */
00370 typedef enum FrameQBufMgr_Interface_Tag {
00371     FrameQBufMgr_INTERFACE_SHAREDMEM = 0x0,
00372     /*!< Denotes FrameQNufMgr implementation (FrameQBufMgr_ShMem
00373      * Implementation) on shared memory.
00374      */
00375     FrameQBufMgr_INTERFACE_NONE      = 0x1
00376 } FrameQBufMgr_Interface;
00377 
00378 /*!
00379  *  @brief  Enumeration of FrameQBufMgr interface types.Denotes different
00380  *          implementation types.
00381  */
00382 typedef enum FrameQBufMgr_FrameHeaderInterface_Tag {
00383     FrameQBufMgr_HDRINTERFACE_SHAREDMEM = 0x0,
00384     /*!< Denotes FrameQNufMgr headers are from shared memory.Address translations
00385      *  will be done using shared region.
00386      */
00387     FrameQBufMgr_HDRINTERFACE_NONE      = 0x1
00388 } FrameQBufMgr_FrameHeaderInterface;
00389 
00390 /*!
00391  *  @brief  Enumeration of FrameQBufMgr interface types.Denotes different
00392  *          implementation types.
00393  */
00394 typedef enum FrameQBufMgr_FrameBufferInterface_Tag {
00395     FrameQBufMgr_BUFINTERFACE_SHAREDMEM = 0x0,
00396     /*!< Denotes FrameQNufMgr implementation (FrameQBufMgr_ShMem
00397      * Implementation) on shared memory.
00398      */
00399     FrameQBufMgr_BUFINTERFACE_TILERMEM = 0x1,
00400     /*!< valid only on RTOS side for Netra platform. Not valid on HLOS side.
00401      */
00402     FrameQBufMgr_BUFINTERFACE_NONE      = 0x2
00403 } FrameQBufMgr_FrameBufferInterface;
00404 /*!
00405  *  @brief  Common parameters required to create FrameQBufMgr instance of
00406  *          any implementation. It should be the first element of the actual
00407  *          implementaton params structure .
00408  */
00409 typedef struct FrameQBufMgr_CreateParams_Tag {
00410     UInt32                  size;
00411     /*!< Size of the paramstructure */
00412     FrameQBufMgr_Interface  ctrlInterfaceType;
00413     /*!< Interface type */
00414     String                  name;
00415     /*!< Name of the instance */
00416     UInt32                  openFlag;
00417     /* Open flag to indicate create/open. internal flag.  Caller should not
00418      * touch this flag during create
00419      */
00420 } FrameQBufMgr_CreateParams;
00421 
00422 /*!
00423  *  @brief  Common parameters required to open a FrameQBufMgr instance of
00424  *          any implementation.
00425  */
00426 typedef struct FrameQBufMgr_CommonOpenParams_Tag {
00427     String      name;
00428     /*!< Name of the instance to open */
00429 
00430     UInt32      cpuAccessFlags;
00431     /*!< cpuAccessFlags flags to know if Frame buffers are accessed through CPU*/
00432 
00433     Ptr         sharedAddr;
00434     /*!<  Virtual shared Region addr in case open by address is required.*/
00435 } FrameQBufMgr_CommonOpenParams;
00436 
00437 /*!
00438  *  @brief  Common parameters required to create FrameQBufMgr instance of
00439  *          any implementation. It should be the first element of the actual
00440  *          implementaton params structure .
00441  */
00442 typedef struct FrameQBufMgr_Params {
00443     FrameQBufMgr_CreateParams   commonCreateParams;
00444     Ptr impParams;
00445     /*!<
00446      *  Pointer to implementation specific parameters
00447      *
00448      */
00449 
00450     UInt32  impParamsSize;
00451     /*!<
00452      *  Size of the implementation specific structure pointed by impParams.
00453      *
00454      */
00455     } FrameQBufMgr_Params;
00456 
00457 /*!
00458  *  @brief  Frame buffer param structure.
00459  */
00460 typedef struct FrameQBufMgr_FrameBufParams_Tag {
00461     UInt32  size;
00462     /*!< size of the Frame buffer. valid if it is not a Tiler buffer*/
00463     UInt32  pixelFormat;
00464     /*!< Pixel format.Valid for Tiler buffers */
00465     UInt32  height;
00466     /*!< Height of buffer.Valid for Tiler buffers */
00467     UInt32  width;
00468     /*!< Width of the buffer.Valid for Tiler buffers */
00469     UInt32  align;
00470     /*!< Alignment of the buffer.Currently not used.*/
00471 }FrameQBufMgr_FrameBufParams;
00472 
00473 /*!
00474  *  @brief  Prototype of the FrameQBufMgr call back function.
00475  */
00476 typedef void (*FrameQBufMgr_NotifyFunc) (FrameQBufMgr_Handle, Ptr arg, UInt32);
00477 
00478 /*!
00479  *  @brief  Structure defining notification parameter structure.
00480  */
00481 typedef struct FrameQBufMgr_NotifyParams_Tag {
00482     SysLink_NotifyType      notifyType;
00483     /*!< Notification type.See SysLink_NotifyType*/
00484     UInt32                  watermark;
00485     /*!< Minumum number of free frames required to generate notification
00486      *   Same water mark for all the individual freeFramePools in the set.
00487      */
00488     FrameQBufMgr_NotifyFunc cbFxnPtr;
00489     /*!< Cacll back function*/
00490     Ptr                     cbContext;
00491     /*!< Context pointer that needs to be passed to call back function.*/
00492     Ptr                     cbClientHandle;
00493     /*!< Handle that needs to be passed as first arg to call back.
00494      *   Ideally this should be callers client handle.*/
00495 } FrameQBufMgr_NotifyParams;
00496 
00497 /* =============================================================================
00498  * APIs
00499  * =============================================================================
00500  */
00501 
00502 /*!
00503  *  @brief      Function to create FrameQBufMgr instance.
00504  *
00505  *              This function create a new instance of FrameQBufMgr. It creates
00506  *              frameQBufMgr based on the params specific to implementation.
00507  *
00508  *  @param      params      pointer to implementation specific params.
00509  *
00510  *  @retval     Handle      Instance handle.
00511  *  @retval     NULL        Create failed.
00512  *
00513  *  @sa         FrameQBufMgr_Shmem_params, FrameQBufMgr_delete(),
00514  *              FrameQBufMgr_open() and FrameQBufMgr_close.
00515  */
00516 FrameQBufMgr_Handle
00517 FrameQBufMgr_create (Ptr params);
00518 
00519 /*!
00520  *  @brief      Function to delete FrameQBufMgr instance.
00521  *
00522  *              This function delets FrameQBufMgr instance that is created.
00523  *
00524  *  @param      pHandle     Pointer to the created frameQ instance handle.
00525  *
00526  *  @retval     FrameQBufMgr_S_SUCCESS     Delete successful.
00527  *  @retval     FrameQBufMgr_E_FAIL        Delete failed.
00528  *  @retval     FrameQBufMgr_E_INVALIDARG  Pointer to Handle passed is null.
00529  *  @retval     FrameQBufMgr_E_INVALIDARG        Handle passed is null.
00530  *
00531  *  @sa         FrameQBufMgr_create(), FrameQBufMgr_open() and
00532  *              FrameQBufMgr_close.
00533  */
00534 Int32
00535 FrameQBufMgr_delete (FrameQBufMgr_Handle * pHandle);
00536 
00537 /*!
00538  *  @brief      Function to open the created FrameQBufMgr instance.
00539  *
00540  *              This function opens the  FrameQBufMgr instance  depending upon
00541  *              the open params passed to it.The instance must be created before
00542  *              opening it. Application is expected to pass the implementations
00543  *              specific open params for the openParams field.FrameQ_open
00544  *              internally calls this API  to use the FrameQBufMgr instance to
00545  *              allocate frames ftom it.
00546  *
00547  *  @param      handlePtr   Return parameter.Instance opened in given mode.
00548  *  @param      openParams  Pointer to implementation specific open params.
00549  *
00550  *  @retval     FrameQBufMgr_S_SUCCESS      open successful.
00551  *  @retval     FrameQBufMgr_E_INVALIDARG   Invalid parameter specified.
00552  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00553  *  @retval     FrameQBufMgr_E_MEMORY       Memory_alloc failed.
00554  *  @retval     FrameQBufMgr_E_ALLOC_MEMORY Memory_alloc failed.
00555  *  @retval     FrameQBufMgr_E_FRAMEQBUFMGROPEN FrameQBufMge instance open
00556  *                                              failed.
00557  *  @retval     FrameQBufMgr_E_OPEN_GATEMP  GateMP open failed.
00558  *  @retval     FrameQBufMgr_E_CLIENTN0TIFYMGR_OPEN ClientNotifyMgr open
00559  *                                                       failed.
00560  *  @retval     FrameQBufMgr_E_NOTFOUND     Instance not found in FrameQBufMgr
00561  *                                          Nameserver or instance  is not crated
00562  *                                          at the shared address obtained
00563  *                                          internally.
00564  *  @retval     FrameQBufMgr_E_FAIL         Failed due to Both name is null and
00565  *                                          shared addr is null.
00566  *  @retval     FrameQBufMgr_E_INVALID_HDRINTERFACETYPE Failed to create the
00567  *                                          Syslink memory manager for header
00568  *                                          buffers.
00569  *  @retval     FrameQBufMgr_E_INVALID_BUFINTERFACETYPE Failed to create the
00570  *                                          Syslink memory manager for frame
00571  *                                          buffers.
00572  *
00573  *  @sa         FrameQBufMgr_ShMem_openParams, FrameQBufMgr_create(),
00574  *              FrameQBufMgr_delete() and FrameQBufMgr_close.
00575  */
00576 Int32
00577 FrameQBufMgr_open (FrameQBufMgr_Handle        * handlePtr,
00578                    Ptr                          openParams);
00579 /*!
00580  *  @brief      Function to open the created FrameQBufMgr instance using the
00581  *              address provided in open params.
00582  *
00583  *              This function opens the  FrameQBufMgr instance  depending upon
00584  *              the open params passed to it.The instance must be created before
00585  *              opening it. Application is expected to pass the implementations
00586  *              specific open params for the openParams field.
00587  *
00588  *  @param      handlePtr   Return parameter.Instance opened in given mode.
00589  *  @param      openParams  Pointer to implementation specific open params.
00590  *
00591  *  @retval     FrameQBufMgr_S_SUCCESS      open successful.
00592  *  @retval     FrameQBufMgr_E_INVALIDARG   Invalid parameter specified.
00593  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00594  *  @retval     FrameQBufMgr_E_MEMORY       Memory_alloc failed.
00595  *  @retval     FrameQBufMgr_E_ALLOC_MEMORY Memory_alloc failed.
00596  *  @retval     FrameQBufMgr_E_FRAMEQBUFMGROPEN FrameQBufMge instance open
00597  *                                              failed.
00598  *  @retval     FrameQBufMgr_E_OPEN_GATEMP  GateMP open failed.
00599  *  @retval     FrameQBufMgr_E_CLIENTN0TIFYMGR_OPEN ClientNotifyMgr open
00600  *                                                       failed.
00601  *  @retval     FrameQBufMgr_E_NOTFOUND     Instance not found in FrameQBufMgr
00602  *                                          Nameserver or instance  is not crated
00603  *                                          at the shared address obtained
00604  *                                          internally.
00605  *  @retval     FrameQBufMgr_E_FAIL         Failed due to shared addr is null.
00606  *  @retval     FrameQBufMgr_E_INVALID_HDRINTERFACETYPE Failed to create the
00607  *                                          Syslink memory manager for header
00608  *                                          buffers.
00609  *  @retval     FrameQBufMgr_E_INVALID_BUFINTERFACETYPE Failed to create the
00610  *                                          Syslink memory manager for frame
00611  *                                          buffers.
00612  *
00613  *  @sa         FrameQBufMgr_ShMem_openParams, FrameQBufMgr_create(),
00614  *              FrameQBufMgr_delete() and FrameQBufMgr_close.
00615  */
00616 Int32
00617 FrameQBufMgr_openByAddr (FrameQBufMgr_Handle     * handlePtr,
00618                          Ptr                       openParams);
00619 
00620 /*!
00621  *  @brief      Function to close the opened FrameQBufMgr instance.
00622  *
00623  *              This function closes FrameQBufMgr instance that is opened.
00624  *
00625  *  @param      pHandle     Pointer to the opened FrameQBufMgr instance handle.
00626  *
00627  *  @retval     FrameQBufMgr_S_SUCCESS     Close successful.
00628  *  @retval     FrameQBufMgr_E_INVALIDARG  Pointer to Handle passed is null.
00629  *  @retval     FrameQBufMgr_E_INVALIDARG  Handle passed is null.
00630  *  @retval     FrameQBufMgr_E_ACCESSDENIED Invalid handle passed.
00631  *
00632  *  @sa         FrameQBufMgr_create, FrameQBufMgr_open and
00633  *              FrameQBufMgr_delete.
00634  */
00635 Int32
00636 FrameQBufMgr_close (FrameQBufMgr_Handle *pHandle);
00637 
00638 /*!
00639  *  @brief      Function to allocate frame from  free frame pool zero.
00640  *
00641  *              This function allocates a frame when called by FrameQBufMgr.
00642  *              from free Frame Pool zero.
00643  *
00644  *  @param      handle      FrameQBufMgr handle.
00645  *  @param      frame       Location to receive the allocated frame.
00646  *
00647  *  @retval     FrameQBufMgr_S_SUCCESS      Successfully allocated frame.
00648  *  @retval     FrameQBufMgr_E_FAIL         Invalid buffer interface type.
00649  *  @retval     FrameQBufMgr_E_ALLOC_FRAME  Free frames are not available to
00650  *                                          allocate.
00651  *  @retval     FrameQBufMgr_E_INVALIDARG   framePtr paased is null.
00652  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00653  *  @retval     FrameQBufMgr_E_ACCESSDENIED Provided handle can not allocate frames.
00654  *                                    Only writer can allocate frames.
00655  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00656  *
00657  *  @sa         FrameQ_alloc, FrameQ_free, FrameQBufMgr_free.
00658  */
00659 Int32
00660 FrameQBufMgr_alloc (FrameQBufMgr_Handle     handle,
00661                     FrameQBufMgr_Frame     *frame);
00662 
00663 /*!
00664  *  @brief      Function to allocate multiple frames from the FrameQbufMgr
00665  *              instance..
00666  *
00667  *              This function allocates frames from multiple free pools.This API
00668  *              allocates all the frames requested if  available other wise
00669  *              returns failure.
00670  *
00671  *  @param      handle      FrameQBufMgr handle.
00672  *  @param      framePtr    Array to receive pointers to allocated frames..
00673  *  @param      freeQId     Array of free frame pool nos of the FrameQBufMgr
00674  *                          from  from which this API needs to allocate free
00675  *                          frames .
00676  *  @param      numFrames   Number of frames that needs to be allocated.
00677  *
00678  *  @retval     FrameQBufMgr_S_SUCCESS      Successfully allocated frames.
00679  *  @retval     FrameQBufMgr_E_ALLOC_FRAME Failed due to non availabilty of free
00680  *                                    frames in free frame pool.
00681  *  @retval     FrameQBufMgr_E_INVALIDARG   framePtr passed is null.
00682  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00683  *  @retval     FrameQBufMgr_E_INVALIDARG   freeQId passed is null.
00684  *  @retval     FrameQBufMgr_E_INVALIDARG   numFrames passed is null.
00685  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00686  *
00687  *  @sa         FrameQ_allocv, FrameQ_freev, FrameQBufMgr_freev.
00688  */
00689 Int32
00690 FrameQBufMgr_allocv (FrameQBufMgr_Handle    handle,
00691                      FrameQBufMgr_Frame     framePtr[],
00692                      UInt32                  freeQId[],
00693                      UInt8                * numFrames);
00694 
00695 /*!
00696  *  @brief      Function to free frame.
00697  *
00698  *              This function frees a frame.
00699  *
00700  *  @param      handle      FrameQBufMgr instance handle.
00701  *  @param      frame       Frame to be freed.
00702  *
00703  *  @retval     FrameQBufMgr_S_SUCCESS      Successfully freed frame.
00704  *  @retval     FrameQBufMgr_E_FAIL         Free failed.
00705  *  @retval     FrameQBufMgr_E_INVALIDARG   frame passed is null.
00706  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00707  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00708  *
00709  *  @sa         FrameQ_free, FrameQBufMgr_alloc
00710  */
00711 Int32
00712 FrameQBufMgr_free (FrameQBufMgr_Handle      handle,
00713                    FrameQBufMgr_Frame       frame);
00714 
00715 /*!
00716  *  @brief      Function to free multiple frames  to the  FrameQBufMgr.
00717  *
00718  *              This function frees multiple frames to the FrameQBufMgr
00719  *              instance.
00720  *
00721  *  @param      handle      FrameQBufMgr instance handle.
00722  *  @param      framePtr    Array of frames to be freed.
00723  *  @param      numFrames   Number of frames to free. The size of the framePtr
00724  *                          should be at least numFrames.
00725  *
00726  *  @retval     FrameQBufMgr_S_SUCCESS      Successfully freed frames.
00727  *  @retval     FrameQBufMgr_E_FAIL         Freev failed.
00728  *  @retval     FrameQBufMgr_E_INVALIDARG   framePtr passed is null.
00729  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00730  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00731  *
00732  *  @sa         FrameQ_freev, FrameQBufMgr_allocv
00733  */
00734 Int32
00735 FrameQBufMgr_freev (FrameQBufMgr_Handle     handle,
00736                     FrameQBufMgr_Frame      framePtr[],
00737                     UInt32                  numFrames);
00738 
00739 
00740 /*!
00741  *  @brief      Function to add frame.
00742  *
00743  *              This function is to add free frames dynamically to the given pool
00744  *              id (freeQId).
00745  *              NOTE: API is not implemented.
00746  *
00747  */
00748 Ptr
00749 FrameQBufMgr_add (FrameQBufMgr_Handle       handle,
00750                   UInt8                     freeQId);
00751 
00752 /*!
00753  *  @brief      Function to remove frame.
00754  *
00755  *              This function is to remove the frames  that is added dynamically.
00756  *              NOTE: API is not implemented.
00757  *
00758  */
00759 Int32
00760 FrameQBufMgr_remove (FrameQBufMgr_Handle    handle,
00761                      UInt8                  freeQId,
00762                      FrameQBufMgr_Frame     framePtr);
00763 
00764 /*!
00765  *  @brief      Function to duplicate the frame.
00766  *
00767  *              This function duplicates the given frame and returns the
00768  *              duplicated frame. It internally allocates one Frame header buffer
00769  *              and copy the header info to the allocated header buffer and
00770  *              returns it. it also increments the reference count of the
00771  *              original frame by 1 as both original frame and duped frmae are
00772  *              pointing to the same frame buffers.
00773  *
00774  *  @param      handle      FrameQBufMgr instance handle.
00775  *  @param      framePtr    Original frame  that needs to be duplicated.
00776 *   @param      dupedFramePtr Location to receive the duped frames.
00777  *  @param      numDupedFrames  Number of duplicated frames required.
00778  *
00779  *  @retval     FrameQBufMgr_S_SUCCESS      Successfully duped frame.
00780  *  @retval     FrameQBufMgr_E_FAIL         dup failed.
00781  *  @retval     FrameQBufMgr_E_INVALIDARG   framePtr passed is null.
00782  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00783  *  @retval     FrameQBufMgr_E_INVALIDARG   dupedFramePtr passed is null.
00784  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00785  *
00786  *  @sa         FrameQ_dup, FrameQBufMgr_alloc, FrameQBufMgr_allocv
00787  */
00788 Int32
00789 FrameQBufMgr_dup (FrameQBufMgr_Handle       handle,
00790                   FrameQBufMgr_Frame        framePtr,
00791                   FrameQBufMgr_Frame        dupedFramePtr[],
00792                   UInt32                    numDupedFrames);
00793 
00794 /*!
00795  *  @brief      Function to duplicate the multiple frames
00796  *
00797  *              API to duplicate the given frames i.e it increments the
00798  *              corresponding frames's reference count.It internally allocates
00799  *              headers for the duped frames.API fails if it is not able to dup
00800  *              all the frames.
00801  *
00802  *  @param      handle          Instance handle.
00803  *  @param      framePtr        Array of frames to duplicated.
00804  *  @param      dupedFramePtr   Location to receive duplicated frames.
00805  *  @param      numDupedFrames  Number of duplicated frames required for each
00806  *                              given frame.
00807  *  @param      numFrames       Number of original frames that needs to be
00808  *                              duplicated.
00809  *
00810  *  @retval     FrameQBufMgr_S_SUCCESS      Successfully duped frame.
00811  *  @retval     FrameQBufMgr_E_FAIL         dup failed.
00812  *  @retval     FrameQBufMgr_E_INVALIDARG   framePtr passed is null.
00813  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00814  *  @retval     FrameQBufMgr_E_INVALIDARG   dupedFramePtr passed is null.
00815  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00816  *
00817  *  @sa         FrameQ_dup, FrameQBufMgr_alloc, FrameQBufMgr_allocv,
00818  *              FrameQBufMgr_dup
00819  */
00820 Int32
00821 FrameQBufMgr_dupv (FrameQBufMgr_Handle   handle,
00822                    FrameQBufMgr_Frame    framePtr[],
00823                    FrameQBufMgr_Frame  **dupedFramePtr,
00824                    UInt32                numDupedFrames,
00825                    UInt32                numFrames);
00826 
00827 /*!
00828  *  @brief      Function to register call back function for notification
00829  *
00830  *              Function to Register notification with the instance. It
00831  *              internally registers notification with the individual free frame
00832  *              pools.If alloc on free frame pool 0 failed,Notification will be
00833  *              generated if free buffers  in that pool becomes more than
00834  *              watermark.
00835  *
00836  *  @param      handle          Instance handle.
00837  *  @param      notifyParams    notify params.
00838  *
00839  *  @retval     FrameQBufMgr_S_SUCCESS      Operation successful.
00840  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00841  *  @retval     FrameQBufMgr_E_INVALIDARG   notifyParams passed is null.
00842  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00843  *  @retval     FrameQBufMgr_E_FAIL         Failed to register notification.
00844  *
00845  *  @sa         FrameQBufMgr_unregisterNotifier
00846  */
00847 Int32
00848 FrameQBufMgr_registerNotifier (FrameQBufMgr_Handle        handle,
00849                                FrameQBufMgr_NotifyParams *notifyParams);
00850 
00851 /*!
00852  *  @brief      Function to unregister call back function.
00853  *
00854  *              Function to Register notification with the instance. It
00855  *              internally unregisters notification with the individual free frame
00856  *              pools.
00857  *
00858  *  @param      handle          Instance handle.
00859  *
00860  *  @retval     FrameQBufMgr_S_SUCCESS      Successfully duped frame.
00861  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00862  *  @retval     FrameQBufMgr_E_INVALIDARG   notifyParams passed is null.
00863  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00864  *  @retval     FrameQBufMgr_E_FAIL         Failed to register notification.
00865 
00866  *
00867  *  @sa         FrameQBufMgr_registerNotifier
00868  */
00869 Int32
00870 FrameQBufMgr_unregisterNotifier (FrameQBufMgr_Handle handle);
00871 
00872 /*!
00873  *  @brief      Function to write back  the frame.
00874  *
00875  *              Function to write back the contents  of buffer .
00876  *
00877  *  @param      handle          Instance handle.
00878  *  @param      framePtr        frame to be written back to external memory.
00879  *
00880  *  @retval     FrameQBufMgr_S_SUCCESS      Operation successful.
00881  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00882  *  @retval     FrameQBufMgr_E_INVALIDARG   framePtr passed is null.
00883  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00884  *
00885  *  @sa         FrameQBufMgr_invlidate
00886  */
00887 Int32
00888 FrameQBufMgr_writeBack(FrameQBufMgr_Handle handle, FrameQBufMgr_Frame framePtr);
00889 
00890 /*!
00891  *  @brief      Write back the contents  of buffer.
00892  *
00893  *              Function to write back the contents  of buffer . Flags denotes
00894  *              whether it is header buffer or frame  buffer..
00895  *
00896  *  @param      handle          Instance handle.
00897  *  @param      buf             Buffer to be written back.
00898  *  @param      flags           Flags denotes whether buf is a header buffer or
00899  *                              frame  buffer.
00900  *
00901  *  @retval     FrameQBufMgr_S_SUCCESS      Operation successful.
00902  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00903  *  @retval     FrameQBufMgr_E_INVALIDARG   notifyParams passed is null.
00904  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00905  *
00906  *  @sa         FrameQBufMgr_invlidate
00907  */
00908 Int32
00909 FrameQBufMgr_writeBackBuf(FrameQBufMgr_Handle handle,
00910                           Ptr                 buf,
00911                           UInt32              flags);
00912 
00913 /*!
00914  *  @brief      Function to invalidate frame.
00915  *
00916  *              Function to invalidate the contents  of frame .
00917  *
00918  *  @param      handle          Instance handle.
00919  *  @param      framePtr        frame to be invalidated from external memory.
00920  *
00921  *  @retval     FrameQBufMgr_S_SUCCESS      Operation successful.
00922  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00923  *  @retval     FrameQBufMgr_E_INVALIDARG   framePtr passed is null.
00924  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00925  *
00926  *  @sa         FrameQBufMgr_writeback
00927  */
00928 Int32
00929 FrameQBufMgr_invalidate(FrameQBufMgr_Handle handle,
00930                         FrameQBufMgr_Frame framePtr);
00931 
00932 /*!
00933  *  @brief      Function to invalidate frame buffer.
00934  *
00935  *              Function to invalidate the contents  of frame buffer .
00936  *
00937  *  @param      handle          Instance handle.
00938  *  @param      frameBuf        framebuffer pointer.
00939  *  @param      size            Size to be invalidated.
00940  *  @param      bufIndexInFrame index of the frame buffer in  the frame to which
00941  *                              the buffer bellongs to.
00942  *
00943  *  @retval     FrameQBufMgr_S_SUCCESS      Operation successful.
00944  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00945  *  @retval     FrameQBufMgr_E_INVALIDARG   frameBuf passed is null.
00946  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00947  *
00948  *  @sa         FrameQBufMgr_writeback
00949  */
00950 Int32
00951 FrameQBufMgr_invalidateFrameBuf(FrameQBufMgr_Handle  handle,
00952                                 Ptr                  frameBuf,
00953                                 UInt32               size,
00954                                 UInt8                bufIndexInFrame);
00955 
00956 /*!
00957  *  @brief      Function to writeback frame buffer.
00958  *
00959  *              Function to writeback the contents  of frame buffer .
00960  *
00961  *  @param      handle          Instance handle.
00962  *  @param      frameBuf        framebuffer pointer.
00963  *  @param      size            Size to be writtenback.
00964  *  @param      bufIndexInFrame index of the frame buffer in  the frame to which
00965  *                              the given buffer bellongs to.
00966  *
00967  *  @retval     FrameQBufMgr_S_SUCCESS      Operation successful.
00968  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00969  *  @retval     FrameQBufMgr_E_INVALIDARG   frameBuf passed is null.
00970  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00971  *
00972  *  @sa         FrameQBufMgr_writeback
00973  */
00974 Int32
00975 FrameQBufMgr_writeBackFrameBuf(FrameQBufMgr_Handle  handle,
00976                                Ptr                  frameBuf,
00977                                UInt32               size,
00978                                UInt8                bufIndexInFrame);
00979 /*!
00980  *  @brief      Invalidate the contents  of  frame header.
00981  *
00982  *              API treates the passed buffer as frame Header.
00983  *
00984  *  @param      handle      Handle to the instance.
00985  *  @param      headerBuf   frame header to be invalidated.
00986  *
00987  *  @retval     FrameQBufMgr_S_SUCCESS      Operation successful.
00988  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
00989  *  @retval     FrameQBufMgr_E_INVALIDARG   headerBuf passed is null.
00990  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
00991  */
00992 Int32
00993 FrameQBufMgr_invalidateHeaderBuf(FrameQBufMgr_Handle  handle,
00994                                  Ptr                  headerBuf);
00995 
00996 /*!
00997  *  @brief      Write back the contents  of  frame header.
00998  *
00999  *              API treates the passed buffer as frame Header.
01000  *
01001  *  @param      handle      Handle to the instance.
01002  *  @param      headerBuf   frame header to be written back.
01003  *
01004  *  @retval     FrameQBufMgr_S_SUCCESS      Operation successful.
01005  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
01006  *  @retval     FrameQBufMgr_E_INVALIDARG   headerBuf passed is null.
01007  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
01008  */
01009 Int32
01010 FrameQBufMgr_writeBackHeaderBuf(FrameQBufMgr_Handle  handle,
01011                                 Ptr                  headerBuf);
01012 
01013 /*!
01014  *  @brief      API to translate the given pointer to other address type.
01015  *
01016  *
01017  *  @param      handle      Handle to the instance.
01018  *  @param      dstAddr     Location to receive the destination address
01019  *                          (translated address).
01020  *  @param      dstAddrType address type to which the source address needs to be
01021  *                          translated to.
01022  *  @param      srcAddr     Source address.
01023  *  @param      srcAddrType Address type of the source address.
01024  *  @param      bufType     buffer type. Denotes source address specified is
01025  *                          frame header or frame buffer.
01026  *
01027  *  @retval     FrameQBufMgr_S_SUCCESS      Operation successful.
01028  *  @retval     FrameQBufMgr_E_FAIL         Invalid buffer type specified in
01029  *                                           bufType.
01030  *  @retval     FrameQBufMgr_E_FAIL         Translate failed in SysLinkMemMgr.
01031  *                                           bufType.
01032  *  @retval     FrameQBufMgr_E_INVALIDARG   handle passed is null.
01033  *  @retval     FrameQBufMgr_E_INVALIDARG   dstAddr passed is null.
01034  *  @retval     FrameQBufMgr_E_INVALIDARG   srcAddr passed is null.
01035  *  @retval     FrameQBufMgr_E_INVALIDSTATE Module is not initialized.
01036  */
01037 Int32
01038 FrameQBufMgr_translateAddr (FrameQBufMgr_Handle            handle,
01039                             Ptr *                          dstAddr,
01040                             FrameQBufMgr_AddrType          dstAddrType,
01041                             Ptr                            srcAddr,
01042                             FrameQBufMgr_AddrType          srcAddrType,
01043                             FrameQBufMgr_BufType           bufType);
01044 
01045 /*!
01046  *  @brief      API to get the ID of the instance.
01047  *
01048  *
01049  *  @param      handle      Handle to the instance.
01050  *
01051  *  @retval     id          Id of the instance.
01052  */
01053 UInt32
01054 FrameQBufMgr_getId (FrameQBufMgr_Handle handle);
01055 
01056 /*!
01057  *  @brief      API to get the handle of the instance.
01058  *
01059  *
01060  *  @param      Id          id of the instance.
01061  *
01062  *  @retval     pointer     handle of the instance.
01063  *  @retval     NULL        getHandle failed.
01064  */
01065 Ptr
01066 FrameQBufMgr_getHandle (UInt32 Id);
01067 
01068 /*!
01069  * @brief       Function to determine whether cache calls(writeback/invalidate)
01070  *              are enabled for frame headers.
01071  *
01072  * @param       handle    Instance handle.
01073  *
01074  *  @retval     TRUE        if cache writeback and invalidate calls are enabled
01075  *  @retval     FALSE       if cache writeback and invalidate calls are disabled.
01076  */
01077 Bool
01078 FrameQBufMgr_isCacheEnabledForHeaderBuf(FrameQBufMgr_Handle handle);
01079 
01080 /*!
01081  * @brief       Function to determine whether cache calls(writeback/invalidate)
01082  *              are enabled for frame headers.
01083  *
01084  * @param       handle          Instance handle.
01085  * @param       framebufIndex   frame buffer index  in frame.
01086  *
01087  *  @retval     TRUE        if cache writeback and invalidate calls are enabled
01088  *  @retval     FALSE       if cache writeback and invalidate calls are disabled.
01089  */
01090 Bool
01091 FrameQBufMgr_isCacheEnabledForFrameBuf(FrameQBufMgr_Handle handle,
01092                                        UInt8 framebufIndex);
01093 
01094 /*!
01095  * @brief       Function to get the number of free frames availabel in pool 0.
01096  *
01097  * @param       handle          Instance handle.
01098  * @param       numFreeFrames   Out parameter.Denotes number of free frames
01099  *                              available in queue 0.
01100  *
01101  *  @retval     FrameQBufMgr_S_SUCCESS  Operation successful.
01102  */
01103 Int32
01104 FrameQBufMgr_getNumFreeFrames (FrameQBufMgr_Handle handle, UInt32* numFreeFrames);
01105 
01106 /*!
01107  * @brief       Provides a hook to perform implementation dependent operation
01108  *
01109  * @param       handle    Instance handle.
01110  * @param       cmd       Command to perform.
01111  * @param       arg       void * argument.
01112  *
01113  *  @retval     FrameQBufMgr_S_SUCCESS      Operation successful.
01114  *  @retval     FrameQBufMgr_E_FAIL         API failed.
01115  */
01116 Int32
01117 FrameQBufMgr_control (FrameQBufMgr_Handle  handle,
01118                       Int32                cmd,
01119                       Ptr                  arg);
01120 
01121 /*!
01122  *  @brief      Function to calcaulate the base frame header size when number of
01123  *              frames in a frame is given.
01124  *
01125  * @param       numFrameBufs  Number of Frame buffers.
01126  *
01127  *  @retval     positive value  size of the base header size.
01128  */
01129 UInt32 FrameQBufMgr_getBaseHeaderSize(UInt8 numFrameBufs);
01130 
01131 /*!
01132  *  @brief      Function to get the kernel space handle of the instance.
01133  *
01134  *              This API is valid only on HLOS side.
01135  * @param       handle  Handle of the instance.
01136  *
01137  *  @retval     pointer Kernel space handle.
01138  */
01139 /* API that returns the kernel space handle of the instance */
01140 Ptr FrameQBufMgr_getKnlHandle(FrameQBufMgr_Handle handle);
01141 
01142 
01143 #if defined (__cplusplus)
01144 }
01145 #endif /* defined (__cplusplus) */
01146 
01147 
01148 #endif /*FRAMEQBUFMGR_H*/

Generated on Mon Mar 14 11:59:45 2011 for Syslink by  doxygen 1.4.4