Skip to contentSkip to conversation

Document link-frequencies better, small fixes

PATCH In review Sakari Ailus 2 participants 12 messages Oct 17, 2023 – Oct 18, 2023

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

v2 cover Document link-frequencies better, small fixes

Hi folks,

Here are a few small documentation improvements.

since v1:

- Fix reference.

Sakari Ailus (3):
media: Documentation: Document how link frequencies can be chosen
media: Documentation: BT.601 is not a bus
media: Documentation: LP-11 and LP-111 are states, not modes

 .../driver-api/media/camera-sensor.rst        | 18 ++++++++++++++++--
 Documentation/driver-api/media/tx-rx.rst      | 19 +++++++++----------
 .../media/drivers/camera-sensor.rst           |  2 ++
 3 files changed, 27 insertions(+), 12 deletions(-)
Signature · 1 line
2.39.2
author maintainer
#1 lore raw

PATCH v2 1/3 media: Documentation: Document how link frequencies can be chosen

Document how link frequencies can be selected for the link-frequencies property.

---
 Documentation/driver-api/media/camera-sensor.rst   | 14 ++++++++++++++
 .../userspace-api/media/drivers/camera-sensor.rst  |  2 ++
 2 files changed, 16 insertions(+)
Documentation/driver-api/media/camera-sensor.rst +14 -0
index 6456145f96ed..0de5c86cbd1f 100644
@@ -29,6 +29,20 @@ used in the system. Using another frequency may cause harmful effects
 elsewhere. Therefore only the pre-determined frequencies are configurable by the
 user.
 
+On choosing link frequencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Choosing link frequencies for a board is generally a part of the hardware design
+process as one needs to ensure an EMC-safe frequency the sensor supports with
+the given external clock frequency exists. On development systems this may be
+less than an immediate concern, so more or less anything that sensor and the
+rest of the applicable hardware supports can be used.
+
+If the sensor's PLL tree is not documented and all that is available are
+register lists, even knowing the frequency a driver uses may be difficult. This
+could still be :ref:`calculated from the number of lanes, sensor's output image
+size, blanking values and frame rate <media_camera_raw_frame_interval>`.
+
 ACPI
 ~~~~
 
Documentation/userspace-api/media/drivers/camera-sensor.rst +2 -0
index 919a50e8b9d9..e0596b85e7ec 100644
@@ -44,6 +44,8 @@ There are two different methods for obtaining possibilities for different frame
 intervals as well as configuring the frame interval. Which one to implement
 depends on the type of the device.
 
+.. _media_camera_raw_frame_interval:
+
 Raw camera sensors
 ~~~~~~~~~~~~~~~~~~
 
Signature · 1 line
2.39.2
#2 lore raw

Re: [PATCH v2 1/3] media: Documentation: Document how link frequencies can be chosen

Hi Sakari,

Thank you for the patch.

Quoted 14 lines · Sakari Ailus

Document how link frequencies can be selected for the link-frequencies property.

---
 Documentation/driver-api/media/camera-sensor.rst   | 14 ++++++++++++++
 .../userspace-api/media/drivers/camera-sensor.rst  |  2 ++
 2 files changed, 16 insertions(+)
Documentation/driver-api/media/camera-sensor.rst +0 -0
index 6456145f96ed..0de5c86cbd1f 100644

Documentation/driver-api/media/camera-sensor.rst used in the system. Using another frequency may cause harmful effects · line 37

Quoted 9 lines
Documentation/driver-api/media/camera-sensor.rst +6 -0
@@ -29,6 +29,20 @@ used in the system. Using another frequency may cause harmful effects
 elsewhere. Therefore only the pre-determined frequencies are configurable by the
 user.
 
+On choosing link frequencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Choosing link frequencies for a board is generally a part of the hardware design
+process as one needs to ensure an EMC-safe frequency the sensor supports with
+the given external clock frequency exists.

This is a bit hard to parse. I would write

Choosing link frequencies for a board is generally a part of the hardware design process as one needs to select EMC-safe frequencies that the sensor supports with the given external clock frequency.

Documentation/driver-api/media/camera-sensor.rst used in the system. Using another frequency may cause harmful effects · line 39

