From: Huang Jiachai Date: Thu, 18 Aug 2016 09:57:31 +0000 (+0800) Subject: video: rockchip: vop: 3399: fix post empty when enable afbdc after resume X-Git-Tag: firefly_0821_release~1704 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6a70fe365cc64033cf9368b4ade268f7074d97c2;p=firefly-linux-kernel-4.4.55.git video: rockchip: vop: 3399: fix post empty when enable afbdc after resume userspace will set several frame after vop suspend, so the kernel back buffer will be freed and after resume vop will read a freed buffer and lead to post empty, so we close all win before suspend, after resume vop will display black until userspace set a new frame. Change-Id: I6648861d2162f221e7fbf85d2361ad245e7b88aa Signed-off-by: Huang Jiachai --- diff --git a/drivers/video/rockchip/lcdc/rk322x_lcdc.c b/drivers/video/rockchip/lcdc/rk322x_lcdc.c index 05ffe15f6fff..74d71da37941 100644 --- a/drivers/video/rockchip/lcdc/rk322x_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk322x_lcdc.c @@ -3424,6 +3424,13 @@ static int vop_early_suspend(struct rk_lcdc_driver *dev_drv) vop_mask_writel(vop_dev, INTR_CLEAR0, INTR_MASK, INTR_MASK); vop_msk_reg(vop_dev, DSP_CTRL0, V_DSP_OUT_ZERO(1)); vop_msk_reg(vop_dev, SYS_CTRL, V_VOP_STANDBY_EN(1)); + if (VOP_CHIP(vop_dev) == VOP_RK3399) { + vop_msk_reg(vop_dev, WIN0_CTRL0, V_WIN0_EN(0)); + vop_msk_reg(vop_dev, WIN1_CTRL0, V_WIN1_EN(0)); + vop_msk_reg(vop_dev, WIN2_CTRL0, V_WIN2_EN(0)); + vop_msk_reg(vop_dev, WIN3_CTRL0, V_WIN3_EN(0)); + vop_msk_reg(vop_dev, AFBCD0_CTRL, V_VOP_FBDC_EN(0)); + } vop_cfg_done(vop_dev); if (dev_drv->iommu_enabled && dev_drv->mmu_dev) {