dt-bindings: convert timing + panel-dpi to DT schema
Subsystems (4)
v3 cover dt-bindings: convert timing + panel-dpi to DT schema
This set of patches convert display-timing.txt to DT schema.
To do that add a panel-timing.yaml file that include all the panel-timing properties and use this in panel-common and in display-timings.
panel-dpi was also converted so we have no .txt users left of panel-timing in panel/
Everything passed dt_binding_check - and the trivial errors I tried in the examples was all catched during validation.
This work was triggered by a patch-set from Oleksandr Suvorov aiming at updating panel-lvds to support panel-dpi.
This will make it simple to add additional properties to panel-dpi.
Thanks for the quick responses on v2 and likewise the quick feedback on the request for the license change!
Highlight from v3 - se individual patches for details.
- Added panel-dpi support to panel-simple.
We can now add a simple panel just by addding timing parameters in a DT node
The patch [5/5] is RFC as test is pending
- To support panel-dpi in panel-simple - add a data-mapping property to panel-dpi
Highlights from v2 - see individual patches for details.
- Got acks for the license change
- Simplfied panel-timings bindings
- panel-dpi can now be used without a panel specific compatible So panel-dpi can be used as a generic binding for dumb panels
Feedback welcome!
Sam
Sam Ravnborg (5):
dt-bindings: display: add panel-timing.yaml
dt-bindings: display: convert display-timings to DT schema
dt-bindings: display: convert panel-dpi to DT schema
dt-bindings: display: add data-mapping to panel-dpi drm/panel: simple: add panel-dpi support
.../bindings/display/panel/display-timing.txt | 124 +---------- .../bindings/display/panel/display-timings.yaml | 77 +++++++ .../bindings/display/panel/panel-common.yaml | 15 +- .../bindings/display/panel/panel-dpi.txt | 50 ----- .../bindings/display/panel/panel-dpi.yaml | 82 ++++++++ .../bindings/display/panel/panel-timing.yaml | 227 +++++++++++++++++++++ drivers/gpu/drm/panel/panel-simple.c | 74 ++++++- 7 files changed, 470 insertions(+), 179 deletions(-)
PATCH v3 1/5 dt-bindings: display: add panel-timing.yaml
Add meta-schema variant of panel-timing and
reference it from panel-common.yaml.
Part of this came form other files with other
licenses - original commits:
cc3f414cf2e4 ("video: add of helper for display timings/videomode")86f46565dff3 ("dt-bindings: display: display-timing: Add property to configure sync drive edge") 9cad9c95d7e8 ("Documentation: DocBook DRM framework documentation")
The original authors acked the license change to:
(GPL-2.0-only OR BSD-2-Clause)
v2:
- Got OK from original authors for re-license
Huge thanks for the quick replies!
- Typo fixes (Oleksandr)
- Drop -array variant when not needed (Maxime)
- Replace oneOf:... with enum (Maxime)
- Drop type from clock-frequency (Rob)
- Drop "|" when not needed (Rob)
v3:
- Added comment to acks that are only for the license change
- Add yaml document terminator "..."
- Updated description (removed reference to native-mode)
--- .../bindings/display/panel/panel-common.yaml | 7 +- .../bindings/display/panel/panel-timing.yaml | 227 ++++++++++++++++++ 2 files changed, 230 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/panel-timing.yaml
Documentation/devicetree/bindings/display/panel/panel-common.yaml +3 -4
@@ -54,13 +54,12 @@ properties: # Display Timings panel-timing: - type: object description: Most display panels are restricted to a single resolution and require specific display timings. The panel-timing subnode expresses those - timings as specified in the timing subnode section of the display timing - bindings defined in - Documentation/devicetree/bindings/display/panel/display-timing.txt. + timings. + allOf: + - $ref: panel-timing.yaml# # Connectivity port:
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +227 -0
227 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 2/5 dt-bindings: display: convert display-timings to DT schema
In reply to Sam RavnborgAdd display-timings.yaml - that references panel-timings.yaml. display-timings.yaml will be used for display bindings when they are converted to meta-schema format.
For now the old display-timing.txt points to the new display-timings.yaml - and all users are left as-is.
v2:
- Updated native-mode description
v3:
- Simpler "^timing" pattern (Rob)
- timing node is of type object (Rob)
- added display-timings to panel-common.yaml
- added yaml document terminator "..."
--- .../bindings/display/panel/display-timing.txt | 124 +----------------- .../display/panel/display-timings.yaml | 77 +++++++++++ .../bindings/display/panel/panel-common.yaml | 8 ++ 3 files changed, 86 insertions(+), 123 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/display-timings.yaml
Documentation/devicetree/bindings/display/panel/display-timing.txt +1 -123
@@ -1,123 +1 @@ -display-timing bindings -======================= - -display-timings node --------------------- - -required properties: - - none - -optional properties: - - native-mode: The native mode for the display, in case multiple modes are - provided. When omitted, assume the first node is the native. - -timing subnode --------------- - -required properties: - - hactive, vactive: display resolution - - hfront-porch, hback-porch, hsync-len: horizontal display timing parameters - in pixels - vfront-porch, vback-porch, vsync-len: vertical display timing parameters in - lines - - clock-frequency: display clock in Hz - -optional properties: - - hsync-active: hsync pulse is active low/high/ignored - - vsync-active: vsync pulse is active low/high/ignored - - de-active: data-enable pulse is active low/high/ignored - - pixelclk-active: with - - active high = drive pixel data on rising edge/ - sample data on falling edge - - active low = drive pixel data on falling edge/ - sample data on rising edge - - ignored = ignored - - syncclk-active: with - - active high = drive sync on rising edge/ - sample sync on falling edge of pixel - clock - - active low = drive sync on falling edge/ - sample sync on rising edge of pixel - clock - - omitted = same configuration as pixelclk-active - - interlaced (bool): boolean to enable interlaced mode - - doublescan (bool): boolean to enable doublescan mode - - doubleclk (bool): boolean to enable doubleclock mode - -All the optional properties that are not bool follow the following logic: - <1>: high active - <0>: low active - omitted: not used on hardware - -There are different ways of describing the capabilities of a display. The -devicetree representation corresponds to the one commonly found in datasheets -for displays. If a display supports multiple signal timings, the native-mode -can be specified. - -The parameters are defined as: - - +----------+-------------------------------------+----------+-------+ - | | ^ | | | - | | |vback_porch | | | - | | v | | | - +----------#######################################----------+-------+ - | # ^ # | | - | # | # | | - | hback # | # hfront | hsync | - | porch # | hactive # porch | len | - |<-------->#<-------+--------------------------->#<-------->|<----->| - | # | # | | - | # |vactive # | | - | # | # | | - | # v # | | - +----------#######################################----------+-------+ - | | ^ | | | - | | |vfront_porch | | | - | | v | | | - +----------+-------------------------------------+----------+-------+ - | | ^ | | | - | | |vsync_len | | | - | | v | | | - +----------+-------------------------------------+----------+-------+ - -Note: In addition to being used as subnode(s) of display-timings, the timing - subnode may also be used on its own. This is appropriate if only one mode - need be conveyed. In this case, the node should be named 'panel-timing'. - - -Example: - - display-timings { - native-mode = <&timing0>; - timing0: 1080p24 { - /* 1920x1080p24 */ - clock-frequency = <52000000>; - hactive = <1920>; - vactive = <1080>; - hfront-porch = <25>; - hback-porch = <25>; - hsync-len = <25>; - vback-porch = <2>; - vfront-porch = <2>; - vsync-len = <2>; - hsync-active = <1>; - }; - }; - -Every required property also supports the use of ranges, so the commonly used -datasheet description with minimum, typical and maximum values can be used. - -Example: - - timing1: timing { - /* 1920x1080p24 */ - clock-frequency = <148500000>; - hactive = <1920>; - vactive = <1080>; - hsync-len = <0 44 60>; - hfront-porch = <80 88 95>; - hback-porch = <100 148 160>; - vfront-porch = <0 4 6>; - vback-porch = <0 36 50>; - vsync-len = <0 5 6>; - }; +See display-timings.yaml in this directory.
Documentation/devicetree/bindings/display/panel/display-timings.yaml new file +77 -0
77 lines not on this page · raw message
Documentation/devicetree/bindings/display/panel/panel-common.yaml +8 -0
@@ -61,6 +61,14 @@ properties: allOf: - $ref: panel-timing.yaml# + display-timings: + description: + Some display panels supports several resolutions with different timing. + The display-timings bindings supports specifying several timings and + optional specify which is the native mode. + allOf: + - $ref: display-timings.yaml# + # Connectivity port: type: object
Signature · 1 line
2.20.1
Re: [PATCH v3 2/5] dt-bindings: display: convert display-timings to DT schema
Hi Sam,
Thank you for the patch.
Quoted 164 lines · Sam Ravnborg
Add
display-timings.yaml- that referencespanel-timings.yaml.display-timings.yamlwill be used for display bindings when they are converted to meta-schema format.For now the old display-timing.txt points to the new
display-timings.yaml- and all users are left as-is.v2:
- Updated native-mode descriptionv3:
- Simpler "^timing" pattern (Rob)
- timing node is of type object (Rob)
- added display-timings topanel-common.yaml
- added yaml document terminator "..."Signed-off-by Sam Ravnborg <[email protected]>Reviewed-by Rob Herring <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Thierry Reding <[email protected]>Cc Oleksandr Suvorov <[email protected]>--- .../bindings/display/panel/display-timing.txt | 124 +----------------- .../display/panel/display-timings.yaml | 77 +++++++++++ .../bindings/display/panel/panel-common.yaml | 8 ++ 3 files changed, 86 insertions(+), 123 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/display-timings.yamlDocumentation/devicetree/bindings/display/panel/display-timing.txt +1
-123@@ -1,123 +1 @@ -display-timing bindings -======================= - -display-timings node --------------------- - -required properties: - - none - -optional properties: - - native-mode: The native mode for the display, in case multiple modes are - provided. When omitted, assume the first node is the native. - -timing subnode --------------- - -required properties: - - hactive, vactive: display resolution - - hfront-porch, hback-porch, hsync-len: horizontal display timing parameters - in pixels - vfront-porch, vback-porch, vsync-len: vertical display timing parameters in - lines - - clock-frequency: display clock in Hz - -optional properties: - - hsync-active: hsync pulse is active low/high/ignored - - vsync-active: vsync pulse is active low/high/ignored - - de-active: data-enable pulse is active low/high/ignored - - pixelclk-active: with - - active high = drive pixel data on rising edge/ - sample data on falling edge - - active low = drive pixel data on falling edge/ - sample data on rising edge - - ignored = ignored - - syncclk-active: with - - active high = drive sync on rising edge/ - sample sync on falling edge of pixel - clock - - active low = drive sync on falling edge/ - sample sync on rising edge of pixel - clock - - omitted = same configuration as pixelclk-active - - interlaced (bool): boolean to enable interlaced mode - - doublescan (bool): boolean to enable doublescan mode - - doubleclk (bool): boolean to enable doubleclock mode - -All the optional properties that are not bool follow the following logic: - <1>: high active - <0>: low active - omitted: not used on hardware - -There are different ways of describing the capabilities of a display. The -devicetree representation corresponds to the one commonly found in datasheets -for displays. If a display supports multiple signal timings, the native-mode -can be specified. - -The parameters are defined as: - - +----------+-------------------------------------+----------+-------+ - | | ^ | | | - | | |vback_porch | | | - | | v | | | - +----------#######################################----------+-------+ - | # ^ # | | - | # | # | | - | hback # | # hfront | hsync | - | porch # | hactive # porch | len | - |<-------->#<-------+--------------------------->#<-------->|<----->| - | # | # | | - | # |vactive # | | - | # | # | | - | # v # | | - +----------#######################################----------+-------+ - | | ^ | | | - | | |vfront_porch | | | - | | v | | | - +----------+-------------------------------------+----------+-------+ - | | ^ | | | - | | |vsync_len | | | - | | v | | | - +----------+-------------------------------------+----------+-------+ - -Note: In addition to being used as subnode(s) of display-timings, the timing - subnode may also be used on its own. This is appropriate if only one mode - need be conveyed. In this case, the node should be named 'panel-timing'. - - -Example: - - display-timings { - native-mode = <&timing0>; - timing0: 1080p24 { - /* 1920x1080p24 */ - clock-frequency = <52000000>; - hactive = <1920>; - vactive = <1080>; - hfront-porch = <25>; - hback-porch = <25>; - hsync-len = <25>; - vback-porch = <2>; - vfront-porch = <2>; - vsync-len = <2>; - hsync-active = <1>; - }; - }; - -Every required property also supports the use of ranges, so the commonly used -datasheet description with minimum, typical and maximum values can be used. - -Example: - - timing1: timing { - /* 1920x1080p24 */ - clock-frequency = <148500000>; - hactive = <1920>; - vactive = <1080>; - hsync-len = <0 44 60>; - hfront-porch = <80 88 95>; - hback-porch = <100 148 160>; - vfront-porch = <0 4 6>; - vback-porch = <0 36 50>; - vsync-len = <0 5 6>; - }; +See display-timings.yaml in this directory.Documentation/devicetree/bindings/display/panel/display-timings.yaml new file +0
-0
Documentation/devicetree/bindings/display/panel/display-timings.yaml line 7
Quoted 7 lines
Documentation/devicetree/bindings/display/panel/display-timings.yaml new file +7
-0@@ -0,0 +1,77 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/display-timings.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: display timing bindings
s/timing/timings/
Documentation/devicetree/bindings/display/panel/display-timings.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/display-timings.yaml new file +10
-0+ +maintainers: + - Thierry Reding <[email protected]> + - Laurent Pinchart <[email protected]> + - Sam Ravnborg <[email protected]> + +description: | + A display panel may be able to handle several display timings, + with different resolutions. + The display-timings node makes it possible to specify the timing
s/the timing/the timings/
Documentation/devicetree/bindings/display/panel/display-timings.yaml line 28
Quoted 11 lines
Documentation/devicetree/bindings/display/panel/display-timings.yaml new file +11
-0+ and to specify the timing that is native for the display. + +properties: + $nodename: + const: display-timings + + native-mode: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + The default display timing is the one specified as native-mode. + If no native-mode is specified then the first node is assumed the
s/assumed the/assumed to be the/
Documentation/devicetree/bindings/display/panel/display-timings.yaml line 32
Quoted 4 lines
Documentation/devicetree/bindings/display/panel/display-timings.yaml new file +4
-0+ native mode. + +patternProperties: + "^timing":
Should this be "^timing[0-9]*$", or do we want to allow or names ?
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/display-timings.yaml new file +6
-0+ type: object + allOf: + - $ref: panel-timing.yaml# + +additionalProperties: false +
Documentation/devicetree/bindings/display/panel/display-timings.yaml line 48
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/display-timings.yaml new file +10
-0+examples: + - |+ + + /* + * Example that specifies panel timing using minimum, typical, + * maximum values as commonly used in datasheet description. + * timing1 is the native-mode. + */ + display-timings { + native-mode = <&timing1>;
Does this compile, as there's no phandle named timing1 ?
Quoted 34 lines
Documentation/devicetree/bindings/display/panel/display-timings.yaml new file +29
-0+ timing0 { + /* 1920x1080p24 */ + clock-frequency = <148500000>; + hactive = <1920>; + vactive = <1080>; + hsync-len = <0 44 60>; + hfront-porch = <80 88 95>; + hback-porch = <100 148 160>; + vfront-porch = <0 4 6>; + vback-porch = <0 36 50>; + vsync-len = <0 5 6>; + }; + timing1 { + /* 1920x1080p24 */ + clock-frequency = <52000000>; + hactive = <1920>; + vactive = <1080>; + hfront-porch = <25>; + hback-porch = <25>; + hsync-len = <0 25 25>; + vback-porch = <2>; + vfront-porch = <2>; + vsync-len = <2>; + hsync-active = <1>; + pixelclk-active = <1>; + }; + }; + +...Documentation/devicetree/bindings/display/panel/panel-common.yaml +0
-0
Documentation/devicetree/bindings/display/panel/panel-common.yaml properties: · line 66
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/panel-common.yaml +3
-0@@ -61,6 +61,14 @@ properties: allOf: - $ref: panel-timing.yaml# + display-timings: + description: + Some display panels supports several resolutions with different timing.
s/timing/timings/
Documentation/devicetree/bindings/display/panel/panel-common.yaml properties: · line 68
Quoted 2 lines
Documentation/devicetree/bindings/display/panel/panel-common.yaml +2
-0+ The display-timings bindings supports specifying several timings and + optional specify which is the native mode.
s/optional/optionally/
With these small issues fixed,
Great work !
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/panel-common.yaml +3
-0+ allOf: + - $ref: display-timings.yaml# + # Connectivity port: type: object
Signature · 3 lines
Regards, Laurent Pinchart
PATCH v3 3/5 dt-bindings: display: convert panel-dpi to DT schema
In reply to Sam RavnborgWith panel-timing converted, now convert the single remaining .txt user in panel/ of panel-timing to DT schema.
v2:
- Drop Thierry as maintainer, as this is not a general panel binding and I have no acks.
- Drop requirement for a panel- specific binding - "panel-dpi" is enough
- Updated example
v3:
- added yaml document terminator "..."
- always require a specific binding - panel-dpi (based on feedback from Rob)
- use "power-supply" for the supply property, and made it mandatory "power-supply" is the standard property for panels
--- .../bindings/display/panel/panel-dpi.txt | 50 ------------- .../bindings/display/panel/panel-dpi.yaml | 72 +++++++++++++++++++ 2 files changed, 72 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.txt create mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
Documentation/devicetree/bindings/display/panel/panel-dpi.txt deleted +0 -50
@@ -1,50 +0,0 @@ -Generic MIPI DPI Panel -====================== - -Required properties: -- compatible: "panel-dpi" - -Optional properties: -- label: a symbolic name for the panel -- enable-gpios: panel enable gpio -- reset-gpios: GPIO to control the RESET pin -- vcc-supply: phandle of regulator that will be used to enable power to the display -- backlight: phandle of the backlight device - -Required nodes: -- "panel-timing" containing video timings - (Documentation/devicetree/bindings/display/panel/display-timing.txt) -- Video port for DPI input - -Example -------- - -lcd0: display@0 { - compatible = "samsung,lte430wq-f0c", "panel-dpi"; - label = "lcd"; - - backlight = <&backlight>; - - port { - lcd_in: endpoint { - remote-endpoint = <&dpi_out>; - }; - }; - - panel-timing { - clock-frequency = <9200000>; - hactive = <480>; - vactive = <272>; - hfront-porch = <8>; - hback-porch = <4>; - hsync-len = <41>; - vback-porch = <2>; - vfront-porch = <4>; - vsync-len = <10>; - - hsync-active = <0>; - vsync-active = <0>; - de-active = <1>; - pixelclk-active = <1>; - }; -};
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml new file +72 -0
72 lines not on this page · raw message
Signature · 1 line
2.20.1
Re: [PATCH v3 3/5] dt-bindings: display: convert panel-dpi to DT schema
Quoted 21 lines · Sam Ravnborg
With panel-timing converted, now convert the single remaining .txt user in panel/ of panel-timing to DT schema.
v2:
- Drop Thierry as maintainer, as this is not a general panel binding and I have no acks.
- Drop requirement for a panel- specific binding - "panel-dpi" is enough
- Updated examplev3:
- added yaml document terminator "..."
- always require a specific binding - panel-dpi (based on feedback from Rob)
- use "power-supply" for the supply property, and made it mandatory "power-supply" is the standard property for panelsSigned-off-by Sam Ravnborg <[email protected]>Cc Rob Herring <[email protected]>Cc Thierry Reding <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Maxime Ripard <[email protected]>
Quoted 6 lines
--- .../bindings/display/panel/panel-dpi.txt | 50 ------------- .../bindings/display/panel/panel-dpi.yaml | 72 +++++++++++++++++++ 2 files changed, 72 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.txt create mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 3/5] dt-bindings: display: convert panel-dpi to DT schema
In reply to Sam RavnborgHi Sam,
Thank you for the patch.
Quoted 15 lines · Sam Ravnborg
With panel-timing converted, now convert the single remaining .txt user in panel/ of panel-timing to DT schema.
v2:
- Drop Thierry as maintainer, as this is not a general panel binding and I have no acks.
- Drop requirement for a panel- specific binding - "panel-dpi" is enough
- Updated examplev3:
- added yaml document terminator "..."
- always require a specific binding - panel-dpi (based on feedback from Rob)
- use "power-supply" for the supply property, and made it mandatory "power-supply" is the standard property for panels
Quoted 5 lines
Signed-off-by Sam Ravnborg <[email protected]>Cc Rob Herring <[email protected]>Cc Thierry Reding <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Maxime Ripard <[email protected]>
Quoted 144 lines
--- .../bindings/display/panel/panel-dpi.txt | 50 ------------- .../bindings/display/panel/panel-dpi.yaml | 72 +++++++++++++++++++ 2 files changed, 72 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.txt create mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.yamlDocumentation/devicetree/bindings/display/panel/panel-dpi.txt deleted +0
-50@@ -1,50 +0,0 @@ -Generic MIPI DPI Panel -====================== - -Required properties: -- compatible: "panel-dpi" - -Optional properties: -- label: a symbolic name for the panel -- enable-gpios: panel enable gpio -- reset-gpios: GPIO to control the RESET pin -- vcc-supply: phandle of regulator that will be used to enable power to the display -- backlight: phandle of the backlight device - -Required nodes: -- "panel-timing" containing video timings - (Documentation/devicetree/bindings/display/panel/display-timing.txt) -- Video port for DPI input - -Example -------- - -lcd0: display@0 { - compatible = "samsung,lte430wq-f0c", "panel-dpi"; - label = "lcd"; - - backlight = <&backlight>; - - port { - lcd_in: endpoint { - remote-endpoint = <&dpi_out>; - }; - }; - - panel-timing { - clock-frequency = <9200000>; - hactive = <480>; - vactive = <272>; - hfront-porch = <8>; - hback-porch = <4>; - hsync-len = <41>; - vback-porch = <2>; - vfront-porch = <4>; - vsync-len = <10>; - - hsync-active = <0>; - vsync-active = <0>; - de-active = <1>; - pixelclk-active = <1>; - }; -};Documentation/devicetree/bindings/display/panel/panel-dpi.yaml new file +72
-0@@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/panel-dpi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic MIPI DPI Panel + +maintainers: + - Sam Ravnborg <[email protected]> + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + description: + Shall contain a panel specific compatible and "panel-dpi" + in that order. + items: + - {} + - const: panel-dpi + + backlight: true + enable-gpios: true + height-mm: true + label: true + panel-timing: true + port: true + power-supply: true + reset-gpios: true + width-mm: true + +required: + - panel-timing + - power-supply + +additionalProperties: false + +examples: + - | + panel@0 { + compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; + label = "osddisplay"; + power-supply = <&vcc_supply>; + + backlight = <&backlight>; + + port { + lcd_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; + panel-timing { + clock-frequency = <9200000>; + hactive = <800>; + vactive = <480>; + hfront-porch = <8>; + hback-porch = <4>; + hsync-len = <41>; + vback-porch = <2>; + vfront-porch = <4>; + vsync-len = <10>; + + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + pixelclk-active = <1>; + }; + }; + +...Signature · 1 line
2.20.1
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 4/5 dt-bindings: display: add data-mapping to panel-dpi
In reply to Sam RavnborgAdd data-mapping property that can be used to specify the media format used for the connection betwwen the display controller (connector) and the panel.
--- .../devicetree/bindings/display/panel/panel-dpi.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +11 -1
@@ -21,6 +21,16 @@ properties: - {} - const: panel-dpi + data-mapping: + enum: + - rgb24 + - rgb565 + - bgr666 + - lvds666 + description: | + Describes the media format, how the display panel is connected + to the display interface. + backlight: true enable-gpios: true height-mm: true
@@ -43,7 +53,7 @@ examples: compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; label = "osddisplay"; power-supply = <&vcc_supply>; - + data-mapping = "lvds666"; backlight = <&backlight>; port {
Signature · 1 line
2.20.1
Rob Herring
maintainerRe: [PATCH v3 4/5] dt-bindings: display: add data-mapping to panel-dpi
Quoted 5 lines · Sam Ravnborg
Add data-mapping property that can be used to specify the media format used for the connection betwwen the display controller (connector) and the panel.
Signed-off-by Sam Ravnborg <[email protected]>
Missing blank line.
Quoted 9 lines
--- .../devicetree/bindings/display/panel/panel-dpi.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0
-0
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml properties: · line 29
Quoted 9 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +6
-0@@ -21,6 +21,16 @@ properties: - {} - const: panel-dpi + data-mapping: + enum: + - rgb24 + - rgb565 + - bgr666 + - lvds666
Doesn't lvds666 come from i.MX IPU which as I remember has built-in LVDS block? I'd think this format would be implicit when using the LVDS block and panel. It doesn't seem this is actually used anywhere either.
Rob
Re: [PATCH v3 4/5] dt-bindings: display: add data-mapping to panel-dpi
Quoted 21 lines · Rob Herring
Quoted 5 lines · Sam Ravnborg
Add data-mapping property that can be used to specify the media format used for the connection betwwen the display controller (connector) and the panel.
Signed-off-by Sam Ravnborg <[email protected]>Missing blank line.
Quoted 12 lines
--- .../devicetree/bindings/display/panel/panel-dpi.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0
-0@@ -21,6 +21,16 @@ properties: - {} - const: panel-dpi
Quoted 11 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml properties: · line 29
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +6
-0+ data-mapping: + enum: + - rgb24 + - rgb565 + - bgr666 + - lvds666Doesn't lvds666 come from i.MX IPU which as I remember has built-in LVDS block? I'd think this format would be implicit when using the LVDS block and panel. It doesn't seem this is actually used anywhere either.
I must admit that I just copied this list from Oleksandrs original patch. The MEDIA type it identifies(MEDIA_BUS_FMT_RGB666_1X24_CPADHI) looks special. I will drop lvds666 while applying, unless I get other feedback. (Note: travelling, earliest in the weekend)
Btw. anyway I can add data-mapping to panel-common - and then list the allowed enum values in each binding?
I would love to have a central definition of data-mapping, and then let the users only allow the relevant subset so we catch errors in DT files early.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 4/5] dt-bindings: display: add data-mapping to panel-dpi
Quoted 33 lines · Sam Ravnborg
Quoted 21 lines · Rob Herring
Quoted 5 lines · Sam Ravnborg
Add data-mapping property that can be used to specify the media format used for the connection betwwen the display controller (connector) and the panel.
Signed-off-by Sam Ravnborg <[email protected]>Missing blank line.
Quoted 12 lines
--- .../devicetree/bindings/display/panel/panel-dpi.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0
-0@@ -21,6 +21,16 @@ properties: - {} - const: panel-dpiQuoted 11 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml properties: · line 29
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +6
-0+ data-mapping: + enum: + - rgb24 + - rgb565 + - bgr666 + - lvds666Doesn't lvds666 come from i.MX IPU which as I remember has built-in LVDS block? I'd think this format would be implicit when using the LVDS block and panel. It doesn't seem this is actually used anywhere either.
Quoted 4 lines
I must admit that I just copied this list from Oleksandrs original patch. The MEDIA type it
identifies(MEDIA_BUS_FMT_RGB666_1X24_CPADHI)looks special. I will drop lvds666 while applying, unless I get other feedback. (Note: travelling, earliest in the weekend)
Okay, with that:
Quoted 3 lines
Btw. anyway I can add data-mapping to panel-common - and then list the allowed enum values in each binding?
That would be good. It should be defined explicitly that it's a single string as that's implicit currently.
Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 4/5] dt-bindings: display: add data-mapping to panel-dpi
In reply to Sam RavnborgHi Sam,
Quoted 34 lines · Sam Ravnborg
Quoted 21 lines · Rob Herring
Quoted 5 lines · Sam Ravnborg
Add data-mapping property that can be used to specify the media format used for the connection betwwen the display controller (connector) and the panel.
Signed-off-by Sam Ravnborg <[email protected]>Missing blank line.
Quoted 12 lines
--- .../devicetree/bindings/display/panel/panel-dpi.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0
-0@@ -21,6 +21,16 @@ properties: - {} - const: panel-dpiQuoted 11 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml properties: · line 29
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +6
-0+ data-mapping: + enum: + - rgb24 + - rgb565 + - bgr666 + - lvds666Doesn't lvds666 come from i.MX IPU which as I remember has built-in LVDS block? I'd think this format would be implicit when using the LVDS block and panel. It doesn't seem this is actually used anywhere either.
Quoted 4 lines
I must admit that I just copied this list from Oleksandrs original patch. The MEDIA type it
identifies(MEDIA_BUS_FMT_RGB666_1X24_CPADHI)looks special. I will drop lvds666 while applying, unless I get other feedback. (Note: travelling, earliest in the weekend)
There are different data mappings defined for LVDS, we should follow them. lvds666 is wrong in any case, and doesn't apply to a DPI panel anyway.
I don't like the name data-mapping much for DPI panels I'm afraid. It made sense for LVDS as it's really about how the different data bits are mapped to LVDS time slots, but for DPI, what we need to describe is the format. I also wonder whether multiple formats wouldn't be required when the panel supports more than one, but that may not apply to panels covered by these bindings.
If a panel expects RGB888 and receives RGB666 with the two LSBs of each component hardwired to GND on the PCB, should DT report RGB888 or RGB666 on the panel side ? I'm tempted by the former, and specifying the latter on the transmitting side.
Please also note that this case is already described by Documentation/devicetree/bindings/media/video-interfaces.txt through two entirely different properties, bus-width and data-shift. I think we should try to standardize mappings between display and capture. This new property should be reconsidered in my opinion, I think it was merged too soon.
Quoted 6 lines
Btw. anyway I can add data-mapping to panel-common - and then list the allowed enum values in each binding?
I would love to have a central definition of data-mapping, and then let the users only allow the relevant subset so we catch errors in DT files early.
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v3 5/5 drm/panel: simple: add panel-dpi support
In reply to Sam RavnborgRFC only - not tested yet!
The panel-dpi compatible is a fallback that
allows the DT to specify the timing.
When matching panel-dpi expect the device tree to include the timing information for the display-panel.
Background for this change:
There are a lot of panels and new models hits the market very often. It is a lost cause trying to chase them all and users of new panels will often find them in situations that the panel they ues are not supported by the kernel.
On top of this a lot of panels are customized based on customer specifications.
Including the panel timing in the device tree allows for a simple way to describe the actual HW and use this description in a generic way in the kernel.
This allows uses of proprietary panels, or panels which are not included in the kernel, to specify the timing in the device tree together with all the other HW descriptions.
And thus, using the device tree it is then easy to add support for an otherwise unknown panel.
The current support expect panels that do not require any delays for prepare/enable/disable/unprepare.
--- drivers/gpu/drm/panel/panel-simple.c | 74 +++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-simple.c +72 -2
@@ -351,6 +351,65 @@ static const struct drm_panel_funcs panel_simple_funcs = { .get_timings = panel_simple_get_timings, }; +static struct panel_desc panel_dpi; + +static int panel_dpi_probe (struct device *dev, +struct panel_simple *panel) +{ +struct display_timing *timing; +const struct device_node *np; +struct panel_desc *desc; +unsigned int bus_flags; +struct videomode vm; +const char *mapping; +int ret; + + np = dev->of_node; + desc =devm_kzalloc (dev,sizeof (*desc),GFP_KERNEL ); +if (!desc) +return -ENOMEM ; + + timing =devm_kzalloc (dev,sizeof (*timing),GFP_KERNEL ); +if (!timing) +return -ENOMEM ; + + ret =of_get_display_timing (np,"panel-timing" , timing); +if (ret <0 ) { +dev_err (dev,"%pOF: no panel-timing node found for \"panel-dpi\" binding\n" , + np); +return ret; + } + + desc->timings = timing; + desc->num_timings =1 ; + +of_property_read_u32 (np,"width-mm" , &desc->size.width); +of_property_read_u32 (np,"height-mm" , &desc->size.height); + +of_property_read_string (np,"data-mapping" , &mapping); +if (!strcmp (mapping,"rgb24" )) + desc->bus_format =MEDIA_BUS_FMT_RGB888_1X24 ; +else if (!strcmp (mapping,"rgb565" )) + desc->bus_format =MEDIA_BUS_FMT_RGB565_1X16 ; +else if (!strcmp (mapping,"bgr666" )) + desc->bus_format =MEDIA_BUS_FMT_RGB666_1X18 ; +else if (!strcmp (mapping,"lvds666" )) + desc->bus_format =MEDIA_BUS_FMT_RGB666_1X24_CPADHI ; + +/* Extract bus_flags from display_timing */ + bus_flags =0 ; + vm.flags = timing->flags; +drm_bus_flags_from_videomode (&vm, &bus_flags); + desc->bus_flags = bus_flags; + +/* We do not know the connector for the DT node, so guess it */ + desc->connector_type =DRM_MODE_CONNECTOR_DPI ; + + panel->desc = desc; + +return 0 ; +} +#define PANEL_SIMPLE_BOUNDS_CHECK (to_check, bounds, field) \ (to_check->field.typ >= bounds->field.min && \ to_check->field.typ <= bounds->field.max)
@@ -437,8 +496,15 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)return -EPROBE_DEFER ; } -if (!of_get_display_timing (dev->of_node,"panel-timing" , &dt)) -panel_simple_parse_panel_timing_node (dev, panel, &dt); +if (desc == &panel_dpi) { +/* Handle the generic panel-dpi binding */ + err =panel_dpi_probe (dev, panel); +if (err) + goto free_ddc; + }else { +if (!of_get_display_timing (dev->of_node,"panel-timing" , &dt)) +panel_simple_parse_panel_timing_node (dev, panel, &dt); + }drm_panel_init (&panel->base, dev, &panel_simple_funcs, desc->connector_type);
@@ -3688,6 +3754,10 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "winstar,wf35ltiacd", .data = &winstar_wf35ltiacd, + }, { + /* Must be the last entry */ + .compatible = "panel-dpi", + .data = &panel_dpi, }, { /* sentinel */ }
Signature · 1 line
2.20.1
Re: [RFC PATCH v3 5/5] drm/panel: simple: add panel-dpi support
Quoted 25 lines · Sam Ravnborg
RFC only - not tested yet!
The panel-dpi compatible is a fallback that
allows the DT to specify the timing.When matching panel-dpi expect the device tree to include the timing information for the display-panel.
Background for this change:
There are a lot of panels and new models hits the market very often. It is a lost cause trying to chase them all and users of new panels will often find them in situations that the panel they ues are not supported by the kernel.
On top of this a lot of panels are customized based on customer specifications.Including the panel timing in the device tree allows for a simple way to describe the actual HW and use this description in a generic way in the kernel.
This allows uses of proprietary panels, or panels which are not included in the kernel, to specify the timing in the device tree together with all the other HW descriptions.
And thus, using the device tree it is then easy to add support for an otherwise unknown panel.
Quoted 8 lines
The current support expect panels that do not require any delays for prepare/enable/disable/unprepare.
Signed-off-by Sam Ravnborg <[email protected]>Cc Thierry Reding <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Maxime Ripard <[email protected]>Cc Oleksandr Suvorov <[email protected]>
I submitted a similar patch a year ago:
https://lists.freedesktop.org/archives/dri-devel/2019-March/209682.html
So I'm all for it :)
Regardless of the outcome of this discussion, for all the patches:
Maxime
Re: [RFC PATCH v3 5/5] drm/panel: simple: add panel-dpi support
In reply to Sam RavnborgQuoted 2 lines · Sam Ravnborg
RFC only - not tested yet!
I've just tested this patch on Apalis iMX6Q and Colibri iMX7D using panel settings from the following patch:
https://lore.kernel.org/linux-arm-kernel/[email protected]/
It works for me, thanks!
Quoted 138 lines
The panel-dpi compatible is a fallback that
allows the DT to specify the timing.When matching panel-dpi expect the device tree to include the timing information for the display-panel.
Background for this change:
There are a lot of panels and new models hits the market very often. It is a lost cause trying to chase them all and users of new panels will often find them in situations that the panel they ues are not supported by the kernel.
On top of this a lot of panels are customized based on customer specifications.Including the panel timing in the device tree allows for a simple way to describe the actual HW and use this description in a generic way in the kernel.
This allows uses of proprietary panels, or panels which are not included in the kernel, to specify the timing in the device tree together with all the other HW descriptions.
And thus, using the device tree it is then easy to add support for an otherwise unknown panel.The current support expect panels that do not require any delays for prepare/enable/disable/unprepare.
Signed-off-by Sam Ravnborg <[email protected]>Cc Thierry Reding <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Maxime Ripard <[email protected]>Cc Oleksandr Suvorov <[email protected]>--- drivers/gpu/drm/panel/panel-simple.c | 74 +++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-)drivers/gpu/drm/panel/panel-simple.c +72
-3@@ -351,6 +351,65 @@ static const struct drm_panel_funcs panel_simple_funcs = { .get_timings = panel_simple_get_timings, }; +static struct panel_desc panel_dpi; + +static int panel_dpi_probe (struct device *dev, +struct panel_simple *panel) +{ +struct display_timing *timing; +const struct device_node *np; +struct panel_desc *desc; +unsigned int bus_flags; +struct videomode vm; +const char *mapping; +int ret; + + np = dev->of_node; + desc =devm_kzalloc (dev,sizeof (*desc),GFP_KERNEL ); +if (!desc) +return -ENOMEM ; + + timing =devm_kzalloc (dev,sizeof (*timing),GFP_KERNEL ); +if (!timing) +return -ENOMEM ; + + ret =of_get_display_timing (np,"panel-timing" , timing); +if (ret <0 ) { +dev_err (dev,"%pOF: no panel-timing node found for \"panel-dpi\" binding\n" , + np); +return ret; + } + + desc->timings = timing; + desc->num_timings =1 ; + +of_property_read_u32 (np,"width-mm" , &desc->size.width); +of_property_read_u32 (np,"height-mm" , &desc->size.height); + +of_property_read_string (np,"data-mapping" , &mapping); +if (!strcmp (mapping,"rgb24" )) + desc->bus_format =MEDIA_BUS_FMT_RGB888_1X24 ; +else if (!strcmp (mapping,"rgb565" )) + desc->bus_format =MEDIA_BUS_FMT_RGB565_1X16 ; +else if (!strcmp (mapping,"bgr666" )) + desc->bus_format =MEDIA_BUS_FMT_RGB666_1X18 ; +else if (!strcmp (mapping,"lvds666" )) + desc->bus_format =MEDIA_BUS_FMT_RGB666_1X24_CPADHI ; + +/* Extract bus_flags from display_timing */ + bus_flags =0 ; + vm.flags = timing->flags; +drm_bus_flags_from_videomode (&vm, &bus_flags); + desc->bus_flags = bus_flags; + +/* We do not know the connector for the DT node, so guess it */ + desc->connector_type =DRM_MODE_CONNECTOR_DPI ; + + panel->desc = desc; + +return 0 ; +} +#define PANEL_SIMPLE_BOUNDS_CHECK (to_check, bounds, field) \ (to_check->field.typ >= bounds->field.min && \ to_check->field.typ <= bounds->field.max)@@ -437,8 +496,15 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)return -EPROBE_DEFER ; } -if (!of_get_display_timing (dev->of_node,"panel-timing" , &dt)) -panel_simple_parse_panel_timing_node (dev, panel, &dt); +if (desc == &panel_dpi) { +/* Handle the generic panel-dpi binding */ + err =panel_dpi_probe (dev, panel); +if (err) + goto free_ddc; + }else { +if (!of_get_display_timing (dev->of_node,"panel-timing" , &dt)) +panel_simple_parse_panel_timing_node (dev, panel, &dt); + }drm_panel_init (&panel->base, dev, &panel_simple_funcs, desc->connector_type);@@ -3688,6 +3754,10 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "winstar,wf35ltiacd", .data = &winstar_wf35ltiacd, + }, { + /* Must be the last entry */ + .compatible = "panel-dpi", + .data = &panel_dpi, }, { /* sentinel */ } --2.20.1
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Best regards
Oleksandr Suvorov
Toradex AG
Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41 500 4800 (main line)
Re: [RFC PATCH v3 5/5] drm/panel: simple: add panel-dpi support
In reply to Sam RavnborgHi Sam,
Thank you for the patch.
Quoted 5 lines · Sam Ravnborg
RFC only - not tested yet!
The panel-dpi compatible is a fallback that
allows the DT to specify the timing.
Quoted 7 lines
When matching panel-dpi expect the device tree to include the timing information for the display-panel.
Background for this change:
There are a lot of panels and new models hits the market very often. It is a lost cause trying to chase them all and users of new panels will often find them in situations that the panel they ues are not
s/ues/use/
Quoted 13 lines
supported by the kernel.
On top of this a lot of panels are customized based on customer specifications.Including the panel timing in the device tree allows for a simple way to describe the actual HW and use this description in a generic way in the kernel.
This allows uses of proprietary panels, or panels which are not included in the kernel, to specify the timing in the device tree together with all the other HW descriptions.
And thus, using the device tree it is then easy to add support for an otherwise unknown panel.
Quoted 2 lines
The current support expect panels that do not require any delays for prepare/enable/disable/unprepare.
I've proposed something similar a few times in the past, so I can't disagree :-)
Quoted 14 lines
Signed-off-by Sam Ravnborg <[email protected]>Cc Thierry Reding <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Maxime Ripard <[email protected]>Cc Oleksandr Suvorov <[email protected]>--- drivers/gpu/drm/panel/panel-simple.c | 74 +++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-)drivers/gpu/drm/panel/panel-simple.c +0
-0
drivers/gpu/drm/panel/panel-simple.c static const struct drm_panel_funcs panel_simple_funcs = { · line 354
Quoted 4 lines
drivers/gpu/drm/panel/panel-simple.c +1
-0@@ -351,6 +351,65 @@ static const struct drm_panel_funcs panel_simple_funcs = { .get_timings = panel_simple_get_timings, }; +static struct panel_desc panel_dpi;
Do you need this, can't you set data to 0 in the panel-dpi entry ?
Quoted 33 lines
drivers/gpu/drm/panel/panel-simple.c +33
-0+ +static int panel_dpi_probe (struct device *dev, +struct panel_simple *panel) +{ +struct display_timing *timing; +const struct device_node *np; +struct panel_desc *desc; +unsigned int bus_flags; +struct videomode vm; +const char *mapping; +int ret; + + np = dev->of_node; + desc =devm_kzalloc (dev,sizeof (*desc),GFP_KERNEL ); +if (!desc) +return -ENOMEM ; + + timing =devm_kzalloc (dev,sizeof (*timing),GFP_KERNEL ); +if (!timing) +return -ENOMEM ; + + ret =of_get_display_timing (np,"panel-timing" , timing); +if (ret <0 ) { +dev_err (dev,"%pOF: no panel-timing node found for \"panel-dpi\" binding\n" , + np); +return ret; + } + + desc->timings = timing; + desc->num_timings =1 ; + +of_property_read_u32 (np,"width-mm" , &desc->size.width); +of_property_read_u32 (np,"height-mm" , &desc->size.height);
drivers/gpu/drm/panel/panel-simple.c static const struct drm_panel_funcs panel_simple_funcs = { · line 397
Quoted 10 lines
drivers/gpu/drm/panel/panel-simple.c +10
-0+ +of_property_read_string (np,"data-mapping" , &mapping); +if (!strcmp (mapping,"rgb24" )) + desc->bus_format =MEDIA_BUS_FMT_RGB888_1X24 ; +else if (!strcmp (mapping,"rgb565" )) + desc->bus_format =MEDIA_BUS_FMT_RGB565_1X16 ; +else if (!strcmp (mapping,"bgr666" )) + desc->bus_format =MEDIA_BUS_FMT_RGB666_1X18 ; +else if (!strcmp (mapping,"lvds666" )) + desc->bus_format =MEDIA_BUS_FMT_RGB666_1X24_CPADHI ;
I think you've dropped lvds666 in the DT bindings, so this should be dropped too. Furthermore, I think the data-mapping property should be reconsidered (see my review of the bindings), so this would need to change too.
Quoted 47 lines
drivers/gpu/drm/panel/panel-simple.c +28
-2+ +/* Extract bus_flags from display_timing */ + bus_flags =0 ; + vm.flags = timing->flags; +drm_bus_flags_from_videomode (&vm, &bus_flags); + desc->bus_flags = bus_flags; + +/* We do not know the connector for the DT node, so guess it */ + desc->connector_type =DRM_MODE_CONNECTOR_DPI ; + + panel->desc = desc; + +return 0 ; +} +#define PANEL_SIMPLE_BOUNDS_CHECK (to_check, bounds, field) \ (to_check->field.typ >= bounds->field.min && \ to_check->field.typ <= bounds->field.max)@@ -437,8 +496,15 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)return -EPROBE_DEFER ; } -if (!of_get_display_timing (dev->of_node,"panel-timing" , &dt)) -panel_simple_parse_panel_timing_node (dev, panel, &dt); +if (desc == &panel_dpi) { +/* Handle the generic panel-dpi binding */ + err =panel_dpi_probe (dev, panel); +if (err) + goto free_ddc; + }else { +if (!of_get_display_timing (dev->of_node,"panel-timing" , &dt)) +panel_simple_parse_panel_timing_node (dev, panel, &dt); + }drm_panel_init (&panel->base, dev, &panel_simple_funcs, desc->connector_type);@@ -3688,6 +3754,10 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "winstar,wf35ltiacd", .data = &winstar_wf35ltiacd, + }, { + /* Must be the last entry */ + .compatible = "panel-dpi", + .data = &panel_dpi, }, { /* sentinel */ }
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 33 lines · Sam Ravnborg
This set of patches convert display-timing.txt to DT schema.
To do that add apanel-timing.yamlfile that include all the panel-timing properties and use this in panel-common and in display-timings.panel-dpi was also converted so we have no .txt users left of panel-timing in panel/
Everything passed
dt_binding_check- and the trivial errors I tried in the examples was all catched during validation.This work was triggered by a patch-set from Oleksandr Suvorov aiming at updating panel-lvds to support panel-dpi.
This will make it simple to add additional properties to panel-dpi.Thanks for the quick responses on v2 and likewise the quick feedback on the request for the license change!
Highlight from v3 - se individual patches for details.
- Added panel-dpi support to panel-simple.
We can now add a simple panel just by addding timing parameters in a DT node
The patch [5/5] is RFC as test is pending
- To support panel-dpi in panel-simple - add a data-mapping property to panel-dpiHighlights from v2 - see individual patches for details.
- Got acks for the license change
- Simplfied panel-timings bindings
- panel-dpi can now be used without a panel specific compatible So panel-dpi can be used as a generic binding for dumb panelsFeedback welcome!
Quoted 8 lines
Sam
Sam Ravnborg (5):
dt-bindings: display: addpanel-timing.yaml
dt-bindings: display: convert display-timings to DT schema
dt-bindings: display: convert panel-dpi to DT schema
dt-bindings: display: add data-mapping to panel-dpi drm/panel: simple: add panel-dpi support
All patches now pushed to drm-misc-next.
Dropped lvds666 when applying the patches.
Sam
Quoted 11 lines
.../bindings/display/panel/display-timing.txt | 124 +---------- .../bindings/display/panel/display-timings.yaml | 77 +++++++ .../bindings/display/panel/panel-common.yaml | 15 +- .../bindings/display/panel/panel-dpi.txt | 50 ----- .../bindings/display/panel/panel-dpi.yaml | 82 ++++++++ .../bindings/display/panel/panel-timing.yaml | 227 +++++++++++++++++++++ drivers/gpu/drm/panel/panel-simple.c | 74 ++++++- 7 files changed, 470 insertions(+), 179 deletions(-)
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Sam,
Quoted 43 lines · Sam Ravnborg
Quoted 33 lines · Sam Ravnborg
This set of patches convert display-timing.txt to DT schema.
To do that add apanel-timing.yamlfile that include all the panel-timing properties and use this in panel-common and in display-timings.panel-dpi was also converted so we have no .txt users left of panel-timing in panel/
Everything passed
dt_binding_check- and the trivial errors I tried in the examples was all catched during validation.This work was triggered by a patch-set from Oleksandr Suvorov aiming at updating panel-lvds to support panel-dpi.
This will make it simple to add additional properties to panel-dpi.Thanks for the quick responses on v2 and likewise the quick feedback on the request for the license change!
Highlight from v3 - se individual patches for details.
- Added panel-dpi support to panel-simple.
We can now add a simple panel just by addding timing parameters in a DT node
The patch [5/5] is RFC as test is pending
- To support panel-dpi in panel-simple - add a data-mapping property to panel-dpiHighlights from v2 - see individual patches for details.
- Got acks for the license change
- Simplfied panel-timings bindings
- panel-dpi can now be used without a panel specific compatible So panel-dpi can be used as a generic binding for dumb panelsFeedback welcome!
Quoted 8 lines
Sam
Sam Ravnborg (5):
dt-bindings: display: addpanel-timing.yaml
dt-bindings: display: convert display-timings to DT schema
dt-bindings: display: convert panel-dpi to DT schema
dt-bindings: display: add data-mapping to panel-dpi drm/panel: simple: add panel-dpi support
Quoted 2 lines
All patches now pushed to drm-misc-next.
Dropped lvds666 when applying the patches.
My feedback is a bit late. Would you like to still take it into consideration yourself, or would you like me to submit patches ?
Quoted 9 lines
Quoted 9 lines
.../bindings/display/panel/display-timing.txt | 124 +---------- .../bindings/display/panel/display-timings.yaml | 77 +++++++ .../bindings/display/panel/panel-common.yaml | 15 +- .../bindings/display/panel/panel-dpi.txt | 50 ----- .../bindings/display/panel/panel-dpi.yaml | 82 ++++++++ .../bindings/display/panel/panel-timing.yaml | 227 +++++++++++++++++++++ drivers/gpu/drm/panel/panel-simple.c | 74 ++++++- 7 files changed, 470 insertions(+), 179 deletions(-)
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel