mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
video(4): wake the kqueue knote when a buffer completes
selwakeup() only wakes select/poll waiters; it does not notify the kqueue knote registered on the device, so EVFILT_READ never fired when a frame became available.
This commit is contained in:
1 parent
bae084550c
commit
9315ab37fd
1 file changed
+2
@@ -303,6 +303,7 @@ video_buf_done(struct video_buf *vb, size_t bytesused, uint32_t sequence)
|
||||
vb->state = VB_DONE;
|
||||
STAILQ_INSERT_TAIL(&vd->done, vb, entry);
|
||||
selwakeup(&vd->sel);
|
||||
KNOTE_LOCKED(&vd->sel.si_note, 0);
|
||||
wakeup(&vd->done);
|
||||
mtx_unlock(&vd->mtx);
|
||||
}
|
||||
@@ -323,6 +324,7 @@ video_buf_error(struct video_buf *vb)
|
||||
vb->state = VB_ERROR;
|
||||
STAILQ_INSERT_TAIL(&vd->done, vb, entry);
|
||||
selwakeup(&vd->sel);
|
||||
KNOTE_LOCKED(&vd->sel.si_note, 0);
|
||||
wakeup(&vd->done);
|
||||
mtx_unlock(&vd->mtx);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user