drm/rockchip: vop2: Make sure the primary plane type is DRM_PLANE_TYPE_PRIMARY

Some times we want change a overlay plane defined in vop2_reg
to primary plane.

Change-Id: I5f563fb258a66278255be762ebdfca21b51aabd1
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2021-11-30 17:25:09 +08:00
committed by Tao Huang
parent d74ec4d675
commit 81d9bd6936

View File

@@ -8020,8 +8020,10 @@ static int vop2_create_crtc(struct vop2 *vop2)
if (vp->primary_plane_phy_id >= 0) {
win = vop2_find_win_by_phys_id(vop2, vp->primary_plane_phy_id);
if (win)
if (win) {
find_primary_plane = true;
win->type = DRM_PLANE_TYPE_PRIMARY;
}
} else {
while (j < vop2->registered_num_wins) {
be_used_for_primary_plane = false;