aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunita Nadampalli2013-09-13 06:05:29 -0500
committerSunita Nadampalli2013-09-13 06:05:29 -0500
commite6859266dde6d2c5a85b43fd1ca27ce093b93eb8 (patch)
tree76e5e158b6016e57a26f00421c49fa8b39f301fd /memplugin_linux.c
parent71a368d4d01d0dd7bd80f1189fe205f4645fd320 (diff)
downloadrepo-libdce-e6859266dde6d2c5a85b43fd1ca27ce093b93eb8.tar.gz
repo-libdce-e6859266dde6d2c5a85b43fd1ca27ce093b93eb8.tar.xz
repo-libdce-e6859266dde6d2c5a85b43fd1ca27ce093b93eb8.zip
[LIBDCE] update memplugin headers and apis
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>
Diffstat (limited to 'memplugin_linux.c')
-rw-r--r--memplugin_linux.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/memplugin_linux.c b/memplugin_linux.c
index db04f4c..ed14f17 100644
--- a/memplugin_linux.c
+++ b/memplugin_linux.c
@@ -42,7 +42,7 @@ extern struct omap_device *OmapDev;
42 * @memory_type : Currently dce_alloc is used on for parameter buffer 42 * @memory_type : Currently dce_alloc is used on for parameter buffer
43 * Returns a virtual address pointer to omap_bo buffer or the param buffer 43 * Returns a virtual address pointer to omap_bo buffer or the param buffer
44 */ 44 */
45void *memplugin_alloc(int sz, int height, mem_type memory_type) 45void *memplugin_alloc(int sz, int height, MemRegion region, int align, int flags)
46{ 46{
47 MemHeader *h; 47 MemHeader *h;
48 struct omap_bo *bo = omap_bo_new(OmapDev, sz + sizeof(MemHeader), OMAP_BO_CACHED); 48 struct omap_bo *bo = omap_bo_new(OmapDev, sz + sizeof(MemHeader), OMAP_BO_CACHED);
@@ -56,6 +56,7 @@ void *memplugin_alloc(int sz, int height, mem_type memory_type)
56 h->size = sz; 56 h->size = sz;
57 h->ptr = (void *)bo; 57 h->ptr = (void *)bo;
58 h->dma_buf_fd = 0; 58 h->dma_buf_fd = 0;
59 h->region = region;
59 60
60 return (H2P(h)); 61 return (H2P(h));
61 62
@@ -65,7 +66,7 @@ void *memplugin_alloc(int sz, int height, mem_type memory_type)
65 * @ptr: pointer to omap_bo buffer, to be freed 66 * @ptr: pointer to omap_bo buffer, to be freed
66 * @memory_type: Currently dce_free is called on parameter buffers only 67 * @memory_type: Currently dce_free is called on parameter buffers only
67 */ 68 */
68void memplugin_free(void *ptr, mem_type memory_type) 69void memplugin_free(void *ptr)
69{ 70{
70 if( ptr ) { 71 if( ptr ) {
71 MemHeader *h = P2H(ptr); 72 MemHeader *h = P2H(ptr);
@@ -77,7 +78,7 @@ void memplugin_free(void *ptr, mem_type memory_type)
77 * @ptr : pointer of omap_bo buffer, to be converted to fd 78 * @ptr : pointer of omap_bo buffer, to be converted to fd
78 * Returns a file discriptor for the omap_bo buffer 79 * Returns a file discriptor for the omap_bo buffer
79 */ 80 */
80int memplugin_share(void *ptr) 81int32_t memplugin_share(void *ptr)
81{ 82{
82 if( ptr ) { 83 if( ptr ) {
83 MemHeader *h = P2H(ptr); 84 MemHeader *h = P2H(ptr);