From 099974363c9420b231537db3c7656a3d90684aa8 Mon Sep 17 00:00:00 2001 From: Huang Jiachai Date: Tue, 23 Aug 2016 20:27:41 +0800 Subject: [PATCH] video: rockchip: vop: 3399: cabc mode indicate whether cabc enable or not Change-Id: Ia4911d746c934b91a887881660373e4b4824f314 Signed-off-by: Huang Jiachai --- drivers/video/rockchip/lcdc/rk322x_lcdc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/video/rockchip/lcdc/rk322x_lcdc.c b/drivers/video/rockchip/lcdc/rk322x_lcdc.c index 74d71da37941..c4af864426b2 100644 --- a/drivers/video/rockchip/lcdc/rk322x_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk322x_lcdc.c @@ -4403,8 +4403,7 @@ static int vop_set_dsp_cabc(struct rk_lcdc_driver *dev_drv, int mode, return 0; } - dev_drv->cabc_mode = mode; - if (!dev_drv->cabc_mode) { + if (!mode) { spin_lock(&vop_dev->reg_lock); if (vop_dev->clk_on) { vop_msk_reg(vop_dev, CABC_CTRL0, @@ -4840,6 +4839,11 @@ static int vop_parse_dt(struct vop_device *vop_dev) else dev_drv->rotate_mode = val; + if (of_property_read_u32(np, "rockchip,cabc_mode", &val)) + dev_drv->cabc_mode = 0; /* default set close cabc */ + else + dev_drv->cabc_mode = val; + if (of_property_read_u32(np, "rockchip,pwr18", &val)) /*default set it as 3.xv power supply */ vop_dev->pwr18 = false; -- 2.34.1