mbox series

[5.10.y-cip,00/25] Add RZ/G2L DSI support

Message ID 20231207142502.401651-1-biju.das.jz@bp.renesas.com (mailing list archive)
Headers show
Series Add RZ/G2L DSI support | expand

Message

Biju Das Dec. 7, 2023, 2:24 p.m. UTC
This patch series aims to add RZ/G2L DSI support on
RZ/{G2L,GLC,V2L} SMARC EVKs.
 
All the patches are cherry-picked from the mainline, except [1] and [2]

Without [1] DU is giving probe failure as the encoder is not
able to find all the connected bridges due to the framework changes
between mainline and 5.10 kernel. So just restructured the bridge handling.

IA55 IRQ driver is not backported to 5.10, so defining it in dts is
giving warnings, so drop IRQs in patch[2].

Please don't apply patch#18 to patch#25 as it is added for testing purpose.

[1]
0011-drm-rcar-du-rzg2l_mipi_dsi-Reorder-bridge-attach.patch
[2]
0017-arm64-dts-renesas-Drop-ADV7535-IRQ.patch

Biju Das (18):
  dt-bindings: display: bridge: Document RZ/G2L MIPI DSI TX bindings
  dt-bindings: display: bridge: renesas,rzg2l-mipi-dsi: Document RZ/V2L
    support
  drm: rcar-du: Add RZ/G2L DSI driver
  drm: rcar-du: Fix Kconfig dependency between DRM and RZG2L_MIPI_DSI
  drm: rcar-du: rzg2l_mipi_dsi: Enhance device lanes check
  drm: rcar-du: rzg2l_mipi_dsi: Reorder bridge attach
  arm64: defconfig: Enable Renesas RZ/G2L MIPI DSI driver
  arm64: dts: renesas: r9a07g044: Add DSI node
  arm64: dts: renesas: r9a07g054: Add DSI node
  arm64: dts: renesas: rzg2l-smarc: Link DSI with ADV7535
  arm64: dts: renesas: rzg2lc-smarc: Link DSI with ADV7535
  arm64: dts: renesas: Drop ADV7535 IRQ
  arm64: dts: renesas: r9a07g044: [HACK DO NOT APPLY] Add DU node
  arm64: dts: renesas: r9a07g054: [HACK DO NOT APPLY] Add DU node
  arm64: dts: renesas: rzg2l-smarc: [HACK DO NOT APPLY] Enable DU and
    link with DSI
  arm64: dts: renesas: rzg2lc-smarc: [HACK DO NOT APPLY] Enable DU and
    link with DSI
  drm: [HACK DO NOT APPLY] Add RZ/G2L DU Support
  defconfig: [HACK DO NOT APPLY] Enable display on RZ/G2L SMARC EVK.

Daniel Vetter (1):
  drm: [HACK DO NOT APPLY] Allow const struct drm_driver

Marek Vasut (2):
  drm: of: Add drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep
  drm: of: Mark empty drm_of_get_data_lanes_count and
    drm_of_get_data_lanes_ep static

Maxime Ripard (3):
  drm/bridge: Add a function to abstract away panels
  drm/bridge: Add stubs for devm_drm_of_get_bridge when OF is disabled
  drm/bridge: Move devm_drm_of_get_bridge to bridge/panel.c

