aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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[Android]: Added support for DRM based Android mempluginSunita Nadampalli2014-11-171-1/+24
| | | | | | | | | | | | This patch adds memplugin implementation for GEM allocator and dce buffer locking via MmRPC for Android builds. Android memplugin implement memplugin interface for buffers with and without memheaders. This implementation is for DRM/GEM buffer allocations. And libdce_android implements GEM buffer registration and unregistration with MmRPC. Change-Id: Ie72c988a37f987446f7d7c1d97225295de73d305 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* [LINUX] Manage Tiler Pinning for dce DRM buffersPradeep Venkatasubbarao2014-03-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [LIBDCE] Add Android specific changesSunita Nadampalli2013-09-131-4/+4
| | | | | | | | | 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] update memplugin headers and apisSunita Nadampalli2013-09-131-17/+19
| | | | | | | | 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>
* [GLP] Enable DMA Buf Handle3.00.01.05Saurabh Bipin Chandra2013-08-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [GLP] Libdce linux implementationSathishkumar2013-08-271-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add Header declaration for MemHeaderSaurabh Bipin Chandra2013-05-231-0/+10
| | | | | | | | | To maintain a generic implementation this patch moves the MemHeader declaration from memplugin_qnx.c to memplugin.h. Change-Id: I881ee18903a906a6e31284710949709a5be4132e 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/+81
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>