diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-11-26 04:47:28 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-01 17:10:19 -0500 |
commit | 879aa24d6394aa04b690a600a41ff500441ad384 (patch) | |
tree | 024886e8a84ab3f7e88c1e2c5aeceae28cc344bb /include/media/v4l2-device.h | |
parent | 2877842de8cbf6272b0a851cb12587b7dd8c2afb (diff) |
[media] V4L: improve the BKL replacement heuristic
The BKL replacement mutex had some serious performance side-effects on
V4L drivers. It is replaced by a better heuristic that works around the
worst of the side-effects.
Read the v4l2-dev.c comments for the whole sorry story. This is a
temporary measure only until we can convert all v4l drivers to use
unlocked_ioctl.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/v4l2-device.h')
-rw-r--r-- | include/media/v4l2-device.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index 6648036b728d..b16f307d471a 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h | |||
@@ -51,6 +51,8 @@ struct v4l2_device { | |||
51 | unsigned int notification, void *arg); | 51 | unsigned int notification, void *arg); |
52 | /* The control handler. May be NULL. */ | 52 | /* The control handler. May be NULL. */ |
53 | struct v4l2_ctrl_handler *ctrl_handler; | 53 | struct v4l2_ctrl_handler *ctrl_handler; |
54 | /* BKL replacement mutex. Temporary solution only. */ | ||
55 | struct mutex ioctl_lock; | ||
54 | }; | 56 | }; |
55 | 57 | ||
56 | /* Initialize v4l2_dev and make dev->driver_data point to v4l2_dev. | 58 | /* Initialize v4l2_dev and make dev->driver_data point to v4l2_dev. |