drm-backend: fix deinit_planes

Commit "drm-backend: move code to init/deinit planes to specific
functions" lost a chunk of drm_output_deinit() when moving code into
drm_output_deinit_planes(). Reinstate the missing chunk.

This fixes an endless loop over weston_compositor::plane_list when you
start with three monitors connected, unplug and re-plug one.

Fixes: 3be23eff99

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 4 years ago
parent ae69381b6e
commit 3d6721eb15
  1. 10
      libweston/backend-drm/drm.c

@ -1706,6 +1706,16 @@ drm_output_deinit_planes(struct drm_output *output)
/* If the compositor is already shutting down, the planes have already
* been destroyed. */
if (!b->shutting_down) {
wl_list_remove(&output->scanout_plane->base.link);
wl_list_init(&output->scanout_plane->base.link);
if (output->cursor_plane) {
wl_list_remove(&output->cursor_plane->base.link);
wl_list_init(&output->cursor_plane->base.link);
/* Turn off hardware cursor */
drmModeSetCursor(b->drm.fd, output->crtc->crtc_id, 0, 0, 0);
}
if (!b->universal_planes) {
/* Without universal planes, our special planes are
* pseudo-planes allocated at output creation, freed at

Loading…
Cancel
Save