flo: rename ion_allocation_data.heap_mask to heap_id_mask

Rename the heap_mask field in ion_allocation_data struct to heap_id_mask and
match the new kernel header.

Change-Id: I54cc2854b6977d4334752bdf4ba9749411af069e
This commit is contained in:
Rom Lemarchand 2013-10-23 09:20:01 -07:00
parent 239d4e258c
commit 52811a9968
4 changed files with 10 additions and 10 deletions

View File

@ -314,7 +314,7 @@ int QCameraMemory::allocOneBuffer(QCameraMemInfo &memInfo, int heap_id, int size
if (m_bCached) {
alloc.flags = ION_FLAG_CACHED;
}
alloc.heap_mask = heap_id;
alloc.heap_id_mask = heap_id;
rc = ioctl(main_ion_fd, ION_IOC_ALLOC, &alloc);
if (rc < 0) {
ALOGE("ION allocation failed: %s\n", strerror(errno));
@ -439,8 +439,8 @@ void *QCameraHeapMemory::getPtr(int index) const
*==========================================================================*/
int QCameraHeapMemory::allocate(int count, int size)
{
int heap_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_mask);
int heap_id_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_id_mask);
if (rc < 0)
return rc;
@ -615,8 +615,8 @@ QCameraStreamMemory::~QCameraStreamMemory()
*==========================================================================*/
int QCameraStreamMemory::allocate(int count, int size)
{
int heap_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_mask);
int heap_id_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_id_mask);
if (rc < 0)
return rc;

View File

@ -332,7 +332,7 @@ int QCamera3HeapMemory::allocOneBuffer(QCamera3MemInfo &memInfo, int heap_id, in
alloc.len = (alloc.len + 4095) & (~4095);
alloc.align = 4096;
alloc.flags = ION_FLAG_CACHED;
alloc.heap_mask = heap_id;
alloc.heap_id_mask = heap_id;
rc = ioctl(main_ion_fd, ION_IOC_ALLOC, &alloc);
if (rc < 0) {
ALOGE("ION allocation for len %d failed: %s\n", alloc.len,
@ -429,8 +429,8 @@ void *QCamera3HeapMemory::getPtr(int index) const
*==========================================================================*/
int QCamera3HeapMemory::allocate(int count, int size, bool queueAll)
{
int heap_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_mask);
int heap_id_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_id_mask);
if (rc < 0)
return rc;

View File

@ -129,7 +129,7 @@ int mm_app_allocate_ion_memory(mm_camera_app_buf_t *buf, int ion_type)
alloc.len = (alloc.len + 4095) & (~4095);
alloc.align = 4096;
alloc.flags = ION_FLAG_CACHED;
alloc.heap_mask = ion_type;
alloc.heap_id_mask = ion_type;
rc = ioctl(main_ion_fd, ION_IOC_ALLOC, &alloc);
if (rc < 0) {
CDBG_ERROR("ION allocation failed\n");

View File

@ -53,7 +53,7 @@ void *buffer_allocate(buffer_test_t *p_buffer)
p_buffer->alloc.len = p_buffer->size;
p_buffer->alloc.align = 4096;
p_buffer->alloc.flags = ION_FLAG_CACHED;
p_buffer->alloc.heap_mask = 0x1 << ION_IOMMU_HEAP_ID;
p_buffer->alloc.heap_id_mask = 0x1 << ION_IOMMU_HEAP_ID;
p_buffer->ion_fd = open("/dev/ion", O_RDONLY);
if(p_buffer->ion_fd < 0) {