Commit message (Collapse)AuthorAgeFilesLines
* Update project for latest Androidd-pie-core-releaseAndrew F. Davis2019-07-221-0/+1
| | | | | | | Convert the file to .bp. Also fixup various build warnings detected by newer compiler tools. Signed-off-by: Andrew F. Davis <>
* libdce[Android]: Add dce_ipc_recover APIAngela Stegmaier2017-01-171-0/+6
| | | | | | | | | | | | | | | | | In case of remote core recovery due to remote core crash, the rpmsg-dce handle needs to be closed and re-opened since any handles that were open when the crash happened are marked as stale in the driver. This patch adds a new API that the user can call to close the rpmsg-dce handle so that recovery can happen. In case the user receives notification of a remote core crash, it can call the dce_ipc_recover() API to make sure that the rpmsg-dce handle that is opened during dce_buf_lock is closed so that a new one can be opened the next time. Change-Id: I8ebc19e308ffe7431b57c31cfecd469e171777f6 Signed-off-by: Angela Stegmaier <>
* get_rproc_info: Introduce new API to query remoteprocBuddy Liong2016-06-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | 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 <> Signed-off-by: Buddy Liong <>
* libdce: Changes to make dce_ipc_init/deinit externalSunita Nadampalli2014-11-141-1/+15
| | | | | | | | | | 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 <>
* [LINUX] Manage Tiler Pinning for dce DRM buffersPradeep Venkatasubbarao2014-03-251-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Change-Id: If09a1039b5b16f3cc5ff0e9c6c598932d8a2ce3e Signed-off-by: Pradeep Venkatasubbarao <> Signed-off-by: Amarinder Bindra <> Signed-off-by: Karthik Ramanan <>
* [DSP]Added duplicate functions for buffer lock and unlock.Pradeep Venkatasubbarao2013-12-061-2/+23
| | | | | | | | | | | | | | This is required temporarily as there is no other way to get the core index.dce_buf_lock and unlock functions expects MmRpcHandle and now as there are separate handles for DSP and IPU, to avoid modifying these APIs, duplicate functions have been created coreIndex is hardcoded. Added prototypes of dsp specific lock and unlock functions in libdce.h Change-Id: I360632acd061f9e134c38bea009b1ad257e32bb8 Signed-off-by: Pradeep Venkatasubbarao <>
* Added VIDDEC2 interfaces for DSP codecsPradeep Venkatasubbarao2013-12-031-0/+1
| | | | | | | | | | | 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 <>
* [LIBDCE] Replace Semaphore with MutexSunita Nadampalli2013-09-261-2/+1
| | | | | | | | | | | | | | | | | | | | | 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 <>
* [LINUX] Fix for make installSathishkumar2013-09-051-0/+1
| | | | | | | | | | | | 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 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 <>
* [LIBDCE] Add function descriptor in libdce header fileSaurabh Bipin Chandra2013-09-051-8/+26
| | | | | | | | | | 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 <>
* [LIBDCE] Mutual exclusion of Engine_open and Engine_closeSaurabh Bipin Chandra2013-09-051-1/+2
| | | | | | | | | | | | | | | | 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 <>
* [LINUX] Moving Linux specific functions to new c fileSaurabh Bipin Chandra2013-09-051-1/+2
| | | | | | | | | | | This patch moves Linux specific functions to libdce_linux.c. It also takes in the DRM Initialization cleanup changes in dce_init from: Change-Id: I570341c8dfbe1d120bc89071a86020b6ba5d4cac Signed-off-by: Saurabh Bipin Chandra <>
* [LINUX] Expose dce_init and dce_deinit calls to userSaurabh Bipin Chandra2013-09-051-6/+25
| | | | | | | | | | | | | | | | | 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 <>
* [LINUX] Expose API to lock and Unlock IO BuffersSaurabh Bipin Chandra2013-09-041-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <>
* [GLP] Libdce linux implementationSathishkumar2013-08-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make install & libdce.c issue fix 1. make install has been fixed. libdce.h will be installed in /usr/include, 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. checks for libmmrpc and modified to link with libmmrpc. and modified 1. Codec_engine,xdctolls,framework_components,ipc,xdctools and xdaias paths needs to be exported. checks for the exported paths. 2. 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 <> Signed-off-by: Sathishkumar <>
* [libDCE] Add IPC 3.x Adapted code to RepositorySaurabh Bipin Chandra2013-04-261-0/+79
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 <>