Philipp Zabel (1):
  drm: [HACK DO NOT APPLY] add drmm_encoder_alloc()

 .../bindings/display/bridge/renesas,dsi.yaml  | 183 ++++
 arch/arm64/boot/dts/renesas/r9a07g044.dtsi    |  42 +
 arch/arm64/boot/dts/renesas/r9a07g054.dtsi    |  43 +
 arch/arm64/boot/dts/renesas/rzg2l-smarc.dtsi  |  98 +++
 arch/arm64/boot/dts/renesas/rzg2lc-smarc.dtsi |  98 +++
 arch/arm64/configs/defconfig                  |   2 +
 drivers/gpu/drm/Kconfig                       |   2 +
 drivers/gpu/drm/Makefile                      |   1 +
 drivers/gpu/drm/bridge/panel.c                |  37 +
 drivers/gpu/drm/drm_bridge.c                  |   8 +-
 drivers/gpu/drm/drm_drv.c                     |  17 +-
 drivers/gpu/drm/drm_encoder.c                 | 109 ++-
 drivers/gpu/drm/drm_of.c                      |  64 ++
 drivers/gpu/drm/rcar-du/Kconfig               |   8 +
 drivers/gpu/drm/rcar-du/Makefile              |   2 +
 drivers/gpu/drm/rcar-du/rzg2l_mipi_dsi.c      | 816 ++++++++++++++++++
 drivers/gpu/drm/rcar-du/rzg2l_mipi_dsi_regs.h | 151 ++++
 drivers/gpu/drm/rz-du/Kconfig                 |  22 +
 drivers/gpu/drm/rz-du/Makefile                |   8 +
 drivers/gpu/drm/rz-du/rzg2l_du_crtc.c         | 432 ++++++++++
 drivers/gpu/drm/rz-du/rzg2l_du_crtc.h         |  91 ++
 drivers/gpu/drm/rz-du/rzg2l_du_drv.c          | 187 ++++
 drivers/gpu/drm/rz-du/rzg2l_du_drv.h          |  85 ++
 drivers/gpu/drm/rz-du/rzg2l_du_encoder.c      | 121 +++
 drivers/gpu/drm/rz-du/rzg2l_du_encoder.h      |  33 +
 drivers/gpu/drm/rz-du/rzg2l_du_kms.c          | 389 +++++++++
 drivers/gpu/drm/rz-du/rzg2l_du_kms.h          |  43 +
 drivers/gpu/drm/rz-du/rzg2l_du_regs.h         |  67 ++
 drivers/gpu/drm/rz-du/rzg2l_du_vsp.c          | 428 +++++++++
 drivers/gpu/drm/rz-du/rzg2l_du_vsp.h          |  96 +++
 include/drm/drm_bridge.h                      |  15 +
 include/drm/drm_device.h                      |   4 +
 include/drm/drm_drv.h                         |   5 +-
 include/drm/drm_encoder.h                     |  30 +
 include/drm/drm_of.h                          |  22 +
 35 files changed, 3724 insertions(+), 35 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,dsi.yaml
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_mipi_dsi.c
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_mipi_dsi_regs.h
 create mode 100644 drivers/gpu/drm/rz-du/Kconfig
 create mode 100644 drivers/gpu/drm/rz-du/Makefile
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_crtc.c
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_crtc.h
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_drv.c
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_drv.h
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_encoder.c
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_encoder.h
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_kms.c
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_kms.h
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_regs.h
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_vsp.c
 create mode 100644 drivers/gpu/drm/rz-du/rzg2l_du_vsp.h

Comments

Pavel Machek Dec. 7, 2023, 7:41 p.m. UTC | #1
Hi!

> This patch series aims to add RZ/G2L DSI support on
> RZ/{G2L,GLC,V2L} SMARC EVKs.
>  
> All the patches are cherry-picked from the mainline, except [1] and [2]
> 
> Without [1] DU is giving probe failure as the encoder is not
> able to find all the connected bridges due to the framework changes
> between mainline and 5.10 kernel. So just restructured the bridge handling.
> 
> IA55 IRQ driver is not backported to 5.10, so defining it in dts is
> giving warnings, so drop IRQs in patch[2].
> 
> Please don't apply patch#18 to patch#25 as it is added for testing
> purpose.

Ok, so series looks good to me. I did not review the [HACK] patches
closely. I can apply if it tests ok and if there are no other
comments.

Best regards,
								Pavel
Pavel Machek Dec. 8, 2023, 11:38 a.m. UTC | #2
Hi!

> This patch series aims to add RZ/G2L DSI support on
> RZ/{G2L,GLC,V2L} SMARC EVKs.
>  
> All the patches are cherry-picked from the mainline, except [1] and [2]
> 
> Without [1] DU is giving probe failure as the encoder is not
> able to find all the connected bridges due to the framework changes
> between mainline and 5.10 kernel. So just restructured the bridge handling.
> 
> IA55 IRQ driver is not backported to 5.10, so defining it in dts is
> giving warnings, so drop IRQs in patch[2].

This series fails testing on x86:

https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/5706662029

  CC      drivers/hid/hid-lg4ff.o
