@@ -649,13 +649,22 @@ Buffer Flags
- 0x00002000
- The buffer timestamp has been taken from the ``CLOCK_MONOTONIC``
clock. To access the same clock outside V4L2, use
- :c:func:`clock_gettime`.
+ :c:func:`clock_gettime` using clock IDs ``CLOCK_MONOTONIC``.
* .. _`V4L2-BUF-FLAG-TIMESTAMP-COPY`:
- ``V4L2_BUF_FLAG_TIMESTAMP_COPY``
- 0x00004000
- The CAPTURE buffer timestamp has been taken from the corresponding
OUTPUT buffer. This flag applies only to mem2mem devices.
+ * .. _`V4L2_BUF_FLAG_TIMESTAMP_BOOTIME`:
+
+ - ``V4L2_BUF_FLAG_TIMESTAMP_BOOTIME``
+ - 0x00008000
+ - The buffer timestamp has been taken from the ``CLOCK_BOOTTIME``
+ clock. To access the same clock outside V4L2, use
+ :c:func:`clock_gettime` using clock IDs ``CLOCK_BOOTTIME``.
+ Identical to CLOCK_MONOTONIC, except it also includes any time that
+ the system is suspended.
* .. _`V4L2-BUF-FLAG-TSTAMP-SRC-MASK`:
- ``V4L2_BUF_FLAG_TSTAMP_SRC_MASK``
@@ -1043,6 +1043,8 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv)
#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x00000000
#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x00002000
#define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x00004000
+#define V4L2_BUF_FLAG_TIMESTAMP_BOOTIME 0x00008000
+
/* Timestamp sources. */
#define V4L2_BUF_FLAG_TSTAMP_SRC_MASK 0x00070000
#define V4L2_BUF_FLAG_TSTAMP_SRC_EOF 0x00000000
For Camera AR(Augmented Reality) application requires camera timestamps to be reported with CLOCK_BOOTTIME to sync timestamp with other sensor sources. The boottime timestamp is identical to monotonic timestamp, except it also includes any time that the system is suspended. Signed-off-by: Jungo Lin <jungo.lin@mediatek.com> --- Documentation/media/uapi/v4l/buffer.rst | 11 ++++++++++- include/uapi/linux/videodev2.h | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-)