diff mbox series

[v10,09/12] dt-bindings: display: bridge: lvds-codec: Add new bus-width prop

Message ID 20200128135514.108171-10-boris.brezillon@collabora.com (mailing list archive)
State New, archived
Headers show
Series drm: Add support for bus-format negotiation | expand

Commit Message

Boris Brezillon Jan. 28, 2020, 1:55 p.m. UTC
Add the bus-width property to describe the input bus format.

v10:
* Add changelog to the commit message
* Add Rob's R-b

v8 -> v9:
* No changes

v7:
* Rebase on top of lvds-codec changes
* Drop the data-mapping property

v4 -> v6:
* Not part of the series

v3:
* New patch

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/display/bridge/lvds-codec.yaml    | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Sam Ravnborg Jan. 31, 2020, 5:12 p.m. UTC | #1
Hi Boris.

On Tue, Jan 28, 2020 at 02:55:11PM +0100, Boris Brezillon wrote:
> Add the bus-width property to describe the input bus format.
> 
> v10:
> * Add changelog to the commit message
> * Add Rob's R-b
> 
> v8 -> v9:
> * No changes
> 
> v7:
> * Rebase on top of lvds-codec changes
> * Drop the data-mapping property
> 
> v4 -> v6:
> * Not part of the series
> 
> v3:
> * New patch
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/display/bridge/lvds-codec.yaml    | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> index 8f373029f5d2..7c4e42f4de61 100644
> --- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> +++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> @@ -55,6 +55,14 @@ properties:
>          description: |
>            For LVDS encoders, port 0 is the parallel input
>            For LVDS decoders, port 0 is the LVDS input
> +        properties:
> +          bus-width:
> +            allOf:
> +              - $ref: /schemas/types.yaml#/definitions/uint32
> +              - enum: [18, 24]
> +              - default: 24
> +          description:
> +            Number of data lines used to transmit the RGB data.

Would this be a candidate for a bridge-common.yaml?
So we share the same definition across all bridges using it.

	Sam
Boris Brezillon Jan. 31, 2020, 5:23 p.m. UTC | #2
On Fri, 31 Jan 2020 18:12:48 +0100
Sam Ravnborg <sam@ravnborg.org> wrote:

> Hi Boris.
> 
> On Tue, Jan 28, 2020 at 02:55:11PM +0100, Boris Brezillon wrote:
> > Add the bus-width property to describe the input bus format.
> > 
> > v10:
> > * Add changelog to the commit message
> > * Add Rob's R-b
> > 
> > v8 -> v9:
> > * No changes
> > 
> > v7:
> > * Rebase on top of lvds-codec changes
> > * Drop the data-mapping property
> > 
> > v4 -> v6:
> > * Not part of the series
> > 
> > v3:
> > * New patch
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > Reviewed-by: Rob Herring <robh@kernel.org>
> > ---
> >  .../devicetree/bindings/display/bridge/lvds-codec.yaml    | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> > index 8f373029f5d2..7c4e42f4de61 100644
> > --- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> > +++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> > @@ -55,6 +55,14 @@ properties:
> >          description: |
> >            For LVDS encoders, port 0 is the parallel input
> >            For LVDS decoders, port 0 is the LVDS input
> > +        properties:
> > +          bus-width:
> > +            allOf:
> > +              - $ref: /schemas/types.yaml#/definitions/uint32
> > +              - enum: [18, 24]
> > +              - default: 24
> > +          description:
> > +            Number of data lines used to transmit the RGB data.  
> 
> Would this be a candidate for a bridge-common.yaml?
> So we share the same definition across all bridges using it.

Could be, though the default and accepted values is likely to be
overloaded on a per-bridge basis. Anyway, looks like bridge-common.yaml
doesn't exists yet, so maybe we should merge this change and move the
field definition when another bridge starts using this property.
Laurent Pinchart Feb. 24, 2020, 10:31 p.m. UTC | #3
Hi Boris,

Thank you for the patch.

On Tue, Jan 28, 2020 at 02:55:11PM +0100, Boris Brezillon wrote:
> Add the bus-width property to describe the input bus format.
> 
> v10:
> * Add changelog to the commit message
> * Add Rob's R-b
> 
> v8 -> v9:
> * No changes
> 
> v7:
> * Rebase on top of lvds-codec changes
> * Drop the data-mapping property
> 
> v4 -> v6:
> * Not part of the series
> 
> v3:
> * New patch
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/display/bridge/lvds-codec.yaml    | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> index 8f373029f5d2..7c4e42f4de61 100644
> --- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> +++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> @@ -55,6 +55,14 @@ properties:
>          description: |
>            For LVDS encoders, port 0 is the parallel input
>            For LVDS decoders, port 0 is the LVDS input
> +        properties:
> +          bus-width:
> +            allOf:
> +              - $ref: /schemas/types.yaml#/definitions/uint32
> +              - enum: [18, 24]
> +              - default: 24
> +          description:
> +            Number of data lines used to transmit the RGB data.

This is a bit unclear. First of all, depending on whether the node is an
LVDS encoder or decoder, port@0 is either a parallel input or an LVDS
input. The property mentiones RGB data, does it mean it apply to LVDS
encoders only ? Or should it be in port@1 for LVDS decoders ?

Then, I'm not sure what the property describes. Is it the number of data
lanes that the chip has ? Or the number of lanes routed on the board ?
Should it be specified only if the number of lanes on the board is
different than the maximum number of lanes of the hardware ? A more
detailed description is needed.

Updating the example would also be useful.

>  
>        port@1:
>          type: object
Boris Brezillon Feb. 25, 2020, 9:13 a.m. UTC | #4
On Tue, 25 Feb 2020 00:31:39 +0200
Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote:

