]> git.baikalelectronics.ru Git - kernel.git/commit
[media] gspca: fix a v4l2-compliance failure about buffer timestamp
authorAntonio Ospite <ao2@ao2.it>
Wed, 9 Mar 2016 16:03:19 +0000 (13:03 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 8 Jul 2016 17:58:46 +0000 (14:58 -0300)
commite0d5422ff9481947418acb241af2c34fca700fc3
treedc9583b66060727c9690d73af086199f01e2d6ed
parenta0c2194d9936bdd1aef4669014c8882e0cc63529
[media] gspca: fix a v4l2-compliance failure about buffer timestamp

v4l2-compliance fails with this message:

  fail: v4l2-test-buffers.cpp(250): \
      timestamp != V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC && \
      timestamp != V4L2_BUF_FLAG_TIMESTAMP_COPY
  ...
  test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL

When setting the frame time, gspca uses v4l2_get_timestamp() which uses
ktime_get_ts() which uses ktime_get_ts64() which returns a monotonic
timestamp, so it's safe to initialize the buffer flags to
V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC to fix the failure.

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/gspca/gspca.c