summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSandor Yu <R01008@freescale.com>2015-07-14 17:26:21 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 09:23:59 -0500
commite792f0e7c3204a19da9a1f8effa9d4166c6b4ab6 (patch)
tree25c52157f506b9c05af692faf5300e58f9b2c227 /drivers
parentda1079875dc5ac03c0c44ac254a66b77468587d4 (diff)
MLK-11185 video: mxc ipuv3 fb: Support setting bpp to fbi->var from dtb
The value bpp of fbi->var can be initialized according to kernel parameter video option. But, for some cases, there is no video option. In these cases, the bpp value should be configured according to the 'bpp' property in dtb if provided, otherwise the frame buffer will always work in bpp 16 mode Signed-off-by: Sandor Yu <R01008@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index 1cd1c749b3f0..a72450c16c4c 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -2765,6 +2765,7 @@ static struct fb_info *mxcfb_init_fbinfo(struct device *dev, struct fb_ops *ops)
{
struct fb_info *fbi;
struct mxcfb_info *mxcfbi;
+ struct ipuv3_fb_platform_data *plat_data = dev->platform_data;
/*
* Allocate sufficient memory for the fb structure
@@ -2777,6 +2778,8 @@ static struct fb_info *mxcfb_init_fbinfo(struct device *dev, struct fb_ops *ops)
fbi->var.activate = FB_ACTIVATE_NOW;
+ bpp_to_var(plat_data->default_bpp, &fbi->var);
+
fbi->fbops = ops;
fbi->flags = FBINFO_FLAG_DEFAULT;
fbi->pseudo_palette = mxcfbi->pseudo_palette;