Skip to contentSkip to conversation

Small link frequency and pixel rate documentation improvements

PATCH In review Sakari Ailus 2 participants 4 messages Oct 13, 2020

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

cover Small link frequency and pixel rate documentation improvements

Hi all,

This small set improve documentation on required controls for parallel and CSI-2 camera sensor drivers.

Sakari Ailus (2):
Documentation: v4l: Fix language
Documentation: v4l: Document required controls on camera sensors

 Documentation/driver-api/media/camera-sensor.rst | 13 +++++++++++++
 Documentation/driver-api/media/csi2.rst          |  7 +++----
 2 files changed, 16 insertions(+), 4 deletions(-)
Signature · 1 line
2.27.0
author maintainer
#1 lore raw

PATCH 1/2 Documentation: v4l: Fix language

Remove extra "is" from sentence explaining V4L2_CID_PIXEL_RATE may be used to tell the pixel rate used by a transmitter driver. Also call V4L2_CID_PIXEL_RATE a control.

---
 Documentation/driver-api/media/csi2.rst | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Documentation/driver-api/media/csi2.rst +3 -4
index e1b838014906..e3bbc6baf0f0 100644
@@ -28,10 +28,9 @@ interface elements must be present on the sub-device represents the
 CSI-2 transmitter.
 
 The V4L2_CID_LINK_FREQ control is used to tell the receiver driver the
-frequency (and not the symbol rate) of the link. The
-V4L2_CID_PIXEL_RATE is may be used by the receiver to obtain the pixel
-rate the transmitter uses. The
-:c:type:`v4l2_subdev_video_ops`->s_stream() callback provides an
+frequency (and not the symbol rate) of the link. The V4L2_CID_PIXEL_RATE
+control may be used by the receiver to obtain the pixel rate the transmitter
+uses. The :c:type:`v4l2_subdev_video_ops`->s_stream() callback provides an
 ability to start and stop the stream.
 
 The value of the V4L2_CID_PIXEL_RATE is calculated as follows::
Signature · 1 line
2.27.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] Documentation: v4l: Fix language

Hi Sakari,

Thank you for the patch.

Quoted 5 lines · Sakari Ailus

Remove extra "is" from sentence explaining V4L2_CID_PIXEL_RATE may be used to tell the pixel rate used by a transmitter driver. Also call V4L2_CID_PIXEL_RATE a control.

Quoted 22 lines
---
 Documentation/driver-api/media/csi2.rst | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Documentation/driver-api/media/csi2.rst +3 -4
index e1b838014906..e3bbc6baf0f0 100644
@@ -28,10 +28,9 @@ interface elements must be present on the sub-device represents the
 CSI-2 transmitter.
 
 The V4L2_CID_LINK_FREQ control is used to tell the receiver driver the
-frequency (and not the symbol rate) of the link. The
-V4L2_CID_PIXEL_RATE is may be used by the receiver to obtain the pixel
-rate the transmitter uses. The
-:c:type:`v4l2_subdev_video_ops`->s_stream() callback provides an
+frequency (and not the symbol rate) of the link. The V4L2_CID_PIXEL_RATE
+control may be used by the receiver to obtain the pixel rate the transmitter
+uses. The :c:type:`v4l2_subdev_video_ops`->s_stream() callback provides an
 ability to start and stop the stream.
 
 The value of the V4L2_CID_PIXEL_RATE is calculated as follows::
Signature · 3 lines
Regards,

Laurent Pinchart
author maintainer
#3 lore raw

PATCH 2/2 Documentation: v4l: Document required controls on camera sensors

In reply to Sakari Ailus

Raw camera sensors connected to parallel or CSI-2 busses need to implement V4L2_CID_LINK_FREQ control so receiver drivers can configure the hardware accordingly.

Document this. Also say V4L2_CID_PIXEL_RATE is recommended for such hardware.

---
 Documentation/driver-api/media/camera-sensor.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Documentation/driver-api/media/camera-sensor.rst +13 -0
index 4d1ae12b9b4d..ffb0cad8137a 100644
@@ -132,3 +132,16 @@ used to obtain device's power state after the power state transition:
 The function returns a non-zero value if it succeeded getting the power count or
 runtime PM was disabled, in either of which cases the driver may proceed to
 access the device.
+
+Controls
+--------
+
+For camera sensors that are connected to a bus where transmitter and receiver
+require common configuration set by drivers, such as CSI-2 or parallel (BT.601
+or BT.656) bus, the ``V4L2_CID_LINK_FREQ`` control is mandatory on transmitter
+drivers. Receiver drivers can use the ``V4L2_CID_LINK_FREQ`` to query the
+frequency used on the bus.
+
+The transmitter drivers should also implement ``V4L2_CID_PIXEL_RATE`` control in
+order to tell the maximum pixel rate to the receiver. This is required on raw
+camera sensors.
Signature · 1 line
2.27.0