diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2013-12-16 05:45:37 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-07 06:51:41 -0200 |
commit | aa32f4c0bcce7dac55bf2639f4a6cf37c5c96934 (patch) | |
tree | 04bc0b91fe4ec0f5983f13673391a08505dd72ef /drivers/media/v4l2-core/v4l2-dev.c | |
parent | 3fe6d4b9620a653f46c5566016c8b060d21e0543 (diff) | |
download | linux-aa32f4c0bcce7dac55bf2639f4a6cf37c5c96934.tar.gz linux-aa32f4c0bcce7dac55bf2639f4a6cf37c5c96934.tar.bz2 linux-aa32f4c0bcce7dac55bf2639f4a6cf37c5c96934.zip |
[media] v4l2: move tracepoints to video_usercopy
The (d)qbuf ioctls were traced in the low-level v4l2 ioctl function. The
trace was outside the serialization lock, so that can affect the usefulness
of the timing. In addition, the __user pointer was expected instead of a
proper kernel pointer.
By moving the tracepoints to video_usercopy we ensure that the trace calls
use the correct kernel pointer, and that it happens right after the ioctl
call to the driver, so certainly inside the serialization lock.
In addition, we only trace if the call was successful.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Wade Farnsworth <wade_farnsworth@mentor.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-dev.c')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-dev.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index 1cc17496b202..b5aaaac427ad 100644 --- a/drivers/media/v4l2-core/v4l2-dev.c +++ b/drivers/media/v4l2-core/v4l2-dev.c @@ -31,10 +31,6 @@ #include <media/v4l2-device.h> #include <media/v4l2-ioctl.h> - -#define CREATE_TRACE_POINTS -#include <trace/events/v4l2.h> - #define VIDEO_NUM_DEVICES 256 #define VIDEO_NAME "video4linux" @@ -395,11 +391,6 @@ static long v4l2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) } else ret = -ENOTTY; - if (cmd == VIDIOC_DQBUF) - trace_v4l2_dqbuf(vdev->minor, (struct v4l2_buffer *)arg); - else if (cmd == VIDIOC_QBUF) - trace_v4l2_qbuf(vdev->minor, (struct v4l2_buffer *)arg); - return ret; } |