Quoted 3 lines

On development systems this may be

Documentation/driver-api/media/camera-sensor.rst +2 -0
+less than an immediate concern, so more or less anything that sensor and the
+rest of the applicable hardware supports can be used.

True, but it still doesn't say what to pick :-)

Q: What link frequency do I put in DT for a development board?
A: Any frequency will do.
Q: 1Hz?
A: No, it has to be supported by the sensor
Q: How do I figure that out?
A: ...

And once the range (or list) of frequencies the driver supports (for a given input clock frequency) will be known, the selection process is still not totally straightforward, as it will have implications on what resolutions and frame rates the sensor will be able to output. This is complicated even further if the sensor can support different number of data lanes.

Quoted 22 lines
Documentation/driver-api/media/camera-sensor.rst +6 -0
+
+If the sensor's PLL tree is not documented and all that is available are
+register lists, even knowing the frequency a driver uses may be difficult. This
+could still be :ref:`calculated from the number of lanes, sensor's output image
+size, blanking values and frame rate <media_camera_raw_frame_interval>`.
+
 ACPI
 ~~~~
Documentation/userspace-api/media/drivers/camera-sensor.rst +2 -0
index 919a50e8b9d9..e0596b85e7ec 100644
@@ -44,6 +44,8 @@ There are two different methods for obtaining possibilities for different frame
 intervals as well as configuring the frame interval. Which one to implement
 depends on the type of the device.
 
+.. _media_camera_raw_frame_interval:
+
 Raw camera sensors
 ~~~~~~~~~~~~~~~~~~
 
Signature · 3 lines
Regards,

Laurent Pinchart
author maintainer
#3 lore raw

Re: [PATCH v2 1/3] media: Documentation: Document how link frequencies can be chosen

Hi Laurent,

Quoted 31 lines · Laurent Pinchart

Hi Sakari,

Thank you for the patch.

Quoted 14 lines · Sakari Ailus

Document how link frequencies can be selected for the link-frequencies property.

---
 Documentation/driver-api/media/camera-sensor.rst   | 14 ++++++++++++++
 .../userspace-api/media/drivers/camera-sensor.rst  |  2 ++
 2 files changed, 16 insertions(+)
Documentation/driver-api/media/camera-sensor.rst +0 -0
index 6456145f96ed..0de5c86cbd1f 100644

Documentation/driver-api/media/camera-sensor.rst used in the system. Using another frequency may cause harmful effects · line 37

Quoted 9 lines
Documentation/driver-api/media/camera-sensor.rst +6 -0
@@ -29,6 +29,20 @@ used in the system. Using another frequency may cause harmful effects
 elsewhere. Therefore only the pre-determined frequencies are configurable by the
 user.
 
+On choosing link frequencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Choosing link frequencies for a board is generally a part of the hardware design
+process as one needs to ensure an EMC-safe frequency the sensor supports with
+the given external clock frequency exists.

This is a bit hard to parse. I would write

Quoted 3 lines

Choosing link frequencies for a board is generally a part of the hardware design process as one needs to select EMC-safe frequencies that the sensor supports with the given external clock frequency.

I'll use this in v3.

Quoted 14 lines

Documentation/driver-api/media/camera-sensor.rst used in the system. Using another frequency may cause harmful effects · line 39

Quoted 4 lines

On development systems this may be

Documentation/driver-api/media/camera-sensor.rst +2 -0
+less than an immediate concern, so more or less anything that sensor and the
+rest of the applicable hardware supports can be used.

True, but it still doesn't say what to pick :-)

Q: What link frequency do I put in DT for a development board?
A: Any frequency will do.
Q: 1Hz?
A: No, it has to be supported by the sensor
Q: How do I figure that out?
A: ...

Quoted 6 lines

And once the range (or list) of frequencies the driver supports (for a given input clock frequency) will be known, the selection process is still not totally straightforward, as it will have implications on what resolutions and frame rates the sensor will be able to output. This is complicated even further if the sensor can support different number of data lanes.

Ultimately this is always sensor specific: the PLL tree documentation is the key here if the frequencies are not known otherwise. I guess one guidance we could give is look what the driver supports but that is what virtually every developers can figure out by themselves.

