forge
Explore
Log in

Don't you dare go Hollow

Drop `GbmDevice` in the end

Browse files at this commit

345428bce76281efeee91336768c2d38282f8027Kirill ChibisovParent: 64ac316
The `GbmDevice` must be destroyed after destroying all the objects
associated with it.
src/backend/tty.rsmodified+4 -2
@@ -66,14 +66,16 @@ type GbmDrmCompositor = DrmCompositor<
6666 struct OutputDevice {
6767 id: dev_t,
6868 token: RegistrationToken,
69- drm: DrmDevice,
70- gbm: GbmDevice<DrmDeviceFd>,
7169 gles: GlesRenderer,
7270 formats: HashSet<DrmFormat>,
7371 drm_scanner: DrmScanner,
7472 surfaces: HashMap<crtc::Handle, Surface>,
7573 dmabuf_state: DmabufState,
7674 dmabuf_global: DmabufGlobal,
75+ // SAFETY: drop after all the objects used with them are dropped.
76+ // See https://github.com/Smithay/smithay/issues/1102.
77+ drm: DrmDevice,
78+ gbm: GbmDevice<DrmDeviceFd>,
7779 }
7880
7981 #[derive(Debug, Clone, Copy)]