Lines Matching refs:alloc
380 int QCameraMemory::alloc(int count, size_t size, unsigned int heap_id) in alloc() function in qcamera::QCameraMemory
468 struct ion_allocation_data alloc; in allocOneBuffer() local
478 memset(&alloc, 0, sizeof(alloc)); in allocOneBuffer()
479 alloc.len = size; in allocOneBuffer()
481 alloc.len = (alloc.len + 4095U) & (~4095U); in allocOneBuffer()
482 alloc.align = 4096; in allocOneBuffer()
484 alloc.flags = ION_FLAG_CACHED; in allocOneBuffer()
486 alloc.heap_id_mask = heap_id; in allocOneBuffer()
489 alloc.flags = ION_FLAG_SECURE | ION_FLAG_CP_CAMERA; in allocOneBuffer()
490 alloc.heap_id_mask = ION_HEAP(ION_SECURE_DISPLAY_HEAP_ID); in allocOneBuffer()
491 alloc.align = 2097152; // 2 MiB alignment to be able to protect later in allocOneBuffer()
492 alloc.len = (alloc.len + 2097152U) & (~2097152U); in allocOneBuffer()
495 rc = ioctl(main_ion_fd, ION_IOC_ALLOC, &alloc); in allocOneBuffer()
502 ion_info_fd.handle = alloc.handle; in allocOneBuffer()
512 memInfo.size = alloc.len; in allocOneBuffer()
517 (unsigned long)memInfo.handle, alloc.len); in allocOneBuffer()
803 rc = alloc(count, size, heap_id_mask); in allocate()
809 rc = alloc(count, size, heap_id_mask); in allocate()
861 int rc = alloc(count, size, heap_id_mask); in allocateMore()
1102 int rc = alloc(count, size, heap_id_mask); in allocate()
1137 int rc = alloc(count, size, heap_id_mask); in allocateMore()