Use memblock_free() and memblock_remove() to remove the allocated or
reserved VRAM area from normal kernel memory.

This is a slightly modified version of patches from Felipe Contreras and
Namhyung Kim.

Reported-by: Felipe Contreras <felipe.contre...@gmail.com>
Reported-by: Namhyung Kim <namhy...@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkei...@nokia.com>
---
 drivers/video/omap2/vram.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c
index bb5ee06..2fd7e52 100644
--- a/drivers/video/omap2/vram.c
+++ b/drivers/video/omap2/vram.c
@@ -576,9 +576,12 @@ void __init omap_vram_reserve_sdram_memblock(void)
                        return;
                }
        } else {
-               paddr = memblock_alloc_base(size, PAGE_SIZE, 
MEMBLOCK_REAL_LIMIT);
+               paddr = memblock_alloc(size, PAGE_SIZE);
        }
 
+       memblock_free(paddr, size);
+       memblock_remove(paddr, size);
+
        omap_vram_add_region(paddr, size);
 
        pr_info("Reserving %u bytes SDRAM for VRAM\n", size);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to