Skip to content

Commit b7c9c41

Browse files
topdjgodjamess-huang
authored andcommitted
Swap video layer
Change-Id: Iab0e18f959e4cc47cba47ae7b6a5c33ff3baf15e Reviewed-on: https://tp-biosrd-v02/gerrit/81884 Reviewed-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com> Tested-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com>
1 parent 6a2bea7 commit b7c9c41

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

drivers/gpu/drm/rockchip/rockchip_drm_vop.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,12 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
12971297
VOP_WIN_SET_EXT(vop, win, csc, r2r_en, !!r2r_table);
12981298
VOP_WIN_SET_EXT(vop, win, csc, r2y_en, !!r2y_table);
12991299
}
1300+
1301+
if (plane->type == DRM_PLANE_TYPE_PRIMARY) {
1302+
VOP_WIN_SET(vop, win, key_color, 0x00000000);
1303+
VOP_WIN_SET(vop, win, key_en, 1);
1304+
}
1305+
13001306
VOP_WIN_SET(vop, win, enable, 1);
13011307
spin_unlock(&vop->reg_lock);
13021308
vop->is_iommu_needed = true;

drivers/gpu/drm/rockchip/rockchip_vop_reg.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ static const struct vop_win_phy rk3288_win01_data = {
121121
.src_alpha_ctl = VOP_REG(RK3288_WIN0_SRC_ALPHA_CTRL, 0xffffffff, 0),
122122
.dst_alpha_ctl = VOP_REG(RK3288_WIN0_DST_ALPHA_CTRL, 0xffffffff, 0),
123123
.channel = VOP_REG_VER(RK3288_WIN0_CTRL2, 0xff, 0, 3, 8, 8),
124+
.key_color = VOP_REG(RK3288_WIN0_COLOR_KEY, 0x3fffffff, 0),
125+
.key_en = VOP_REG(RK3288_WIN0_COLOR_KEY, 0x1, 31),
124126
};
125127

126128
static const struct vop_win_phy rk3288_win23_data = {
@@ -255,9 +257,9 @@ static const struct vop_ctrl rk3288_ctrl_data = {
255257
*/
256258
static const struct vop_win_data rk3288_vop_win_data[] = {
257259
{ .base = 0x00, .phy = &rk3288_win01_data,
258-
.type = DRM_PLANE_TYPE_PRIMARY },
259-
{ .base = 0x40, .phy = &rk3288_win01_data,
260260
.type = DRM_PLANE_TYPE_OVERLAY },
261+
{ .base = 0x40, .phy = &rk3288_win01_data,
262+
.type = DRM_PLANE_TYPE_PRIMARY },
261263
{ .base = 0x00, .phy = &rk3288_win23_data,
262264
.type = DRM_PLANE_TYPE_OVERLAY,
263265
.area = rk3288_area_data,

0 commit comments

Comments
 (0)