Revert "flo: rename ion_allocation_data.heap_mask to heap_id_mask"

Our kernel doesn't declare it this way anymore.

This reverts commit 52811a9968.

Change-Id: Ibef35c44bc21a1e8fe15388799a9f8c5e90dcb01
This commit is contained in:
Artem Borisov 2018-02-13 11:49:48 +03:00 committed by Nolen Johnson
parent 334bd16d35
commit 4e5720df30
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_id_mask = heap_id;
alloc.heap_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_id_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_id_mask);
int heap_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_mask);
if (rc < 0)
return rc;
@ -617,8 +617,8 @@ QCameraStreamMemory::~QCameraStreamMemory()
*==========================================================================*/
int QCameraStreamMemory::allocate(int count, int size)
{
int heap_id_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_id_mask);
int heap_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_mask);
if (rc < 0)
return rc;

View File

@ -337,7 +337,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_id_mask = heap_id;
alloc.heap_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,
@ -434,8 +434,8 @@ void *QCamera3HeapMemory::getPtr(int index) const
*==========================================================================*/
int QCamera3HeapMemory::allocate(int count, int size, bool queueAll)
{
int heap_id_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_id_mask);
int heap_mask = 0x1 << ION_IOMMU_HEAP_ID;
int rc = alloc(count, size, heap_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_id_mask = ion_type;
alloc.heap_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_id_mask = 0x1 << ION_IOMMU_HEAP_ID;
p_buffer->alloc.heap_mask = 0x1 << ION_IOMMU_HEAP_ID;
p_buffer->ion_fd = open("/dev/ion", O_RDONLY);
if(p_buffer->ion_fd < 0) {