Commit 767f17a7 authored by Melchior Franz's avatar Melchior Franz Committed by Bartlomiej Zolnierkiewicz

fbdev: mxsfb: implement FB_PRE_INIT_FB option

The FB_PRE_INIT_FB option keeps the kernel from reinitializing the display
and prevents flickering during the transition from a bootloader splash
screen to the kernel logo screen.

Make this option available for the mxsfb driver.
Signed-off-by: default avatarMelchior Franz <melchior.franz@ginzinger.com>
Signed-off-by: default avatarMartin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: default avatarManfred Schlaegl <manfred.schlaegl@ginzinger.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent df768610
...@@ -2183,7 +2183,7 @@ config FB_EP93XX ...@@ -2183,7 +2183,7 @@ config FB_EP93XX
config FB_PRE_INIT_FB config FB_PRE_INIT_FB
bool "Don't reinitialize, use bootloader's GDC/Display configuration" bool "Don't reinitialize, use bootloader's GDC/Display configuration"
depends on FB && FB_MB862XX_LIME depends on FB && (FB_MB862XX_LIME || FB_MXS)
---help--- ---help---
Select this option if display contents should be inherited as set by Select this option if display contents should be inherited as set by
the bootloader. the bootloader.
......
...@@ -181,6 +181,7 @@ struct mxsfb_info { ...@@ -181,6 +181,7 @@ struct mxsfb_info {
const struct mxsfb_devdata *devdata; const struct mxsfb_devdata *devdata;
u32 sync; u32 sync;
struct regulator *reg_lcd; struct regulator *reg_lcd;
int pre_init;
}; };
#define mxsfb_is_v3(host) (host->devdata->ipversion == 3) #define mxsfb_is_v3(host) (host->devdata->ipversion == 3)
...@@ -419,6 +420,12 @@ static int mxsfb_set_par(struct fb_info *fb_info) ...@@ -419,6 +420,12 @@ static int mxsfb_set_par(struct fb_info *fb_info)
fb_info->fix.line_length = line_size; fb_info->fix.line_length = line_size;
if (host->pre_init) {
mxsfb_enable_controller(fb_info);
host->pre_init = 0;
return 0;
}
/* /*
* It seems, you can't re-program the controller if it is still running. * It seems, you can't re-program the controller if it is still running.
* This may lead into shifted pictures (FIFO issue?). * This may lead into shifted pictures (FIFO issue?).
...@@ -931,6 +938,10 @@ static int mxsfb_probe(struct platform_device *pdev) ...@@ -931,6 +938,10 @@ static int mxsfb_probe(struct platform_device *pdev)
if (IS_ERR(host->reg_lcd)) if (IS_ERR(host->reg_lcd))
host->reg_lcd = NULL; host->reg_lcd = NULL;
#if defined(CONFIG_FB_PRE_INIT_FB)
host->pre_init = 1;
#endif
fb_info->pseudo_palette = devm_kcalloc(&pdev->dev, 16, sizeof(u32), fb_info->pseudo_palette = devm_kcalloc(&pdev->dev, 16, sizeof(u32),
GFP_KERNEL); GFP_KERNEL);
if (!fb_info->pseudo_palette) { if (!fb_info->pseudo_palette) {
...@@ -963,6 +974,7 @@ static int mxsfb_probe(struct platform_device *pdev) ...@@ -963,6 +974,7 @@ static int mxsfb_probe(struct platform_device *pdev)
mxsfb_enable_controller(fb_info); mxsfb_enable_controller(fb_info);
} }
host->pre_init = 0;
dev_info(&pdev->dev, "initialized\n"); dev_info(&pdev->dev, "initialized\n");
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment