From: Zheng Yang Date: Fri, 18 Jul 2014 01:07:04 +0000 (+0800) Subject: rk3036 lcdc: fix set win0 virtual width error. X-Git-Tag: firefly_0821_release~4916^2~212 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=58994aa20ff04fb33412270545697b4bc05c084c;p=firefly-linux-kernel-4.4.55.git rk3036 lcdc: fix set win0 virtual width error. --- diff --git a/drivers/video/rockchip/lcdc/rk3036_lcdc.c b/drivers/video/rockchip/lcdc/rk3036_lcdc.c index b67ceaecd36b..8e113959f42d 100644 --- a/drivers/video/rockchip/lcdc/rk3036_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3036_lcdc.c @@ -191,9 +191,8 @@ static void lcdc_layer_update_regs(struct lcdc_device *lcdc_dev, struct rk_lcdc_ lcdc_writel(lcdc_dev, WIN0_SCL_FACTOR_CBR, v_X_SCL_FACTOR(win->scale_cbcr_x) | v_Y_SCL_FACTOR(win->scale_cbcr_y)); - lcdc_msk_reg(lcdc_dev, WIN0_VIR, m_YRGB_VIR | m_CBBR_VIR, - v_YRGB_VIR(win->area[0].y_vir_stride) | v_YRGB_VIR(win->area[0].uv_vir_stride)); + v_YRGB_VIR(win->area[0].y_vir_stride) | v_CBBR_VIR(win->area[0].uv_vir_stride)); lcdc_writel(lcdc_dev, WIN0_ACT_INFO, v_ACT_WIDTH(win->area[0].xact) | v_ACT_HEIGHT(win->area[0].yact)); lcdc_writel(lcdc_dev, WIN0_DSP_ST, v_DSP_STX(win->area[0].dsp_stx) | @@ -406,6 +405,9 @@ static int rk3036_load_screen(struct rk_lcdc_driver *dev_drv, bool initscreen) if(screen->pixelrepeat) { mask |= m_CORE_CLK_DIV_EN; val |= v_CORE_CLK_DIV_EN(1); + } else { + mask |= m_CORE_CLK_DIV_EN; + val |= v_CORE_CLK_DIV_EN(0); } lcdc_msk_reg(lcdc_dev, AXI_BUS_CTRL, mask, val); break; @@ -415,6 +417,9 @@ static int rk3036_load_screen(struct rk_lcdc_driver *dev_drv, bool initscreen) if(screen->pixelrepeat) { mask |= m_CORE_CLK_DIV_EN; val |= v_CORE_CLK_DIV_EN(1); + } else { + mask |= m_CORE_CLK_DIV_EN; + val |= v_CORE_CLK_DIV_EN(0); } lcdc_msk_reg(lcdc_dev, AXI_BUS_CTRL, mask, val); if(x_res == 720 && y_res == 576)