summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHemant Hariyani2014-12-03 16:11:37 -0600
committerHemant Hariyani2014-12-03 16:28:54 -0600
commit6ef4a562451a007755c9bef3e341cba543bbab7d (patch)
treea405d3da696f36ce7a12fc53a82d6f524218bc10 /memplugin_android.c
parentd56393c4e1cde702b568f484e4d860a0746bfc0c (diff)
downloadhardware-ti-libdce-6ef4a562451a007755c9bef3e341cba543bbab7d.tar.gz
hardware-ti-libdce-6ef4a562451a007755c9bef3e341cba543bbab7d.tar.xz
hardware-ti-libdce-6ef4a562451a007755c9bef3e341cba543bbab7d.zip
Revert "libdce[ANDROID] - add drmsetmaster/dropmaster calls"
Not needed as dce will use drm render node. This reverts commit 4715ea56d8a266e66bc6cef982410c602a19be43. Change-Id: I1dc14249ffe2dbbfdfd970cea3bf4a378274db6d Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Diffstat (limited to 'memplugin_android.c')
-rw-r--r--memplugin_android.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/memplugin_android.c b/memplugin_android.c
index c3c6cb1..154ae7c 100644
--- a/memplugin_android.c
+++ b/memplugin_android.c
@@ -103,9 +103,6 @@ int memplugin_close()
103void *memplugin_alloc(int sz, int height, MemRegion region, int align, int flags) 103void *memplugin_alloc(int sz, int height, MemRegion region, int align, int flags)
104{ 104{
105 MemHeader *h = NULL; 105 MemHeader *h = NULL;
106
107 drmSetMaster(OmapDrm_FD);
108
109 struct omap_bo *bo = omap_bo_new(OmapDev, sz + sizeof(MemHeader), OMAP_BO_WC); 106 struct omap_bo *bo = omap_bo_new(OmapDev, sz + sizeof(MemHeader), OMAP_BO_WC);
110 107
111 if( !bo ) { 108 if( !bo ) {
@@ -123,8 +120,6 @@ void *memplugin_alloc(int sz, int height, MemRegion region, int align, int flags
123 h->handle = (void*)bo; 120 h->handle = (void*)bo;
124 h->offset = 0; 121 h->offset = 0;
125 122
126 drmDropMaster(OmapDrm_FD);
127
128 dce_buf_lock(1, (size_t *)&(h->dma_buf_fd)); 123 dce_buf_lock(1, (size_t *)&(h->dma_buf_fd));
129 124
130 return (H2P(h)); 125 return (H2P(h));
@@ -140,10 +135,8 @@ void memplugin_free(void *ptr)
140 /* close the file descriptor */ 135 /* close the file descriptor */
141 close(h->dma_buf_fd); 136 close(h->dma_buf_fd);
142 } 137 }
143 drmSetMaster(OmapDrm_FD);
144 /*Finally, Delete the buffer object*/ 138 /*Finally, Delete the buffer object*/
145 omap_bo_del((struct omap_bo *)h->handle); 139 omap_bo_del((struct omap_bo *)h->handle);
146 drmDropMaster(OmapDrm_FD);
147 ptr = NULL; 140 ptr = NULL;
148 } 141 }
149 142
@@ -166,8 +159,6 @@ void *memplugin_alloc_noheader(MemHeader *memHdr, int sz, int height, MemRegion
166 if (!memHdr) 159 if (!memHdr)
167 return NULL; 160 return NULL;
168 161
169 drmSetMaster(OmapDrm_FD);
170
171 struct omap_bo *bo = omap_bo_new(OmapDev, sz, OMAP_BO_WC); 162 struct omap_bo *bo = omap_bo_new(OmapDev, sz, OMAP_BO_WC);
172 163
173 if( !bo ) { 164 if( !bo ) {
@@ -185,7 +176,6 @@ void *memplugin_alloc_noheader(MemHeader *memHdr, int sz, int height, MemRegion
185 h->region = region; 176 h->region = region;
186 h->flags = flags;/*Beware: This is a bit field.*/ 177 h->flags = flags;/*Beware: This is a bit field.*/
187 h->offset = 0; 178 h->offset = 0;
188 drmDropMaster(OmapDrm_FD);
189 179
190 dce_buf_lock(1, (size_t *)&(h->dma_buf_fd)); 180 dce_buf_lock(1, (size_t *)&(h->dma_buf_fd));
191 181
@@ -205,10 +195,8 @@ void memplugin_free_noheader(MemHeader *memHdr)
205 close(h->dma_buf_fd); 195 close(h->dma_buf_fd);
206 } 196 }
207 197
208 drmSetMaster(OmapDrm_FD);
209 /*Finally, Delete the buffer object*/ 198 /*Finally, Delete the buffer object*/
210 omap_bo_del((struct omap_bo *)h->ptr); 199 omap_bo_del((struct omap_bo *)h->ptr);
211 drmDropMaster(OmapDrm_FD);
212 200
213 return; 201 return;
214} 202}