Skip to content
Snippets Groups Projects
Commit 7738c42b authored by Lyude Paul's avatar Lyude Paul
Browse files

fixup! WIP: rust: drm/kms: Add VblankSupport

parent c7f2b69e
No related branches found
No related tags found
No related merge requests found
......@@ -208,7 +208,8 @@ impl<T: VblankDriverCrtc> Crtc<T> {
/// dropped.
pub fn vblank_lock<'a>(&'a self, irq: IrqDisabled<'a>) -> VblankGuard<'a, T> {
// SAFETY: `vbl_lock` is initialized for as long as `Crtc` is available to users
unsafe { bindings::spin_lock(&mut (*self.drm_dev().as_raw()).vbl_lock) };
// INVARIANT: We just acquired `vbl_lock`, fulfilling the invariants of `VblankGuard`
unsafe { bindings::spin_lock(addr_of_mut!((*self.drm_dev().as_raw()).vbl_lock)) };
// SAFETY: We just acquired vbl_lock above
unsafe { VblankGuard::new(self, irq) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment