@@ -559,23 +559,17 @@ Buffer Flags
:ref:`VIDIOC_PREPARE_BUF <VIDIOC_QBUF>`,
:ref:`VIDIOC_QBUF` or
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called.
- * .. _`V4L2-BUF-FLAG-NO-CACHE-INVALIDATE`:
+ * .. _`V4L2-BUF-FLAG-NO-CACHE-SYNC`:
- - ``V4L2_BUF_FLAG_NO_CACHE_INVALIDATE``
+ - ``V4L2_BUF_FLAG_NO_CACHE_SYNC``
- 0x00000800
- - Caches do not have to be invalidated for this buffer. Typically
- applications shall use this flag if the data captured in the
- buffer is not going to be touched by the CPU, instead the buffer
- will, probably, be passed on to a DMA-capable hardware unit for
- further processing or output.
- * .. _`V4L2-BUF-FLAG-NO-CACHE-CLEAN`:
-
- - ``V4L2_BUF_FLAG_NO_CACHE_CLEAN``
- - 0x00001000
- - Caches do not have to be cleaned for this buffer. Typically
- applications shall use this flag for output buffers if the data in
- this buffer has not been created by the CPU but by some
- DMA-capable unit, in which case caches have not been used.
+ - Do not perform CPU cache synchronisation operations when the buffer is
+ queued or dequeued. The user is responsible for the correct use of
+ this flag. It should be only used when the buffer is not accessed
+ using the CPU, e.g. the buffer is written to by a hardware block and
+ then read by another one, in which case the flag should be set in both
+ :ref:`VIDIOC_QBUF` and :ref:`VIDIOC_DQBUF` ioctls. This flag has no
+ effect on some devices / architectures.
* .. _`V4L2-BUF-FLAG-LAST`:
- ``V4L2_BUF_FLAG_LAST``
@@ -36,9 +36,8 @@ pass ownership of the buffer to the driver before actually enqueuing it,
using the :ref:`VIDIOC_QBUF` ioctl, and to prepare it for future I/O. Such
preparations may include cache invalidation or cleaning. Performing them
in advance saves time during the actual I/O. In case such cache
-operations are not required, the application can use one of
-``V4L2_BUF_FLAG_NO_CACHE_INVALIDATE`` and
-``V4L2_BUF_FLAG_NO_CACHE_CLEAN`` flags to skip the respective step.
+operations are not required, the application can use the
+``V4L2_BUF_FLAG_NO_CACHE_SYNC`` flag to skip the cache synchronization step.
The struct :c:type:`v4l2_buffer` structure is specified in
:ref:`buffer`.
@@ -81,8 +81,7 @@ SHOW_FIELD
{ V4L2_BUF_FLAG_ERROR, "ERROR" }, \
{ V4L2_BUF_FLAG_TIMECODE, "TIMECODE" }, \
{ V4L2_BUF_FLAG_PREPARED, "PREPARED" }, \
- { V4L2_BUF_FLAG_NO_CACHE_INVALIDATE, "NO_CACHE_INVALIDATE" }, \
- { V4L2_BUF_FLAG_NO_CACHE_CLEAN, "NO_CACHE_CLEAN" }, \
+ { V4L2_BUF_FLAG_NO_CACHE_SYNC, "NO_CACHE_SYNC" }, \
{ V4L2_BUF_FLAG_TIMESTAMP_MASK, "TIMESTAMP_MASK" }, \
{ V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN, "TIMESTAMP_UNKNOWN" }, \
{ V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC, "TIMESTAMP_MONOTONIC" }, \
@@ -939,8 +939,11 @@ struct v4l2_buffer {
#define V4L2_BUF_FLAG_TIMECODE 0x00000100
/* Buffer is prepared for queuing */
#define V4L2_BUF_FLAG_PREPARED 0x00000400
-/* Cache handling flags */
-#define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x00000800
+/* Cache sync hint */
+#define V4L2_BUF_FLAG_NO_CACHE_SYNC 0x00000800
+/* DEPRECATED. THIS WILL BE REMOVED IN THE FUTURE! */
+#define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE V4L2_BUF_FLAG_NO_CACHE_SYNC
+/* DEPRECATED. THIS WILL BE REMOVED IN THE FUTURE! */
#define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x00001000
/* Timestamp type */
#define V4L2_BUF_FLAG_TIMESTAMP_MASK 0x0000e000