The branch main has been updated by bapt:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=9315ab37fdc1ea7ffb0aeb7835ba1de937c047e4

commit 9315ab37fdc1ea7ffb0aeb7835ba1de937c047e4
Author:     Baptiste Daroussin <[email protected]>
AuthorDate: 2026-09-12 07:01:56 +0000
Commit:     Baptiste Daroussin <[email protected]>
CommitDate: 2026-09-14 06:57:36 +0000

    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.
---
 sys/dev/video/video.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/dev/video/video.c b/sys/dev/video/video.c
index 660e09642110..ed02bbc1e250 100644
--- a/sys/dev/video/video.c
+++ b/sys/dev/video/video.c
@@ -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);
 }

Reply via email to