Skip to contentSkip to conversation

v4l: Document that m2m devices have a file handle specific context

PATCH Superseded Sakari Ailus 1 participant 2 messages Oct 18, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 v4l: Document that m2m devices have a file handle specific context

Memory-to-memory V4L2 devices all have file handle specific context. Say this in the API documentation so that the user space may rely on it being the case.

---
 Documentation/media/uapi/v4l/dev-codec.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/media/uapi/v4l/dev-codec.rst +1 -1
index d9f2184..c61e938 100644
@@ -26,7 +26,7 @@ parameters
    The MPEG controls actually support many more codecs than
    just MPEG. See :ref:`mpeg-controls`.
 
-Memory-to-memory devices can often be used as a shared resource: you can
+Memory-to-memory devices function as a shared resource: you can
 open the video node multiple times, each application setting up their
 own codec properties that are local to the file handle, and each can use
 it independently from the others. The driver will arbitrate access to
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 v4l: Document that m2m devices have a file handle specific context

Memory-to-memory V4L2 devices all have file handle specific context. Say this in the API documentation so that the user space may rely on it being the case.

---
since v1:

- Added a note to struct v4l2_m2m_queue_ctx documentation as well.

 Documentation/media/uapi/v4l/dev-codec.rst | 2 +-
 include/media/v4l2-mem2mem.h               | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
Documentation/media/uapi/v4l/dev-codec.rst +1 -1
index d9f2184..c61e938 100644
@@ -26,7 +26,7 @@ parameters
    The MPEG controls actually support many more codecs than
    just MPEG. See :ref:`mpeg-controls`.
 
-Memory-to-memory devices can often be used as a shared resource: you can
+Memory-to-memory devices function as a shared resource: you can
 open the video node multiple times, each application setting up their
 own codec properties that are local to the file handle, and each can use
 it independently from the others. The driver will arbitrate access to
include/media/v4l2-mem2mem.h +3 -0
index 1b35534..3ccd01b 100644
@@ -90,6 +90,9 @@ struct v4l2_m2m_queue_ctx {
  *		%TRANS_QUEUED, %TRANS_RUNNING and %TRANS_ABORT.
  * @finished: Wait queue used to signalize when a job queue finished.
  * @priv: Instance private data
+ *
+ * The memory to memory context is specific to a file handle, NOT to e.g.
+ * a device.
  */
 struct v4l2_m2m_ctx {
 	/* optional cap/out vb2 queues lock */
Signature · 1 line
2.7.4