]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00216786-2 IPU/FB: Allocate DMA buffer from DMA zone
authorWayne Zou <b36644@freescale.com>
Mon, 13 Aug 2012 07:25:12 +0000 (15:25 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:12:41 +0000 (14:12 +0200)
Allocate DMA buffer from DMA zone, and the system can configure reserve dma
size through proc fs file under /proc/sys/vm/lowmem_reserve_ratio.

Signed-off-by: Wayne Zou <b36644@freescale.com>
drivers/video/mxc/mxc_ipuv3_fb.c

index 4c3ae1e1511e593b51befd8a6703ceb357f4120c..c9cdad48b899ea7ee44cb1aada526794c1ae411d 100644 (file)
@@ -401,13 +401,13 @@ static int mxcfb_set_par(struct fb_info *fbi)
                                        dma_alloc_coherent(fbi->device,
                                                  alpha_mem_len,
                                                  &mxc_fbi->alpha_phy_addr0,
-                                                 GFP_KERNEL);
+                                                 GFP_DMA | GFP_KERNEL);
 
                        mxc_fbi->alpha_virt_addr1 =
                                        dma_alloc_coherent(fbi->device,
                                                  alpha_mem_len,
                                                  &mxc_fbi->alpha_phy_addr1,
-                                                 GFP_KERNEL);
+                                                 GFP_DMA | GFP_KERNEL);
                        if (mxc_fbi->alpha_virt_addr0 == NULL ||
                            mxc_fbi->alpha_virt_addr1 == NULL) {
                                dev_err(fbi->device, "mxcfb: dma alloc for"
@@ -1652,7 +1652,7 @@ static int mxcfb_map_video_memory(struct fb_info *fbi)
        fbi->screen_base = dma_alloc_writecombine(fbi->device,
                                fbi->fix.smem_len,
                                (dma_addr_t *)&fbi->fix.smem_start,
-                               GFP_KERNEL);
+                               GFP_DMA | GFP_KERNEL);
        if (fbi->screen_base == 0) {
                dev_err(fbi->device, "Unable to allocate framebuffer memory\n");
                fbi->fix.smem_len = 0;