> Hi Boris,
> 
> Thank you for the patch.
> 
> On Tue, Jan 28, 2020 at 02:55:11PM +0100, Boris Brezillon wrote:
> > Add the bus-width property to describe the input bus format.
> > 
> > v10:
> > * Add changelog to the commit message
> > * Add Rob's R-b
> > 
> > v8 -> v9:
> > * No changes
> > 
> > v7:
> > * Rebase on top of lvds-codec changes
> > * Drop the data-mapping property
> > 
> > v4 -> v6:
> > * Not part of the series
> > 
> > v3:
> > * New patch
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > Reviewed-by: Rob Herring <robh@kernel.org>
> > ---
> >  .../devicetree/bindings/display/bridge/lvds-codec.yaml    | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> > index 8f373029f5d2..7c4e42f4de61 100644
> > --- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> > +++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> > @@ -55,6 +55,14 @@ properties:
> >          description: |
> >            For LVDS encoders, port 0 is the parallel input
> >            For LVDS decoders, port 0 is the LVDS input
> > +        properties:
> > +          bus-width:
> > +            allOf:
> > +              - $ref: /schemas/types.yaml#/definitions/uint32
> > +              - enum: [18, 24]
> > +              - default: 24
> > +          description:
> > +            Number of data lines used to transmit the RGB data.  
> 
> This is a bit unclear. First of all, depending on whether the node is an
> LVDS encoder or decoder, port@0 is either a parallel input or an LVDS
> input. The property mentiones RGB data, does it mean it apply to LVDS
> encoders only ? Or should it be in port@1 for LVDS decoders ?

Right, I only considered the encoder case here. For the decoder case, we
don't need a bus-width prop yet, as the bus format output is currently
enforced by the bus format input of the next component in the chain
(panel/next-bridge), but that might change if we start dealing with
panel/bridges supporting several input formats and expecting the LVDS
encoder/decoder to select one. What we do need for the decoder case
though, is a data-mapping prop, otherwise this LVDS bridge exposes a
FIXED in-format and the previous element in the chain has to use its
'default' output format (which might not be appropriate).

Maybe we should go for Sam's approach and expose a data-mapping prop
on both ends of the bridge (that implies describing RGB/DPI bus width
using the data-mapping prop), this way we wouldn't have to distinguish
the encoder/decoder case.

> 
> Then, I'm not sure what the property describes. Is it the number of data
> lanes that the chip has ? Or the number of lanes routed on the board ?

It's the number of lanes routed on the board. I'll clarify that.

> Should it be specified only if the number of lanes on the board is
> different than the maximum number of lanes of the hardware ?

You mean default number of lanes (24)? Well, I guess defining it
explicitly is not a bad thing, so, even if the default is already 24,
I don't see a problem setting bus-width = <24>. Actually, maybe that's
even better if we force new users to explicitly define the number of
lanes exposed on the DPI interface, but we definitely need this default
value if we want to keep things backward compatible. Not sure how to
express that (it's not mandatory, it's not optional, it's recommended
:-)).

> A more
> detailed description is needed.
> 
> Updating the example would also be useful.

I can do that too.
Boris Brezillon March 9, 2020, 10:35 a.m. UTC | #5
Hi Laurent,

On Tue, 25 Feb 2020 10:13:54 +0100
Boris Brezillon <boris.brezillon@collabora.com> wrote:

> > > diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> > > index 8f373029f5d2..7c4e42f4de61 100644
> > > --- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> > > +++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
> > > @@ -55,6 +55,14 @@ properties:
> > >          description: |
> > >            For LVDS encoders, port 0 is the parallel input
> > >            For LVDS decoders, port 0 is the LVDS input
> > > +        properties:
> > > +          bus-width:
> > > +            allOf:
> > > +              - $ref: /schemas/types.yaml#/definitions/uint32
> > > +              - enum: [18, 24]
> > > +              - default: 24
> > > +          description:
> > > +            Number of data lines used to transmit the RGB data.    
> > 
> > This is a bit unclear. First of all, depending on whether the node is an
> > LVDS encoder or decoder, port@0 is either a parallel input or an LVDS
> > input. The property mentiones RGB data, does it mean it apply to LVDS
> > encoders only ? Or should it be in port@1 for LVDS decoders ?  
> 
> Right, I only considered the encoder case here. For the decoder case, we
> don't need a bus-width prop yet, as the bus format output is currently
> enforced by the bus format input of the next component in the chain
> (panel/next-bridge), but that might change if we start dealing with
> panel/bridges supporting several input formats and expecting the LVDS
> encoder/decoder to select one. What we do need for the decoder case
> though, is a data-mapping prop, otherwise this LVDS bridge exposes a
> FIXED in-format and the previous element in the chain has to use its
> 'default' output format (which might not be appropriate).
> 
> Maybe we should go for Sam's approach and expose a data-mapping prop
> on both ends of the bridge (that implies describing RGB/DPI bus width
> using the data-mapping prop), this way we wouldn't have to distinguish
> the encoder/decoder case.

Gentle ping.

Regards,

Boris
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
index 8f373029f5d2..7c4e42f4de61 100644
--- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
+++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml
@@ -55,6 +55,14 @@  properties:
         description: |
           For LVDS encoders, port 0 is the parallel input
           For LVDS decoders, port 0 is the LVDS input
+        properties:
+          bus-width:
+            allOf:
+              - $ref: /schemas/types.yaml#/definitions/uint32
+              - enum: [18, 24]
+              - default: 24
+          description:
+            Number of data lines used to transmit the RGB data.
 
       port@1:
         type: object