diff options
Diffstat (limited to 'memplugin_android.c')
-rw-r--r-- | memplugin_android.c | 12 |
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() | |||
103 | void *memplugin_alloc(int sz, int height, MemRegion region, int align, int flags) | 103 | void *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 | } |