C2D HAL: Enable ION

Change-Id: Ibfd124d620bab018bc89dd37e4471270c93aa58d
This commit is contained in:
Naseer Ahmed 2011-11-14 14:44:34 -08:00
parent e8525339bc
commit 049cef0c8c

View File

@ -208,10 +208,17 @@ static uint32 c2d_get_gpuaddr(int device_fd, struct private_handle_t *handle)
param.offset = handle->offset;
param.hostptr = handle->base;
if (handle->flags & (private_handle_t::PRIV_FLAGS_USES_PMEM|private_handle_t::PRIV_FLAGS_USES_PMEM_ADSP))
if (handle->flags & (private_handle_t::PRIV_FLAGS_USES_PMEM |
private_handle_t::PRIV_FLAGS_USES_PMEM_ADSP))
param.memtype = KGSL_USER_MEM_TYPE_PMEM;
else
else if (handle->flags & private_handle_t::PRIV_FLAGS_USES_ASHMEM)
param.memtype = KGSL_USER_MEM_TYPE_ASHMEM;
else if (handle->flags & private_handle_t::PRIV_FLAGS_USES_ION)
param.memtype = KGSL_USER_MEM_TYPE_ION;
else {
LOGE("Invalid handle flags: 0x%x", handle->flags);
return 0;
}
if (!ioctl(device_fd, IOCTL_KGSL_MAP_USER_MEM, (void *)&param, sizeof(param))) {
return param.gpuaddr;