Skip to content

Commit

Permalink
OMAP: VRAM: Fix boot-time memory allocation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomi Valkeinen authored and Paul Mundt committed Nov 10, 2010
1 parent 108409a commit 88abf44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/video/omap2/vram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 88abf44

Please sign in to comment.