aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-11-10 04:45:19 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-11-10 06:51:13 -0500
commit88abf44d3d8d4fefcbf3d57584d471e38cb51627 (patch)
treeb43468aec564c391415252636995e08ad3e45f0c
parent108409a8a4e325db38f27258da68d7207a0ad433 (diff)
OMAP: VRAM: Fix boot-time memory allocation
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.contreras@gmail.com> Reported-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--drivers/video/omap2/vram.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c
index bb5ee0663e65..2fd7e5271be9 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)
576 return; 576 return;
577 } 577 }
578 } else { 578 } else {
579 paddr = memblock_alloc_base(size, PAGE_SIZE, MEMBLOCK_REAL_LIMIT); 579 paddr = memblock_alloc(size, PAGE_SIZE);
580 } 580 }
581 581
582 memblock_free(paddr, size);
583 memblock_remove(paddr, size);
584
582 omap_vram_add_region(paddr, size); 585 omap_vram_add_region(paddr, size);
583 586
584 pr_info("Reserving %u bytes SDRAM for VRAM\n", size); 587 pr_info("Reserving %u bytes SDRAM for VRAM\n", size);