mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-09-20 21:54:23 +00:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user