From: Huang Jiachai Date: Tue, 23 Aug 2016 12:27:41 +0000 (+0800) Subject: video: rockchip: vop: 3399: cabc mode indicate whether cabc enable or not X-Git-Tag: firefly_0821_release~1683 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=099974363c9420b231537db3c7656a3d90684aa8;p=firefly-linux-kernel-4.4.55.git video: rockchip: vop: 3399: cabc mode indicate whether cabc enable or not Change-Id: Ia4911d746c934b91a887881660373e4b4824f314 Signed-off-by: Huang Jiachai --- 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;