Age | Commit message (Collapse) | Author |
|
Fix focus position HW abstraction algorithm.
The new algorithm uses a best-fit loop that allows for extra
focus positions at each end of the focus range.
Bug 909087
Change-Id: Ib25913e6ad5a6644a550f76cba94800bd664143e
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/70466
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
|
|
- Added multi-instance support with sync capability
- Added GLOS power scheme
- Standardized the IOCTL API
Bug 860351
Bug 850614
Bug 852480
Bug 872156
Bug 824459
Change-Id: I858edfb4437ca1f7121790a5580b8825a8d925ae
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/66164
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
|
|
- Added multi-instance support with sync capability
- Added GLOS power scheme
- Standardized the IOCTL API
Bug 865305
Change-Id: I37bcf306477d30589f3985d9370c59450842d340
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/66116
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Gerrit_Virtual_Submit
Rebase-Id: Rb4fb40adf45cfd5359ebc4da6efc0ff2b0beeb9e
|
|
This is the common header for the camera devices:
imager, focuser, and torch.
Bug 852480
Change-Id: I0a7d7486ca71e97f1ff7f923795146b3e151eb12
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/66419
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Gerrit_Virtual_Submit
Rebase-Id: R812b8f9b958706565a512380abe4e1be3a567c6b
|
|
- Added multi-instance support with sync capability
- Added GLOS power scheme
- Standardized the IOCTL API
Bug 882012
Bug 866726
Bug 896181
Bug 894789
Bug 861828
Bug 852480
Bug 872156
Change-Id: Ic315a9ed404854e13568c5b5afae60415a19b093
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/66052
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R516fb9110c4fc654ba0d3e1289a3d0eb938a805d
|
|
move the set mode table from odm driver to the kernel driver.
Bug 856739
Original Gerrit: http://git-master/r/#change,60741
(cherry picked from commit 18e2d9f8b61767a4dc0df7621531d1b040fe3ca0)
Change-Id: I22fd3e012c3f91a0c7cd07a00ae25987b4cb75dd
Reviewed-on: http://git-master/r/61666
Reviewed-by: Charlie Huang <chahuang@nvidia.com>
Tested-by: Charlie Huang <chahuang@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Rebase-Id: R75397527d8b9b33c186b71d87866f8ca5ab2f9c3
|
|
Add support of Sunny P8M01E module (AKA aptina 8141)
This new module is identical with 8140 plus pixel improvement.
Use different recommended register settings for each sensor.
Add function to figure out the sensor id and let the odm driver
pick up the right config data.
Bug 868929
Original Gerrit: http://git-master/r/#change,53022
(cherry picked from commit f59f83468f71980c9ce3204df3a34f2aafffc512)
Change-Id: Ibed03f01b13a22a75753f8495ab17eb6077a99d3
Reviewed-on: http://git-master/r/60765
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R10688d303b3b7c401a58c8fb069654dade019d47
|
|
Support for OV14810 (14MP) sensor
Bug 839441
Reviewed-on: http://git-master/r/47714
(cherry picked from commit 2a9be1047fe93fba46c32edf60054261cc90970b)
Change-Id: Ib5c55c56017f4f18312c5b4fdc2c884857003f5f
Reviewed-on: http://git-master/r/58657
Reviewed-by: Krupal Divvela <kdivvela@nvidia.com>
Tested-by: Krupal Divvela <kdivvela@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: Ra0bf2a7d2fdfff8303dcdb84b8655afce11a4a12
|
|
Enable pd2vi_clk in case of Null sensor
Bug 870406
Reviewed-on: http://git-master/r/50822
(cherry picked from commit 4eaca0ed7652aacf1bf56d1f7ad1ff1bd39c73a9)
Change-Id: Ie508e3addf4e757201bed9499dbba2887a8d423f
Reviewed-on: http://git-master/r/55199
Tested-by: Krupal Divvela <kdivvela@nvidia.com>
Reviewed-by: Prayas Mohanty <pmohanty@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: Rdc286d25cf01b6bae9e50accf618cb96e17c5bd9
|
|
In struct tegra_camera_clk_info adding member flag.
This will create a same IOCTL number for TEGRA_CAMERA_IOCTL_CLK_SET_RATE
as of user space.
Bug 872674
Change-Id: I23c725a50bad429b27498662370698c6734f82d5
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: http://git-master/r/51762
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: Rc70f14f716ed3df266d0ba37f993b29aa6c639a4
|
|
Add IOCTL (OV5650_IOCTL_SET_BINNING) that user code
can access to registers which have 2x2 binning control
bits.
Bug 835589
Original-Change-Id: I07f8d3536fcdb92e8bae0af294d1a0f8523cefbc
Reviewed-on: http://git-master/r/43727
Tested-by: Changyeon Jo <cjo@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R36b1a800652a73e5b51dd56f30e0f56f6dda7d36
|
|
The sh532u focuser is enabled to pair with the stereo right camera
with the required power control configurations.
Bug 827897
Original-Change-Id: Icc21bcd2327671da193a8b8f24c338b0b2f6729c
Reviewed-on: http://git-master/r/36571
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R5c6dcd9b9c2bc7ab89870ee13da408ee0a392276
|
|
initial support for sensor ov9726
bug 829399
Original-Change-Id: I67315dfce7baf2c14f49bf526c10fe19cf32d1d3
Reviewed-on: http://git-master/r/40472
Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
Reviewed-by: Chonglei Huang <chahuang@nvidia.com>
Tested-by: Chonglei Huang <chahuang@nvidia.com>
Rebase-Id: R31312b2b0fda96348bb14461651ccb27aa30b0de
|
|
Separate board specific sequence from ar0832 driver and add it to board
files. Add function that changes device slave address in real time to support
multiple devices in the same I2C bus.
Bug 844021
Original-Change-Id: I48641909eb531b4ba827096bc30fa4eccf83469e
Reviewed-on: http://git-master/r/40385
Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Tested-by: Jihoon Bang <jbang@nvidia.com>
Rebase-Id: R4b761bd3b09ed2b0101b03e8be737c25e5c3ee5f
|
|
Support only one sensor for now.
Original-Change-Id: I1d0b804077e271052a6d6f4554865675fa70d612
Reviewed-on: http://git-master/r/36779
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R88b01bf956bdfabd8f13d883ea93a7d8e542d248
|
|
Kernel driver for TPS61050 flash/torch camera device.
Bug 794431
Original-Change-Id: I760bd086c283076dc7136bd8ccd6b75e6e823ea8
Reviewed-on: http://git-master/r/34208
Tested-by: Erik M Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-by: Michael Stewart <mstewart@nvidia.com>
Reviewed-by: John Sasinowski <jsasinowski@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: Radb862760f165e40b764b3bb104787427d024c7e
|
|
update headers for camera files
bug 846086
Original-Change-Id: Id53c77ead17b569ad05c0a5b8ec7f2a5d1aef869
Reviewed-on: http://git-master/r/39102
Reviewed-by: Erik M Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-by: Abhinav Sinha <absinha@nvidia.com>
Reviewed-by: Michael Stewart <mstewart@nvidia.com>
Tested-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
Rebase-Id: R4526cd043ef49dfa4a0c48f5942fca57e81eb4f0
|
|
For stereo camera, it is important that both sensors
should start sending data at the same time for them to
be in sync. Add IOCTL (OV5650_IOCTL_SYNC_SENSORS),
which user code can access to synchronize both sensors.
bug 787214
bug 786928
Original-Change-Id: I6bf34a8af3b7dd51150d5c0247b6787b824c1dae
Reviewed-on: http://git-master/r/30005
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R1b655e1a02514cf0f2258650f6ad86a479a2eabe
|
|
When device sh532u is open, it calls board related initialization
and de- initialization function.
In the board related functions, the client can initialize the required
signal, power on/off the device etc.
bug 802264
Original-Change-Id: Ie69a6e70c5d104489d248bef538e89263208ee54
Reviewed-on: http://git-master/r/30169
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Danielle Sun <dsun@nvidia.com>
Tested-by: Danielle Sun <dsun@nvidia.com>
Reviewed-by: Prayas Mohanty <pmohanty@nvidia.com>
Rebase-Id: R026fbf2cd53dfd839875c3edb97aca5b037120c4
|
|
Return last requested position if the motor settled or timeout occurs.
Original-Change-Id: Ib0ff58b827fcf871dbf185eb0a284b7fe010aef2
Reviewed-on: http://git-master/r/27978
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Andrei Denissov <adenissov@nvidia.com>
Reviewed-by: Gary Zhang <garyz@nvidia.com>
Tested-by: Gary Zhang <garyz@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Rebase-Id: Rd5395077ebfd868f65cea951176962594dc476ad
|
|
Original-Change-Id: I6f0bc3b5859c8545853051f10bda60ab6ac3dd8b
Bug 819975
Reviewed-on: http://git-master/r/29467
(cherry picked from commit 9c4eac8a44eef360c2e5be07838fecc78096847f)
Original-Change-Id: If868656a2c8811593974723e85010257b07ed22b
Reviewed-on: http://git-master/r/29972
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Tested-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R61798483f1cdcb2c6aec458a36e88ca509de92c9
|
|
Bug: 783488
Original-Change-Id: I0d70ec5bb0fd880b167e9ced0e002829abeccdbf
Reviewed-on: http://git-master/r/24969
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R83f2674bdf0300e8fba97c50e55649ff68ad18a2
|
|
Add AD5820 focuser driver for Whistler.
Bug 783488
Original-Change-Id: I0d8a08e7df9f472ffc4edfe7bfa255357bff5126
Reviewed-on: http://git-master/r/26970
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R504af41accb317526f17265a2975efa3d42a8947
|
|
-Removed unused sensor mode mode_1920x1088
-Added ov5650_write_reg_helper function to do write_reg()
according to camera_mode.
-ov5650_get_status function is removed as it is reading reg 2
value and there is not any definition of reg 2 in datasheet and
even user space is not using it's value at all.
-Added ov5650_set_power function to on/off camera sensors power
according to camera_mode.
-Added ioctl OV5650_IOCTL_SET_CAMERA_MODE to set camera_mode
from user space.
-Added i2c driver for right ov5650.
Bug 809921
Original-Change-Id: Ib3cf43d0a064c18c218d0850e849fff84e18e661
Reviewed-on: http://git-master/r/26857
Tested-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: George Bauernschmidt <georgeb@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: Rf6847be1ff260ea91798a29fbd2ff6d7e26e1711
|
|
- fix an incorrect i2c address and a function return check.
- add checks for function returns.
- remove the developer name in the beginning comment.
- fix an uninitialized variable..
Original-Change-Id: I2d42025b7ff47eb6228e626e65990f4da04b94ac
Reviewed-on: http://git-master/r/23594
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
Tested-by: Qinggang Zhou <qzhou@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Rebase-Id: R2fcab8b5c5b997791861629c230bbd25e5f42c90
|
|
This focuser is from SEMCO and is integrated with OV5650 sensor and LC898211 driver.
bug 778859
Original-Change-Id: I6e5dcc129c72aed7d92a00a1d926424050583c1d
Reviewed-on: http://git-master/r/22711
Reviewed-by: Qinggang Zhou <qzhou@nvidia.com>
Tested-by: Qinggang Zhou <qzhou@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
Rebase-Id: R03b55358626eb34807ce5514e1eee5731124619e
|
|
Original-Change-Id: Id5cb40c9823c7fcfd26e45e4608c45b16a2d431a
Reviewed-on: http://git-master/r/21351
Reviewed-by: Erik M Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik M Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-by: George Bauernschmidt <georgeb@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R3a3c1112d59a61c52e8a35944d77603154a9598e
|
|
Original-Change-Id: Ie894d71f45cc08709daff3f258e0c4676b7778b0
Reviewed-on: http://git-master/r/19687
Reviewed-by: Nathan Lord <nlord@nvidia.com>
Tested-by: Nathan Lord <nlord@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R33fa5212af3b1fdd59fb66318419e9187f6a3b5a
|
|
Original-Change-Id: I9d9a9a301f23398a13fa7d865058f384288f6c92
Reviewed-on: http://git-master/r/18537
Reviewed-by: Nathan Lord <nlord@nvidia.com>
Tested-by: Nathan Lord <nlord@nvidia.com>
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: Rddda80e10e9494770257961b12079e7cd345c3a0
|
|
Original-Change-Id: I127ea2a132adf2126c28194e8d778cc46b0a2e63
Reviewed-on: http://git-master/r/10573
Reviewed-by: Chien-Yu Chen <chichen@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R6b57bbe4286b088fe474e57d5fbfd0314b915a9d
|
|
The tegra_camera device includes all clock and regulator
functionality needed to support camera on tegra.
Change-Id: I281f1cb5f360276af832309e35dbe17c98b62bb3
Signed-off-by: Dima Zavin <dima@android.com>
|
|
This is an initial driver release for the Omnivision 5642 CMOS sensor.
Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Now that v4l2 subdevices have got their own device objects, having
one more device in soc-camera clients became redundant and confusing.
This patch removes those devices and the soc-camera bus, they used to
reside on.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
The soc-camera bus is now completely local again.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
This moves us one more step closer to eliminating the soc-camera bus
and devices on it. Besides, as a side effect, CSI-2 runtime PM on
sh-mobile secomes finer grained now: we only have to power on the
interface, when the device nodes are open.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Add media bus configuration types and two subdev operations to get
supported mediabus configurations and to set a specific configuration.
Subdevs can support several configurations, e.g., they can send video data
on 1 or several lanes, can be configured to use a specific CSI-2 channel,
in such cases subdevice drivers return bitmasks with all respective bits
set. When a set-configuration operation is called, it has to specify a
non-ambiguous configuration.
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
soc-camera host drivers shall be implementing their PM, using standard
kernel methods, soc-camera specific hooks can die.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Callback is used to acquire current analog TV standard from a subdev.
It is used to avoid keeping current standard in top-level driver.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Callback is used to acquire current digital video preset from a subdev.
It is used to avoid keeping dv preset in top-level driver.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Callback is used to acquire TV norms supported by a subdev.
It is used to avoid having standards in top-level driver.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
This is a custom IR protocol decoder, for the RC-6-ish protocol used by
the Microsoft Remote Keyboard, apparently developed internally at
Microsoft, and officially dubbed MCIR-2, per their March 2011 remote and
transceiver requirements and specifications document, which also touches
on this IR keyboard/mouse device.
Its a standard keyboard with embedded thumb stick mouse pointer and
mouse buttons, along with a number of media keys. The media keys are
standard RC-6, identical to the signals from the stock MCE remotes, and
will be handled as such. The keyboard and mouse signals will be decoded
and delivered to the system by an input device registered specifically
by this driver.
Successfully tested with multiple mceusb-driven transceivers, as well as
with fintek-cir and redrat3 hardware. Essentially, any raw IR hardware
with enough sampling resolution should be able to use this decoder,
nothing about it is at all receiver-hardware-specific.
This work is inspired by lirc_mod_mce:
The documentation there and code aided in understanding and decoding the
protocol, but the bulk of the code is actually borrowed more from the
existing in-kernel decoders than anything. I did recycle the keyboard
keycode table, a few defines, and some of the keyboard and mouse data
parsing bits from lirc_mod_mce though.
Special thanks to James Meyer for providing the hardware, and being
patient with me as I took forever to get around to writing this.
callback routine to ensure we don't get any stuck keys, and used
symbolic names for the keytable. Also cc'ing Florian this time, who I
believe is the original mod-mce author...
CC: Florian Demski <fdemski@users.sourceforge.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
This patch adds the driver for the adp1653 LED flash controller. This
controller supports a high power led in flash and torch modes and an
indicator light, sometimes also called privacy light.
The adp1653 is used on the Nokia N900.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Tuukka Toivonen <tuukkat76@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: David Cohen <dacohen@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
It's getting confusing who is linking to what, so add an overview at
the start of the header.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Thanks to Laurent Pinchart <laurent.pinchart@ideasonboard.com>.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
The implementation of VIDIOC_G/S/TRY_EXT_CTRLS in the control framework has
to figure out which controls in the control list belong to the same cluster.
Since controls belonging to the same cluster need to be handled as a unit,
this is important information.
It did that by going over the controls in the list and for each control that
belonged to a multi-control cluster it would walk the remainder of the list
to try and find controls that belong to that same cluster.
This approach has two disadvantages:
1) it was a potentially quadratic algorithm (although highly unlikely that
it would ever be that bad in practice).
2) it took place with the control handler's lock held.
Since we want to make it possible in the future to change control values
from interrupt context, doing a lot of work while holding a lock is not a
good idea.
In the new code the algorithm is no longer quadratic but linear in the
number of controls in the list. Also, it now can be done beforehand.
Another change that was made was to so the try and set at the same time.
Before when S_TRY_EXT_CTRLS was called it would 'try' the controls first,
and then it would 'set' them. The idea was that any 'try' errors would
prevent the 'set' from happening, thus avoiding having partially set
control lists.
However, this caused more problems than it solved because between the 'try'
and the 'set' changes might have happened, so it had to try a second time,
and since actual controls with a try_ctrl op are very rare (and those that
we have just adjust values and do not return an error), I've decided to
drop that two-stage approach and just combine try and set.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
When the event queue for a subscribed event is full, then the oldest
event is dropped. It would be nice if the contents of that oldest
event could be merged with the next-oldest. That way no information is
lost, only intermediate steps are lost.
This patch adds optional replace() (called when only one kevent was allocated)
and merge() (called when more than one kevent was allocated) callbacks that
will be called to do this job.
These two callbacks are implemented for the V4L2_EVENT_CTRL event.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
just per-fh
The driver had to decide how many events to allocate when the v4l2_fh struct
was created. It was possible to add more events afterwards, but there was no
way to ensure that you wouldn't miss important events if the event queue
would fill up for that filehandle.
In addition, once there were no more free events, any new events were simply
dropped on the floor.
For the control event in particular this made life very difficult since
control status/value changes could just be missed if the number of allocated
events and the speed at which the application read events was too low to keep
up with the number of generated events. The application would have no idea
what the latest state was for a control since it could have missed the latest
control change.
So this patch makes some major changes in how events are allocated. Instead
of allocating events per-filehandle they are now allocated when subscribing an
event. So for that particular event type N events (determined by the driver)
are allocated. Those events are reserved for that particular event type.
This ensures that you will not miss events for a particular type altogether.
In addition, if there are N events in use and a new event is raised, then
the oldest event is dropped and the new one is added. So the latest event
is always available.
This can be further improved by adding the ability to merge the state of
two events together, ensuring that no data is lost at all. This will be
added in the next patch.
This also makes it possible to allow the user to determine the number of
events that will be allocated. This is not implemented at the moment, but
would be trivial.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
v4l2_subscribed_event
The v4l2_ctrl_fh struct connected v4l2_ctrl with v4l2_fh so the control
would know which filehandles subscribed to it. However, it is much easier
to use struct v4l2_subscribed_event directly for that and get rid of that
intermediate struct.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Drivers that supported events used to be rare, but now that controls can also
raise events this will become much more common since almost all drivers have
controls.
This means that keeping struct v4l2_events as a separate struct make no more
sense. Merging it into struct v4l2_fh simplifies things substantially as it
is now an integral part of the filehandle struct.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
This patch is to enable Atmel Image Sensor Interface (ISI) driver support.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|