Lines Matching refs:alloc
372 int QCameraMemory::alloc(int count, size_t size, unsigned int heap_id, in alloc() function in qcamera::QCameraMemory
459 struct ion_allocation_data alloc; in allocOneBuffer() local
469 memset(&alloc, 0, sizeof(alloc)); in allocOneBuffer()
470 alloc.len = size; in allocOneBuffer()
472 alloc.len = (alloc.len + 4095U) & (~4095U); in allocOneBuffer()
473 alloc.align = 4096; in allocOneBuffer()
475 alloc.flags = ION_FLAG_CACHED; in allocOneBuffer()
477 alloc.heap_id_mask = heap_id; in allocOneBuffer()
480 alloc.flags = ION_SECURE; in allocOneBuffer()
481 alloc.heap_id_mask = ION_HEAP(ION_CP_MM_HEAP_ID); in allocOneBuffer()
482 alloc.align = 1048576; // 1 MiB alignment to be able to protect later in allocOneBuffer()
483 alloc.len = (alloc.len + 1048575U) & (~1048575U); in allocOneBuffer()
486 rc = ioctl(main_ion_fd, ION_IOC_ALLOC, &alloc); in allocOneBuffer()
493 ion_info_fd.handle = alloc.handle; in allocOneBuffer()
503 memInfo.size = alloc.len; in allocOneBuffer()
508 (unsigned long)memInfo.handle, alloc.len); in allocOneBuffer()
793 rc = alloc(count, size, heap_id_mask, SECURE); in allocate()
799 rc = alloc(count, size, heap_id_mask, NON_SECURE); in allocate()
851 int rc = alloc(count, size, heap_id_mask, NON_SECURE); in allocateMore()
1087 int rc = alloc(count, size, heap_id_mask, isSecure); in allocate()
1122 int rc = alloc(count, size, heap_id_mask, NON_SECURE); in allocateMore()