compositor-drm: Add shutting_down flag
Does what it says on the box: is true when the compositor is shutting down. When we begin to use universal planes, we need divergent destruction paths. With universal planes, the drm_planes are created at backend initialisation time, and destroyed with the backend. However, without universal planes, we create per-output drm_planes to hold the primary/scanout and cursor planes, whose lifetime is tied to the output. We will use the new shutting_down flag to determine if output destruction is hot-unplug or compositor shutdown, and make a decision on whether or not to destroy the special planes. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
@@ -184,6 +184,8 @@ struct drm_backend {
|
|||||||
int32_t cursor_height;
|
int32_t cursor_height;
|
||||||
|
|
||||||
uint32_t pageflip_timeout;
|
uint32_t pageflip_timeout;
|
||||||
|
|
||||||
|
bool shutting_down;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct drm_mode {
|
struct drm_mode {
|
||||||
@@ -3605,6 +3607,8 @@ drm_destroy(struct weston_compositor *ec)
|
|||||||
wl_event_source_remove(b->udev_drm_source);
|
wl_event_source_remove(b->udev_drm_source);
|
||||||
wl_event_source_remove(b->drm_source);
|
wl_event_source_remove(b->drm_source);
|
||||||
|
|
||||||
|
b->shutting_down = true;
|
||||||
|
|
||||||
destroy_sprites(b);
|
destroy_sprites(b);
|
||||||
|
|
||||||
weston_compositor_shutdown(ec);
|
weston_compositor_shutdown(ec);
|
||||||
|
|||||||
Reference in New Issue
Block a user