From: Huang Jiachai Date: Thu, 29 Dec 2016 07:26:53 +0000 (+0800) Subject: video: rockchip: vop: add ourput color bt601, bt709, bt2020 X-Git-Tag: firefly_0821_release~386 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1eb011849fe287199a3c2357014c14a779509020;p=firefly-linux-kernel-4.4.55.git video: rockchip: vop: add ourput color bt601, bt709, bt2020 Change-Id: I0b679244817f1a524d6f834ade32dce1666a6352 Signed-off-by: Huang Jiachai (cherry picked from commit b76f11e6652a825fd4cb7798ec3fe06c60587338) --- diff --git a/drivers/video/rockchip/lcdc/rk312x_lcdc.c b/drivers/video/rockchip/lcdc/rk312x_lcdc.c index 0a1dc7f0a65e..2de0ef9fbf57 100755 --- a/drivers/video/rockchip/lcdc/rk312x_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk312x_lcdc.c @@ -1091,7 +1091,7 @@ static void rk312x_lcdc_select_bcsh(struct rk_lcdc_driver *dev_drv, { u32 bcsh_ctrl; if (dev_drv->overlay_mode == VOP_YUV_DOMAIN) { - if (dev_drv->output_color == COLOR_YCBCR)/* bypass */ + if (IS_YUV_COLOR(dev_drv->output_color))/* bypass */ lcdc_msk_reg(lcdc_dev, BCSH_CTRL, m_BCSH_Y2R_EN | m_BCSH_R2Y_EN, v_BCSH_Y2R_EN(0) | v_BCSH_R2Y_EN(0)); diff --git a/drivers/video/rockchip/lcdc/rk322x_lcdc.c b/drivers/video/rockchip/lcdc/rk322x_lcdc.c index 93c996a79e0e..08b8ddd80bd2 100644 --- a/drivers/video/rockchip/lcdc/rk322x_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk322x_lcdc.c @@ -1826,7 +1826,7 @@ static void vop_bcsh_path_sel(struct rk_lcdc_driver *dev_drv) vop_msk_reg(vop_dev, SYS_CTRL, V_OVERLAY_MODE(dev_drv->overlay_mode)); if (dev_drv->overlay_mode == VOP_YUV_DOMAIN) { - if (dev_drv->output_color == COLOR_YCBCR) /* bypass */ + if (IS_YUV_COLOR(dev_drv->output_color)) /* bypass */ vop_msk_reg(vop_dev, BCSH_CTRL, V_BCSH_Y2R_EN(0) | V_BCSH_R2Y_EN(0)); else /* YUV2RGB */ diff --git a/drivers/video/rockchip/lcdc/rk3368_lcdc.c b/drivers/video/rockchip/lcdc/rk3368_lcdc.c index c452109f6b77..9fdc1a7adeeb 100644 --- a/drivers/video/rockchip/lcdc/rk3368_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3368_lcdc.c @@ -1804,7 +1804,7 @@ static void rk3368_lcdc_bcsh_path_sel(struct rk_lcdc_driver *dev_drv) lcdc_msk_reg(lcdc_dev, SYS_CTRL, m_OVERLAY_MODE, v_OVERLAY_MODE(dev_drv->overlay_mode)); if (dev_drv->overlay_mode == VOP_YUV_DOMAIN) { - if (dev_drv->output_color == COLOR_YCBCR) /* bypass */ + if (IS_YUV_COLOR(dev_drv->output_color)) /* bypass */ lcdc_msk_reg(lcdc_dev, BCSH_CTRL, m_BCSH_Y2R_EN | m_BCSH_R2Y_EN, v_BCSH_Y2R_EN(0) | v_BCSH_R2Y_EN(0)); diff --git a/drivers/video/rockchip/lcdc/rk_vop_lite.c b/drivers/video/rockchip/lcdc/rk_vop_lite.c index 1d995fb822e7..71bd69cb5cfd 100644 --- a/drivers/video/rockchip/lcdc/rk_vop_lite.c +++ b/drivers/video/rockchip/lcdc/rk_vop_lite.c @@ -1061,7 +1061,7 @@ static void vop_bcsh_path_sel(struct rk_lcdc_driver *dev_drv) struct vop_device *vop_dev = to_vop_dev(dev_drv); if (dev_drv->overlay_mode == VOP_YUV_DOMAIN) { - if (dev_drv->output_color == COLOR_YCBCR) /* bypass */ + if (IS_YUV_COLOR(dev_drv->output_color)) /* bypass */ vop_msk_reg(vop_dev, BCSH_CTRL, V_SW_BCSH_Y2R_EN(0) | V_SW_BCSH_R2Y_EN(0)); else /* YUV2RGB */