diff options
author | Tomi Valkeinen <[email protected]> | 2024-04-24 18:39:12 +0300 |
---|---|---|
committer | Hans Verkuil <[email protected]> | 2024-06-04 08:31:25 +0200 |
commit | b62949ddaa52e7612d3bbd90095079f97946c821 (patch) | |
tree | f498d0bcda153d193c04ea75bc2aca18c6031f22 /tools/perf/scripts/python/syscall-counts.py | |
parent | 86862307606b9f07d36097f7c9f018ad04f36ce0 (diff) |
media: subdev: Support single-stream case in v4l2_subdev_enable/disable_streams()
At the moment the v4l2_subdev_enable/disable_streams() functions call
fallback helpers to handle the case where the subdev only implements
.s_stream(), and the main function handles the case where the subdev
implements streams (V4L2_SUBDEV_FL_STREAMS, which implies
.enable/disable_streams()).
What is missing is support for subdevs which do not implement streams
support, but do implement .enable/disable_streams(). Example cases of
these subdevices are single-stream cameras, where using
.enable/disable_streams() is not required but helps us remove the users
of the legacy .s_stream(), and subdevices with multiple source pads (but
single stream per pad), where .enable/disable_streams() allows the
subdevice to control the enable/disable state per pad.
The two single-streams cases (.s_stream() and .enable/disable_streams())
are very similar, and with small changes we can change the
v4l2_subdev_enable/disable_streams() functions to support all three
cases, without needing separate fallback functions.
A few potentially problematic details, though:
- For the single-streams cases we use sd->enabled_pads field, which
limits the number of pads for the subdevice to 64. For simplicity I
added the check for this limitation to the beginning of the function,
and it also applies to the streams case.
- The fallback functions only allowed the target pad to be a source pad.
It is not very clear to me why this check was needed, but it was not
needed in the streams case. However, I doubt the
v4l2_subdev_enable/disable_streams() code has ever been tested with
sink pads, so to be on the safe side, I added the same check
to the v4l2_subdev_enable/disable_streams() functions.
Reviewed-by: Laurent Pinchart <[email protected]>
Tested-by: Umang Jain <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions