DSS2: do bootmem reserve for exclusive access
authorImre Deak <imre.deak@nokia.com>
Tue, 14 Apr 2009 12:50:11 +0000 (14:50 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 1 May 2009 16:45:05 +0000 (19:45 +0300)
BOOTMEM_DEFAULT would allow multiple reservations for the same location,
we need to reserve the region for our exclusive use. Also check if the
reserve succeeded.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
arch/arm/plat-omap/vram.c

index f24a110..520f260 100644 (file)
@@ -524,7 +524,10 @@ void __init omapfb_reserve_sdram(void)
                        return;
                }
 
-               reserve_bootmem(paddr, size, BOOTMEM_DEFAULT);
+               if (reserve_bootmem(paddr, size, BOOTMEM_EXCLUSIVE) < 0) {
+                       pr_err("FB: failed to reserve VRAM\n");
+                       return;
+               }
        } else {
                if (size > sdram_size) {
                        printk(KERN_ERR "Illegal SDRAM size for VRAM\n");