diff options
author | Wayne Zou <b36644@freescale.com> | 2012-04-26 12:53:52 +0800 |
---|---|---|
committer | Frank Li <Frank.Li@freescale.com> | 2012-04-27 09:08:42 +0800 |
commit | 52166db8caefce7d0dc124c42cd0f04a6e30207f (patch) | |
tree | a417a8d4f16e13f6b1b2f272be6a73922f35bbb2 /drivers | |
parent | d8aa89ab7b867fc464af2e8ddb6aa48c0ed9ab68 (diff) |
ENGR00175084 IPU-FB: change dma memory alloc gfp flags to GFP_KERNEL
We only needs the dma buffer, don't care if it is from DMA Zone on i.mx SOC.
To fix the following bug:
mxc_ipudev_test: page allocation failure: order:13, mode:0x1
[<80042e08>] (unwind_backtrace+0x0/0xfc) from [<800b4dd8>]
(warn_alloc_failed+0x9c/0x118)
[<800b4dd8>] (warn_alloc_failed+0x9c/0x118) from [<800b5ac4>]
(__alloc_pages_nodemask+0x494/0x6ec)
[<800b5ac4>] (__alloc_pages_nodemask+0x494/0x6ec) from [<80046154>]
(__dma_alloc+0xd4/0x2fc)
[<80046154>] (__dma_alloc+0xd4/0x2fc) from [<800463a0>]
(dma_alloc_writecombine+0x24/0x2c)
[<800463a0>] (dma_alloc_writecombine+0x24/0x2c) from [<8024be34>]
(mxcfb_set_par+0x3e4/0x4c0)
[<8024be34>] (mxcfb_set_par+0x3e4/0x4c0) from [<80235f08>]
(fb_set_var+0x168/0x2a4)
[<80235f08>] (fb_set_var+0x168/0x2a4) from [<802363f8>](do_fb_ioctl+0x3b4/0x5f0)
[<802363f8>] (do_fb_ioctl+0x3b4/0x5f0) from[<800f58d0>](do_vfs_ioctl+0x80/0x5e4)
[<800f58d0>] (do_vfs_ioctl+0x80/0x5e4) from [<800f5e6c>] (sys_ioctl+0x38/0x60)
[<800f5e6c>] (sys_ioctl+0x38/0x60) from [<8003d500>] (ret_fast_syscall+0x0/0x30)
mxc_sdc_fb mxc_sdc_fb.0: Unable to allocate framebuffer memory
detected fb_set_par error, error code: -12
Signed-off-by: Wayne Zou <b36644@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mxc/ipu3/ipu_device.c | 4 | ||||
-rw-r--r-- | drivers/video/mxc/mxc_ipuv3_fb.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mxc/ipu3/ipu_device.c b/drivers/mxc/ipu3/ipu_device.c index 46a9645fcf25..6810cea8f503 100644 --- a/drivers/mxc/ipu3/ipu_device.c +++ b/drivers/mxc/ipu3/ipu_device.c @@ -2577,7 +2577,7 @@ static void do_task(struct ipu_task_entry *t) ipu->rot_dma[rot_idx].vaddr = dma_alloc_coherent(t->dev, r_size, &ipu->rot_dma[rot_idx].paddr, - GFP_DMA | GFP_KERNEL); + GFP_KERNEL); CHECK_RETCODE(ipu->rot_dma[rot_idx].vaddr == NULL, "ic_and_rot", STATE_SYS_NO_MEM, chan_setup, -ENOMEM); @@ -3276,7 +3276,7 @@ static long mxc_ipu_ioctl(struct file *file, mem->cpu_addr = dma_alloc_coherent(ipu_dev, size, &mem->phy_addr, - GFP_DMA); + GFP_KERNEL); if (mem->cpu_addr == NULL) { kfree(mem); return -ENOMEM; diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c index 8eade2c99d1a..4ee96de5b479 100644 --- a/drivers/video/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/mxc/mxc_ipuv3_fb.c @@ -360,13 +360,13 @@ static int mxcfb_set_par(struct fb_info *fbi) dma_alloc_coherent(fbi->device, alpha_mem_len, &mxc_fbi->alpha_phy_addr0, - GFP_DMA | GFP_KERNEL); + GFP_KERNEL); mxc_fbi->alpha_virt_addr1 = dma_alloc_coherent(fbi->device, alpha_mem_len, &mxc_fbi->alpha_phy_addr1, - GFP_DMA | GFP_KERNEL); + GFP_KERNEL); if (mxc_fbi->alpha_virt_addr0 == NULL || mxc_fbi->alpha_virt_addr1 == NULL) { dev_err(fbi->device, "mxcfb: dma alloc for" @@ -1036,7 +1036,7 @@ static int mxcfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) mem->cpu_addr = dma_alloc_coherent(fbi->device, size, &mem->phy_addr, - GFP_DMA); + GFP_KERNEL); if (mem->cpu_addr == NULL) { kfree(mem); return -ENOMEM; @@ -1576,7 +1576,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_DMA); + GFP_KERNEL); if (fbi->screen_base == 0) { dev_err(fbi->device, "Unable to allocate framebuffer memory\n"); fbi->fix.smem_len = 0; |