Commit message (Collapse)AuthorAgeFilesLines
* libdce: Increase the concurrent engine handle countHEAD3.00.13.00masterSunita Nadampalli2017-02-071-2/+2
| | | | | | | | Increase the MAX_INSTANCES count for the concurrent engine handles to match the DCE server definitions. Change-Id: If29de276b9a173e114ad6df9b1358b4842e86b49 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* Valid id checking for callbackmsg[id]).row_mode in process() Liong2016-06-221-2/+2
| | | | | | | | | | | | | | | | | | | In VIDDEC3_process or VIDENC2_process, if low latency is used, then id will have a valid value of >= 0. When full frame is used, after process call, there is a condition check of callbackmsg[id]).row_mode. Problem is that id might not be valid for full frame. With id value < 0, the value in callbackmsg[id]).row_mode can be guarantee to be correct. Issue is found when id = -1 and the value of callbackmsg[-1]).row_mode points to less than 0, which causes the condition to pass. This commit is fixing the issue by adding additional check to make sure id is >= 0 when calling callbackmsg[id]).row_mode so that the condition check will be valid to determine low latency mode or full frame mode after process(). Change-Id: I93209e4da42305e807824565bf676c8bdd33d72a Signed-off-by: Buddy Liong <buddy.liong@ti.com>
* get_rproc_info: Introduce new API to query remoteprocBuddy Liong2016-06-171-0/+38
| | | | | | | | | | | | | | | | | | | | | | This is the initial implementation of an extensible API that allows the user to query various remote core parameters. Currently, there are three query parameters that are supported: 1. CPU Load 2. Total configured heap size 3. Available heap size The intent of this API is to programmatically call the API and feed it in various other tools that can be developed on top of this (for example: soc performance visualization etc.) NOTE: This will require the implementation on ipumm-fw and/or dspdce-fw. Change-Id: I94c309221dbce24162a4f31166890d3acdb2d049 Signed-off-by: Karthik Ramanan <a0393906@ti.com> Signed-off-by: Buddy Liong <buddy.liong@ti.com>
* H.264 low latency with IVIDEO_NUMROWSBuddy Liong2016-03-011-85/+587
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | H.264 codec user guide describes the functionality of low latency. This functionality allows user to encode/decode a sub-frame level data communications. Without low latency, user can only encode/decode a complete/full frame only. More information about H264 low latency can be found in codec release package: * H.264 Encoder 2.0 on HDVICP2 and Media Controller Based Platform User's Guide (SPRUHG3), Appendix G - Low Latency / Sub Frame Level Synchronization * H.264 Decoder 2.0 on HDVICP2 and Media Controller Based Platform User's Guide (SPRUHF9), Appendix I - Low Latency / Sub Frame Level Synchronization This commit is only implemented low latency with IVIDEO_NUMROWS. H.264 encoder handles inputDataMode = IVIDEO_NUMROWS with getDataFxn as callback to get the numRows being filled into the inputBuffer pointer passed at process call. From H.264 encoder user guide Appendix G, more details can be found in sec. G2 H.264 Encoder Input with sub frame level synchronization H.264 decoder handles outputDataMode = IVIDEO_NUMROWS with putDataFxn as callback to notify client on the numRows/numBlocks being filled by codec into the outputBuffer pointer passed at process call. From H.264 decoder user guide Appendix I, more details can be found in sec. I.2 Details of using Sub Frame Level data sync at output side. The update is only valid on video codec on IVA-HD. This changes depend on the changes done on IPUMM DCE server. No low latency update is performed on video codec on DSP. This commit has dependencies on: IPC or latest IPUMM commit ids: commit e37750cc921a9442c48e7212824b28850ac3aaa7 - H.264 low latency - IVIDEO_NUMROWS commit 266749c0b6a2584d563625f881f998c3d78ca873 - Handling when MPU crashes, eg. CTRL-C on MPU side. commit 030572aaa1964bb50a903852fab0ecc0149b6b7e - H.264 Low Latency - sync put_DataFxn to MPU side Change-Id: I308bc74a879099f38705df6e6dda4a86b6645986 Signed-off-by: Buddy Liong <buddy.liong@ti.com>
* libdce[LINUX] : Mutex protection support and other bug fixesBuddy Liong2015-05-051-0/+6
| | | | | | | | | | | | | | | | | | | * The dce_init/dce_deinit APIs can be called multiple times by applications. This is called from multiple thread contexts in the viddec3test and is also invoked several times by the GStreamer framework. * But certain init functions and deinit operations need to be done only on the first and last calls of the respective APIs. * Additionally, according the pthread documentation we need to use **either** the PTHREAD_MUTEX_INITIALIZER or the pthread_mutex_init APIs with the attribs * The protection for the dce_init with the ref count mechanism is additionally needed for the mutex initialization because if this is not done conditionally (for the first dce_init) sequence, the subsequent call to this API would actually reinit the mutex value and cause the new thread sequence to acquire the same. Change-Id: I2d129a2b030a25c4e8c5f621abf05d68562db6b8 Signed-off-by: Karthik Ramanan <a0393906@ti.com> Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
* [QNX] Remove dependency on QNX TILER for memory allocationBuddy Liong2015-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Previously dce_alloc() call will always reserve the memory from QNX TILER 1D. The same case happens when it calls memplugin_alloc since the definition of DEFAULT_REGION is set to MEM_TILER_1D for QNX. Since there is a known issue of DMA lockup due to MPU side performing memory copy into the TILER memory, this patch limits the use of QNX TILER. With this patch, dce_test and dce_enc_test can be executed without QNX TILER allocation. DCE test apps are also updated to allocate the memory through shmemallocator instead of QNX TILER. The capability to: allocate TILER output buffer for decoder and allocate TILER input buffer and output buffer for encoder are still existed as part of the dce_test or dce_enc_test input parameter 'tiler' vs 'nontiler' Change-Id: I33e2a9dd83c791cc2621e548628715abaeae871d Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
* libdce: Add mutex protection for dce_buf_lock/dce_buf_unlockSunita Nadampalli2015-01-301-1/+1
| | | | | | | | | | | | The dce_buf_lock and dce_buf_unlock are meant for any video buffer locking and unlocking with the GEM allocator. Currently, these methods are being called from libdce apis with ipc mutex held. In order to enable other media components to make use of these buffer lock/unlock apis, explicit ipc mutex protection is added. Change-Id: I6d63a4cdcffec62a346341ff515a7ebb03dea8c0 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [Fix] Support Multiplanar encoder input buffers3.00.07.00Pradeep Venkatasubbarao2014-11-271-1/+2
| | | | | | | | | | An earlier patch to enable Single planar buffers for encoder broke the multiplanar support. This patch fixes this issue. Change-Id: Ide169a43b3df915a969a401e623fdad7f8792faf Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
* libdce: Changes to make dce_ipc_init/deinit externalSunita Nadampalli2014-11-141-7/+6
| | | | | | | | | | dce_ipc_init and dce_ipc_deinit are required by android memplugin even before DCE engine open happens. This is required to use MmRpc interface for DRM/GEM buffer locking. Change-Id: Ia11af04658c367242c33ab8acffaa4b522aa0716 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* Fix multi threaded logic for client indexingPradeep Venkatasubbarao2014-09-151-9/+39
| | | | | | | | | | | | | | | | | | | Client count was being used for indexing into an empty slot in table holding clients' engine handles. In the case of multi-threaded scenario, there is a possibility of out of order creation and deletions of clients in which case the client indexing should search for an empty slot in the table rather than assuming that the index defined by number of clients points to an empty slot in the table. This patch fixes this issue by decoupling client count from table indexing. Now the table indexing is done by finding the empty slot identified by a '0' in the entry. This also forces filling '0' during client deletion which is also taken care of in the patch. Change-Id: I3d4c8d744c3912a6fae5809f445039d39b762f91 Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
* Fixing Klocwork findingBuddy Liong2014-09-021-2/+2
| | | | | | | | Running Klocwork stand-alone, it reports 19-20 issues. This task submitted to resolve the found issues. Change-Id: I98150d4262ee5b1ab85cb1a7c0e697dcadb4a665 Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
* [VIDENC2] Single planar support for encoder inputPradeep Venkatasubbarao2014-08-171-1/+11
| | | | | | | | | | | This patch adds support for single planar buffers (Y and UV) in a single buffer sharing the same dma buf fd. In the case of single planar buffers the offset of uv data need to passed to rpc. This logic has been added in this patch. The patch s specific to LINUX and will not have any effect on QNX and Android builds. Change-Id: Ib4be4b8f1df36a1dc8d53eb0299189802ce040ca Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
* [LINUX] Manage Tiler Pinning for dce DRM buffersPradeep Venkatasubbarao2014-03-251-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications using dce_alloc/dce_free calls to manage memory, leaked memory because on non-closure of the created dmabuf fds. Additionally, all memory allocated from Tiler/DMM via DRM need to be explictly pinned to tiler using dce_buf_lock/dce_buf_unlock calls. Hence in the earlier implementation, every call to dce_alloc/free had to be followed by a lock/unlock call to pin/unpin it to tiler. In order, to insulate the applications from the internal details of DRM memory management and for ease of use of alloc and free calls, dce_alloc now takes care of creating the dmabuf and pinning it to tiler while dce_free takes care of tiler unpinning and closure of dmabuf fd. Applications can continue to use dce_alloc and dce_free calls as before thus maintiaining backward compatibility. On the other hand, since the same interfaces are used for multiple remote core targets, like IPU and DSP, MemHeader struture is upgraded to hold the core for which the block of memory belongs to, to keep track of the core. Hence all applications/Remote cores using this version of libdce should recompile with the new MemHeader for proper functioning. Dependent IPUMM patch: https://gerrit.ext.ti.com/gerrit/omap/#/c/12994/ Change-Id: If09a1039b5b16f3cc5ff0e9c6c598932d8a2ce3e Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com> Signed-off-by: Amarinder Bindra <a-bindra@ti.com> Signed-off-by: Karthik Ramanan <a0393906@ti.com>
* [Fix] Hold mutex during Mmrpc_callPradeep Venkatasubbarao2014-01-031-10/+49
| | | | | | | | | | | | | | | There is a single IPC channel to communicate to IPU2 using Mmrpc calls. Any communication to remote proc ipu2 gets routed through same channel. If mutiple instances use IVAHD/DCE, all the packets get routed through same channel. There is a possibility of corruption if the ipc calls are not serialised. Hence this patch protects the Mmrpc_call function calls with a mutex. Change-Id: I3673ba76e52f03707277893cec07cff06abe8f1f Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
* [Bug] Fix possible client count overflowPradeep Venkatasubbarao2014-01-031-4/+6
| | | | | | | | | | | | | | The number of existing clients already running was being incremented and then checked for maximum clients allowed. However in the error scenario i.e. when maximum allowed clients are already running and the new incoming client connection request was rejected the client count was incremented unconditionally and not rolled back to previous value thus resulting in possible overflow error. This patch fixes this erroneous case. Change-Id: I3e2b2bebfd025ba6a99b7ef838537d9716154ca4 Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
* [LIBDCE]: Changes to make Encoder and Decoder co-exist on AndroidSunita Nadampalli2013-12-111-50/+40
| | | | | | | | | | | | | | | | | | | In the current design omx video decoder is sending ptr for inbufs and dma_buf_fd for the outbufs to the dce client. In order to co-exist with encoder the inbufs/outbufs interpretation is unified between encoder and decoder. this is achieved by passing the memheader for both inbufs and outbufs for both encoder and decoders. This patch modified the process function to handle memheader for all Android scenarios (inbufs/outbufs for encoder/decoder) With this unified buf interpretation, the process function simplified for Android. Note# This patch has should be merged along with the omx patch: http://review.omapzoom.org/#/c/34414/ Change-Id: Ia89ef9785ddf702bca986ce6b4a91983fb8bcc11 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [LIBDCE] Spacing and alignment clean upbuddy.liong2013-12-031-210/+208
| | | | | | | Clean the spacing and alignment of tab to 4 spaces. Change-Id: I62d75f0aef1a06858868458eedaf017f90f04ec4 Signed-off-by: buddy.liong <buddy.budiono@ti.com>
* Added VIDDEC2 interfaces for DSP codecsPradeep Venkatasubbarao2013-12-031-55/+243
| | | | | | | | | | | This patch adds VIDDEC2 interfaces and libdce now supports both VIDDEC2 and VIDDEC3 interfaces. It initializes ipc based on the server name(IVA or DSP). Provisions are made to handle multiple instances of IPU and DSP codecs. Change-Id: Ie1869e626423a6250983711114dc9d0854022309 Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
* [LIBDCE] Get codec version on dce_test and dce_enc_testbuddy.liong2013-11-151-1/+6
| | | | | | | | | | | Internal reference: DVT OMAPS00302159. To add the capability for the QNX dce_test and dce_enc_test to get the codec version through XDM_GETVERSION command of codec_control. Change-Id: Ia39aeb5b55d3b8aba9365ad6d4a4a63e4e44b8aa Signed-off-by: buddy.liong <buddy.budiono@ti.com>
* [LIBDCE] Replace Semaphore with MutexSunita Nadampalli2013-09-261-72/+19
| | | | | | | | | | | | | | | | | | | | | This patch reverts the below commit: "abd5152ca071e552954571862635666297221177 [LIBDCE] Mutual exclusion of Engine_open and Engine_close" Description: ----------- (1) The current semaphore logic doesn't protect the engine open/close calls across processes. It is confirmed on QNX that two instances of dce test app is creating two different instances of semaphore. Hence, other than the delay the current semaphore doesn't add any protection for the mutli process <-> multi instance scenarios. (2) For the single process <-> multi instance scenario, it does protect the engine open/close calls, but it fails due to lack of reference counting And also, it is not sure why we need to protect the entire engine_open/close. Hence the current semaphore is replaced with mutex to protect the ipc handle create/close. Change-Id: Ibdad089bdd39cd5afc813373e84bf91fa8920860 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [LIBDCE] Fix memory leak on dce_ipc_init failureSunita Nadampalli2013-09-241-1/+1
| | | | | | | | On dce_ipc_init failure, we need to close the semaphore that was already created successfully. Change-Id: Id04ed4cae7e3dab6193e460b005580fac0c2edd4 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [LIBDCE][ANDROID] unify 1D output buffer support for Android/LinuxSunita Nadampalli2013-09-231-24/+1
| | | | | | | | | | Android omx components are modified to support dma buf fd for the output buffers, in all scenarios. Hence Android specific changes are removed from libdce, and enabled linux code for android as well. Change-Id: I8bf86803b40702d28ba0c45fd829b35fb47445fd Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [LIBDCE] Add single planar output buffer support for AndroidSunita Nadampalli2013-09-181-2/+25
| | | | | | | | | | | Android Thumbnail scenario allocates both input and out buffers from ION carveout. A single buffer is allocated for both Y and UV, with an offset for UV. This patch adds support for single planar buffers with memheaders required for the Android thumbnail scenario. Change-Id: I18306d2b07fe89f667d3f04bf5769ef1f2585c9d Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [LIBDCE] Trace and Comments cleanup3.00.03.00Saurabh Bipin Chandra2013-09-131-55/+29
| | | | | | | | | This patch: 1. replaces printf with trace MACROS. 2. Remove unwanted comments. Change-Id: Id137603cbe947ca371550f594fc249d2f1b1410b Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [LIBDCE] Add Android specific changesSunita Nadampalli2013-09-131-0/+34
| | | | | | | | | This patch adds changes specific to Android OS: (1) Semaphore handling (2) Input buffer offset handling Change-Id: Id6232e0b90e638fd1268ccbfafb51c6ca916fad2 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [LIBDCE] Move semaphore handling into dce_sem_* methodsSunita Nadampalli2013-09-131-9/+40
| | | | | | | | Inorder to unify semaphore handling across multiple OSes semphore calls are moved into dce_sem_* methods. Change-Id: I32e8fc2ffdbf9ee91365923a28dded7f1d8784ce Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [LIBDCE] Add support for offset within the xlation buffersSunita Nadampalli2013-09-131-12/+12
| | | | | | | | | | The input buffers for the video decoders need offset support because of HLOS Multimedia framework requirement. Inorder to support such input buffers, we should provide the buffer base address and offseted address to ipc. Change-Id: I2214dbced0a40911b17c5951593322b0fa3bfd16 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [LIBDCE] update memplugin headers and apisSunita Nadampalli2013-09-131-8/+8
| | | | | | | | memheader and memplugin apis are extended to meet the requirements for mem allocations/free/share for all OSes. Change-Id: Ide911d1654ccd0807ace37de9576299cbb860d07 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [TRACE] Debug Log levels enabledSathishkumar2013-09-051-1/+1
| | | | | | | | | | This patch adds debug log levels to libdce. To enable traces, set the DCE_DEBUG_ENABLE. The trace level can be changed by setting DCE_DEBUG_LEVEL= [1/2/3] during compile time. Change-Id: I4bed53cc6e3af938c02221376662318e3a1b8ec4 Signed-off-by: Sathishkumar <x0203598@ti.com>
* [LINUX] Fix for make installSathishkumar2013-09-051-3/+3
| | | | | | | | | | | | This patch fixes make install. All the required headers are copied to $(includedir)/dce on make install. Unused variables(X11 and WAYLAND) are removed in Makefile.am and pkg-config on libmmrpc is removed as no libmmrpc.pc is available. xdc_target_types__=gnu/targets/std.h is added to libdce.h, so that applications need not do it when using libdce.h. Change-Id: I8cc70aa2102becdbdc4c6b1e38e2aaa91739c4cc Signed-off-by: Sathishkumar <x0203598@ti.com>
* [LIBDCE] Add function descriptor in libdce header fileSaurabh Bipin Chandra2013-09-051-5/+3
| | | | | | | | | | This patch adds function descriptors in the libdce.h. The xdc/std.h inclusion is shifted from libdce.c to libdce.h to remove the need of client application including xdc/std.h. Change-Id: I4b9e6f12643b130a2cf1d317c4fed595008c7812 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [LIBDCE] Mutual exclusion of Engine_open and Engine_closeSaurabh Bipin Chandra2013-09-051-8/+22
| | | | | | | | | | | | | | | | This patch uses semaphores to mutually exclude: 1. dce_init() and Engine_open() IPU call. This solves a hang on IPU side during multiple instances. pthread mutex used within dce_init is replaced with semaphores as mutex is valid only across threads and not processes. 2. dce_deinit() and Engine_close(). This solves a hang on IPU side during multiple instances. Change-Id: Ia4d31582ebf0536142dee389e9601eae0169fb22 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [LINUX] Moving Linux specific functions to new c fileSaurabh Bipin Chandra2013-09-051-103/+0
| | | | | | | | | | | This patch moves Linux specific functions to libdce_linux.c. It also takes in the DRM Initialization cleanup changes in dce_init from: https://gerrit.ext.ti.com/gerrit/omap/#/c/12888 Change-Id: I570341c8dfbe1d120bc89071a86020b6ba5d4cac Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [LINUX] Expose dce_init and dce_deinit calls to userSaurabh Bipin Chandra2013-09-051-51/+64
| | | | | | | | | | | | | | | | | This patch changes the declaration of dce_init() and dce_deinit() to what is expected by Gstreamer for GLP and exposes it. This involves returning a struct omap_device pointer as void * during dce_init() and receiving a struct omap_device during dce_deinit(). The IPC initialization/deinitialization has been separated out of dce_init()/dce_deinit() into two static functions dce_ipc_init(), dce_ipc_deinit(). These functions are now included within Engine_open(), Engine_close() for all OSs. Change-Id: I86f4778cbd80f0a83aa3c39d8183bb3155a2a391 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [LINUX] Expose API to lock and Unlock IO BuffersSaurabh Bipin Chandra2013-09-041-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch exposes APIs: dce_buf_lock(int num, size_t *handle) dce_buf_unlock(int num, size_t *handle) to lock and unlock the Input/Output Buffers respectively. The change is specific to GLP. The DRM driver pins and unpins tiler address for the IO Buffers whenever the rpmsg_rpc driver calls map_attachment and unmap_attachment() respectively. As the rpmsg_rpc driver invokes these calls during every process call, the reference buffer addresses (address of past locked buffers) held by the codec gets invalidated. That is, these addresses will not continue to map to the same memory region (YUV reference buffer) as before. Most often, these virtual addresses may point to the next YUV Buffer translated from the MPU. These APIs put a condition on the map and unmap() within rpmsg_rpc. The expectation from the application is to call dce_buf_lock() for the inArgs.inputID buffer and dce_buf_unlock() for the outArgs.freeBufID buffer. Change-Id: Ic749c6b18385f9052a2eeb4e16959063c5efab5e Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [DCE] Align MmRpc offset setting with GLP Rpmsg_rpcSaurabh Bipin Chandra2013-09-041-6/+6
| | | | | | | | | | | | | | | | | | | | | This patch aligns setting translation[i].offset field of MmRpc Translation Array (XltAry) with the understanding of rpmsg_rpc of GLP. Rpmsg_rpc of GLP calculates: primary_offset as mmrpc_params.addr - mmprc_params.base and secondary_offset as translation[i].offset and sums both to get to the location of the address to be translated. Whereas in QNX rpmsg_rpc, the primary offset was subtracted from the secondary offset. This logic has now been modified in IPC_03_10_00_07_eng to align with the rpmsg_rpc of GLP. Change-Id: Ied11e78891119312f35162e336cd3dded9e8997a Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [GLP] Enable DMA Buf Handle3.00.01.05Saurabh Bipin Chandra2013-08-301-29/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts all MmRpc_Pointer_Param call to MmRpc_OffsetPointer_Param to take care of MemHeader. This is not needed from a QNX perspective but is needed from a Linux perspective. There should no added latency is QNX due to this change as the rpmsg_rpc kernel path is still the same. This patch invokes memplugin_share() for the buffers allocated through DCE to get the corresponding DMA Buf Handles for GLP. For QNX, the return value is expected to be 0. For linux, the patch adds the logic for Single vs Multiplanar buffers. For linux, the memplugin_share() logic is modified to store and retireve the same dma_buf_fd rather than getting a dup() each time. These changes makes the following assumptions: 1. All the parameter buffers are allocated through DCE/MemPlugin. 2. The CLient passes Virtual pointers, rather than DMA Buf Handles to libdce for parameter buffers. 3. For IO Buffers, the client passes DMA Buf Handles and are not allocated using DCE/MemPlugin. This patch assumes MmRpc is exposing translation[i].base. Change-Id: I7d13f4a4d69fbe8b6dd0317e2a860f0df2061ef9 Signed-off-by: Sunita Nadampalli <sunitan@ti.com> Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [LINUX] X11 and Wayland Support removedSathishkumar2013-08-291-30/+3
| | | | | | | | X11 and wayland support is removed from libdce. Defaults to omapdrm device. Change-Id: I0def0c872cc2658edd12a3e69dec6016eab3f1c9 Signed-off-by: Sathishkumar <x0203598@ti.com>
* [GLP] Libdce linux implementationSathishkumar2013-08-271-17/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make install & libdce.c issue fix 1. make install has been fixed. libdce.h will be installed in /usr/include, libdce.so files in /usr/lib and libdce.pc in /usr/lib/pkgconfig on using --prefix=/usr. By default the prefix is /usr/local. 2. init and deinit calls are removed from libdce.h 3. dce_set_fd and dce_get_fd calls are implemented in libdce.c 4. configure.ac checks for libmmrpc and makefile.am modified to link with libmmrpc. configure.ac and makefile.am modified 1. Codec_engine,xdctolls,framework_components,ipc,xdctools and xdaias paths needs to be exported. Configure.ac checks for the exported paths. 2. Makefile.am is modified to have the exported paths in the include directories list for the compiler. Modifications done after review 1. Comments added in memplugin_linux.c. White spaces removed manually and cleaned up libdce.c, memplugin.h. dce_priv.h is modified to have File and line number in the logs. linux/dce.h file is removed. Libdce modifications for linux Linux Specific libdce functionality added. 1. memplugin calls specific to linux are added in memplugin_linux.c 2. Error and debug logs implementation for linux in dce_priv.h 3. xll and wayland specific files are moved to linux folder Change-Id: Ib41e6a52d902376cdabbb939dee7585944720d92 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com> Signed-off-by: Sathishkumar <x0203598@ti.com>
* [DCE] Modify approach to pass parameters to IPCSaurabh Bipin Chandra2013-08-271-126/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three approaches were followed for IPC MmRpc calls. 1. All the parameters which need to be sent and received to/from IPU are coupled in a struct allocated from Shared/Tiler Memory. Only the adrress of the struct is passed to MmRpc as a pointer argument. This approach is useful as MmRpc in some cases to avoid multiple translations. This approach is followed for : Engine_open(), Engine_close(), create(), control(), delete() 2. All the parameters which need to be sent are given as separate arguments to MmRpc. This approach is needed when you need to translate an address which is ofsetted from a pointer which in itself needs to be translated. This apporach is followed for : process() For understanding, take the example of inbufs argument in process call(). Inbufs allocated in Shared memory and needs to be translated, has the address of Input buffer (allocated from Tiler). It is not possible to give the Input buffer as an argument to Mmrpc for translation until inbufs is given as a parameter to Mmrpc. Therefore inbuf can't be populated inside another Shared/Tiler memory struct. 3. This approach is a workaround to use approach [1] by solving the issue posed by [2]. This approach is followed for : get_version() Taking the example of inbufs to explain, the Input buffer address will be one of the parameters of the struct (explained in [1]) along with inbufs address. Therefore the Input buffer address will get translated here. At the IPU, this address needs to be copied back to inbufs. This patch aligns all DCE calls except Engine_Open to use Approach [2]. Engine_open still follows Approach [1] because: 1. Engine open takes in pointers to Engine_attrs and Error_code structures. The client may set both, none or either one of them to NULL (as allowed by CE). So that implies either I'll have to pass NULL as param_pointer to IPU or decide not to pass them at all. In the second case, I'll have to pass extra arguments to inform IPU that I have not passed Attrs or ErrorCode or both. I tried passing NULL but mmrpc_write failed. Dependent on ipumm patch: https://gerrit.ext.ti.com/gerrit/omap/#/c/12773 Change-Id: Ic770aaa99a56ea559efe9446e6e98d70726cc7c5 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [LIBDCE] Remove MmRpc translation param base3. Bipin Chandra2013-06-191-2/+0
| | | | | | | | | | The "base" field is no longer exposed by MmRpc from IPC release as it can be calculated internally using the "offset" field. Hence this patch removes setting the field. Change-Id: I08df16e08042ae27bb2fa550b7126b3f7cae8fa6 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* Fix to pass right translation param to IPC.Saurabh Bipin Chandra2013-05-231-1/+1
| | | | | | | | | | | | | The base field of the MmRpc_Xlt translation structure needs to be value of the address to be translated. The code was wrongly setting base to the location of the address. This has been corrected. This didn't create issues because the IPC doesnot use the base field for address translation. IPC uses offset to find the address to be translated. Change-Id: I404c7dc61cf3f4b5b584008b13336441420149d8 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [LIBDCE] Remove check for error_code in Engine_openSaurabh Bipin Chandra2013-05-231-1/+0
| | | | | | | | | This patch removes check for error_code in Engine_open because the Codec Engine doesnot expect a valid address. Change-Id: Id3286a101e290f6d987017741a0c194f53c19f94 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
* [libDCE] Add IPC 3.x Adapted code to Repository3.00.01.00Saurabh Bipin Chandra2013-04-261-0/+711
This patch adds libdce code to the repository. LibDCE has been adapted to use the MmRpc layer of IPC 3.x. This version of LibDCE is expected to work on QNX. Patchset 2 adds/modifies: 1. Removes Tiler 2D allocation/free for now. 2. Corrects memplugin_free() for Tiler 1D. 3. Modifies dce_test app to dump output till 30 frames. 4. Renamed dce.h to libdce.h. 5. Corrected header files across all files. 6. Build configuration for QNX 7. Removes build warnings. 8. Add README for Build instructions 9. Takes care of comments of Buddy and Pradeep. Patchset 3 adds/modifies: 1. Reduced Stack usage of each function. 2. Add ptr check in memplugin and remove from libdce. 3. Add DCE_Assert macros. 4. Add DCE_error_status enum. 5. Comments Cleanup 6. Make some functions static. 7. process() cleanup including removing reply_buf. 8. Add else if (for codec_type == Encoder type) 9. Converted Macros to Inline functions. 10.Converted init and deinit to dce_init and dce_deinit functions. 11. Removed dce_init() and dce_deinit() declarations Patchset 4 adds/modifies: 1. Assert Input function arguments. 2. Correct copyright year. 3. Correct memplugin_free for Shared memory. 4. Create dce_priv.h and move trace and assert macros to the header. 5. Redeclare mem_type enum and add mem_error_status enum in memplugin.h and make corresponding changes. 6. Add asserts in memplugin. Intention of some of the changes above is to move towards delinking Libdce and Memplugin. Patchset 5: 1. Missed to add dce_priv.h file. Patchset 6: 1. Take care Pradeep's comment. Change-Id: I6e5e37b7088362e7bad66200fc3454bb828e0eff Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>