Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions drivers/gpu/drm/vc4/vc4_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -2984,6 +2984,11 @@ int vc4_plane_create_additional_planes(struct drm_device *drm)
}

drm_for_each_crtc(crtc, drm) {
/* The writeback CRTC has its own, larger set of overlays */
unsigned int max_zpos = crtc == txp_crtc ?
VC4_NUM_TXP_OVERLAY_PLANES + 1 :
VC4_NUM_OVERLAY_PLANES + 1;

/* Set up the legacy cursor after overlay initialization,
* since the zpos fallback is that planes are rendered by plane
* ID order, and that then puts the cursor on top.
Expand All @@ -2993,10 +2998,8 @@ int vc4_plane_create_additional_planes(struct drm_device *drm)
if (!IS_ERR(cursor_plane)) {
crtc->cursor = cursor_plane;

drm_plane_create_zpos_property(cursor_plane,
VC4_NUM_OVERLAY_PLANES + 1,
1,
VC4_NUM_OVERLAY_PLANES + 1);
drm_plane_create_zpos_property(cursor_plane, max_zpos,
1, max_zpos);
}
}

Expand Down