Provide a serialisation mechanism for subdev ops
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | v4l: subdev: Set sd->devnode before registering the subdevdrivers/ | +2 | 1 reply | |
| 2/6 | v4l: subdev: Provide a locking scheme for subdev operationsinclude/ | +17 | 2 replies | |
| 3/6 | smiapp: Error handling cleanups and fixesdrivers/ | +26 | 0 replies | |
| 4/6 | smiapp: Rely on V4L2 sub-device framework to do the lockingdrivers/ | +36 | 0 replies | |
| 5/6 | smiapp: Remove the active field from sensor's structdrivers/ drivers/ drivers/ | +0 | 0 replies | |
| 6/6 | smiapp: Avoid fall-through in switchdrivers/ | +5 | 4 replies |
Reviews trailers per patch
2 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Hans Verkuil |
|---|---|
| 1/6 | R-b |
| 2/6 | |
| 3/6 | |
| 4/6 | |
| 5/6 | |
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/6] Provide a serialisation mechanism for subdev ops
Hi folks,
While access to the V4L2 device nodes was conveniently serialised for devices the drivers of which used the V4L2 framework, this was no the case for sub-devices that also may be called from other drivers.
Instead acquire the lock to the v4l2_subdev_call macro.
This set adds the capability to the framework and makes smiapp use it.
This is a big change. I'm still not posting this as RFC as the feature is entirely optional. Albeit I'd expect new drivers to use it in the future:
quite a bit of code was removed from the smiapp driver as a result (there were other cleanups, too).
Generally drivers that handle multiple sub-devices need to take special care when making nested calls (hopefully as few as possible, but starting streaming comes to mind). We may need an unlocked variant of the macro as well.
Sakari Ailus (6):
v4l: subdev: Set sd->devnode before registering the subdev
v4l: subdev: Provide a locking scheme for subdev operations
smiapp: Error handling cleanups and fixes
smiapp: Rely on V4L2 sub-device framework to do the locking
smiapp: Remove the active field from sensor's struct
smiapp: Avoid fall-through in switch
drivers/media/i2c/smiapp/smiapp-core.c | 203 ++++++++----------------- drivers/media/i2c/smiapp/smiapp-regs.c | 3 - drivers/media/i2c/smiapp/smiapp.h | 1 - drivers/media/v4l2-core/v4l2-device.c | 3 +- include/media/v4l2-subdev.h | 25 ++- 5 files changed, 86 insertions(+), 149 deletions(-)
Signature · 1 line
2.20.1