backend-drm: Correctly tear down the DRM backend

It seem that we skipped to put back in TEXT mode the tty, in case a DRM
device node wasn't present at that time, or it isn't present at all. This
orders the destroy part correctly as to handle that case as well.

As a side effect, as the tty will still be set to GRAPHICS mode we will
require a manual change of the tty number, which might be not possible
on all systems. Properly putting back the tty to TEXT mode should avoid
that, and allows to re-use the same tty no in case the DRM device has
been created at a later point in time.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
dev
Marius Vlad 4 years ago
parent 2592d6591e
commit 5130a8c21a
  1. 4
      libweston/backend-drm/drm.c

@ -3031,10 +3031,10 @@ err_sprite:
destroy_sprites(b); destroy_sprites(b);
err_udev_dev: err_udev_dev:
udev_device_unref(drm_device); udev_device_unref(drm_device);
err_launcher:
weston_launcher_destroy(compositor->launcher);
err_udev: err_udev:
udev_unref(b->udev); udev_unref(b->udev);
err_launcher:
weston_launcher_destroy(compositor->launcher);
err_compositor: err_compositor:
weston_compositor_shutdown(compositor); weston_compositor_shutdown(compositor);
free(b); free(b);

Loading…
Cancel
Save