summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ying <b17645@freescale.com>2009-09-22 17:41:27 +0800
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-02-12 17:19:17 +0100
commitbc9152fb673370e2feacf1f3d14b13588564ed58 (patch)
tree8302567965dafd295b8fae3a0454f024e7923448
parentc734437f7b3d6fe8d2200c19fa156da83d965b13 (diff)
ENGR00116699 IPUv3 FB:Memory allocation enhancement when initializing
When framebuffer is being initialized in probe, don't allocate memory for FB if it has memory resource already. Signed-off-by: Liu Ying <b17645@freescale.com>
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index f3ac4d208b98..279764d9a3a4 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -1482,8 +1482,9 @@ static int mxcfb_probe(struct platform_device *pdev)
mxcfb_set_fix(fbi);
/* alocate fb first */
- if (mxcfb_map_video_memory(fbi) < 0)
- return -ENOMEM;
+ if (!res)
+ if (mxcfb_map_video_memory(fbi) < 0)
+ return -ENOMEM;
ret = register_framebuffer(fbi);
if (ret < 0)