upstream: [media] v4l2: move tracepoints to video_usercopy
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 16 Dec 2013 08:45:37 +0000 (05:45 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:55:33 +0000 (11:55 +0900)
commit745c5ada8a6c2e33d19ac9cef22e8751c103db4f
tree0bb2d324c0409750b4fd618b302dfffe422ad089
parent3d4b3861ef9681244ade384a4e18375b7c3d1862
upstream: [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