[media] v4l2: move tracepoints to video_usercopy
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 16 Dec 2013 08:45:37 +0000 (05:45 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 7 Jan 2014 08:51:41 +0000 (06:51 -0200)
commitaa32f4c0bcce7dac55bf2639f4a6cf37c5c96934
tree04bc0b91fe4ec0f5983f13673391a08505dd72ef
parent3fe6d4b9620a653f46c5566016c8b060d21e0543
[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>
drivers/media/v4l2-core/v4l2-dev.c
drivers/media/v4l2-core/v4l2-ioctl.c