/device/lge/bullhead/camera/QCamera2/stack/mm-jpeg-interface/src/ |
D | mm_jpeg_ionbuf.c | 47 void *buffer_allocate(buffer_t *p_buffer, int cached) in buffer_allocate() argument 54 p_buffer->alloc.len = p_buffer->size; in buffer_allocate() 55 p_buffer->alloc.align = 4096; in buffer_allocate() 56 p_buffer->alloc.flags = (cached) ? ION_FLAG_CACHED : 0; in buffer_allocate() 57 p_buffer->alloc.heap_id_mask = 0x1 << ION_IOMMU_HEAP_ID; in buffer_allocate() 59 p_buffer->ion_fd = open("/dev/ion", O_RDONLY); in buffer_allocate() 60 if(p_buffer->ion_fd < 0) { in buffer_allocate() 66 p_buffer->alloc.len = (p_buffer->alloc.len + 4095U) & (~4095U); in buffer_allocate() 67 lrc = ioctl(p_buffer->ion_fd, ION_IOC_ALLOC, &p_buffer->alloc); in buffer_allocate() 70 p_buffer->alloc.len); in buffer_allocate() [all …]
|
/device/huawei/angler/camera/QCamera2/stack/mm-jpeg-interface/src/ |
D | mm_jpeg_ionbuf.c | 47 void *buffer_allocate(buffer_t *p_buffer, int cached) in buffer_allocate() argument 54 p_buffer->alloc.len = p_buffer->size; in buffer_allocate() 55 p_buffer->alloc.align = 4096; in buffer_allocate() 56 p_buffer->alloc.flags = (cached) ? ION_FLAG_CACHED : 0; in buffer_allocate() 57 p_buffer->alloc.heap_id_mask = 0x1 << ION_IOMMU_HEAP_ID; in buffer_allocate() 59 p_buffer->ion_fd = open("/dev/ion", O_RDONLY); in buffer_allocate() 60 if(p_buffer->ion_fd < 0) { in buffer_allocate() 66 p_buffer->alloc.len = (p_buffer->alloc.len + 4095U) & (~4095U); in buffer_allocate() 67 lrc = ioctl(p_buffer->ion_fd, ION_IOC_ALLOC, &p_buffer->alloc); in buffer_allocate() 70 p_buffer->alloc.len); in buffer_allocate() [all …]
|
/device/moto/shamu/camera/QCamera2/stack/mm-jpeg-interface/src/ |
D | mm_jpeg_ionbuf.c | 45 void *buffer_allocate(buffer_t *p_buffer, int cached) in buffer_allocate() argument 52 p_buffer->alloc.len = p_buffer->size; in buffer_allocate() 53 p_buffer->alloc.align = 4096; in buffer_allocate() 54 p_buffer->alloc.flags = (cached) ? ION_FLAG_CACHED : 0; in buffer_allocate() 55 p_buffer->alloc.heap_mask = 0x1 << ION_IOMMU_HEAP_ID; in buffer_allocate() 57 p_buffer->ion_fd = open("/dev/ion", O_RDONLY); in buffer_allocate() 58 if(p_buffer->ion_fd < 0) { in buffer_allocate() 64 p_buffer->alloc.len = (p_buffer->alloc.len + 4095) & (~4095); in buffer_allocate() 65 lrc = ioctl(p_buffer->ion_fd, ION_IOC_ALLOC, &p_buffer->alloc); in buffer_allocate() 68 p_buffer->alloc.len); in buffer_allocate() [all …]
|
/device/moto/shamu/camera/QCamera2/stack/mm-jpeg-interface/inc/ |
D | mm_jpeg_ionbuf.h | 64 void* buffer_allocate(buffer_t *p_buffer, int cached); 78 int buffer_deallocate(buffer_t *p_buffer); 92 int buffer_invalidate(buffer_t *p_buffer);
|
/device/lge/bullhead/camera/QCamera2/stack/mm-jpeg-interface/inc/ |
D | mm_jpeg_ionbuf.h | 63 void* buffer_allocate(buffer_t *p_buffer, int cached); 77 int buffer_deallocate(buffer_t *p_buffer); 91 int buffer_invalidate(buffer_t *p_buffer);
|
/device/huawei/angler/camera/QCamera2/stack/mm-jpeg-interface/inc/ |
D | mm_jpeg_ionbuf.h | 63 void* buffer_allocate(buffer_t *p_buffer, int cached); 77 int buffer_deallocate(buffer_t *p_buffer); 91 int buffer_invalidate(buffer_t *p_buffer);
|
/device/huawei/angler/camera/QCamera2/stack/mm-jpeg-interface/test/ |
D | mm_jpegdec_test.c | 135 int mm_jpegdec_test_alloc(buffer_t *p_buffer, int use_pmem) in mm_jpegdec_test_alloc() argument 140 p_buffer->addr = (uint8_t *)buffer_allocate(p_buffer, 0); in mm_jpegdec_test_alloc() 141 if (NULL == p_buffer->addr) { in mm_jpegdec_test_alloc() 147 p_buffer->addr = (uint8_t *)malloc(p_buffer->size); in mm_jpegdec_test_alloc() 148 if (NULL == p_buffer->addr) { in mm_jpegdec_test_alloc() 156 void mm_jpegdec_test_free(buffer_t *p_buffer) in mm_jpegdec_test_free() argument 158 if (p_buffer->addr == NULL) in mm_jpegdec_test_free() 161 if (p_buffer->p_pmem_fd >= 0) in mm_jpegdec_test_free() 162 buffer_deallocate(p_buffer); in mm_jpegdec_test_free() 164 free(p_buffer->addr); in mm_jpegdec_test_free() [all …]
|
D | mm_jpeg_test.c | 186 int mm_jpeg_test_alloc(buffer_t *p_buffer, int use_pmem) in mm_jpeg_test_alloc() argument 191 p_buffer->addr = (uint8_t *)buffer_allocate(p_buffer, 0); in mm_jpeg_test_alloc() 192 if (NULL == p_buffer->addr) { in mm_jpeg_test_alloc() 198 p_buffer->addr = (uint8_t *)malloc(p_buffer->size); in mm_jpeg_test_alloc() 199 if (NULL == p_buffer->addr) { in mm_jpeg_test_alloc() 207 void mm_jpeg_test_free(buffer_t *p_buffer) in mm_jpeg_test_free() argument 209 if (p_buffer->addr == NULL) in mm_jpeg_test_free() 212 if (p_buffer->p_pmem_fd >= 0) in mm_jpeg_test_free() 213 buffer_deallocate(p_buffer); in mm_jpeg_test_free() 215 free(p_buffer->addr); in mm_jpeg_test_free() [all …]
|
/device/moto/shamu/camera/QCamera2/stack/mm-jpeg-interface/test/ |
D | mm_jpegdec_test.c | 134 int mm_jpegdec_test_alloc(buffer_t *p_buffer, int use_pmem) in mm_jpegdec_test_alloc() argument 139 p_buffer->addr = (uint8_t *)buffer_allocate(p_buffer, 0); in mm_jpegdec_test_alloc() 140 if (NULL == p_buffer->addr) { in mm_jpegdec_test_alloc() 146 p_buffer->addr = (uint8_t *)malloc(p_buffer->size); in mm_jpegdec_test_alloc() 147 if (NULL == p_buffer->addr) { in mm_jpegdec_test_alloc() 155 void mm_jpegdec_test_free(buffer_t *p_buffer) in mm_jpegdec_test_free() argument 157 if (p_buffer->addr == NULL) in mm_jpegdec_test_free() 160 if (p_buffer->p_pmem_fd > 0) in mm_jpegdec_test_free() 161 buffer_deallocate(p_buffer); in mm_jpegdec_test_free() 163 free(p_buffer->addr); in mm_jpegdec_test_free() [all …]
|
D | mm_jpeg_test.c | 186 int mm_jpeg_test_alloc(buffer_t *p_buffer, int use_pmem) in mm_jpeg_test_alloc() argument 191 p_buffer->addr = (uint8_t *)buffer_allocate(p_buffer, 0); in mm_jpeg_test_alloc() 192 if (NULL == p_buffer->addr) { in mm_jpeg_test_alloc() 198 p_buffer->addr = (uint8_t *)malloc(p_buffer->size); in mm_jpeg_test_alloc() 199 if (NULL == p_buffer->addr) { in mm_jpeg_test_alloc() 207 void mm_jpeg_test_free(buffer_t *p_buffer) in mm_jpeg_test_free() argument 209 if (p_buffer->addr == NULL) in mm_jpeg_test_free() 212 if (p_buffer->p_pmem_fd > 0) in mm_jpeg_test_free() 213 buffer_deallocate(p_buffer); in mm_jpeg_test_free() 215 free(p_buffer->addr); in mm_jpeg_test_free() [all …]
|
/device/lge/bullhead/camera/QCamera2/stack/mm-jpeg-interface/test/ |
D | mm_jpegdec_test.c | 135 int mm_jpegdec_test_alloc(buffer_t *p_buffer, int use_pmem) in mm_jpegdec_test_alloc() argument 140 p_buffer->addr = (uint8_t *)buffer_allocate(p_buffer, 0); in mm_jpegdec_test_alloc() 141 if (NULL == p_buffer->addr) { in mm_jpegdec_test_alloc() 147 p_buffer->addr = (uint8_t *)malloc(p_buffer->size); in mm_jpegdec_test_alloc() 148 if (NULL == p_buffer->addr) { in mm_jpegdec_test_alloc() 156 void mm_jpegdec_test_free(buffer_t *p_buffer) in mm_jpegdec_test_free() argument 158 if (p_buffer->addr == NULL) in mm_jpegdec_test_free() 161 if (p_buffer->p_pmem_fd >= 0) in mm_jpegdec_test_free() 162 buffer_deallocate(p_buffer); in mm_jpegdec_test_free() 164 free(p_buffer->addr); in mm_jpegdec_test_free() [all …]
|
D | mm_jpeg_test.c | 186 int mm_jpeg_test_alloc(buffer_t *p_buffer, int use_pmem) in mm_jpeg_test_alloc() argument 191 p_buffer->addr = (uint8_t *)buffer_allocate(p_buffer, 0); in mm_jpeg_test_alloc() 192 if (NULL == p_buffer->addr) { in mm_jpeg_test_alloc() 198 p_buffer->addr = (uint8_t *)malloc(p_buffer->size); in mm_jpeg_test_alloc() 199 if (NULL == p_buffer->addr) { in mm_jpeg_test_alloc() 207 void mm_jpeg_test_free(buffer_t *p_buffer) in mm_jpeg_test_free() argument 209 if (p_buffer->addr == NULL) in mm_jpeg_test_free() 212 if (p_buffer->p_pmem_fd >= 0) in mm_jpeg_test_free() 213 buffer_deallocate(p_buffer); in mm_jpeg_test_free() 215 free(p_buffer->addr); in mm_jpeg_test_free() [all …]
|