Home
last modified time | relevance | path

Searched refs:p_buffer (Results 1 – 10 of 10) sorted by relevance

/device/moto/shamu/camera/QCamera2/stack/mm-jpeg-interface/src/
Dmm_jpeg_ionbuf.c45 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/asus/flo/camera/QCamera2/stack/mm-jpeg-interface/test/
Dmm_jpeg_ionbuf.c46 void *buffer_allocate(buffer_test_t *p_buffer) in buffer_allocate() argument
53 p_buffer->alloc.len = p_buffer->size; in buffer_allocate()
54 p_buffer->alloc.align = 4096; in buffer_allocate()
55 p_buffer->alloc.flags = ION_FLAG_CACHED; in buffer_allocate()
56 p_buffer->alloc.heap_id_mask = 0x1 << ION_IOMMU_HEAP_ID; in buffer_allocate()
58 p_buffer->ion_fd = open("/dev/ion", O_RDONLY); in buffer_allocate()
59 if(p_buffer->ion_fd < 0) { in buffer_allocate()
65 p_buffer->alloc.len = (p_buffer->alloc.len + 4095) & (~4095); in buffer_allocate()
66 lrc = ioctl(p_buffer->ion_fd, ION_IOC_ALLOC, &p_buffer->alloc); in buffer_allocate()
69 p_buffer->alloc.len); in buffer_allocate()
[all …]
Dmm_jpeg_test.c107 int mm_jpeg_test_alloc(buffer_test_t *p_buffer, int use_pmem) in mm_jpeg_test_alloc() argument
112 p_buffer->addr = (uint8_t *)buffer_allocate(p_buffer); in mm_jpeg_test_alloc()
113 if (NULL == p_buffer->addr) { in mm_jpeg_test_alloc()
119 p_buffer->addr = (uint8_t *)malloc(p_buffer->size); in mm_jpeg_test_alloc()
120 if (NULL == p_buffer->addr) { in mm_jpeg_test_alloc()
128 void mm_jpeg_test_free(buffer_test_t *p_buffer) in mm_jpeg_test_free() argument
130 if (p_buffer->addr == NULL) in mm_jpeg_test_free()
133 if (p_buffer->p_pmem_fd > 0) in mm_jpeg_test_free()
134 buffer_deallocate(p_buffer); in mm_jpeg_test_free()
136 free(p_buffer->addr); in mm_jpeg_test_free()
[all …]
Dmm_jpeg_ionbuf.h64 void* buffer_allocate(buffer_test_t *p_buffer);
78 int buffer_deallocate(buffer_test_t *p_buffer);
/device/lge/hammerhead/camera/QCamera2/stack/mm-jpeg-interface/test/
Dmm_jpeg_ionbuf.c46 void *buffer_allocate(buffer_test_t *p_buffer) in buffer_allocate() argument
53 p_buffer->alloc.len = p_buffer->size; in buffer_allocate()
54 p_buffer->alloc.align = 4096; in buffer_allocate()
55 p_buffer->alloc.flags = ION_FLAG_CACHED; in buffer_allocate()
56 p_buffer->alloc.heap_id_mask = 0x1 << ION_IOMMU_HEAP_ID; in buffer_allocate()
58 p_buffer->ion_fd = open("/dev/ion", O_RDONLY); in buffer_allocate()
59 if(p_buffer->ion_fd < 0) { in buffer_allocate()
65 p_buffer->alloc.len = (p_buffer->alloc.len + 4095) & (~4095); in buffer_allocate()
66 lrc = ioctl(p_buffer->ion_fd, ION_IOC_ALLOC, &p_buffer->alloc); in buffer_allocate()
69 p_buffer->alloc.len); in buffer_allocate()
[all …]
Dmm_jpeg_test.c106 int mm_jpeg_test_alloc(buffer_test_t *p_buffer, int use_pmem) in mm_jpeg_test_alloc() argument
111 p_buffer->addr = (uint8_t *)buffer_allocate(p_buffer); in mm_jpeg_test_alloc()
112 if (NULL == p_buffer->addr) { in mm_jpeg_test_alloc()
118 p_buffer->addr = (uint8_t *)malloc(p_buffer->size); in mm_jpeg_test_alloc()
119 if (NULL == p_buffer->addr) { in mm_jpeg_test_alloc()
127 void mm_jpeg_test_free(buffer_test_t *p_buffer) in mm_jpeg_test_free() argument
129 if (p_buffer->addr == NULL) in mm_jpeg_test_free()
132 if (p_buffer->p_pmem_fd > 0) in mm_jpeg_test_free()
133 buffer_deallocate(p_buffer); in mm_jpeg_test_free()
135 free(p_buffer->addr); in mm_jpeg_test_free()
[all …]
Dmm_jpeg_ionbuf.h64 void* buffer_allocate(buffer_test_t *p_buffer);
78 int buffer_deallocate(buffer_test_t *p_buffer);
/device/moto/shamu/camera/QCamera2/stack/mm-jpeg-interface/inc/
Dmm_jpeg_ionbuf.h64 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/moto/shamu/camera/QCamera2/stack/mm-jpeg-interface/test/
Dmm_jpegdec_test.c134 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 …]
Dmm_jpeg_test.c186 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 …]