gralloc: Add missing GRALLOC_USAGE_HW_FIMC1 logic
authorAndrew Dodd <atd7@cornell.edu>
Tue, 18 Dec 2012 22:11:01 +0000 (17:11 -0500)
committerAndrew Dodd <atd7@cornell.edu>
Tue, 18 Dec 2012 22:13:24 +0000 (17:13 -0500)
This caused the ION pointer to get clobbered with a UMP
pointer when FIMC1 memory was requested.

After a while, camera would be unable to allocate buffers
due to ION memory not being freed properly.

Change-Id: I1ba1d27da924a0bb81631548e83c7f3e5789f319

exynos4/hal/libgralloc_ump/alloc_device.cpp

index f2befddc2acc4272ef9e4273e09d7ac5853b92fc..1e8ad5dd6922f27ef1920180dd5ffddcd2d8582f 100644 (file)
@@ -224,7 +224,7 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage,
             ump_mem_handle = ump_ref_drv_allocate(size, UMP_REF_DRV_CONSTRAINT_NONE);
 #endif
         if (UMP_INVALID_MEMORY_HANDLE != ump_mem_handle) {
-            if (!(usage & GRALLOC_USAGE_HW_ION))
+            if (!(usage & GRALLOC_USAGE_HW_ION || usage & GRALLOC_USAGE_HW_FIMC1))
                 cpu_ptr = ump_mapped_pointer_get(ump_mem_handle);
             if (NULL != cpu_ptr) {
                 ump_id = ump_secure_id_get(ump_mem_handle);