I'd say teaching mathematics is out of scope of this documentation.

Quoted 24 lines
Quoted 23 lines
Documentation/driver-api/media/camera-sensor.rst +6 -0
+
+If the sensor's PLL tree is not documented and all that is available are
+register lists, even knowing the frequency a driver uses may be difficult. This
+could still be :ref:`calculated from the number of lanes, sensor's output image
+size, blanking values and frame rate <media_camera_raw_frame_interval>`.
+
 ACPI
 ~~~~
Documentation/userspace-api/media/drivers/camera-sensor.rst +2 -0
index 919a50e8b9d9..e0596b85e7ec 100644
@@ -44,6 +44,8 @@ There are two different methods for obtaining possibilities for different frame
 intervals as well as configuring the frame interval. Which one to implement
 depends on the type of the device.
 
+.. _media_camera_raw_frame_interval:
+
 Raw camera sensors
 ~~~~~~~~~~~~~~~~~~
 
Signature · 1 line
Sakari Ailus
#4 lore raw

Re: [PATCH v2 1/3] media: Documentation: Document how link frequencies can be chosen

Hi Sakari,

Quoted 54 lines · Sakari Ailus
Quoted 27 lines · Laurent Pinchart
Quoted 14 lines · Sakari Ailus

Document how link frequencies can be selected for the link-frequencies property.

---
 Documentation/driver-api/media/camera-sensor.rst   | 14 ++++++++++++++
 .../userspace-api/media/drivers/camera-sensor.rst  |  2 ++
 2 files changed, 16 insertions(+)
Documentation/driver-api/media/camera-sensor.rst +0 -0
index 6456145f96ed..0de5c86cbd1f 100644

Documentation/driver-api/media/camera-sensor.rst used in the system. Using another frequency may cause harmful effects · line 37

Quoted 9 lines
Documentation/driver-api/media/camera-sensor.rst +6 -0
@@ -29,6 +29,20 @@ used in the system. Using another frequency may cause harmful effects
 elsewhere. Therefore only the pre-determined frequencies are configurable by the
 user.
 
+On choosing link frequencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Choosing link frequencies for a board is generally a part of the hardware design
+process as one needs to ensure an EMC-safe frequency the sensor supports with
+the given external clock frequency exists.

This is a bit hard to parse. I would write

Quoted 3 lines

Choosing link frequencies for a board is generally a part of the hardware design process as one needs to select EMC-safe frequencies that the sensor supports with the given external clock frequency.

I'll use this in v3.

Quoted 13 lines

Documentation/driver-api/media/camera-sensor.rst used in the system. Using another frequency may cause harmful effects · line 39

Quoted 3 lines

On development systems this may be

Documentation/driver-api/media/camera-sensor.rst +2 -0
+less than an immediate concern, so more or less anything that sensor and the
+rest of the applicable hardware supports can be used.

True, but it still doesn't say what to pick :-)

Q: What link frequency do I put in DT for a development board?
A: Any frequency will do.
Q: 1Hz?
A: No, it has to be supported by the sensor
Q: How do I figure that out?
A: ...

Quoted 6 lines

And once the range (or list) of frequencies the driver supports (for a given input clock frequency) will be known, the selection process is still not totally straightforward, as it will have implications on what resolutions and frame rates the sensor will be able to output. This is complicated even further if the sensor can support different number of data lanes.

Quoted 6 lines

Ultimately this is always sensor specific: the PLL tree documentation is the key here if the frequencies are not known otherwise. I guess one guidance we could give is look what the driver supports but that is what virtually every developers can figure out by themselves.

I'd say teaching mathematics is out of scope of this documentation.

I don't know how to compute the information. Can you teach me ? And let's record it in the documentation.

Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Documentation/driver-api/media/camera-sensor.rst +6 -0
+
+If the sensor's PLL tree is not documented and all that is available are
+register lists, even knowing the frequency a driver uses may be difficult. This
+could still be :ref:`calculated from the number of lanes, sensor's output image
+size, blanking values and frame rate <media_camera_raw_frame_interval>`.
+
 ACPI
 ~~~~
