diff options
| author | David S. Miller <davem@davemloft.net> | 2010-12-26 22:37:05 -0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-12-26 22:37:05 -0800 |
| commit | 17f7f4d9fcce8f1b75b5f735569309dee7665968 (patch) | |
| tree | 14d7e49ca0053a0fcab3c33b5023bf3f90c5c08a /drivers/video/omap2/vram.c | |
| parent | 041110a439e21cd40709ead4ffbfa8034619ad77 (diff) | |
| parent | d7c1255a3a21e98bdc64df8ccf005a174d7e6289 (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/ipv4/fib_frontend.c
Diffstat (limited to 'drivers/video/omap2/vram.c')
| -rw-r--r-- | drivers/video/omap2/vram.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c index fed2a72bc6b6..9441e2eb3dee 100644 --- a/drivers/video/omap2/vram.c +++ b/drivers/video/omap2/vram.c @@ -551,12 +551,18 @@ void __init omap_vram_reserve_sdram_memblock(void) if (!size) return; - size = PAGE_ALIGN(size); + size = ALIGN(size, SZ_2M); if (paddr) { - if ((paddr & ~PAGE_MASK) || - !memblock_is_region_memory(paddr, size)) { - pr_err("Illegal SDRAM region for VRAM\n"); + if (paddr & ~PAGE_MASK) { + pr_err("VRAM start address 0x%08x not page aligned\n", + paddr); + return; + } + + if (!memblock_is_region_memory(paddr, size)) { + pr_err("Illegal SDRAM region 0x%08x..0x%08x for VRAM\n", + paddr, paddr + size - 1); return; } @@ -570,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, SZ_2M); } + memblock_free(paddr, size); + memblock_remove(paddr, size); + omap_vram_add_region(paddr, size); pr_info("Reserving %u bytes SDRAM for VRAM\n", size); |
