diff options
author | Sean Paul <seanpaul@chromium.org> | 2019-05-22 16:08:21 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2019-05-22 16:08:21 -0400 |
commit | 374ed5429346a021c8e2d26fafce14c5b15dedd0 (patch) | |
tree | 70739e93443494993197cc11f41c0fd0a0f3aac0 /drivers/video/fbdev/mxsfb.c | |
parent | 270afb37ae34fc1499d166f6edf4bc472f529d96 (diff) | |
parent | a188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff) | |
download | blackbird-op-linux-374ed5429346a021c8e2d26fafce14c5b15dedd0.tar.gz blackbird-op-linux-374ed5429346a021c8e2d26fafce14c5b15dedd0.zip |
Merge drm/drm-next into drm-misc-next
Backmerging 5.2-rc1 to -misc-next for robher
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/video/fbdev/mxsfb.c')
-rw-r--r-- | drivers/video/fbdev/mxsfb.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/video/fbdev/mxsfb.c b/drivers/video/fbdev/mxsfb.c index 12c8bd1d24d5..1fdd1eb38fe0 100644 --- a/drivers/video/fbdev/mxsfb.c +++ b/drivers/video/fbdev/mxsfb.c @@ -181,6 +181,7 @@ struct mxsfb_info { const struct mxsfb_devdata *devdata; u32 sync; struct regulator *reg_lcd; + int pre_init; }; #define mxsfb_is_v3(host) (host->devdata->ipversion == 3) @@ -419,6 +420,12 @@ static int mxsfb_set_par(struct fb_info *fb_info) 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. * This may lead into shifted pictures (FIFO issue?). @@ -623,7 +630,6 @@ static int mxsfb_restore_mode(struct fb_info *fb_info, struct fb_videomode *vmode) { struct mxsfb_info *host = fb_info->par; - unsigned line_count; unsigned period; unsigned long pa, fbsize; int bits_per_pixel, ofs, ret = 0; @@ -710,7 +716,6 @@ static int mxsfb_restore_mode(struct fb_info *fb_info, writel(fb_info->fix.smem_start, host->base + host->devdata->next_buf); } - line_count = fb_info->fix.smem_len / fb_info->fix.line_length; fb_info->fix.ypanstep = 1; clk_prepare_enable(host->clk); @@ -931,6 +936,10 @@ static int mxsfb_probe(struct platform_device *pdev) if (IS_ERR(host->reg_lcd)) 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), GFP_KERNEL); if (!fb_info->pseudo_palette) { @@ -963,6 +972,7 @@ static int mxsfb_probe(struct platform_device *pdev) mxsfb_enable_controller(fb_info); } + host->pre_init = 0; dev_info(&pdev->dev, "initialized\n"); return 0; |