Documentation/userspace-api/media/drivers/camera-sensor.rst +2 -0
index 919a50e8b9d9..e0596b85e7ec 100644
@@ -44,6 +44,8 @@ There are two different methods for obtaining possibilities for different frame
 intervals as well as configuring the frame interval. Which one to implement
 depends on the type of the device.
 
+.. _media_camera_raw_frame_interval:
+
 Raw camera sensors
 ~~~~~~~~~~~~~~~~~~
 
Signature · 3 lines
Regards,

Laurent Pinchart
author maintainer
#5 lore raw

Re: [PATCH v2 1/3] media: Documentation: Document how link frequencies can be chosen

Hi Laurent,

Quoted 62 lines · Laurent Pinchart

Hi Sakari,

Quoted 59 lines · Sakari Ailus
Quoted 27 lines · Laurent Pinchart
Quoted 14 lines · Sakari Ailus

Document how link frequencies can be selected for the link-frequencies property.

---
 Documentation/driver-api/media/camera-sensor.rst   | 14 ++++++++++++++
 .../userspace-api/media/drivers/camera-sensor.rst  |  2 ++
 2 files changed, 16 insertions(+)
Documentation/driver-api/media/camera-sensor.rst +0 -0
index 6456145f96ed..0de5c86cbd1f 100644

Documentation/driver-api/media/camera-sensor.rst used in the system. Using another frequency may cause harmful effects · line 37

Quoted 9 lines
Documentation/driver-api/media/camera-sensor.rst +6 -0
@@ -29,6 +29,20 @@ used in the system. Using another frequency may cause harmful effects
 elsewhere. Therefore only the pre-determined frequencies are configurable by the
 user.
 
+On choosing link frequencies
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Choosing link frequencies for a board is generally a part of the hardware design
+process as one needs to ensure an EMC-safe frequency the sensor supports with
+the given external clock frequency exists.

This is a bit hard to parse. I would write

Quoted 3 lines

Choosing link frequencies for a board is generally a part of the hardware design process as one needs to select EMC-safe frequencies that the sensor supports with the given external clock frequency.

I'll use this in v3.

Quoted 13 lines

Documentation/driver-api/media/camera-sensor.rst used in the system. Using another frequency may cause harmful effects · line 39

Quoted 3 lines

On development systems this may be

Documentation/driver-api/media/camera-sensor.rst +2 -0
+less than an immediate concern, so more or less anything that sensor and the
+rest of the applicable hardware supports can be used.

True, but it still doesn't say what to pick :-)

Q: What link frequency do I put in DT for a development board?
A: Any frequency will do.
Q: 1Hz?
A: No, it has to be supported by the sensor
Q: How do I figure that out?
A: ...

Quoted 6 lines

And once the range (or list) of frequencies the driver supports (for a given input clock frequency) will be known, the selection process is still not totally straightforward, as it will have implications on what resolutions and frame rates the sensor will be able to output. This is complicated even further if the sensor can support different number of data lanes.

Ultimately this is always sensor specific: the PLL tree documentation is the key here if the frequencies are not known otherwise. I guess one guidance we could give is look what the driver supports but that is what virtually every developers can figure out by themselves.

Quoted 4 lines
Quoted 1 line

I'd say teaching mathematics is out of scope of this documentation.

I don't know how to compute the information. Can you teach me ? And let's record it in the documentation.

You're certainly not in a position to state this: you've written a PLL calculator for an Aptina sensor. It's certainly easier to come up with a single configuration than writing code that comes up with a reasonable configuration when only the input and output parameters are known.

The Aptina PLL calculator is much more simple than the CCS PLL calculator, perhaps we should use it as an example?

Quoted 28 lines
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Documentation/driver-api/media/camera-sensor.rst +6 -0
+
+If the sensor's PLL tree is not documented and all that is available are
+register lists, even knowing the frequency a driver uses may be difficult. This
+could still be :ref:`calculated from the number of lanes, sensor's output image
+size, blanking values and frame rate <media_camera_raw_frame_interval>`.
+
 ACPI
 ~~~~
