Skip to content

Commit 015fb43

Browse files
committed
drm/rockchip: rk3288 vop: fix background color error
rk3288 can't support yuv overlay, so when set output yuv color space, we must enable bcsh r2y correctly before vop enable. Change-Id: Ie69fa980586107f9895a2c6f717e26d60661f6ad Signed-off-by: Sandy Huang <hjc@rock-chips.com>
1 parent a41d7c6 commit 015fb43

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drivers/gpu/drm/rockchip/rockchip_drm_vop.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ struct vop {
289289
struct vop_win win[];
290290
};
291291

292+
static void vop_tv_config_update(struct drm_crtc *crtc,
293+
struct drm_crtc_state *old_crtc_state);
294+
292295
static void vop_lock(struct vop *vop)
293296
{
294297
mutex_lock(&vop->vop_lock);
@@ -2633,7 +2636,7 @@ static void vop_update_csc(struct drm_crtc *crtc)
26332636
/*
26342637
* Background color is 10bit depth if vop version >= 3.5
26352638
*/
2636-
if (!is_yuv_output(s->bus_format))
2639+
if (!is_yuv_output(s->bus_format) || !VOP_CTRL_SUPPORT(vop, overlay_mode))
26372640
val = 0;
26382641
else if (VOP_MAJOR(vop->version) == 3 && VOP_MINOR(vop->version) == 8 &&
26392642
s->hdr.pre_overlay)
@@ -2873,7 +2876,8 @@ static void vop_crtc_enable(struct drm_crtc *crtc)
28732876

28742877
clk_set_rate(vop->dclk, adjusted_mode->crtc_clock * 1000);
28752878

2876-
2879+
if (!VOP_CTRL_SUPPORT(vop, overlay_mode))
2880+
vop_tv_config_update(crtc, &s->base);
28772881
vop_cfg_done(vop);
28782882

28792883
enable_irq(vop->irq);

0 commit comments

Comments
 (0)