drm/rockchip: vop: fix background color on yuv domain

On yuv domain, background need use 10bit yuv format.

Change-Id: I02fe3894ac12b509e22c0d90977bcb7e4535c16d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This commit is contained in:
Mark Yao
2017-03-03 08:40:21 +08:00
committed by Huang, Tao
parent 27e143efd7
commit f4fdb5f5cc
3 changed files with 6 additions and 0 deletions

View File

@@ -1560,6 +1560,10 @@ static void vop_crtc_enable(struct drm_crtc *crtc)
VOP_CTRL_SET(vop, dclk_ddr,
s->output_mode == ROCKCHIP_OUT_MODE_YUV420 ? 1 : 0);
VOP_CTRL_SET(vop, overlay_mode, is_yuv_output(s->bus_format));
VOP_CTRL_SET(vop, dsp_out_yuv, is_yuv_output(s->bus_format));
VOP_CTRL_SET(vop, dsp_background,
is_yuv_output(s->bus_format) ? 0x20010200 : 0);
VOP_CTRL_SET(vop, htotal_pw, (htotal << 16) | hsync_len);
val = hact_st << 16;
val |= hact_end;

View File

@@ -109,6 +109,7 @@ struct vop_ctrl {
struct vop_reg dither_up;
struct vop_reg dither_down;
struct vop_reg dsp_out_yuv;
struct vop_reg dsp_data_swap;
struct vop_reg dsp_ccir656_avg;
struct vop_reg dsp_black;

View File

@@ -205,6 +205,7 @@ static const struct vop_ctrl rk3288_ctrl_data = {
.dither_down = VOP_REG(RK3288_DSP_CTRL1, 0xf, 1),
.dither_up = VOP_REG(RK3288_DSP_CTRL1, 0x1, 6),
.dsp_out_yuv = VOP_REG_VER(RK3399_POST_SCL_CTRL, 0x1, 2, 3, 5, -1),
.dsp_data_swap = VOP_REG(RK3288_DSP_CTRL0, 0x1f, 12),
.dsp_ccir656_avg = VOP_REG(RK3288_DSP_CTRL0, 0x1, 20),
.dsp_blank = VOP_REG(RK3288_DSP_CTRL0, 0x3, 18),