ion: remove use of qcom,msm-ion-reserve

The device tree string "qcom,msm-ion-reserve" is no
longer needed since we don't support carveout heaps any more.

Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ion: chunk_heap: fix leak in allocated counter

buffer->size is controlled by the outer ion layer, don't modify it
inside the heap.  Instead, compute the rounded up allocated size
on demand.

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: mdss: Lower allowed minimum backlight level

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cma: Delay non-placed memblocks until after all allocations

CMA is now responsible for almost all memory reservation/removal.
Some regions are at fixed locations, some are placed dynamically.
We need to place all fixed regions first before trying to place
dynamic regions to avoid overlap. Additionally, allow an
architectural callback after all removals/fixed location has
happened to potentially update any relevant limits.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cma: Call dma_contiguous_early_fixup after allocation

Commit cma: Delay non-placed memblocks until after all allocations
delayed calling memblock_alloc until later but didn't move the
fixup. Make sure to call the fixup after allocation of the
memblock.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cma: Return 0 on error path

If a free CMA region cannot be found because every one is busy,
an error needs to be propegated up by returning a zero pfn.
Ensure the pfn is actually zero when returning an error.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mm: Increase number of GFP masks

The __GFP_CMA mask is now placed after all available GFP masks.
With this we need to increase the total number of GFP flags.
Do so accordingly.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: Remove memory hole scanning

The memory hole is now accounted for by using CMA/reserved regions.
Remove the custom memory hole scanning and cruft.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
hammerhead: Remove memory hole scanning

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>