backend/drm: add special case for cursor in add_plane

The code calling add_plane now makes sure not to add a cursor plane to a
CRTC which already has one.
This commit is contained in:
Simon Ser 2020-12-24 12:31:20 +01:00
parent 5548406667
commit c011a0e2ed
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 1 additions and 4 deletions

View File

@ -92,10 +92,7 @@ static bool add_plane(struct wlr_drm_backend *drm,
struct wlr_drm_crtc *crtc, drmModePlane *drm_plane,
uint32_t type, union wlr_drm_plane_props *props) {
assert(!(type == DRM_PLANE_TYPE_PRIMARY && crtc->primary));
if (type == DRM_PLANE_TYPE_CURSOR && crtc->cursor) {
return true;
}
assert(!(type == DRM_PLANE_TYPE_CURSOR && crtc->cursor));
struct wlr_drm_plane *p = calloc(1, sizeof(*p));
if (!p) {