libgralloc: Discontinue allocating FB buffers from carveout.

Don't allocate primary framebuffer from carveout.
Allocate them from IOMMU heap just like the external framebuffer.

Bug: 7626586
Change-Id: I52a8db1a34d19856302b38d2c30c1290d1f2f060
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/libgralloc/gpu.cpp b/libgralloc/gpu.cpp
index ed4394a..c238264 100644
--- a/libgralloc/gpu.cpp
+++ b/libgralloc/gpu.cpp
@@ -229,16 +229,9 @@
         (usage & GRALLOC_USAGE_PRIVATE_CP_BUFFER)) {
         bufferType = BUFFER_TYPE_VIDEO;
     }
-    int err;
-    private_module_t* m = reinterpret_cast<private_module_t*>(common.module);
-    uint32_t bufferMask = m->bufferMask;
-    uint32_t numBuffers = m->numBuffers;
-    if (usage & GRALLOC_USAGE_HW_FB && (bufferMask < ((1LU << numBuffers) - 1))) {
-        err = gralloc_alloc_framebuffer(size, usage, pHandle);
-    } else {
-        err = gralloc_alloc_buffer(size, usage, pHandle, bufferType,
-                                   grallocFormat, alignedw, alignedh);
-    }
+
+    int err = gralloc_alloc_buffer(size, usage, pHandle, bufferType,
+            grallocFormat, alignedw, alignedh);
 
     if (err < 0) {
         return err;