C2D HAL: Enable ION
Change-Id: Ibfd124d620bab018bc89dd37e4471270c93aa58d
This commit is contained in:
parent
e8525339bc
commit
049cef0c8c
@ -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 *)¶m, sizeof(param))) {
|
||||
return param.gpuaddr;
|
||||
|
Loading…
Reference in New Issue
Block a user