diff options
author | Jason Chen <b02280@freescale.com> | 2009-09-16 13:52:42 +0800 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-02-12 17:19:17 +0100 |
commit | f2ff59feff3155c070ac4e256e3de95d730e057e (patch) | |
tree | 4c949788e6eb47bc4fc8131e72a8ebaa608cf7ba /drivers/video/mxc/mxc_ipuv3_fb.c | |
parent | 5e1987d86df14dc18fb054edf265738a6d2120cd (diff) |
ENGR00116086 fb: mmap fail for first time for fb2
If did not set_var, fb driver will not allocate buffers. If user call
fb_set_var with the same size as fb default setting(in mxcfb_probe,
usually 240x320),fb drvier will not call mxcfb_set_par if no
FB_ACTIVATE_FORCE flag set, which will make mmap fail.
Allocate fb buffers in mxcfb_probe avoid such issue, but it will consume
memory at the very beginning.
Signed-off-by: Jason Chen <b02280@freescale.com>
Diffstat (limited to 'drivers/video/mxc/mxc_ipuv3_fb.c')
-rw-r--r-- | drivers/video/mxc/mxc_ipuv3_fb.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c index 19f301d2dfb4..f3ac4d208b98 100644 --- a/drivers/video/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/mxc/mxc_ipuv3_fb.c @@ -1449,9 +1449,6 @@ static int mxcfb_probe(struct platform_device *pdev) } ipu_disable_irq(mxcfbi->ipu_ch_irq); - /* Default Y virtual size is 2x panel size */ - fbi->var.yres_virtual = fbi->var.yres * 2; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res) { fbi->fix.smem_len = res->end - res->start + 1; @@ -1478,8 +1475,16 @@ static int mxcfb_probe(struct platform_device *pdev) } mxcfb_check_var(&fbi->var, fbi); + + /* Default Y virtual size is 2x panel size */ + fbi->var.yres_virtual = fbi->var.yres * 2; + mxcfb_set_fix(fbi); + /* alocate fb first */ + if (mxcfb_map_video_memory(fbi) < 0) + return -ENOMEM; + ret = register_framebuffer(fbi); if (ret < 0) goto err2; |