Documentation/userspace-api/media/drivers/camera-sensor.rst +2 -0
index 919a50e8b9d9..e0596b85e7ec 100644
@@ -44,6 +44,8 @@ There are two different methods for obtaining possibilities for different frame
 intervals as well as configuring the frame interval. Which one to implement
 depends on the type of the device.
 
+.. _media_camera_raw_frame_interval:
+
 Raw camera sensors
 ~~~~~~~~~~~~~~~~~~
 
Signature · 3 lines
Regards,

Laurent Pinchart
Signature · 3 lines
Regards,

Sakari Ailus
author maintainer
#6 lore raw

PATCH v2 2/3 media: Documentation: BT.601 is not a bus

In reply to Sakari Ailus

BT.601 is not actually a bus specification, leaving parallel bus without a specification to refer to. Fix this.

---
 Documentation/driver-api/media/camera-sensor.rst | 4 ++--
 Documentation/driver-api/media/tx-rx.rst         | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)
Documentation/driver-api/media/camera-sensor.rst +2 -2
index 0de5c86cbd1f..19f2feeecc91 100644
@@ -9,8 +9,8 @@ This document covers the in-kernel APIs only. For the best practices on
 userspace API implementation in camera sensor drivers, please see
 :ref:`media_using_camera_sensor_drivers`.
 
-CSI-2 and parallel (BT.601 and BT.656) busses
----------------------------------------------
+CSI-2 and parallel and BT.656 buses
+-----------------------------------
 
 Please see :ref:`transmitter-receiver`.
 
Documentation/driver-api/media/tx-rx.rst +1 -2
index e1e9258dd862..7e115e3c4735 100644
@@ -25,9 +25,8 @@ the host SoC. It is defined by the `MIPI alliance`_.
 Parallel
 ^^^^^^^^
 
-`BT.601`_ and `BT.656`_ are the most common parallel busses.
+The parallel bus and its `BT.656`_ variant are the most common parallel busses.
 
-.. _`BT.601`: https://en.wikipedia.org/wiki/Rec._601
 .. _`BT.656`: https://en.wikipedia.org/wiki/ITU-R_BT.656
 
 Transmitter drivers
Signature · 1 line
2.39.2
#7 lore raw

Re: [PATCH v2 2/3] media: Documentation: BT.601 is not a bus

Hi Sakari,

Thank you for the patch.

Quoted 2 lines · Sakari Ailus

BT.601 is not actually a bus specification, leaving parallel bus without a specification to refer to. Fix this.

I'm really annoyed there's no standard name for parallel buses :-(

Quoted 11 lines
---
 Documentation/driver-api/media/camera-sensor.rst | 4 ++--
 Documentation/driver-api/media/tx-rx.rst         | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)
Documentation/driver-api/media/camera-sensor.rst +0 -0
index 0de5c86cbd1f..19f2feeecc91 100644

Documentation/driver-api/media/camera-sensor.rst This document covers the in-kernel APIs only. For the best practices on · line 12

Quoted 6 lines
Documentation/driver-api/media/camera-sensor.rst +1 -2
@@ -9,8 +9,8 @@ This document covers the in-kernel APIs only. For the best practices on
 userspace API implementation in camera sensor drivers, please see
 :ref:`media_using_camera_sensor_drivers`.
 
-CSI-2 and parallel (BT.601 and BT.656) busses
----------------------------------------------
+CSI-2 and parallel and BT.656 buses

CSI-2, parallel and BT.656 buses

Quoted 9 lines
Documentation/driver-api/media/camera-sensor.rst +1 -0
+-----------------------------------
 
 Please see :ref:`transmitter-receiver`.
 
Documentation/driver-api/media/tx-rx.rst +0 -0
index e1e9258dd862..7e115e3c4735 100644

Documentation/driver-api/media/tx-rx.rst the host SoC. It is defined by the `MIPI alliance`_. · line 28

Quoted 5 lines
Documentation/driver-api/media/tx-rx.rst +1 -1
@@ -25,9 +25,8 @@ the host SoC. It is defined by the `MIPI alliance`_.
 Parallel
 ^^^^^^^^
 
