diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-05-14 11:54:27 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 14:05:55 -0400 |
commit | 74f22c48640cf39df1f9cbf4fac07f5fcd365a48 (patch) | |
tree | c929411038c524d82d47a4ad8f68fe5205f2d7f3 /Documentation/video4linux/v4l2-framework.txt | |
parent | a299e407b9ef356bf14fbb49793dc026877440df (diff) |
[media] v4l2-framework.txt: update the core lock documentation
Thanks to Laurent Pinchart for pointing out that this information was missing.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/video4linux/v4l2-framework.txt')
-rw-r--r-- | Documentation/video4linux/v4l2-framework.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 0dace876b978..c24a9393dbb9 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -590,8 +590,8 @@ You should also set these fields: | |||
590 | future!), then set this to your v4l2_ioctl_ops struct. | 590 | future!), then set this to your v4l2_ioctl_ops struct. |
591 | 591 | ||
592 | - lock: leave to NULL if you want to do all the locking in the driver. | 592 | - lock: leave to NULL if you want to do all the locking in the driver. |
593 | Otherwise you give it a pointer to a struct mutex_lock and before any | 593 | Otherwise you give it a pointer to a struct mutex_lock and before the |
594 | of the v4l2_file_operations is called this lock will be taken by the | 594 | unlocked_ioctl file operation is called this lock will be taken by the |
595 | core and released afterwards. See the next section for more details. | 595 | core and released afterwards. See the next section for more details. |
596 | 596 | ||
597 | - prio: keeps track of the priorities. Used to implement VIDIOC_G/S_PRIORITY. | 597 | - prio: keeps track of the priorities. Used to implement VIDIOC_G/S_PRIORITY. |
@@ -652,8 +652,8 @@ v4l2_file_operations and locking | |||
652 | 652 | ||
653 | You can set a pointer to a mutex_lock in struct video_device. Usually this | 653 | You can set a pointer to a mutex_lock in struct video_device. Usually this |
654 | will be either a top-level mutex or a mutex per device node. By default this | 654 | will be either a top-level mutex or a mutex per device node. By default this |
655 | lock will be used for each file operation and ioctl, but you can disable | 655 | lock will be used for unlocked_ioctl, but you can disable locking for |
656 | locking for selected ioctls by calling: | 656 | selected ioctls by calling: |
657 | 657 | ||
658 | void v4l2_dont_use_lock(struct video_device *vdev, unsigned int cmd); | 658 | void v4l2_dont_use_lock(struct video_device *vdev, unsigned int cmd); |
659 | 659 | ||
@@ -674,7 +674,7 @@ of a USB webcam might take a long time), then you might be better off with | |||
674 | doing your own locking if you want to allow the user to do other things with | 674 | doing your own locking if you want to allow the user to do other things with |
675 | the device while waiting for the high-latency command to finish. | 675 | the device while waiting for the high-latency command to finish. |
676 | 676 | ||
677 | If a lock is specified then all file operations will be serialized on that | 677 | If a lock is specified then all ioctl commands will be serialized on that |
678 | lock. If you use videobuf then you must pass the same lock to the videobuf | 678 | lock. If you use videobuf then you must pass the same lock to the videobuf |
679 | queue initialize function: if videobuf has to wait for a frame to arrive, then | 679 | queue initialize function: if videobuf has to wait for a frame to arrive, then |
680 | it will temporarily unlock the lock and relock it afterwards. If your driver | 680 | it will temporarily unlock the lock and relock it afterwards. If your driver |