mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
vfb: Support vfb configuration from kernel cmdline
Add support to configure mode_option, framebuffer size and bpp from kernel command line. Signed-off-by: Shashank Mittal <mittals@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org>
This commit is contained in:
parent
cc61930243
commit
77ac7552be
1 changed files with 17 additions and 2 deletions
|
@ -35,6 +35,13 @@
|
|||
static void *videomemory;
|
||||
static u_long videomemorysize = VIDEOMEMSIZE;
|
||||
module_param(videomemorysize, ulong, 0);
|
||||
static char *mode_option __devinitdata;
|
||||
static int bpp __devinitdata = 8;
|
||||
|
||||
module_param(mode_option, charp, 0);
|
||||
MODULE_PARM_DESC(mode_option, "Initial video mode e.g. '648x480-8@60'");
|
||||
module_param(bpp, int, 0);
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
|
@ -469,6 +476,14 @@ static int __init vfb_setup(char *options)
|
|||
/* Test disable for backwards compatibility */
|
||||
if (!strcmp(this_opt, "disable"))
|
||||
vfb_enable = 0;
|
||||
else if (!strncmp(this_opt, "bpp=", 4)) {
|
||||
if (kstrtoint(this_opt + 4, 0, &bpp) < 0)
|
||||
bpp = 8;
|
||||
} else if (!strncmp(this_opt, "memsize=", 8)) {
|
||||
if (kstrtoul(this_opt + 8, 0, &videomemorysize) < 0)
|
||||
videomemorysize = VIDEOMEMSIZE;
|
||||
} else
|
||||
mode_option = this_opt;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -504,8 +519,8 @@ static int __devinit vfb_probe(struct platform_device *dev)
|
|||
info->screen_base = (char __iomem *)videomemory;
|
||||
info->fbops = &vfb_ops;
|
||||
|
||||
retval = fb_find_mode(&info->var, info, NULL,
|
||||
NULL, 0, NULL, 8);
|
||||
retval = fb_find_mode(&info->var, info, mode_option,
|
||||
NULL, 0, NULL, bpp);
|
||||
|
||||
if (!retval || (retval == 4))
|
||||
info->var = vfb_default;
|
||||
|
|
Loading…
Reference in a new issue