]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: video-i2c: fix buffer queue ordering
authorArash Golgol <arash.golgol@gmail.com>
Sun, 10 May 2026 03:34:23 +0000 (07:04 +0330)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 12 May 2026 07:39:02 +0000 (09:39 +0200)
commitbc4574c265ed738849e46d942617100580fcedd2
tree55285303213239c4a8a762f2e17b0b877470d86d
parent56384b486b80ce4a2bc93689aae49995f908f90d
media: video-i2c: fix buffer queue ordering

Queued buffers are added to the tail of vid_cap_active in
buffer_queue(), but the capture kthread also retrieves buffers from
the tail of the list.

This makes the queue behave as LIFO instead of FIFO when multiple
buffers are queued.

Fix this by retrieving buffers from the head of the list.

Signed-off-by: Arash Golgol <arash.golgol@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/video-i2c.c