3346In file included from drivers/gpu/drm/drm_bridge_connector.c:11:
3347./include/drm/drm_bridge.h:903:34: error: static declaration of 'devm_drm_of_get_bridge' follows non-static declaration
3348  903 | static inline struct drm_bridge *devm_drm_of_get_bridge(struct device *dev,
3349      |                                  ^~~~~~~~~~~~~~~~~~~~~~
3350./include/drm/drm_bridge.h:894:20: note: previous declaration of 'devm_drm_of_get_bridge' was here
3351  894 | struct drm_bridge *devm_drm_of_get_bridge(struct device *dev, struct device_node *node,
3352      |                    ^~~~~~~~~~~~~~~~~~~~~~
3353  CC      drivers/hid/hid-lg-g15.o
3354make[3]: *** [scripts/Makefile.build:286: drivers/gpu/drm/drm_bridge_connector.o] Error 1
3355make[3]: *** Waiting for unfinished jobs....
3356  CC      drivers/hid/hid-microsoft.o
3357

Best regards,
								Pavel
Biju Das Dec. 8, 2023, 12:09 p.m. UTC | #3
Hi Pavel Machek,

Thanks for the feedback.

> -----Original Message-----
> From: Pavel Machek <pavel@denx.de>
> Sent: Friday, December 8, 2023 11:39 AM
> Subject: Re: [PATCH 5.10.y-cip 00/25] Add RZ/G2L DSI support
> 
> Hi!
> 
> > This patch series aims to add RZ/G2L DSI support on RZ/{G2L,GLC,V2L}
> > SMARC EVKs.
> >
> > All the patches are cherry-picked from the mainline, except [1] and
> > [2]
> >
> > Without [1] DU is giving probe failure as the encoder is not able to
> > find all the connected bridges due to the framework changes between
> > mainline and 5.10 kernel. So just restructured the bridge handling.
> >
> > IA55 IRQ driver is not backported to 5.10, so defining it in dts is
> > giving warnings, so drop IRQs in patch[2].
> 
> This series fails testing on x86:
> 
> https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/5706662029
> 
>   CC      drivers/hid/hid-lg4ff.o
> 3346In file included from drivers/gpu/drm/drm_bridge_connector.c:11:
> 3347./include/drm/drm_bridge.h:903:34: error: static declaration of
> 'devm_drm_of_get_bridge' follows non-static declaration
> 3348  903 | static inline struct drm_bridge *devm_drm_of_get_bridge(struct
> device *dev,
> 3349      |                                  ^~~~~~~~~~~~~~~~~~~~~~
> 3350./include/drm/drm_bridge.h:894:20: note: previous declaration of
> 'devm_drm_of_get_bridge' was here
> 3351  894 | struct drm_bridge *devm_drm_of_get_bridge(struct device *dev,
> struct device_node *node,
> 3352      |                    ^~~~~~~~~~~~~~~~~~~~~~
> 3353  CC      drivers/hid/hid-lg-g15.o
> 3354make[3]: *** [scripts/Makefile.build:286:
> drivers/gpu/drm/drm_bridge_connector.o] Error 1
> 3355make[3]: *** Waiting for unfinished jobs....
> 3356  CC      drivers/hid/hid-microsoft.o
> 3357

I can reproduce the issue here with x86. I am looking on to it.


In file included from drivers/gpu/drm/drm_bridge_connector.c:11:
./include/drm/drm_bridge.h:903:34: error: static declaration of 'devm_drm_of_get_bridge' follows non-static declaration
  903 | static inline struct drm_bridge *devm_drm_of_get_bridge(struct device *dev,
      |                                  ^~~~~~~~~~~~~~~~~~~~~~
./include/drm/drm_bridge.h:894:20: note: previous declaration of 'devm_drm_of_get_bridge' was here
  894 | struct drm_bridge *devm_drm_of_get_bridge(struct device *dev, struct device_node *node,
      |                    ^~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:286: drivers/gpu/drm/drm_bridge_connector.o] Error 1
make[2]: *** [scripts/Makefile.build:503: drivers/gpu/drm] Error 2
make[1]: *** [scripts/Makefile.build:503: drivers/gpu] Error 2
make[1]: *** Waiting for unfinished jobs....

Cheers,
Biju
Biju Das Dec. 8, 2023, 12:56 p.m. UTC | #4
Hi Pavel,

> -----Original Message-----
> From: cip-dev@lists.cip-project.org <cip-dev@lists.cip-project.org> On
> Behalf Of Biju Das via lists.cip-project.org
> Subject: Re: [cip-dev] [PATCH 5.10.y-cip 00/25] Add RZ/G2L DSI support
> 
> Hi Pavel Machek,
> 
> Thanks for the feedback.
> 
> > -----Original Message-----
> > From: Pavel Machek <pavel@denx.de>
> > Sent: Friday, December 8, 2023 11:39 AM
> > Subject: Re: [PATCH 5.10.y-cip 00/25] Add RZ/G2L DSI support
> >
> > Hi!
> >
> > > This patch series aims to add RZ/G2L DSI support on RZ/{G2L,GLC,V2L}
> > > SMARC EVKs.
> > >
> > > All the patches are cherry-picked from the mainline, except [1] and
> > > [2]
> > >
> > > Without [1] DU is giving probe failure as the encoder is not able to
> > > find all the connected bridges due to the framework changes between
> > > mainline and 5.10 kernel. So just restructured the bridge handling.
> > >
> > > IA55 IRQ driver is not backported to 5.10, so defining it in dts is
> > > giving warnings, so drop IRQs in patch[2].
> >
> > This series fails testing on x86:
> >
> > https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitl
> > ab.com%2Fcip-project%2Fcip-kernel%2Flinux-cip%2F-%2Fjobs%2F5706662029&
> > data=05%7C02%7Cbiju.das.jz%40bp.renesas.com%7Cab1879377b15488f4c8f08db
> > f7e68432%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C6383763416551582
> > 43%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI
> > 6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9A%2FwCfd9i0XsElIxzSShyU
> > J%2FIE0FS5e6yqRz26tOjkM%3D&reserved=0
> >
> >   CC      drivers/hid/hid-lg4ff.o
> > 3346In file included from drivers/gpu/drm/drm_bridge_connector.c:11:
> > 3347./include/drm/drm_bridge.h:903:34: error: static declaration of
> > 'devm_drm_of_get_bridge' follows non-static declaration
> > 3348  903 | static inline struct drm_bridge
> > *devm_drm_of_get_bridge(struct device *dev,
> > 3349      |                                  ^~~~~~~~~~~~~~~~~~~~~~
> > 3350./include/drm/drm_bridge.h:894:20: note: previous declaration of
> > 'devm_drm_of_get_bridge' was here
> > 3351  894 | struct drm_bridge *devm_drm_of_get_bridge(struct device
> > *dev, struct device_node *node,
> > 3352      |                    ^~~~~~~~~~~~~~~~~~~~~~
> > 3353  CC      drivers/hid/hid-lg-g15.o
> > 3354make[3]: *** [scripts/Makefile.build:286:
> > drivers/gpu/drm/drm_bridge_connector.o] Error 1
> > 3355make[3]: *** Waiting for unfinished jobs....
> > 3356  CC      drivers/hid/hid-microsoft.o
> > 3357
> 
> I can reproduce the issue here with x86. I am looking on to it.
> 
> 
> In file included from drivers/gpu/drm/drm_bridge_connector.c:11:
> ./include/drm/drm_bridge.h:903:34: error: static declaration of
> 'devm_drm_of_get_bridge' follows non-static declaration
>   903 | static inline struct drm_bridge *devm_drm_of_get_bridge(struct
> device *dev,
>       |                                  ^~~~~~~~~~~~~~~~~~~~~~
> ./include/drm/drm_bridge.h:894:20: note: previous declaration of
> 'devm_drm_of_get_bridge' was here
>   894 | struct drm_bridge *devm_drm_of_get_bridge(struct device *dev,
> struct device_node *node,
>       |                    ^~~~~~~~~~~~~~~~~~~~~~
> make[3]: *** [scripts/Makefile.build:286:
> drivers/gpu/drm/drm_bridge_connector.o] Error 1
> make[2]: *** [scripts/Makefile.build:503: drivers/gpu/drm] Error 2
> make[1]: *** [scripts/Makefile.build:503: drivers/gpu] Error 2
> make[1]: *** Waiting for unfinished jobs....


The build issue is related to patch [1]

[1]
https://patchwork.kernel.org/project/cip-dev/patch/20231207142502.401651-3-biju.das.jz@bp.renesas.com/

I have done some mistake while fixing the conflict.

The correct patch is below. I will send v2 soon.

diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index 3c640e704186..6bfc13b69475 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -891,9 +891,20 @@ struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev,
 struct drm_bridge *devm_drm_panel_bridge_add_typed(struct device *dev,
 						   struct drm_panel *panel,
 						   u32 connector_type);
+struct drm_connector *drm_panel_bridge_connector(struct drm_bridge *bridge);
+#endif
+
+#if defined(CONFIG_OF) && defined(CONFIG_DRM_PANEL_BRIDGE)
 struct drm_bridge *devm_drm_of_get_bridge(struct device *dev, struct device_node *node,
 					  u32 port, u32 endpoint);
-struct drm_connector *drm_panel_bridge_connector(struct drm_bridge *bridge);
+#else
+static inline struct drm_bridge *devm_drm_of_get_bridge(struct device *dev,
+							struct device_node *node,
+							u32 port,
+							u32 endpoint)
+{
+	return ERR_PTR(-ENODEV);
+}
 #endif
 
 #endif