summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ying <Ying.liu@freescale.com>2013-01-18 16:33:00 +0800
committerLiu Ying <Ying.liu@freescale.com>2013-01-18 16:35:06 +0800
commit5528e415659a60f3c6d67db96692befb3302a58a (patch)
treed23ded1f5b160eabbf5d3efceb186a3415ef6a8e
parent78f0495e79f3b18d3f56ac8bf6ca76a5cea91cf5 (diff)
ENGR00240740-3 IPUv3 fb:Workaround Android 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>
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c20
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 2e6736a411b1..57f5ecc98985 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.
*/
/*
@@ -504,6 +504,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;
@@ -2172,15 +2180,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();