mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
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>
This commit is contained in:
parent
56384b486b
commit
bc4574c265
|
|
@ -454,8 +454,9 @@ static int video_i2c_thread_vid_cap(void *priv)
|
|||
spin_lock(&data->slock);
|
||||
|
||||
if (!list_empty(&data->vid_cap_active)) {
|
||||
vid_cap_buf = list_last_entry(&data->vid_cap_active,
|
||||
struct video_i2c_buffer, list);
|
||||
vid_cap_buf = list_first_entry(&data->vid_cap_active,
|
||||
struct video_i2c_buffer,
|
||||
list);
|
||||
list_del(&vid_cap_buf->list);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user