mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 09:06:50 +08:00
[osal/android]: fix ion heap id on 5.1
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@147 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -171,6 +171,7 @@ static int ion_map(int fd, ion_user_handle_t handle, size_t length, int prot,
|
||||
typedef struct {
|
||||
RK_U32 alignment;
|
||||
RK_S32 ion_device;
|
||||
RK_U32 heap_id;
|
||||
} allocator_ctx_ion;
|
||||
|
||||
MPP_RET os_allocator_ion_open(void **ctx, size_t alignment)
|
||||
@@ -201,6 +202,7 @@ MPP_RET os_allocator_ion_open(void **ctx, size_t alignment)
|
||||
} else {
|
||||
p->alignment = alignment;
|
||||
p->ion_device = fd;
|
||||
p->heap_id = ION_HEAP_TYPE_SYSTEM_CONTIG; /* ION_HEAP_TYPE_CARVEOUT */
|
||||
*ctx = p;
|
||||
}
|
||||
|
||||
@@ -219,7 +221,7 @@ MPP_RET os_allocator_ion_alloc(void *ctx, MppBufferInfo *info)
|
||||
|
||||
p = (allocator_ctx_ion *)ctx;
|
||||
ret = ion_alloc(p->ion_device, info->size, p->alignment,
|
||||
ION_HEAP_TYPE_CARVEOUT, 0,
|
||||
p->heap_id, 0,
|
||||
(ion_user_handle_t *)&info->hnd);
|
||||
if (ret) {
|
||||
mpp_err("os_allocator_ion_alloc ion_alloc failed ret %d\n", ret);
|
||||
|
Reference in New Issue
Block a user