drm: LogiCVC display controller support
Subsystems (5)
v8 cover drm: LogiCVC display controller support
This series introduces support for the LogiCVC display controller. The controller is a bit unusual since it is usually loaded as programmable logic on Xilinx FPGAs or Zynq-7000 SoCs. More details are presented on the main commit for the driver.
More information about the controller is available on the dedicated web page: https://www.logicbricks.com/Products/logiCVC-ML.aspx
Note that this driver has rather simple connector management, which was not converted to drm_panel_bridge to keep the ability to enable the panel at first vblank but also to support DVI.
Change since v7:
- Replaced DRM_INFO/DRM_ERROR/DRM_DEBUG_DRIVER with fashions using drm_device;
- Fixed yaml binding alignment issue;
- Renamed logicvc-display name to the generic "display" name;
- Added patternProperties match for display in the parent mfd binding;
- Used drm_atomic_get_new_crtc_state when needed;
- Checked mode in mode_valid instead of atomic_check;
- Switched to drmm_mode_config_init;
- Removed useless logicvc_connector_destroy wrapper;
- Removed useless drm_dev_put calls;
- Removed atomic_commit_tail that enables the panel and streamlined the logic;
- Reworked Makefile cosmetics;
- Fixed checkpatch issues.
Changes since v6:
- Updated to the latest DRM internal API changes;
- Used an enum to index dt properties instead of the name string.
Changes since v5:
- Subclass DRM device and use devm_drm_dev_alloc for allocation;
- Removed call to drm_mode_config_cleanup (done automatically with devm);
- Some related code cleanups;
- Bring back not-for-merge patch adding colorkey support.
Changes since v4:
- Updated to internal DRM API changes (rebased on drm-misc-next);
- Added Kconfig dependency on OF;
- Added MAINTAINERS entry;
- Used drm_err and dev_err instead of DRM_ERROR where possible;
- Various cosmetic changes.
Changes since v3:
- Rebased on latest drm-misc;
- Improved event lock wrapping;
- Added collect tag;
- Added color-key support patch (not for merge, for reference only).
Changes since v2:
- Fixed and slightly improved dt schema.
Changes since v1:
- Switched dt bindings documentation to dt schema;
- Described more possible dt parameters;
- Added support for the lvds-3bit interface;
- Added support for grabbing syscon regmap from parent node;
- Removed layers count property and count layers child nodes instead.
Paul Kocialkowski (4):
dt-bindings: display: Document the Xylon LogiCVC display controller
dt-bindings: mfd: logicvc: Add patternProperties for the display
drm: Add support for the LogiCVC display controller
NOTFORMERGE: drm/logicvc: Add plane colorkey support
.../display/xylon,logicvc-display.yaml | 313 +++++++ .../bindings/mfd/xylon,logicvc.yaml | 3 + MAINTAINERS | 6 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/logicvc/Kconfig | 9 + drivers/gpu/drm/logicvc/Makefile | 9 + drivers/gpu/drm/logicvc/logicvc_crtc.c | 280 +++++++ drivers/gpu/drm/logicvc/logicvc_crtc.h | 21 + drivers/gpu/drm/logicvc/logicvc_drm.c | 474 +++++++++++ drivers/gpu/drm/logicvc/logicvc_drm.h | 67 ++ drivers/gpu/drm/logicvc/logicvc_interface.c | 214 +++++ drivers/gpu/drm/logicvc/logicvc_interface.h | 28 + drivers/gpu/drm/logicvc/logicvc_layer.c | 762 ++++++++++++++++++ drivers/gpu/drm/logicvc/logicvc_layer.h | 71 ++ drivers/gpu/drm/logicvc/logicvc_mode.c | 80 ++ drivers/gpu/drm/logicvc/logicvc_mode.h | 15 + drivers/gpu/drm/logicvc/logicvc_of.c | 185 +++++ drivers/gpu/drm/logicvc/logicvc_of.h | 46 ++ drivers/gpu/drm/logicvc/logicvc_regs.h | 88 ++ 20 files changed, 2674 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml create mode 100644 drivers/gpu/drm/logicvc/Kconfig create mode 100644 drivers/gpu/drm/logicvc/Makefile create mode 100644 drivers/gpu/drm/logicvc/logicvc_crtc.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_crtc.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_drm.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_drm.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_interface.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_interface.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_layer.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_layer.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_mode.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_mode.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_of.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_of.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_regs.h
Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v8 1/4 dt-bindings: display: Document the Xylon LogiCVC display controller
The Xylon LogiCVC is a display controller implemented as programmable logic in Xilinx FPGAs.
--- .../display/xylon,logicvc-display.yaml | 313 ++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +313 -0
@@ -0,0 +1,313 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2019 Bootlin +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/display/xylon,logicvc-display.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Xylon LogiCVC display controller + +maintainers: + - Paul Kocialkowski <[email protected]> + +description: | + The Xylon LogiCVC is a display controller that supports multiple layers. + It is usually implemented as programmable logic and was optimized for use + with Xilinx Zynq-7000 SoCs and Xilinx FPGAs. + + Because the controller is intended for use in a FPGA, most of the + configuration of the controller takes place at logic configuration bitstream + synthesis time. As a result, many of the device-tree bindings are meant to + reflect the synthesis configuration and must not be configured differently. + Matching synthesis parameters are provided when applicable. + + Layers are declared in the "layers" sub-node and have dedicated configuration. + In version 3 of the controller, each layer has fixed memory offset and address + starting from the video memory base address for its framebuffer. In version 4, + framebuffers are configured with a direct memory address instead. + +properties: + compatible: + enum: + - xylon,logicvc-3.02.a-display + - xylon,logicvc-4.01.a-display + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 4 + + clock-names: + minItems: 1 + maxItems: 4 + items: + # vclk is required and must be provided as first item. + - const: vclk + # Other clocks are optional and can be provided in any order. + - enum: + - vclk2 + - lvdsclk + - lvdsclkn + - enum: + - vclk2 + - lvdsclk + - lvdsclkn + - enum: + - vclk2 + - lvdsclk + - lvdsclkn + + interrupts: + maxItems: 1 + + memory-region: + maxItems: 1 + + xylon,display-interface: + enum: + # Parallel RGB interface (C_DISPLAY_INTERFACE == 0) + - parallel-rgb + # ITU-T BR656 interface (C_DISPLAY_INTERFACE == 1) + - bt656 + # 4-bit LVDS interface (C_DISPLAY_INTERFACE == 2) + - lvds-4bits + # 3-bit LVDS interface (C_DISPLAY_INTERFACE == 4) + - lvds-3bits + # DVI interface (C_DISPLAY_INTERFACE == 5) + - dvi + description: Display output interface (C_DISPLAY_INTERFACE). + + xylon,display-colorspace: + enum: + # RGB colorspace (C_DISPLAY_COLOR_SPACE == 0) + - rgb + # YUV 4:2:2 colorspace (C_DISPLAY_COLOR_SPACE == 1) + - yuv422 + # YUV 4:4:4 colorspace (C_DISPLAY_COLOR_SPACE == 2) + - yuv444 + description: Display output colorspace (C_DISPLAY_COLOR_SPACE). + + xylon,display-depth: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: Display output depth (C_PIXEL_DATA_WIDTH). + + xylon,row-stride: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: Fixed number of pixels in a framebuffer row (C_ROW_STRIDE). + + xylon,syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + Syscon phandle representing the top-level logicvc instance, useful when + the parent node is not the top-level logicvc instance. + + xylon,dithering: + $ref: "/schemas/types.yaml#/definitions/flag" + description: Dithering module is enabled (C_XCOLOR) + + xylon,background-layer: + $ref: "/schemas/types.yaml#/definitions/flag" + description: | + The last layer is used to display a black background (C_USE_BACKGROUND). + The layer must still be registered. + + xylon,layers-configurable: + $ref: "/schemas/types.yaml#/definitions/flag" + description: | + Configuration of layers' size, position and offset is enabled + (C_USE_SIZE_POSITION). + + layers: + type: object + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^layer@[0-9]+$": + type: object + + properties: + reg: + maxItems: 1 + + xylon,layer-depth: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: Layer depth (C_LAYER_X_DATA_WIDTH). + + xylon,layer-colorspace: + enum: + # RGB colorspace (C_LAYER_X_TYPE == 0) + - rgb + # YUV packed colorspace (C_LAYER_X_TYPE == 0) + - yuv + description: Layer colorspace (C_LAYER_X_TYPE). + + xylon,layer-alpha-mode: + enum: + # Alpha is configured layer-wide (C_LAYER_X_ALPHA_MODE == 0) + - layer + # Alpha is configured per-pixel (C_LAYER_X_ALPHA_MODE == 1) + - pixel + description: Alpha mode for the layer (C_LAYER_X_ALPHA_MODE). + + xylon,layer-base-offset: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: | + Offset in number of lines (C_LAYER_X_OFFSET) starting from the + video RAM base (C_VMEM_BASEADDR), only for version 3. + + xylon,layer-buffer-offset: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: | + Offset in number of lines (C_BUFFER_*_OFFSET) starting from the + layer base offset for the second buffer used in double-buffering. + + xylon,layer-primary: + $ref: "/schemas/types.yaml#/definitions/flag" + description: | + Layer should be registered as a primary plane (exactly one is + required). + + additionalProperties: false + + required: + - reg + - xylon,layer-depth + - xylon,layer-colorspace + - xylon,layer-alpha-mode + + required: + - "#address-cells" + - "#size-cells" + - layer@0 + + additionalProperties: false + + description: | + The description of the display controller layers, containing layer + sub-nodes that each describe a registered layer. + + ports: + type: object + +additionalProperties: false + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - xylon,display-interface + - xylon,display-colorspace + - xylon,display-depth + - xylon,row-stride + - layers + - ports + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + logicvc: logicvc@43c00000 { + compatible = "xylon,logicvc-3.02.a", "syscon", "simple-mfd"; + reg = <0x43c00000 0x6000>; + + #address-cells = <1>; + #size-cells = <1>; + + logicvc_display: display@0 { + compatible = "xylon,logicvc-3.02.a-display"; + reg = <0x0 0x6000>; + + memory-region = <&logicvc_cma>; + + clocks = <&logicvc_vclk 0>, <&logicvc_lvdsclk 0>; + clock-names = "vclk", "lvdsclk"; + + interrupt-parent = <&intc>; + interrupts = <0 34 IRQ_TYPE_LEVEL_HIGH>; + + xylon,display-interface = "lvds-4bits"; + xylon,display-colorspace = "rgb"; + xylon,display-depth = <16>; + xylon,row-stride = <1024>; + + xylon,layers-configurable; + + layers { + #address-cells = <1>; + #size-cells = <0>; + + layer@0 { + reg = <0>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <0>; + xylon,layer-buffer-offset = <480>; + xylon,layer-primary; + }; + + layer@1 { + reg = <1>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <2400>; + xylon,layer-buffer-offset = <480>; + }; + + layer@2 { + reg = <2>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <960>; + xylon,layer-buffer-offset = <480>; + }; + + layer@3 { + reg = <3>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <480>; + xylon,layer-buffer-offset = <480>; + }; + + layer@4 { + reg = <4>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <8192>; + xylon,layer-buffer-offset = <480>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + logicvc_out: port@1 { + reg = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + logicvc_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + };
Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Rob Herring
maintainerRe: [PATCH v8 1/4] dt-bindings: display: Document the Xylon LogiCVC display controller
Quoted 10 lines · Paul Kocialkowski
The Xylon LogiCVC is a display controller implemented as programmable logic in Xilinx FPGAs.
Signed-off-by Paul Kocialkowski <[email protected]>Acked-by Rob Herring <[email protected]>--- .../display/xylon,logicvc-display.yaml | 313 ++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/xylon,logicvc-display.example.dt.yaml: logicvc@43c00000: 'display@0' does not match any of the regexes: '^gpio@[0-9a-f]+$', 'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/xylon,logicvc.yaml
See https://patchwork.ozlabs.org/patch/1420307
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v8 1/4] dt-bindings: display: Document the Xylon LogiCVC display controller
Hi,
Quoted 14 lines · Rob Herring
Quoted 10 lines · Paul Kocialkowski
The Xylon LogiCVC is a display controller implemented as programmable logic in Xilinx FPGAs.
Signed-off-by Paul Kocialkowski <[email protected]>Acked-by Rob Herring <[email protected]>--- .../display/xylon,logicvc-display.yaml | 313 ++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/xylon,logicvc-display.yamlMy bot found errors running 'make
dt_binding_check' on your patch:
Quoted 7 lines
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/xylon,logicvc-display.example.dt.yaml: logicvc@43c00000: 'display@0' does not match any of the regexes: '^gpio@[0-9a-f]+$', 'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/xylon,logicvc.yaml
Just so you know, this specific issue is fixed in patch 2/4.
Cheers,
Paul
Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Rob Herring
maintainerRe: [PATCH v8 1/4] dt-bindings: display: Document the Xylon LogiCVC display controller
In reply to Paul KocialkowskiQuoted 86 lines · Paul Kocialkowski
The Xylon LogiCVC is a display controller implemented as programmable logic in Xilinx FPGAs.
Signed-off-by Paul Kocialkowski <[email protected]>Acked-by Rob Herring <[email protected]>--- .../display/xylon,logicvc-display.yaml | 313 ++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/xylon,logicvc-display.yamlDocumentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +70
-0@@ -0,0 +1,313 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2019 Bootlin +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/display/xylon,logicvc-display.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Xylon LogiCVC display controller + +maintainers: + - Paul Kocialkowski <[email protected]> + +description: | + The Xylon LogiCVC is a display controller that supports multiple layers. + It is usually implemented as programmable logic and was optimized for use + with Xilinx Zynq-7000 SoCs and Xilinx FPGAs. + + Because the controller is intended for use in a FPGA, most of the + configuration of the controller takes place at logic configuration bitstream + synthesis time. As a result, many of the device-tree bindings are meant to + reflect the synthesis configuration and must not be configured differently. + Matching synthesis parameters are provided when applicable. + + Layers are declared in the "layers" sub-node and have dedicated configuration. + In version 3 of the controller, each layer has fixed memory offset and address + starting from the video memory base address for its framebuffer. In version 4, + framebuffers are configured with a direct memory address instead. + +properties: + compatible: + enum: + - xylon,logicvc-3.02.a-display + - xylon,logicvc-4.01.a-display + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 4 + + clock-names: + minItems: 1 + maxItems: 4 + items: + # vclk is required and must be provided as first item. + - const: vclk + # Other clocks are optional and can be provided in any order. + - enum: + - vclk2 + - lvdsclk + - lvdsclkn + - enum: + - vclk2 + - lvdsclk + - lvdsclkn + - enum: + - vclk2 + - lvdsclk + - lvdsclkn + + interrupts: + maxItems: 1 + + memory-region: + maxItems: 1 + + xylon,display-interface: + enum: + # Parallel RGB interface (C_DISPLAY_INTERFACE == 0)
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml line 80
Quoted 10 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +10
-0+ - parallel-rgb + # ITU-T BR656 interface (C_DISPLAY_INTERFACE == 1) + - bt656 + # 4-bit LVDS interface (C_DISPLAY_INTERFACE == 2) + - lvds-4bits + # 3-bit LVDS interface (C_DISPLAY_INTERFACE == 4) + - lvds-3bits + # DVI interface (C_DISPLAY_INTERFACE == 5) + - dvi + description: Display output interface (C_DISPLAY_INTERFACE).
As I mentioned before, we have standard properties for these or you know the setting based on the panel/bridge attached.
Quoted 14 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +14
-0+ + xylon,display-colorspace: + enum: + # RGB colorspace (C_DISPLAY_COLOR_SPACE == 0) + - rgb + # YUV 4:2:2 colorspace (C_DISPLAY_COLOR_SPACE == 1) + - yuv422 + # YUV 4:4:4 colorspace (C_DISPLAY_COLOR_SPACE == 2) + - yuv444 + description: Display output colorspace (C_DISPLAY_COLOR_SPACE). + + xylon,display-depth: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: Display output depth (C_PIXEL_DATA_WIDTH).
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml line 104
Quoted 10 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +10
-0+ + xylon,row-stride: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: Fixed number of pixels in a framebuffer row (C_ROW_STRIDE). + + xylon,syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + Syscon phandle representing the top-level logicvc instance, useful when + the parent node is not the top-level logicvc instance.
Why do you need to support both ways? Drop this and require it to be the parent node.
Quoted 84 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +84
-0+ + xylon,dithering: + $ref: "/schemas/types.yaml#/definitions/flag" + description: Dithering module is enabled (C_XCOLOR) + + xylon,background-layer: + $ref: "/schemas/types.yaml#/definitions/flag" + description: | + The last layer is used to display a black background (C_USE_BACKGROUND). + The layer must still be registered. + + xylon,layers-configurable: + $ref: "/schemas/types.yaml#/definitions/flag" + description: | + Configuration of layers' size, position and offset is enabled + (C_USE_SIZE_POSITION). + + layers: + type: object + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^layer@[0-9]+$": + type: object + + properties: + reg: + maxItems: 1 + + xylon,layer-depth: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: Layer depth (C_LAYER_X_DATA_WIDTH). + + xylon,layer-colorspace: + enum: + # RGB colorspace (C_LAYER_X_TYPE == 0) + - rgb + # YUV packed colorspace (C_LAYER_X_TYPE == 0) + - yuv + description: Layer colorspace (C_LAYER_X_TYPE). + + xylon,layer-alpha-mode: + enum: + # Alpha is configured layer-wide (C_LAYER_X_ALPHA_MODE == 0) + - layer + # Alpha is configured per-pixel (C_LAYER_X_ALPHA_MODE == 1) + - pixel + description: Alpha mode for the layer (C_LAYER_X_ALPHA_MODE). + + xylon,layer-base-offset: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: | + Offset in number of lines (C_LAYER_X_OFFSET) starting from the + video RAM base (C_VMEM_BASEADDR), only for version 3. + + xylon,layer-buffer-offset: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: | + Offset in number of lines (C_BUFFER_*_OFFSET) starting from the + layer base offset for the second buffer used in double-buffering. + + xylon,layer-primary: + $ref: "/schemas/types.yaml#/definitions/flag" + description: | + Layer should be registered as a primary plane (exactly one is + required). + + additionalProperties: false + + required: + - reg + - xylon,layer-depth + - xylon,layer-colorspace + - xylon,layer-alpha-mode + + required: + - "#address-cells" + - "#size-cells"
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml line 198
Quoted 10 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +10
-0+ - layer@0 + + additionalProperties: false + + description: | + The description of the display controller layers, containing layer + sub-nodes that each describe a registered layer. + + ports: + type: object
You have to define what each port is. If only 1, then use just 'port'.
We now have graph.yaml (in dt-schema). You need to reference that here. See drm-misc-next as everything has been converted.
Quoted 118 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +115
-0+ +additionalProperties: false + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - xylon,display-interface + - xylon,display-colorspace + - xylon,display-depth + - xylon,row-stride + - layers + - ports + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + logicvc: logicvc@43c00000 { + compatible = "xylon,logicvc-3.02.a", "syscon", "simple-mfd"; + reg = <0x43c00000 0x6000>; + + #address-cells = <1>; + #size-cells = <1>; + + logicvc_display: display@0 { + compatible = "xylon,logicvc-3.02.a-display"; + reg = <0x0 0x6000>; + + memory-region = <&logicvc_cma>; + + clocks = <&logicvc_vclk 0>, <&logicvc_lvdsclk 0>; + clock-names = "vclk", "lvdsclk"; + + interrupt-parent = <&intc>; + interrupts = <0 34 IRQ_TYPE_LEVEL_HIGH>; + + xylon,display-interface = "lvds-4bits"; + xylon,display-colorspace = "rgb"; + xylon,display-depth = <16>; + xylon,row-stride = <1024>; + + xylon,layers-configurable; + + layers { + #address-cells = <1>; + #size-cells = <0>; + + layer@0 { + reg = <0>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <0>; + xylon,layer-buffer-offset = <480>; + xylon,layer-primary; + }; + + layer@1 { + reg = <1>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <2400>; + xylon,layer-buffer-offset = <480>; + }; + + layer@2 { + reg = <2>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <960>; + xylon,layer-buffer-offset = <480>; + }; + + layer@3 { + reg = <3>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <480>; + xylon,layer-buffer-offset = <480>; + }; + + layer@4 { + reg = <4>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <8192>; + xylon,layer-buffer-offset = <480>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + logicvc_out: port@1 { + reg = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + logicvc_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + };Signature · 1 line
2.29.2
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v8 1/4] dt-bindings: display: Document the Xylon LogiCVC display controller
Hi Rob,
I just found out as I'm about to send a new revision that I had not yet responded to your concerns here.
Quoted 92 lines · Rob Herring
Quoted 91 lines · Paul Kocialkowski
The Xylon LogiCVC is a display controller implemented as programmable logic in Xilinx FPGAs.
Signed-off-by Paul Kocialkowski <[email protected]>Acked-by Rob Herring <[email protected]>--- .../display/xylon,logicvc-display.yaml | 313 ++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/xylon,logicvc-display.yamlDocumentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +75
-0@@ -0,0 +1,313 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2019 Bootlin +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/display/xylon,logicvc-display.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Xylon LogiCVC display controller + +maintainers: + - Paul Kocialkowski <[email protected]> + +description: | + The Xylon LogiCVC is a display controller that supports multiple layers. + It is usually implemented as programmable logic and was optimized for use + with Xilinx Zynq-7000 SoCs and Xilinx FPGAs. + + Because the controller is intended for use in a FPGA, most of the + configuration of the controller takes place at logic configuration bitstream + synthesis time. As a result, many of the device-tree bindings are meant to + reflect the synthesis configuration and must not be configured differently. + Matching synthesis parameters are provided when applicable. + + Layers are declared in the "layers" sub-node and have dedicated configuration. + In version 3 of the controller, each layer has fixed memory offset and address + starting from the video memory base address for its framebuffer. In version 4, + framebuffers are configured with a direct memory address instead. + +properties: + compatible: + enum: + - xylon,logicvc-3.02.a-display + - xylon,logicvc-4.01.a-display + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 4 + + clock-names: + minItems: 1 + maxItems: 4 + items: + # vclk is required and must be provided as first item. + - const: vclk + # Other clocks are optional and can be provided in any order. + - enum: + - vclk2 + - lvdsclk + - lvdsclkn + - enum: + - vclk2 + - lvdsclk + - lvdsclkn + - enum: + - vclk2 + - lvdsclk + - lvdsclkn + + interrupts: + maxItems: 1 + + memory-region: + maxItems: 1 + + xylon,display-interface: + enum: + # Parallel RGB interface (C_DISPLAY_INTERFACE == 0) + - parallel-rgb + # ITU-T BR656 interface (C_DISPLAY_INTERFACE == 1) + - bt656 + # 4-bit LVDS interface (C_DISPLAY_INTERFACE == 2) + - lvds-4bits
Quoted 8 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml line 80
Quoted 5 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +5
-0+ # 3-bit LVDS interface (C_DISPLAY_INTERFACE == 4) + - lvds-3bits + # DVI interface (C_DISPLAY_INTERFACE == 5) + - dvi + description: Display output interface (C_DISPLAY_INTERFACE).As I mentioned before, we have standard properties for these or you know the setting based on the panel/bridge attached.
The point here is to indicate how the bitstream was configured and not to indicate what some run-time configuration should be. The bottomline is to let the driver have knowledge of the bitstream configuration, like it's done for the other properties.
This could typically be used by the driver to check if a connected panel/bridge is compatible or not with the bitstream configuration.
As a result, it doesn't reflect the general "bus configuration" for which we may have a generic property, but a bitstream configuration property that is specific to our hardware. Hence why I think it makes sense to have it described that way.
Quoted 19 lines
Quoted 19 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +19
-0+ + xylon,display-colorspace: + enum: + # RGB colorspace (C_DISPLAY_COLOR_SPACE == 0) + - rgb + # YUV 4:2:2 colorspace (C_DISPLAY_COLOR_SPACE == 1) + - yuv422 + # YUV 4:4:4 colorspace (C_DISPLAY_COLOR_SPACE == 2) + - yuv444 + description: Display output colorspace (C_DISPLAY_COLOR_SPACE). + + xylon,display-depth: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: Display output depth (C_PIXEL_DATA_WIDTH). + + xylon,row-stride: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: Fixed number of pixels in a framebuffer row (C_ROW_STRIDE). +
Quoted 8 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml line 104
Quoted 5 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +5
-0+ xylon,syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + Syscon phandle representing the top-level logicvc instance, useful when + the parent node is not the top-level logicvc instance.Why do you need to support both ways? Drop this and require it to be the parent node.
Fair enough, I guess I had seen similar things around but there's no real use-case as far as I know.
Quoted 97 lines
Quoted 84 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +84
-0+ + xylon,dithering: + $ref: "/schemas/types.yaml#/definitions/flag" + description: Dithering module is enabled (C_XCOLOR) + + xylon,background-layer: + $ref: "/schemas/types.yaml#/definitions/flag" + description: | + The last layer is used to display a black background (C_USE_BACKGROUND). + The layer must still be registered. + + xylon,layers-configurable: + $ref: "/schemas/types.yaml#/definitions/flag" + description: | + Configuration of layers' size, position and offset is enabled + (C_USE_SIZE_POSITION). + + layers: + type: object + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^layer@[0-9]+$": + type: object + + properties: + reg: + maxItems: 1 + + xylon,layer-depth: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: Layer depth (C_LAYER_X_DATA_WIDTH). + + xylon,layer-colorspace: + enum: + # RGB colorspace (C_LAYER_X_TYPE == 0) + - rgb + # YUV packed colorspace (C_LAYER_X_TYPE == 0) + - yuv + description: Layer colorspace (C_LAYER_X_TYPE). + + xylon,layer-alpha-mode: + enum: + # Alpha is configured layer-wide (C_LAYER_X_ALPHA_MODE == 0) + - layer + # Alpha is configured per-pixel (C_LAYER_X_ALPHA_MODE == 1) + - pixel + description: Alpha mode for the layer (C_LAYER_X_ALPHA_MODE). + + xylon,layer-base-offset: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: | + Offset in number of lines (C_LAYER_X_OFFSET) starting from the + video RAM base (C_VMEM_BASEADDR), only for version 3. + + xylon,layer-buffer-offset: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: | + Offset in number of lines (C_BUFFER_*_OFFSET) starting from the + layer base offset for the second buffer used in double-buffering. + + xylon,layer-primary: + $ref: "/schemas/types.yaml#/definitions/flag" + description: | + Layer should be registered as a primary plane (exactly one is + required). + + additionalProperties: false + + required: + - reg + - xylon,layer-depth + - xylon,layer-colorspace + - xylon,layer-alpha-mode + + required: + - "#address-cells" + - "#size-cells"Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml line 198
Quoted 10 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +10
-0+ - layer@0 + + additionalProperties: false + + description: | + The description of the display controller layers, containing layer + sub-nodes that each describe a registered layer. + + ports: + type: objectYou have to define what each port is. If only 1, then use just 'port'.
Quoted 2 lines
We now have
graph.yaml(in dt-schema). You need to reference that here. See drm-misc-next as everything has been converted.
I will definitely switch to a single port and describe its purpose.
Thanks!
Paul
Quoted 118 lines
Quoted 118 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +115
-0+ +additionalProperties: false + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - xylon,display-interface + - xylon,display-colorspace + - xylon,display-depth + - xylon,row-stride + - layers + - ports + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + logicvc: logicvc@43c00000 { + compatible = "xylon,logicvc-3.02.a", "syscon", "simple-mfd"; + reg = <0x43c00000 0x6000>; + + #address-cells = <1>; + #size-cells = <1>; + + logicvc_display: display@0 { + compatible = "xylon,logicvc-3.02.a-display"; + reg = <0x0 0x6000>; + + memory-region = <&logicvc_cma>; + + clocks = <&logicvc_vclk 0>, <&logicvc_lvdsclk 0>; + clock-names = "vclk", "lvdsclk"; + + interrupt-parent = <&intc>; + interrupts = <0 34 IRQ_TYPE_LEVEL_HIGH>; + + xylon,display-interface = "lvds-4bits"; + xylon,display-colorspace = "rgb"; + xylon,display-depth = <16>; + xylon,row-stride = <1024>; + + xylon,layers-configurable; + + layers { + #address-cells = <1>; + #size-cells = <0>; + + layer@0 { + reg = <0>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <0>; + xylon,layer-buffer-offset = <480>; + xylon,layer-primary; + }; + + layer@1 { + reg = <1>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <2400>; + xylon,layer-buffer-offset = <480>; + }; + + layer@2 { + reg = <2>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <960>; + xylon,layer-buffer-offset = <480>; + }; + + layer@3 { + reg = <3>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <480>; + xylon,layer-buffer-offset = <480>; + }; + + layer@4 { + reg = <4>; + xylon,layer-depth = <16>; + xylon,layer-colorspace = "rgb"; + xylon,layer-alpha-mode = "layer"; + xylon,layer-base-offset = <8192>; + xylon,layer-buffer-offset = <480>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + logicvc_out: port@1 { + reg = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + logicvc_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + };Signature · 1 line
2.29.2
Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com
Re: [PATCH v8 1/4] dt-bindings: display: Document the Xylon LogiCVC display controller
In reply to Paul KocialkowskiHi Paul,
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml line 44
Quoted 13 lines · Paul Kocialkowski
The Xylon LogiCVC is a display controller implemented as programmable logic in Xilinx FPGAs.
Signed-off-by Paul Kocialkowski <[email protected]>Acked-by Rob Herring <[email protected]>Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +3
-0@@ -0,0 +1,313 @@ + clock-names: + minItems: 1 + maxItems: 4
After applying this to my local tree, as it is a dependency for 2/4 in for-mfd-next:
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml:
properties:clock-names: {'required': ['maxItems']} is not allowed for {'minItems': 1, 'maxItems': 4, 'items': [{'const': 'vclk'}, {'enum':
['vclk2', 'lvdsclk', 'lvdsclkn']}, {'enum': ['vclk2', 'lvdsclk', 'lvdsclkn']}, {'enum': ['vclk2', 'lvdsclk', 'lvdsclkn']}]}
hint: "maxItems" is not needed with an "items" list
from schema $id: http://devicetree.org/meta-schemas/items.yaml#
Quoted 7 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +7
-0+ items: + # vclk is required and must be provided as first item. + - const: vclk + # Other clocks are optional and can be provided in any order. + - enum: + - vclk2 + - lvdsclk
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml line 61
Quoted 10 lines
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml new file +10
-0+ - lvdsclkn + - enum: + - vclk2 + - lvdsclk + - lvdsclkn + - enum: + - vclk2 + - lvdsclk + - lvdsclkn +
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
PATCH v8 2/4 dt-bindings: mfd: logicvc: Add patternProperties for the display
In reply to Paul KocialkowskiThe LogiCVC multi-function device has a display part which is now described in its binding. Add a patternProperties match for it.
--- Documentation/devicetree/bindings/mfd/xylon,logicvc.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/mfd/xylon,logicvc.yaml +3 -0
@@ -46,6 +46,9 @@ patternProperties: "^gpio@[0-9a-f]+$": $ref: /schemas/gpio/xylon,logicvc-gpio.yaml# + "^display@[0-9a-f]+$": + $ref: /schemas/display/xylon,logicvc-display.yaml# + required: - compatible - reg
Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v8 3/4 drm: Add support for the LogiCVC display controller
In reply to Paul KocialkowskiIntroduces a driver for the LogiCVC display controller, a programmable logic controller optimized for use in Xilinx Zynq-7000 SoCs and other Xilinx FPGAs. The controller is mostly configured at logic synthesis time so only a subset of configuration is left for the driver to handle.
The following features are implemented and tested:
- LVDS 4-bit interface;
- RGB565 pixel formats;
- Multiple layers and hardware composition;
- Layer-wide alpha mode;
The following features are implemented but untested:
- Other RGB pixel formats;
- Layer framebuffer configuration for version 4;
- Lowest-layer used as background color;
- Per-pixel alpha mode.
The following features are not implemented:
- YUV pixel formats;
- DVI, LVDS 3-bit, ITU656 and camera link interfaces;
- External parallel input for layer;
- Color-keying;
- LUT-based alpha modes.
Additional implementation-specific notes:
- Panels are only enabled after the first page flip to avoid flashing a white screen.
- Depth used in context of the LogiCVC driver only counts color components to match the definition of the synthesis parameters.
Support is implemented for both version 3 and 4 of the controller.
With version 3, framebuffers are stored in a dedicated contiguous memory area, with a base address hardcoded for each layer. This requires using a dedicated CMA pool registered at the base address and tweaking a few offset-related registers to try to use any buffer allocated from the pool. This is done on a best-effort basis to have the hardware cope with the DRM framebuffer allocation model and there is no guarantee that each buffer allocated by GEM CMA can be used for any layer. In particular, buffers allocated below the base address for a layer are guaranteed not to be configurable for that layer. See the implementation of logicvc_layer_buffer_find_setup for specifics.
Version 4 allows configuring each buffer address directly, which guarantees that any buffer can be configured.
--- MAINTAINERS | 6 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/logicvc/Kconfig | 9 + drivers/gpu/drm/logicvc/Makefile | 9 + drivers/gpu/drm/logicvc/logicvc_crtc.c | 280 +++++++++ drivers/gpu/drm/logicvc/logicvc_crtc.h | 21 + drivers/gpu/drm/logicvc/logicvc_drm.c | 474 +++++++++++++++ drivers/gpu/drm/logicvc/logicvc_drm.h | 64 ++ drivers/gpu/drm/logicvc/logicvc_interface.c | 214 +++++++ drivers/gpu/drm/logicvc/logicvc_interface.h | 28 + drivers/gpu/drm/logicvc/logicvc_layer.c | 624 ++++++++++++++++++++ drivers/gpu/drm/logicvc/logicvc_layer.h | 64 ++ drivers/gpu/drm/logicvc/logicvc_mode.c | 80 +++ drivers/gpu/drm/logicvc/logicvc_mode.h | 15 + drivers/gpu/drm/logicvc/logicvc_of.c | 185 ++++++ drivers/gpu/drm/logicvc/logicvc_of.h | 46 ++ drivers/gpu/drm/logicvc/logicvc_regs.h | 88 +++ 18 files changed, 2210 insertions(+) create mode 100644 drivers/gpu/drm/logicvc/Kconfig create mode 100644 drivers/gpu/drm/logicvc/Makefile create mode 100644 drivers/gpu/drm/logicvc/logicvc_crtc.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_crtc.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_drm.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_drm.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_interface.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_interface.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_layer.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_layer.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_mode.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_mode.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_of.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_of.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_regs.h
MAINTAINERS +6 -0
@@ -5534,6 +5534,12 @@ S: Orphan / Obsolete F: drivers/gpu/drm/i810/ F: include/uapi/drm/i810_drm.h +DRM DRIVER FOR LOGICVC DISPLAY CONTROLLER +M: Paul Kocialkowski <[email protected]> +S: Supported +T: git git://anongit.freedesktop.org/drm/drm-misc +F: drivers/gpu/drm/logicvc/ + DRM DRIVER FOR LVDS PANELS M: Laurent Pinchart <[email protected]> L: [email protected]
drivers/gpu/drm/Kconfig +2 -0
@@ -356,6 +356,8 @@ source "drivers/gpu/drm/arc/Kconfig" source "drivers/gpu/drm/hisilicon/Kconfig" +source "drivers/gpu/drm/logicvc/Kconfig" + source "drivers/gpu/drm/mediatek/Kconfig" source "drivers/gpu/drm/zte/Kconfig"
drivers/gpu/drm/Makefile +1 -0
@@ -103,6 +103,7 @@ obj-$(CONFIG_DRM_STM) += stm/ obj-$(CONFIG_DRM_STI) += sti/ obj-y += imx/ obj-$(CONFIG_DRM_INGENIC) += ingenic/ +obj-$(CONFIG_DRM_LOGICVC) += logicvc/ obj-$(CONFIG_DRM_MEDIATEK) += mediatek/ obj-$(CONFIG_DRM_MESON) += meson/ obj-y += i2c/
drivers/gpu/drm/logicvc/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config DRM_LOGICVC + tristate "LogiCVC DRM" + depends on DRM + depends on OF || COMPILE_TEST + select DRM_KMS_HELPER + select DRM_KMS_CMA_HELPER + select DRM_GEM_CMA_HELPER + help + DRM display driver for the logiCVC programmable logic block from Xylon
drivers/gpu/drm/logicvc/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +logicvc-drm-y += \ + logicvc_crtc.o \ + logicvc_drm.o \ + logicvc_interface.o \ + logicvc_layer.o \ + logicvc_mode.o \ + logicvc_of.o + +obj-$(CONFIG_DRM_LOGICVC) += logicvc-drm.o
drivers/gpu/drm/logicvc/logicvc_crtc.c new file +280 -0
280 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_crtc.h new file +21 -0
@@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2019 Bootlin +* Author: Paul Kocialkowski <[email protected]> +*/ + +#ifndef _LOGICVC_CRTC_H_ +#define _LOGICVC_CRTC_H_ + +struct drm_pending_vblank_event ; +struct logicvc_drm ; + +struct logicvc_crtc { +struct drm_crtc drm_crtc; +struct drm_pending_vblank_event *event; +}; + +void logicvc_crtc_vblank_handler (struct logicvc_drm *logicvc); +int logicvc_crtc_init (struct logicvc_drm *logicvc); + +#endif
drivers/gpu/drm/logicvc/logicvc_drm.c new file +474 -0
474 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_drm.h new file +64 -0
64 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_interface.c new file +214 -0
214 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_interface.h new file +28 -0
@@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2019 Bootlin +* Author: Paul Kocialkowski <[email protected]> +*/ + +#ifndef _LOGICVC_INTERFACE_H_ +#define _LOGICVC_INTERFACE_H_ + +#include <drm/drm_bridge.h> +#include <drm/drm_connector.h> +#include <drm/drm_encoder.h> +#include <drm/drm_panel.h> + +struct logicvc_drm ; + +struct logicvc_interface { +struct drm_encoder drm_encoder; +struct drm_connector drm_connector; + +struct drm_panel *drm_panel; +struct drm_bridge *drm_bridge; +}; + +void logicvc_interface_attach_crtc (struct logicvc_drm *logicvc); +int logicvc_interface_init (struct logicvc_drm *logicvc); + +#endif
drivers/gpu/drm/logicvc/logicvc_layer.c new file +624 -0
624 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_layer.h new file +64 -0
64 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_mode.c new file +80 -0
80 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_mode.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2019 Bootlin +* Author: Paul Kocialkowski <[email protected]> +*/ + +#ifndef _LOGICVC_MODE_H_ +#define _LOGICVC_MODE_H_ + +struct logicvc_drm ; + +int logicvc_mode_init (struct logicvc_drm *logicvc); +void logicvc_mode_fini (struct logicvc_drm *logicvc); + +#endif
drivers/gpu/drm/logicvc/logicvc_of.c new file +185 -0
185 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_of.h new file +46 -0
46 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_regs.h new file +88 -0
88 lines not on this page · raw message
Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v8 4/4 NOTFORMERGE: drm/logicvc: Add plane colorkey support
In reply to Paul Kocialkowski--- drivers/gpu/drm/logicvc/logicvc_drm.h | 3 + drivers/gpu/drm/logicvc/logicvc_layer.c | 150 +++++++++++++++++++++++- drivers/gpu/drm/logicvc/logicvc_layer.h | 7 ++ 3 files changed, 154 insertions(+), 6 deletions(-)
drivers/gpu/drm/logicvc/logicvc_drm.h +3 -0
@@ -59,6 +59,9 @@ struct logicvc_drm {struct list_head layers_list;struct logicvc_crtc *crtc;struct logicvc_interface *interface; + +struct drm_property *colorkey_enabled_property; + struct drm_property *colorkey_value_property; };#endif
drivers/gpu/drm/logicvc/logicvc_layer.c +144 -6
213 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_layer.h +7 -0
@@ -39,6 +39,13 @@ struct logicvc_layer_formats {uint32_t *formats; }; +struct logicvc_layer_state { +struct drm_plane_state drm_plane_state; + +bool colorkey_enabled; +uint32_t colorkey_value; +}; +struct logicvc_layer {struct logicvc_layer_config config;struct logicvc_layer_formats *formats;
Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v8 4/4] NOTFORMERGE: drm/logicvc: Add plane colorkey support
nouveau already has something for colorkey:
https://drmdb.emersion.fr/properties/4008636142/colorkey
I know this is marked "not for merge", but it would be nice to discuss with them and come up with a standardized property.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v8 4/4] NOTFORMERGE: drm/logicvc: Add plane colorkey support
FWIW this is something I added, hoping it was going to get used at some point, but I never followed up with support in xf86-video-nouveau for Xv. At this point, I'm not sure I ever will. I encoded the "enabled" part into the value with a high bit (1<<24) -- not sure that was such a great idea. All NVIDIA hardware supports colorkey (and not actual alpha, until the very latest GPUs - Volta/Turing families), although my implementation only covers the pre-G80 series (i.e. DX9 and earlier GPUs - pre-2008). Should a determination of usefulness be reached, it would be easy to implement on the remainder though.
Cheers,
-ilia
Quoted 10 lines · Simon Ser
nouveau already has something for colorkey:
https://drmdb.emersion.fr/properties/4008636142/colorkeyI know this is marked "not for merge", but it would be nice to discuss with them and come up with a standardized property.
_______________________________________________
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
Re: [PATCH v8 4/4] NOTFORMERGE: drm/logicvc: Add plane colorkey support
Hi,
Quoted 9 lines · Ilia Mirkin
FWIW this is something I added, hoping it was going to get used at some point, but I never followed up with support in xf86-video-nouveau for Xv. At this point, I'm not sure I ever will. I encoded the "enabled" part into the value with a high bit (1<<24) -- not sure that was such a great idea. All NVIDIA hardware supports colorkey (and not actual alpha, until the very latest GPUs - Volta/Turing families), although my implementation only covers the pre-G80 series (i.e. DX9 and earlier GPUs - pre-2008). Should a determination of usefulness be reached, it would be easy to implement on the remainder though.
Interesting to know!
Regarding a generic colorkey property, there was a discussion under thread:
drm: Add generic colorkey properties for display planes
and the latest proposal (RFC v4) can be found here:
https://patchwork.ozlabs.org/project/linux-tegra/patch/[email protected]/
It looks like this was much more complex than anticipated and the series was more or less abandonned. I didn't feel like picking it up in my logicvc series so I kept the colorkey patch as not for merge.
If someone's up for picking the proposal and continuing the discussion, I could provide insight on how it would fit with logicvc though!
Cheers,
Paul
Quoted 7 lines · Simon Ser
Quoted 6 lines
nouveau already has something for colorkey:
https://drmdb.emersion.fr/properties/4008636142/colorkeyI know this is marked "not for merge", but it would be nice to discuss with them and come up with a standardized property.
Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel