Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/rockchip: vop: rk3328: fix overlay abnormal

It's a hardware bug, all window's overlay channel reset
value is same, hardware overlay would be die.

so we must initial difference id for each overlay channel.

The Channel register is supported on all vop will full design.
Following is the details for this register
VOP_WIN0_CTRL2
bit[7:4] win_rid_win0_cbr
axi read id of win0 cbr channel
bit[3:0] win_rid_win0_yrgb
axi read id of win0 yrgb channel

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Reviewed-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/1501049980-6239-1-git-send-email-mark.yao@rock-chips.com

Mark yao 9dd2aca4 b218dec7

+4
+2
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
··· 1457 1457 1458 1458 for (i = 0; i < vop_data->win_size; i++) { 1459 1459 const struct vop_win_data *win = &vop_data->win[i]; 1460 + int channel = i * 2 + 1; 1460 1461 1462 + VOP_WIN_SET(vop, win, channel, (channel + 1) << 4 | channel); 1461 1463 VOP_WIN_SET(vop, win, enable, 0); 1462 1464 VOP_WIN_SET(vop, win, gate, 1); 1463 1465 }
+1
drivers/gpu/drm/rockchip/rockchip_drm_vop.h
··· 141 141 142 142 struct vop_reg dst_alpha_ctl; 143 143 struct vop_reg src_alpha_ctl; 144 + struct vop_reg channel; 144 145 }; 145 146 146 147 struct vop_win_data {
+1
drivers/gpu/drm/rockchip/rockchip_vop_reg.c
··· 197 197 .uv_vir = VOP_REG(RK3288_WIN0_VIR, 0x3fff, 16), 198 198 .src_alpha_ctl = VOP_REG(RK3288_WIN0_SRC_ALPHA_CTRL, 0xff, 0), 199 199 .dst_alpha_ctl = VOP_REG(RK3288_WIN0_DST_ALPHA_CTRL, 0xff, 0), 200 + .channel = VOP_REG(RK3288_WIN0_CTRL2, 0xff, 0), 200 201 }; 201 202 202 203 static const struct vop_win_phy rk3288_win23_data = {