From: Huang Jiachai Date: Mon, 18 Apr 2016 12:10:36 +0000 (+0800) Subject: video: rockchip: vop: 3399: update for AFBDC X-Git-Tag: firefly_0821_release~2779 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5194e73a9c56d6897664f65f6cfbe7188d8ec006;p=firefly-linux-kernel-4.4.55.git video: rockchip: vop: 3399: update for AFBDC 1.gpu afbc default in yuv color; 2.mb width and hight is equal to xvir and yvir. Change-Id: I905d90c8a75c0b5136ff883fbcf7128ca954e425 Signed-off-by: Huang Jiachai --- diff --git a/drivers/video/rockchip/lcdc/rk322x_lcdc.c b/drivers/video/rockchip/lcdc/rk322x_lcdc.c index cb7a4cf8e2b3..f00373490144 100644 --- a/drivers/video/rockchip/lcdc/rk322x_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk322x_lcdc.c @@ -1336,10 +1336,10 @@ static int vop_init_fbdc_config(struct vop_device *vop_dev, int win_id) return 0; } - win->area[0].fbdc_mb_width = win->area[0].xact; + win->area[0].fbdc_mb_width = win->area[0].xvir; win->area[0].fbdc_mb_height = win->area[0].yact; win->area[0].fbdc_cor_en = 0; /* hreg_block_split */ - win->area[0].fbdc_fmt_cfg |= 0 << 4; + win->area[0].fbdc_fmt_cfg |= AFBDC_YUV_COLOR_TRANSFORM << 4; return 0; } diff --git a/drivers/video/rockchip/lcdc/rk322x_lcdc.h b/drivers/video/rockchip/lcdc/rk322x_lcdc.h index 12fe254248f7..326d9ecc5c1c 100644 --- a/drivers/video/rockchip/lcdc/rk322x_lcdc.h +++ b/drivers/video/rockchip/lcdc/rk322x_lcdc.h @@ -1352,6 +1352,9 @@ static inline u64 val_mask(int val, u64 msk, int shift) #define OUT_CCIR656_MODE_1 6 #define OUT_CCIR656_MODE_2 7 +#define AFBDC_RGB_COLOR_TRANSFORM 0 +#define AFBDC_YUV_COLOR_TRANSFORM 1 + enum cabc_stage_mode { LAST_FRAME_PWM_VAL = 0x0, CUR_FRAME_PWM_VAL = 0x1,