summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid
diff options
context:
space:
mode:
authorNicolas Dufresne2018-07-20 16:09:16 +0200
committerMauro Carvalho Chehab2018-07-27 13:51:09 +0200
commit43bd1dce39cea87a75e8691aad4ce11a9b457d8e (patch)
treee8249a7b6d66a33f1f076f8df8d40e1478d0df17 /drivers/media/platform/vivid
parentmedia: media.h.rst.exceptions: ignore MEDIA-ENT-F-DTV-DECODER (diff)
downloadkernel-qcow2-linux-43bd1dce39cea87a75e8691aad4ce11a9b457d8e.tar.gz
kernel-qcow2-linux-43bd1dce39cea87a75e8691aad4ce11a9b457d8e.tar.xz
kernel-qcow2-linux-43bd1dce39cea87a75e8691aad4ce11a9b457d8e.zip
media: vivid: Fix V4L2_FIELD_ALTERNATE new frame check
The vivid driver will overlay stream time on generated frames. Though, in interlacing mode V4L2_FIELD_ALTERNATE, each field is separate and must have the same time to ensure proper render. Though, this time was only updated every 2 frames as the code was checking against the wrong counter (frame counter rather then field counter). Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/vivid')
-rw-r--r--drivers/media/platform/vivid/vivid-kthread-cap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/vivid/vivid-kthread-cap.c b/drivers/media/platform/vivid/vivid-kthread-cap.c
index 3fdb280c36ca..f06003bb8e42 100644
--- a/drivers/media/platform/vivid/vivid-kthread-cap.c
+++ b/drivers/media/platform/vivid/vivid-kthread-cap.c
@@ -477,7 +477,7 @@ static void vivid_fillbuff(struct vivid_dev *dev, struct vivid_buffer *buf)
/* Updates stream time, only update at the start of a new frame. */
if (dev->field_cap != V4L2_FIELD_ALTERNATE ||
- (buf->vb.sequence & 1) == 0)
+ (dev->vid_cap_seq_count & 1) == 0)
dev->ms_vid_cap =
jiffies_to_msecs(jiffies - dev->jiffies_vid_cap);