diff options
author | Troy Kisky <troy.kisky@boundarydevices.com> | 2013-07-29 14:56:59 -0700 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-12-21 14:25:22 +0100 |
commit | 3fba3b192c3059acbeebc038e54ea140b162d53b (patch) | |
tree | 4f39c02787db955a45ef9d76a025458d40d9bb41 /drivers/video | |
parent | 071a5b6b9261caceb4e2a9902a8ead23c2a5d60a (diff) |
mxc_ipuv3_fb: unblank displays at init
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
(cherry picked from commit 4d751666e1211ea8a378b8a4af2ad0f6820b650e)
(cherry picked from commit 89a914b029644dc8872410c1f26daec909f76fef)
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/mxc/mxc_ipuv3_fb.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/video/fbdev/mxc/mxc_ipuv3_fb.c b/drivers/video/fbdev/mxc/mxc_ipuv3_fb.c index c6001b6a73d2..6e3b4679a6a8 100644 --- a/drivers/video/fbdev/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/fbdev/mxc/mxc_ipuv3_fb.c @@ -1317,6 +1317,15 @@ static int mxcfb_set_par(struct fb_info *fbi) dev_dbg(fbi->device, "pixclock = %ul Hz\n", (u32) (PICOS2KHZ(fbi->var.pixclock) * 1000UL)); + dev_info(fbi->device,"%dx%d h_sync,r,l: %d,%d,%d v_sync,l,u: %d,%d,%d pixclock=%u Hz\n", + fbi->var.xres, fbi->var.yres, + fbi->var.hsync_len, + fbi->var.right_margin, + fbi->var.left_margin, + fbi->var.vsync_len, + fbi->var.lower_margin, + fbi->var.upper_margin, + (u32)(PICOS2KHZ(fbi->var.pixclock) * 1000UL)); if (ipu_init_sync_panel(mxc_fbi->ipu, mxc_fbi->ipu_di, (PICOS2KHZ(fbi->var.pixclock)) * 1000UL, @@ -3050,6 +3059,10 @@ static int mxcfb_option_setup(struct platform_device *pdev, struct fb_info *fbi) name[5] += pdev->id; if (fb_get_options(name, &options)) { + if (options && !strncmp(options, "off", 3)) { + dev_info(&pdev->dev, "%s is turned off!\n", name); + return -ENODEV; + } dev_err(&pdev->dev, "Can't get fb option for %s!\n", name); return -ENODEV; } @@ -3343,8 +3356,10 @@ static void mxcfb_unsetup_overlay(struct fb_info *fbi_bg) } static bool ipu_usage[2][2]; -static int ipu_test_set_usage(int ipu, int di) +static int ipu_test_set_usage(unsigned ipu, unsigned di) { + if ((ipu >= 2) || (di >= 2)) + return -EINVAL; if (ipu_usage[ipu][di]) return -EBUSY; else @@ -3354,6 +3369,8 @@ static int ipu_test_set_usage(int ipu, int di) static void ipu_clear_usage(int ipu, int di) { + if ((ipu >= 2) || (di >= 2)) + return; ipu_usage[ipu][di] = false; } @@ -3525,7 +3542,7 @@ static int mxcfb_probe(struct platform_device *pdev) mxcfbi->ipu_alp_ch_irq = IPU_IRQ_BG_ALPHA_SYNC_EOF; mxcfbi->ipu_ch = MEM_BG_SYNC; /* Unblank the primary fb only by default */ - if (pdev->id == 0) + if (1) //(pdev->id == 0) mxcfbi->cur_blank = mxcfbi->next_blank = FB_BLANK_UNBLANK; else mxcfbi->cur_blank = mxcfbi->next_blank = FB_BLANK_POWERDOWN; @@ -3566,7 +3583,7 @@ static int mxcfb_probe(struct platform_device *pdev) mxcfbi->ipu_ch_nf_irq = IPU_IRQ_DC_SYNC_NFACK; mxcfbi->ipu_alp_ch_irq = -1; mxcfbi->ipu_ch = MEM_DC_SYNC; - mxcfbi->cur_blank = mxcfbi->next_blank = FB_BLANK_POWERDOWN; + mxcfbi->cur_blank = mxcfbi->next_blank = FB_BLANK_UNBLANK; ret = mxcfb_register(fbi); if (ret < 0) |