-`BT.601`_ and `BT.656`_ are the most common parallel busses.
+The parallel bus and its `BT.656`_ variant are the most common parallel busses.

We use "parallel" to mean explicit sync signals in many places (including APIs), and here it covers BT.656 too :-( This sentence is fairly bad.

Quoted 5 lines
Documentation/driver-api/media/tx-rx.rst +0 -1
-.. _`BT.601`: https://en.wikipedia.org/wiki/Rec._601
 .. _`BT.656`: https://en.wikipedia.org/wiki/ITU-R_BT.656
 
 Transmitter drivers
Signature · 3 lines
Regards,

Laurent Pinchart
author maintainer
#8 lore raw

Re: [PATCH v2 2/3] media: Documentation: BT.601 is not a bus

Hi Laurent,

Thanks for the review.

Quoted 24 lines · Laurent Pinchart

Hi Sakari,

Thank you for the patch.

Quoted 2 lines · Sakari Ailus

BT.601 is not actually a bus specification, leaving parallel bus without a specification to refer to. Fix this.

I'm really annoyed there's no standard name for parallel buses :-(

Quoted 14 lines
---
 Documentation/driver-api/media/camera-sensor.rst | 4 ++--
 Documentation/driver-api/media/tx-rx.rst         | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)
Documentation/driver-api/media/camera-sensor.rst +0 -0
index 0de5c86cbd1f..19f2feeecc91 100644
@@ -9,8 +9,8 @@ This document covers the in-kernel APIs only. For the best practices on
 userspace API implementation in camera sensor drivers, please see
 :ref:`media_using_camera_sensor_drivers`.
 
Quoted 5 lines

Documentation/driver-api/media/camera-sensor.rst This document covers the in-kernel APIs only. For the best practices on · line 12

Quoted 3 lines
Documentation/driver-api/media/camera-sensor.rst +1 -2
-CSI-2 and parallel (BT.601 and BT.656) busses
----------------------------------------------
+CSI-2 and parallel and BT.656 buses

CSI-2, parallel and BT.656 buses

Yes.

Quoted 13 lines
Quoted 13 lines
Documentation/driver-api/media/camera-sensor.rst +1 -0
+-----------------------------------
 
 Please see :ref:`transmitter-receiver`.
 
Documentation/driver-api/media/tx-rx.rst +0 -0
index e1e9258dd862..7e115e3c4735 100644
@@ -25,9 +25,8 @@ the host SoC. It is defined by the `MIPI alliance`_.
 Parallel
 ^^^^^^^^
 
Quoted 6 lines

Documentation/driver-api/media/tx-rx.rst the host SoC. It is defined by the `MIPI alliance`_. · line 28

Quoted 2 lines
Documentation/driver-api/media/tx-rx.rst +1 -1
-`BT.601`_ and `BT.656`_ are the most common parallel busses.
+The parallel bus and its `BT.656`_ variant are the most common parallel busses.

We use "parallel" to mean explicit sync signals in many places (including APIs), and here it covers BT.656 too :-( This sentence is fairly bad.

I'll mention parallel and BT.656 separately.

Quoted 7 lines
Quoted 6 lines
Documentation/driver-api/media/tx-rx.rst +0 -1
-.. _`BT.601`: https://en.wikipedia.org/wiki/Rec._601
 .. _`BT.656`: https://en.wikipedia.org/wiki/ITU-R_BT.656
 
 Transmitter drivers
Signature · 3 lines
Regards,

Sakari Ailus
author maintainer
#9 lore raw

PATCH v2 3/3 media: Documentation: LP-11 and LP-111 are states, not modes

In reply to Sakari Ailus

LP-11 and LP-111 are CSI-2 bus states, not modes. Fix this.

---
 Documentation/driver-api/media/tx-rx.rst | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Documentation/driver-api/media/tx-rx.rst +8 -8
index 7e115e3c4735..bc1b94cffdd9 100644
@@ -89,13 +89,13 @@ where
 	pixel rate on the camera sensor's pixel array which is indicated by the
 	:ref:`V4L2_CID_PIXEL_RATE <v4l2-cid-pixel-rate>` control.
 
-LP-11 and LP-111 modes
-^^^^^^^^^^^^^^^^^^^^^^
+LP-11 and LP-111 states
+^^^^^^^^^^^^^^^^^^^^^^^
 
-As part of transitioning to high speed mode, a CSI-2 transmitter typically
+As part of transitioning to high speed state, a CSI-2 transmitter typically
 briefly sets the bus to LP-11 or LP-111 state, depending on the PHY. This period
 may be as short as 100 µs, during which the receiver observes this state and
-proceeds its own part of high speed mode transition.
+proceeds its own part of high speed state transition.
 
 Most receivers are capable of autonomously handling this once the software has
 configured them to do so, but there are receivers which require software
@@ -104,7 +104,7 @@ in software, especially when there is no interrupt telling something is
 happening.
 
 One way to address this is to configure the transmitter side explicitly to LP-11
-or LP-111 mode, which requires support from the transmitter hardware. This is
+or LP-111 state, which requires support from the transmitter hardware. This is
 not universally available. Many devices return to this state once streaming is
 stopped while the state after power-on is LP-00 or LP-000.
 
@@ -115,11 +115,11 @@ transitioning to streaming state, but not yet start streaming. Similarly, the
 to call ``.post_streamoff()`` for each successful call of ``.pre_streamon()``.
 
 In the context of CSI-2, the ``.pre_streamon()`` callback is used to transition
-the transmitter to the LP-11 or LP-111 mode. This also requires powering on the
+the transmitter to the LP-11 or LP-111 state. This also requires powering on the
 device, so this should be only done when it is needed.
 
-Receiver drivers that do not need explicit LP-11 or LP-111 mode setup are waived
-from calling the two callbacks.
+Receiver drivers that do not need explicit LP-11 or LP-111 state setup are
+waived from calling the two callbacks.
 
 Stopping the transmitter
 ^^^^^^^^^^^^^^^^^^^^^^^^
Signature · 1 line
2.39.2
Reviewed-by on v2 3/3
#10 lore raw

Re: [PATCH v2 3/3] media: Documentation: LP-11 and LP-111 are states, not modes

Hi Sakari,

Thank you for the patch.

Quoted 12 lines · Sakari Ailus

LP-11 and LP-111 are CSI-2 bus states, not modes. Fix this.

---
 Documentation/driver-api/media/tx-rx.rst | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Documentation/driver-api/media/tx-rx.rst +0 -0
index 7e115e3c4735..bc1b94cffdd9 100644

Documentation/driver-api/media/tx-rx.rst where · line 93

Quoted 7 lines
Documentation/driver-api/media/tx-rx.rst +2 -2
@@ -89,13 +89,13 @@ where
 	pixel rate on the camera sensor's pixel array which is indicated by the
 	:ref:`V4L2_CID_PIXEL_RATE <v4l2-cid-pixel-rate>` control.
 
-LP-11 and LP-111 modes
-^^^^^^^^^^^^^^^^^^^^^^
+LP-11 and LP-111 states
+^^^^^^^^^^^^^^^^^^^^^^^

Indeed.

Documentation/driver-api/media/tx-rx.rst where · line 95

Quoted 3 lines
Documentation/driver-api/media/tx-rx.rst +1 -1
-As part of transitioning to high speed mode, a CSI-2 transmitter typically
+As part of transitioning to high speed state, a CSI-2 transmitter typically

"high speed" is a mode according to the D-PHY specification.

Documentation/driver-api/media/tx-rx.rst where · line 98

Quoted 4 lines
Documentation/driver-api/media/tx-rx.rst +1 -1
 briefly sets the bus to LP-11 or LP-111 state, depending on the PHY. This period
 may be as short as 100 µs, during which the receiver observes this state and
-proceeds its own part of high speed mode transition.
+proceeds its own part of high speed state transition.

Same here.

Documentation/driver-api/media/tx-rx.rst in software, especially when there is no interrupt telling something is · line 107

Quoted 9 lines
Documentation/driver-api/media/tx-rx.rst +1 -1
 Most receivers are capable of autonomously handling this once the software has
 configured them to do so, but there are receivers which require software
@@ -104,7 +104,7 @@ in software, especially when there is no interrupt telling something is
 happening.
 
 One way to address this is to configure the transmitter side explicitly to LP-11
-or LP-111 mode, which requires support from the transmitter hardware. This is
+or LP-111 state, which requires support from the transmitter hardware. This is

Ack.

With the two changes referring to high speed state dropped,

Quoted 18 lines
Documentation/driver-api/media/tx-rx.rst +3 -3
 not universally available. Many devices return to this state once streaming is
 stopped while the state after power-on is LP-00 or LP-000.
 
@@ -115,11 +115,11 @@ transitioning to streaming state, but not yet start streaming. Similarly, the
 to call ``.post_streamoff()`` for each successful call of ``.pre_streamon()``.
 
 In the context of CSI-2, the ``.pre_streamon()`` callback is used to transition
-the transmitter to the LP-11 or LP-111 mode. This also requires powering on the
+the transmitter to the LP-11 or LP-111 state. This also requires powering on the
 device, so this should be only done when it is needed.
 
-Receiver drivers that do not need explicit LP-11 or LP-111 mode setup are waived
-from calling the two callbacks.
+Receiver drivers that do not need explicit LP-11 or LP-111 state setup are
+waived from calling the two callbacks.
 
 Stopping the transmitter
 ^^^^^^^^^^^^^^^^^^^^^^^^
Signature · 3 lines
Regards,

Laurent Pinchart
author maintainer
#11 lore raw

Re: [PATCH v2 3/3] media: Documentation: LP-11 and LP-111 are states, not modes

Hi Laurent,

Quoted 28 lines · Laurent Pinchart

Hi Sakari,

Thank you for the patch.

Quoted 12 lines · Sakari Ailus

LP-11 and LP-111 are CSI-2 bus states, not modes. Fix this.

---
 Documentation/driver-api/media/tx-rx.rst | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Documentation/driver-api/media/tx-rx.rst +0 -0
index 7e115e3c4735..bc1b94cffdd9 100644

Documentation/driver-api/media/tx-rx.rst where · line 93

Quoted 7 lines
Documentation/driver-api/media/tx-rx.rst +2 -2
@@ -89,13 +89,13 @@ where
 	pixel rate on the camera sensor's pixel array which is indicated by the
 	:ref:`V4L2_CID_PIXEL_RATE <v4l2-cid-pixel-rate>` control.
 
-LP-11 and LP-111 modes
-^^^^^^^^^^^^^^^^^^^^^^
+LP-11 and LP-111 states
+^^^^^^^^^^^^^^^^^^^^^^^

Indeed.

Quoted 1 line
Quoted 4 lines

Documentation/driver-api/media/tx-rx.rst where · line 95

Quoted 2 lines
Documentation/driver-api/media/tx-rx.rst +1 -1
-As part of transitioning to high speed mode, a CSI-2 transmitter typically
+As part of transitioning to high speed state, a CSI-2 transmitter typically

"high speed" is a mode according to the D-PHY specification.

Yes, indeed. I'll address these in v3.

Quoted 20 lines

Documentation/driver-api/media/tx-rx.rst where · line 98

Quoted 5 lines

briefly sets the bus to LP-11 or LP-111 state, depending on the PHY. This period may be as short as 100 µs, during which the receiver observes this state and

Documentation/driver-api/media/tx-rx.rst +1 -1
-proceeds its own part of high speed mode transition.
+proceeds its own part of high speed state transition.

Same here.

Documentation/driver-api/media/tx-rx.rst in software, especially when there is no interrupt telling something is · line 107

Quoted 9 lines

Most receivers are capable of autonomously handling this once the software has configured them to do so, but there are receivers which require software

Documentation/driver-api/media/tx-rx.rst +1 -1
@@ -104,7 +104,7 @@ in software, especially when there is no interrupt telling something is
 happening.
 
 One way to address this is to configure the transmitter side explicitly to LP-11
-or LP-111 mode, which requires support from the transmitter hardware. This is
+or LP-111 state, which requires support from the transmitter hardware. This is

Ack.

Quoted 3 lines

With the two changes referring to high speed state dropped,

Thanks!

Signature · 3 lines
Regards,

Sakari Ailus