aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-12-06 17:06:48 +0100
committerSimon Ser <contact@emersion.fr>2020-12-08 18:38:42 +0100
commit863acb26c0326f6e0ccc6140ba86d41d2b3f09ab (patch)
tree3efe4beefada0d63cfc2dd871505e3514b87d539 /backend/drm
parent29da97c185c60eae5d9eaf743c3895c4dba139f7 (diff)
backend/drm: stop tracking overlay planes
We don't do anything with them. Once we do, we can easily add this back.
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c24
1 files changed, 7 insertions, 17 deletions
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);