From 147e9c9981c8fb24398b78fb0d4a8b13633c5761 Mon Sep 17 00:00:00 2001 From: Huang Jiachai Date: Wed, 6 Apr 2016 15:15:29 +0800 Subject: [PATCH] video: rockchip: vop: 3399: update for dsp output mode Change-Id: I3558b90bea9cdad7954d17004c08cfc2c2c53aa0 Signed-off-by: Huang Jiachai --- drivers/video/rockchip/lcdc/rk322x_lcdc.c | 20 +++++++++++++++++--- drivers/video/rockchip/lcdc/rk322x_lcdc.h | 1 + 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/video/rockchip/lcdc/rk322x_lcdc.c b/drivers/video/rockchip/lcdc/rk322x_lcdc.c index 9e321afce5ad..e97be2c1e676 100644 --- a/drivers/video/rockchip/lcdc/rk322x_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk322x_lcdc.c @@ -1996,9 +1996,14 @@ static int vop_load_screen(struct rk_lcdc_driver *dev_drv, bool initscreen) vop_msk_reg(vop_dev, SYS_CTRL, val); break; case SCREEN_HDMI: - if ((screen->face == OUT_P888) || - (screen->face == OUT_P101010)) - face = OUT_P101010; /*RGB 101010 output*/ + if ((VOP_CHIP(vop_dev) == VOP_RK3399) && + ((screen->face == OUT_P888) || + (screen->face == OUT_P101010))) { + if (vop_dev->id == 0) + face = OUT_P101010; /*RGB 10bit output*/ + else + face = OUT_P888; + } val = V_HDMI_OUT_EN(1) | V_SW_UV_OFFSET_EN(0); vop_msk_reg(vop_dev, SYS_CTRL, val); break; @@ -2006,10 +2011,19 @@ static int vop_load_screen(struct rk_lcdc_driver *dev_drv, bool initscreen) case SCREEN_LVDS: val = V_RGB_OUT_EN(1); vop_msk_reg(vop_dev, SYS_CTRL, val); + break; case SCREEN_MIPI: val = V_MIPI_OUT_EN(1); vop_msk_reg(vop_dev, SYS_CTRL, val); + break; + case SCREEN_DUAL_MIPI: + val = V_MIPI_OUT_EN(1) | V_MIPI_DUAL_CHANNEL_EN(1); + vop_msk_reg(vop_dev, SYS_CTRL, val); + break; case SCREEN_EDP: + if ((VOP_CHIP(vop_dev) == VOP_RK3399) && + (vop_dev->id == 0)) + face = OUT_P101010; val = V_EDP_OUT_EN(1); vop_msk_reg(vop_dev, SYS_CTRL, val); break; diff --git a/drivers/video/rockchip/lcdc/rk322x_lcdc.h b/drivers/video/rockchip/lcdc/rk322x_lcdc.h index ac7d98045095..12fe254248f7 100644 --- a/drivers/video/rockchip/lcdc/rk322x_lcdc.h +++ b/drivers/video/rockchip/lcdc/rk322x_lcdc.h @@ -245,6 +245,7 @@ static inline u64 val_mask(int val, u64 msk, int shift) #define SYS_CTRL 0x00000008 #define V_DIRECT_PATH_EN(x) VAL_MASK(x, 1, 0) #define V_DIRECT_PATH_LAYER_SEL(x) VAL_MASK(x, 2, 1) +#define V_MIPI_DUAL_CHANNEL_EN(x) VAL_MASK(x, 1, 3) #define V_EDPI_HALT_EN(x) VAL_MASK(x, 1, 8) #define V_EDPI_WMS_MODE(x) VAL_MASK(x, 1, 9) #define V_EDPI_WMS_FS(x) VAL_MASK(x, 1, 10) -- 2.34.1