mbox series

[v9,0/4] drm: LogiCVC display controller support

Message ID 20210914200539.732093-1-paul.kocialkowski@bootlin.com
Headers show
Series drm: LogiCVC display controller support | expand

Message

Paul Kocialkowski Sept. 14, 2021, 8:05 p.m. UTC
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.

Changes since v8:
- Rebased on top of the latest drm-misc-next;
- Dropped useless phandle-based syscon regmap support;
- Switched to a single-port graph description;
- Updated the device-tree schema to the port schema and added a
  description for the port.

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        | 302 +++++++
 .../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         | 471 +++++++++++
 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       | 767 ++++++++++++++++++
 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, 2665 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

Comments

Rob Herring (Arm) Sept. 15, 2021, 12:56 p.m. UTC | #1
On Tue, 14 Sep 2021 22:05:36 +0200, Paul Kocialkowski wrote:
> The Xylon LogiCVC is a display controller implemented as programmable

> logic in Xilinx FPGAs.

> 

> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

> Acked-by: Rob Herring <robh@kernel.org>

> ---

>  .../display/xylon,logicvc-display.yaml        | 302 ++++++++++++++++++

>  1 file changed, 302 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml

> 


My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

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

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1528119

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.
Rob Herring (Arm) Sept. 16, 2021, 7:54 p.m. UTC | #2
On Wed, Sep 15, 2021 at 07:56:34AM -0500, Rob Herring wrote:
> On Tue, 14 Sep 2021 22:05:36 +0200, Paul Kocialkowski wrote:

> > The Xylon LogiCVC is a display controller implemented as programmable

> > logic in Xilinx FPGAs.

> > 

> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

> > Acked-by: Rob Herring <robh@kernel.org>

> > ---

> >  .../display/xylon,logicvc-display.yaml        | 302 ++++++++++++++++++

> >  1 file changed, 302 insertions(+)

> >  create mode 100644 Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml

> > 

> 

> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'

> on your patch (DT_CHECKER_FLAGS is new in v5.13):

> 

> 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


You can ignore this.

Rob
Paul Kocialkowski Oct. 1, 2021, 9:54 a.m. UTC | #3
Hi,

On Tue 14 Sep 21, 22:05, Paul Kocialkowski wrote:
> 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.


A gentle ping here, I think this series is pretty much good to go
and unless there are objections, I'd be very happy to see it merged
soon rather than having to post another version to follow internal API
changes.

Thanks!

Paul
 
> 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.

> 

> Changes since v8:

> - Rebased on top of the latest drm-misc-next;

> - Dropped useless phandle-based syscon regmap support;

> - Switched to a single-port graph description;

> - Updated the device-tree schema to the port schema and added a

>   description for the port.

> 

> 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        | 302 +++++++

>  .../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         | 471 +++++++++++

>  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       | 767 ++++++++++++++++++

>  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, 2665 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

> 

> -- 

> 2.32.0

> 


-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com