mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01:00
backend/drm: stop tracking overlay planes
We don't do anything with them. Once we do, we can easily add this back.
This commit is contained in:
parent
29da97c185
commit
863acb26c0
2 changed files with 7 additions and 24 deletions
|
@ -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);
|
||||
|
|
|
@ -63,13 +63,6 @@ struct wlr_drm_crtc {
|
|||
struct wlr_drm_plane *primary;
|
||||
struct wlr_drm_plane *cursor;
|
||||
|
||||
/*
|
||||
* We don't support overlay planes yet, but we keep track of them to
|
||||
* give to DRM lease clients.
|
||||
*/
|
||||
size_t num_overlays;
|
||||
uint32_t *overlays;
|
||||
|
||||
union wlr_drm_crtc_props props;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue