diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 079e3651ae01..2c6c65e9036d 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1771,9 +1771,18 @@ static void vop_crtc_enable(struct drm_crtc *crtc) 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); + /* + * Background color is 10bit depth if vop version >= 3.5 + */ + if (!is_yuv_output(s->bus_format)) + val = 0; + else if (VOP_MAJOR(vop->data->version) == 3 && + VOP_MINOR(vop->data->version) >= 5) + val = 0x20010200; + else + val = 0x801080; + VOP_CTRL_SET(vop, dsp_background, val); VOP_CTRL_SET(vop, htotal_pw, (htotal << 16) | hsync_len); val = hact_st << 16; val |= hact_end;