From: yxj Date: Mon, 11 Mar 2013 06:48:28 +0000 (+0800) Subject: rk3188 lcdc:fix bug in rk3188_lcdc_open/close X-Git-Tag: firefly_0821_release~7440 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e846d213ef4db50fe939e6694a8e95723b0a6738;p=firefly-linux-kernel-4.4.55.git rk3188 lcdc:fix bug in rk3188_lcdc_open/close before disable lcdc clk,we must make sure the lcdc enter stanby and finish read or write the lcdc register。 Before this commit,some hdmi hotplug crash made by thie issue --- diff --git a/drivers/video/rockchip/lcdc/rk3188_lcdc.c b/drivers/video/rockchip/lcdc/rk3188_lcdc.c index 680df62918d8..5042067774f2 100644 --- a/drivers/video/rockchip/lcdc/rk3188_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3188_lcdc.c @@ -65,7 +65,7 @@ static int rk3188_lcdc_clk_disable(struct rk3188_lcdc_device *lcdc_dev) spin_lock(&lcdc_dev->reg_lock); lcdc_dev->clk_on = 0; spin_unlock(&lcdc_dev->reg_lock); - + mdelay(25); clk_disable(lcdc_dev->dclk); clk_disable(lcdc_dev->hclk); clk_disable(lcdc_dev->aclk); @@ -310,6 +310,8 @@ static int rk3188_lcdc_open(struct rk_lcdc_device_driver *dev_drv,int layer_id,b if((!open) && (!lcdc_dev->atv_layer_cnt)) //when all layer closed,disable clk { + lcdc_msk_reg(lcdc_dev,INT_STATUS,m_FS_INT_CLEAR,v_FS_INT_CLEAR(1)); + rk3188_lcdc_reg_update(dev_drv); rk3188_lcdc_clk_disable(lcdc_dev); } @@ -927,7 +929,6 @@ static int rk3188_lcdc_early_suspend(struct rk_lcdc_device_driver *dev_drv) return 0; } - mdelay(25); rk3188_lcdc_clk_disable(lcdc_dev); return 0; }