aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/vram.c
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-12-01 07:13:56 -0500
committerMichal Marek <mmarek@suse.cz>2010-12-01 07:13:56 -0500
commit307991055b0ce65d53dc1eb501c456c10eb36360 (patch)
tree71bb9263dc71344e5d7b97ca6d5cf223f1f1a856 /drivers/video/omap2/vram.c
parent1198c6d45a1ef5f4f7fdfbf33ef7d270493ec575 (diff)
parent9b4320b77bab4031649c484da1c595f39c2e43cd (diff)
Merge branch 'kconfig_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-next into kbuild/rc-fixes
Diffstat (limited to 'drivers/video/omap2/vram.c')
-rw-r--r--drivers/video/omap2/vram.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c
index fed2a72bc6b6..2fd7e5271be9 100644
--- a/drivers/video/omap2/vram.c
+++ b/drivers/video/omap2/vram.c
@@ -554,9 +554,15 @@ void __init omap_vram_reserve_sdram_memblock(void)
554 size = PAGE_ALIGN(size); 554 size = PAGE_ALIGN(size);
555 555
556 if (paddr) { 556 if (paddr) {
557 if ((paddr & ~PAGE_MASK) || 557 if (paddr & ~PAGE_MASK) {
558 !memblock_is_region_memory(paddr, size)) { 558 pr_err("VRAM start address 0x%08x not page aligned\n",
559 pr_err("Illegal SDRAM region for VRAM\n"); 559 paddr);
560 return;
561 }
562
563 if (!memblock_is_region_memory(paddr, size)) {
564 pr_err("Illegal SDRAM region 0x%08x..0x%08x for VRAM\n",
565 paddr, paddr + size - 1);
560 return; 566 return;
561 } 567 }
562 568
@@ -570,9 +576,12 @@ void __init omap_vram_reserve_sdram_memblock(void)
570 return; 576 return;
571 } 577 }
572 } else { 578 } else {
573 paddr = memblock_alloc_base(size, PAGE_SIZE, MEMBLOCK_REAL_LIMIT); 579 paddr = memblock_alloc(size, PAGE_SIZE);
574 } 580 }
575 581
582 memblock_free(paddr, size);
583 memblock_remove(paddr, size);
584
576 omap_vram_add_region(paddr, size); 585 omap_vram_add_region(paddr, size);
577 586
578 pr_info("Reserving %u bytes SDRAM for VRAM\n", size); 587 pr_info("Reserving %u bytes SDRAM for VRAM\n", size);