From 0a49e8e7c0944f27c1e08767bc352cbdfa32e868 Mon Sep 17 00:00:00 2001 From: Huang Jiachai Date: Fri, 11 Mar 2016 11:14:48 +0800 Subject: [PATCH] video: rockchip: lcdc: 3366: update for CABC Change-Id: I75fd4deb02f3f131a7258f5529a8cb68fb55dca6 Signed-off-by: Huang Jiachai --- drivers/video/rockchip/lcdc/rk3368_lcdc.c | 6 ++++-- drivers/video/rockchip/lcdc/rk3368_lcdc.h | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/video/rockchip/lcdc/rk3368_lcdc.c b/drivers/video/rockchip/lcdc/rk3368_lcdc.c index 52387869001f..11b12731de84 100644 --- a/drivers/video/rockchip/lcdc/rk3368_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3368_lcdc.c @@ -121,7 +121,7 @@ static int rk3368_set_cabc_lut(struct rk_lcdc_driver *dev_drv, int *cabc_lut) v_CABC_LUT_EN(0)); lcdc_cfg_done(lcdc_dev); mdelay(25); - for (i = 0; i < 256; i++) { + for (i = 0; i < 128; i++) { v = cabc_lut[i]; c = lcdc_dev->cabc_lut_addr_base + i; writel_relaxed(v, c); @@ -5011,7 +5011,9 @@ static int rk3368_lcdc_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); lcdc_dev->reg_phy_base = res->start; lcdc_dev->len = resource_size(res); - lcdc_dev->regs = devm_ioremap_resource(dev, res); + + lcdc_dev->regs = devm_ioremap(&pdev->dev, res->start, + resource_size(res)); if (IS_ERR(lcdc_dev->regs)) return PTR_ERR(lcdc_dev->regs); else diff --git a/drivers/video/rockchip/lcdc/rk3368_lcdc.h b/drivers/video/rockchip/lcdc/rk3368_lcdc.h index d1d4c4eb1cf7..56cc96ce863e 100755 --- a/drivers/video/rockchip/lcdc/rk3368_lcdc.h +++ b/drivers/video/rockchip/lcdc/rk3368_lcdc.h @@ -1350,12 +1350,12 @@ #define CABC_CTRL0 (0x01c0) #define v_CABC_EN(x) (((x)&1)<<0) -#define v_PWM_CONFIG_MODE(x) (((x)&3)<<1) -#define v_CABC_HANDLE_EN(x) (((x)&1)<<3) +#define v_CABC_HANDLE_EN(x) (((x)&1)<<1) +#define v_PWM_CONFIG_MODE(x) (((x)&3)<<2) #define v_CABC_CALC_PIXEL_NUM(x) (((x)&0x7fffff)<<4) #define m_CABC_EN (1<<0) -#define m_PWM_CONFIG_MODE (3<<1) -#define m_CABC_HANDLE_EN (1<<3) +#define m_CABC_HANDLE_EN (1<<1) +#define m_PWM_CONFIG_MODE (3<<2) #define m_CABC_CALC_PIXEL_NUM (0x7fffff<<4) #define CABC_CTRL1 (0x01c4) -- 2.34.1