diff options
author | Liu Ying <Ying.liu@freescale.com> | 2013-01-18 16:33:00 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-06-03 22:59:16 -0500 |
commit | 41ab4fae6f80e93d7ee044eb3aae805acda8c5e7 (patch) | |
tree | 41870f4d00558d512967848ce2a698ee55494304 /drivers/video | |
parent | ec20d3a0bd4581cad66dc4fcb7ae92cec221cd1f (diff) |
ENGR00240740-3 IPUv3 fb:Workaround bootup ipu error
Enabling IPU hsp clock in mxcfb_probe() context by calling
ipu_init_channel() can avoid the IPU display channel(setup
in bootloader) from being damaged by some IPU common driver
APIS which enable/disable IPU hsp clock when doing driver
probe. However, somehow, after LDO bypass patch set is pushed
to kernel, this clock enablement can trigger IPU errors
(IPU_INT_STAT_5 - 0x00800000/IPU_INT_STAT_10 - 0x00100000) and
a display flash. A workaround is to enable IPU hsp clock when
we are at ipu_probe() context, which is earlier than mxcfb_probe()
context, and then to disable(cleanup) the clock once more when
fb_set_par() is triggered by the user for the first time. This
patch updates the comment for ipu_init_channel() and
ipu_enable_channel() in mxcfb_probe() context, and disables ipu
hsp clock when fb_set_par() is triggered by the user for the first
time.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 5528e415659a60f3c6d67db96692befb3302a58a)
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/mxc/mxc_ipuv3_fb.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c index 8038f3de81c5..e8a33987280c 100644 --- a/drivers/video/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/mxc/mxc_ipuv3_fb.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2012 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -481,6 +481,14 @@ static int mxcfb_set_par(struct fb_info *fbi) ipu_disable_irq(mxc_fbi->ipu, mxc_fbi->ipu_ch_nf_irq); ipu_disable_channel(mxc_fbi->ipu, mxc_fbi->ipu_ch, true); ipu_uninit_channel(mxc_fbi->ipu, mxc_fbi->ipu_ch); + + /* + * Disable IPU hsp clock if it is enabled for an + * additional time in ipu common driver. + */ + if (mxc_fbi->first_set_par && mxc_fbi->late_init) + ipu_disable_hsp_clk(mxc_fbi->ipu); + mxcfb_set_fix(fbi); mem_len = fbi->var.yres_virtual * fbi->fix.line_length; @@ -2035,15 +2043,7 @@ static int mxcfb_register(struct fb_info *fbi) /* * Setup the channel again though bootloader * has done this, then set_par() can stop the - * channel and re-initialize it. Moreover, - * ipu_init_channel() enables ipu hsp clock, - * so we may keep the clock on until user - * space triggers set_par(), i.e., any ipu - * interface which enables/disables ipu hsp - * clock with pair(called in IPUv3 fb driver - * or mxc v4l2 driver<probed after fb driver>) - * cannot eventually disables the clock to - * damage the channel. + * channel neatly and re-initialize it . */ if (mxcfbi->next_blank == FB_BLANK_UNBLANK) { console_lock(); |