From 5ff67b275efe92262c02265c79a14084eb7e8825 Mon Sep 17 00:00:00 2001 From: Huang Jiachai Date: Wed, 29 Jun 2016 20:40:13 +0800 Subject: [PATCH] video: rockchip: vop: 3399: fix layer0 perpixel alpha error Change-Id: I5d4947ab131d39ebc611ba78100e05aa95c4b3e9 Signed-off-by: Huang Jiachai --- drivers/video/rockchip/lcdc/rk322x_lcdc.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/video/rockchip/lcdc/rk322x_lcdc.c b/drivers/video/rockchip/lcdc/rk322x_lcdc.c index 8b13ad8d95f1..112d53a3b039 100644 --- a/drivers/video/rockchip/lcdc/rk322x_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk322x_lcdc.c @@ -1453,13 +1453,6 @@ static int vop_win_0_1_reg_update(struct rk_lcdc_driver *dev_drv, int win_id) val = V_WIN0_HS_FACTOR_CBR(win->scale_cbcr_x) | V_WIN0_VS_FACTOR_CBR(win->scale_cbcr_y); vop_writel(vop_dev, WIN0_SCL_FACTOR_CBR + off, val); - if (win->alpha_en == 1) { - vop_alpha_cfg(dev_drv, win_id); - } else { - val = V_WIN0_SRC_ALPHA_EN(0); - vop_msk_reg(vop_dev, WIN0_SRC_ALPHA_CTRL + off, val); - } - } else { val = V_WIN0_EN(win->state); vop_msk_reg(vop_dev, WIN0_CTRL0 + off, val); @@ -1593,13 +1586,6 @@ static int vop_win_2_3_reg_update(struct rk_lcdc_driver *dev_drv, int win_id) val = V_WIN2_MST3_EN(0); vop_msk_reg(vop_dev, WIN2_CTRL0 + off, val); } - - if (win->alpha_en == 1) { - vop_alpha_cfg(dev_drv, win_id); - } else { - val = V_WIN2_SRC_ALPHA_EN(0); - vop_msk_reg(vop_dev, WIN2_SRC_ALPHA_CTRL + off, val); - } } else { val = V_WIN2_EN(win->state) | V_WIN2_MST0_EN(0) | V_WIN2_MST1_EN(0) | V_WIN2_MST2_EN(0) | V_WIN2_MST3_EN(0); @@ -1644,13 +1630,6 @@ static int vop_hwc_reg_update(struct rk_lcdc_driver *dev_drv, int win_id) val = V_HWC_DSP_XST(win->area[0].dsp_stx) | V_HWC_DSP_YST(win->area[0].dsp_sty); vop_msk_reg(vop_dev, HWC_DSP_ST, val); - - if (win->alpha_en == 1) { - vop_alpha_cfg(dev_drv, win_id); - } else { - val = V_WIN2_SRC_ALPHA_EN(0); - vop_msk_reg(vop_dev, HWC_SRC_ALPHA_CTRL, val); - } } else { val = V_HWC_EN(win->state); vop_msk_reg(vop_dev, HWC_CTRL0, val); @@ -4140,6 +4119,7 @@ static int vop_config_done(struct rk_lcdc_driver *dev_drv) vop_msk_reg(vop_dev, SYS_CTRL, V_VOP_STANDBY_EN(vop_dev->standby)); for (i = 0; i < dev_drv->lcdc_win_num; i++) { win = dev_drv->win[i]; + vop_alpha_cfg(dev_drv, i); fbdc_en |= win->area[0].fbdc_en; if ((win->state == 0) && (win->last_state == 1)) { switch (win->id) { -- 2.34.1