From 863acb26c0326f6e0ccc6140ba86d41d2b3f09ab Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 6 Dec 2020 17:06:48 +0100 Subject: backend/drm: stop tracking overlay planes We don't do anything with them. Once we do, we can easily add this back. --- backend/drm/drm.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'backend/drm/drm.c') diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 6c420b10..c0186f36 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -197,6 +197,13 @@ static bool init_planes(struct wlr_drm_backend *drm) { goto error; } + // We don't really care about overlay planes, as we don't support them + // yet. + if (type == DRM_PLANE_TYPE_OVERLAY) { + drmModeFreePlane(plane); + continue; + } + /* * This is a very naive implementation of the plane matching * logic. Primary and cursor planes should only work on a @@ -204,10 +211,6 @@ static bool init_planes(struct wlr_drm_backend *drm) { * overlay planes can potentially work with multiple CRTCs, * meaning this could return inefficient/skewed results. * - * However, we don't really care about overlay planes, as we - * don't support them yet. We only bother to keep basic - * tracking of them for DRM lease clients. - * * possible_crtcs is a bitmask of crtcs, where each bit is an * index into drmModeRes.crtcs. So if bit 0 is set (ffs starts * counting from 1), crtc 0 is possible. @@ -218,18 +221,6 @@ static bool init_planes(struct wlr_drm_backend *drm) { assert(crtc_bit >= 0 && (size_t)crtc_bit < drm->num_crtcs); struct wlr_drm_crtc *crtc = &drm->crtcs[crtc_bit]; - - if (type == DRM_PLANE_TYPE_OVERLAY) { - uint32_t *tmp = realloc(crtc->overlays, - sizeof(*crtc->overlays) * (crtc->num_overlays + 1)); - if (tmp) { - crtc->overlays = tmp; - crtc->overlays[crtc->num_overlays++] = id; - } - drmModeFreePlane(plane); - continue; - } - if (!add_plane(drm, crtc, plane, type, &props)) { drmModeFreePlane(plane); goto error; @@ -314,7 +305,6 @@ void finish_drm_resources(struct wlr_drm_backend *drm) { wlr_drm_format_set_finish(&crtc->cursor->formats); free(crtc->cursor); } - free(crtc->overlays); } free(drm->crtcs); -- cgit v1.2.3