devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR
@ 2025-11-26 17:35 Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 01/21] dt-bindings: display: tilcdc: Convert to DT schema Kory Maincent (TI.com)
                   ` (21 more replies)
  0 siblings, 22 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

The starting point for this work was adding support for the HDMI cape:
https://www.seeedstudio.com/Seeed-Studio-BeagleBone-Green-HDMI-Cape.html
This will be sent in a later series.

Initially, Miguel proposed modifying the ite-it66121 bridge to support
the legacy behavior without the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag:
https://lore.kernel.org/lkml/20250909-it66121-fix-v1-1-bc79ca83df17@bootlin.com/
This patch was NAK'd as we don't want to add more legacy code. Maxime
requested that the tilcdc driver be updated to use
DRM_BRIDGE_ATTACH_NO_CONNECTOR instead.

While working on this update, I discovered that the tilcdc driver
contained significant amounts of legacy code that needed cleaning.
Since this driver was developed alongside the tda998x driver for
several AM335x boards, the tda998x driver also required cleanup and
support for the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag.

This series is based on the tilcdc fix sent to mainline:
https://lore.kernel.org/lkml/20251125090546.137193-1-kory.maincent@bootlin.com/

Patch 1-7: Convert tilcdc binding to YAML and remove the ti,tilcdc,panel
	   sub-binding and driver
Patch 8-16: Clean up tilcdc driver
Patch 17-19: Clean up tda998x driver
Patch 20: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support to tda998x
Patch 21: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support to tilcdc

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
Kory Maincent (TI.com) (21):
      dt-bindings: display: tilcdc: Convert to DT schema
      dt-bindings: display: tilcdc: Add fifo-threshold property
      drm/tilcdc: Remove simulate_vesa_sync flag
      drm/tilcdc: Add support for DRM bus flags and simplify panel config
      ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
      dt-bindings: display: tilcdc: Remove panel binding
      drm/tilcdc: Remove tilcdc panel driver
      drm/tilcdc: Remove component framework support
      drm/tilcdc: Remove tilcdc_panel_info structure
      drm/tilcdc: Remove redundant #endif/#ifdef in debugfs code
      drm/tilcdc: Remove unused encoder and connector tracking arrays
      drm/tilcdc: Rename external_encoder and external_connector to encoder and connector
      drm/tilcdc: Rename tilcdc_external to tilcdc_encoder
      drm/tilcdc: Remove the useless module list support
      drm/tilcdc: Modernize driver initialization and cleanup paths
      drm/tilcdc: Remove the use of drm_device private_data
      drm/bridge: tda998x: Remove component support
      drm/bridge: tda998x: Move tda998x_create/destroy into probe and remove
      drm/bridge: tda998x: Remove useless tda998x_connector_destroy wrapper
      drm/bridge: tda998x: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
      drm/tilcdc: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR

 .../devicetree/bindings/display/tilcdc/panel.txt   |  66 ---
 .../devicetree/bindings/display/tilcdc/tilcdc.txt  |  82 ----
 .../devicetree/bindings/display/tilcdc/tilcdc.yaml | 103 +++++
 arch/arm/boot/dts/ti/davinci/da850-evm.dts         |  26 +-
 arch/arm/boot/dts/ti/omap/am335x-guardian.dts      |  25 +-
 arch/arm/boot/dts/ti/omap/am335x-pdu001.dts        |  21 +-
 arch/arm/boot/dts/ti/omap/am335x-pepper.dts        |  22 +-
 arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts      |  25 +-
 arch/arm/boot/dts/ti/omap/am335x-sl50.dts          |  25 +-
 drivers/gpu/drm/bridge/tda998x_drv.c               | 251 ++++++------
 drivers/gpu/drm/tilcdc/Makefile                    |   3 +-
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c               | 117 ++----
 drivers/gpu/drm/tilcdc/tilcdc_drv.c                | 456 +++++++--------------
 drivers/gpu/drm/tilcdc/tilcdc_drv.h                |  88 +---
 drivers/gpu/drm/tilcdc/tilcdc_encoder.c            |  93 +++++
 .../tilcdc/{tilcdc_external.h => tilcdc_encoder.h} |   5 +-
 drivers/gpu/drm/tilcdc/tilcdc_external.c           | 179 --------
 drivers/gpu/drm/tilcdc/tilcdc_panel.c              | 408 ------------------
 drivers/gpu/drm/tilcdc/tilcdc_panel.h              |  15 -
 drivers/gpu/drm/tilcdc/tilcdc_plane.c              |   2 +-
 drivers/gpu/drm/tilcdc/tilcdc_regs.h               |   8 +-
 21 files changed, 589 insertions(+), 1431 deletions(-)
---
base-commit: 670bacfc7579bdd79a3069cfb5ab60a6a7923003
change-id: 20251014-feature_tilcdc-79cd49e67bf9

Best regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 01/21] dt-bindings: display: tilcdc: Convert to DT schema
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 02/21] dt-bindings: display: tilcdc: Add fifo-threshold property Kory Maincent (TI.com)
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Convert the device tree binding documentation for tilcdc
from plain text to DT binding schema.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 .../devicetree/bindings/display/tilcdc/tilcdc.txt  | 82 ------------------
 .../devicetree/bindings/display/tilcdc/tilcdc.yaml | 96 ++++++++++++++++++++++
 2 files changed, 96 insertions(+), 82 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt
deleted file mode 100644
index 3b3d0bbfcfff4..0000000000000
--- a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-Device-Tree bindings for tilcdc DRM driver
-
-Required properties:
- - compatible: value should be one of the following:
-    - "ti,am33xx-tilcdc" for AM335x based boards
-    - "ti,da850-tilcdc" for DA850/AM18x/OMAP-L138 based boards
- - interrupts: the interrupt number
- - reg: base address and size of the LCDC device
-
-Recommended properties:
- - ti,hwmods: Name of the hwmod associated to the LCDC
-
-Optional properties:
- - max-bandwidth: The maximum pixels per second that the memory
-   interface / lcd controller combination can sustain
- - max-width: The maximum horizontal pixel width supported by
-   the lcd controller.
- - max-pixelclock: The maximum pixel clock that can be supported
-   by the lcd controller in KHz.
- - blue-and-red-wiring: Recognized values "straight" or "crossed".
-   This property deals with the LCDC revision 2 (found on AM335x)
-   color errata [1].
-    - "straight" indicates normal wiring that supports RGB565,
-      BGR888, and XBGR8888 color formats.
-    - "crossed" indicates wiring that has blue and red wires
-      crossed. This setup supports BGR565, RGB888 and XRGB8888
-      formats.
-    - If the property is not present or its value is not recognized
-      the legacy mode is assumed. This configuration supports RGB565,
-      RGB888 and XRGB8888 formats. However, depending on wiring, the red
-      and blue colors are swapped in either 16 or 24-bit color modes.
-
-Optional nodes:
-
- - port/ports: to describe a connection to an external encoder. The
-   binding follows Documentation/devicetree/bindings/graph.txt and
-   supports a single port with a single endpoint.
-
- - See also Documentation/devicetree/bindings/display/tilcdc/panel.txt and
-   Documentation/devicetree/bindings/display/bridge/ti,tfp410.yaml for connecting
-   tfp410 DVI encoder or lcd panel to lcdc
-
-[1] There is an errata about AM335x color wiring. For 16-bit color mode
-    the wires work as they should (LCD_DATA[0:4] is for Blue[3:7]),
-    but for 24 bit color modes the wiring of blue and red components is
-    crossed and LCD_DATA[0:4] is for Red[3:7] and LCD_DATA[11:15] is
-    for Blue[3-7]. For more details see section 3.1.1 in AM335x
-    Silicon Errata:
-    https://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360
-
-Example:
-
-	fb: fb@4830e000 {
-		compatible = "ti,am33xx-tilcdc", "ti,da850-tilcdc";
-		reg = <0x4830e000 0x1000>;
-		interrupt-parent = <&intc>;
-		interrupts = <36>;
-		ti,hwmods = "lcdc";
-
-		blue-and-red-wiring = "crossed";
-
-		port {
-			lcdc_0: endpoint {
-				remote-endpoint = <&hdmi_0>;
-			};
-		};
-	};
-
-	tda19988: tda19988 {
-		compatible = "nxp,tda998x";
-		reg = <0x70>;
-
-		pinctrl-names = "default", "off";
-		pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
-		pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
-
-		port {
-			hdmi_0: endpoint {
-				remote-endpoint = <&lcdc_0>;
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml
new file mode 100644
index 0000000000000..34ac1fd04d5c6
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml
@@ -0,0 +1,96 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/tilcdc/tilcdc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI LCD Controller, found on AM335x, DA850, AM18x and OMAP-L138
+
+maintainers:
+  - Kory Maincent <kory.maincent@bootlin.com>
+
+properties:
+  compatible:
+    enum:
+      - ti,am33xx-tilcdc
+      - ti,da850-tilcdc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+
+  ti,hwmods:
+    $ref: /schemas/types.yaml#/definitions/string
+    description:
+      Name of the hwmod associated to the LCDC
+
+  max-bandwidth:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      The maximum pixels per second that the memory interface / lcd
+      controller combination can sustain
+
+  max-width:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      The maximum horizontal pixel width supported by the lcd controller.
+
+  max-pixelclock:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      The maximum pixel clock that can be supported by the lcd controller
+      in KHz.
+
+  blue-and-red-wiring:
+    enum: [straight, crossed]
+    description:
+      This property deals with the LCDC revision 2 (found on AM335x)
+      color errata [1].
+       - "straight" indicates normal wiring that supports RGB565,
+         BGR888, and XBGR8888 color formats.
+       - "crossed" indicates wiring that has blue and red wires
+         crossed. This setup supports BGR565, RGB888 and XRGB8888
+         formats.
+       - If the property is not present or its value is not recognized
+         the legacy mode is assumed. This configuration supports RGB565,
+         RGB888 and XRGB8888 formats. However, depending on wiring, the red
+         and blue colors are swapped in either 16 or 24-bit color modes.
+
+       [1] There is an errata about AM335x color wiring. For 16-bit color
+       mode the wires work as they should (LCD_DATA[0:4] is for Blue[3:7]),
+       but for 24 bit color modes the wiring of blue and red components is
+       crossed and LCD_DATA[0:4] is for Red[3:7] and LCD_DATA[11:15] is
+       for Blue[3-7]. For more details see section 3.1.1 in AM335x
+       Silicon Errata
+       https://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360
+
+required:
+  - compatible
+  - interrupts
+  - reg
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    tilcdc: tilcdc@4830e000 {
+        compatible = "ti,am33xx-tilcdc";
+        reg = <0x4830e000 0x1000>;
+        interrupt-parent = <&intc>;
+        interrupts = <36>;
+        ti,hwmods = "lcdc";
+
+        blue-and-red-wiring = "crossed";
+
+        port {
+            lcdc_0: endpoint {
+                remote-endpoint = <&hdmi_0>;
+            };
+        };
+    };

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 02/21] dt-bindings: display: tilcdc: Add fifo-threshold property
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 01/21] dt-bindings: display: tilcdc: Convert to DT schema Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-27  8:22   ` Krzysztof Kozlowski
  2025-11-26 17:35 ` [PATCH 03/21] drm/tilcdc: Remove simulate_vesa_sync flag Kory Maincent (TI.com)
                   ` (19 subsequent siblings)
  21 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Add the fifo-threshold property to control the DMA FIFO threshold level,
which specifies the number of words that must be loaded before the DMA
FIFO becomes ready.

This property is needed to support the da850-evm board configuration
which requires a non-default FIFO threshold value. Currently, this value
is specified through the deprecated ti,tilcdc,panel binding. Adding this
property to the tilcdc binding allows for proper configuration while
migrating away from the non-standard panel binding.

The default value is 8 words, with valid values being powers of 2 from
8 to 512.

Related commit: 55da73fa7a68c ("ARM: dts: davinci: da850-evm: Increase
fifo threshold")

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml
index 34ac1fd04d5c6..bf6d506e25e17 100644
--- a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml
+++ b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml
@@ -46,6 +46,13 @@ properties:
       The maximum pixel clock that can be supported by the lcd controller
       in KHz.
 
+  fifo-threshold:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [8, 16, 32, 64, 128, 256, 512]
+    description:
+      Number of words loaded before the DMA fifo becomes ready. The default
+      value is 8.
+
   blue-and-red-wiring:
     enum: [straight, crossed]
     description:

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 03/21] drm/tilcdc: Remove simulate_vesa_sync flag
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 01/21] dt-bindings: display: tilcdc: Convert to DT schema Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 02/21] dt-bindings: display: tilcdc: Add fifo-threshold property Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-12-10 18:10   ` Luca Ceresoli
  2025-11-26 17:35 ` [PATCH 04/21] drm/tilcdc: Add support for DRM bus flags and simplify panel config Kory Maincent (TI.com)
                   ` (18 subsequent siblings)
  21 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

The tilcdc hardware does not generate VESA-compliant sync signals. It
aligns the vertical sync (VS) on the second edge of the horizontal sync
(HS) instead of the first edge. To compensate for this hardware
behavior, the driver applies a timing adjustment in mode_fixup().

Previously, this adjustment was conditional based on the simulate_vesa_sync
flag, which was only set when using external encoders. This appears
problematic because:

1. The timing adjustment seems needed for the hardware behavior regardless
   of whether an external encoder is used
2. The external encoder infrastructure is driver-specific and being
   removed due to design issues
3. Boards using tilcdc without bridges (e.g., am335x-evm, am335x-evmsk)
   may not be getting the necessary timing adjustments

Remove the simulate_vesa_sync flag and apply the VESA sync timing
adjustment unconditionally, ensuring consistent behavior across all
configurations. While it's unclear if the previous conditional behavior
was causing actual issues, the unconditional adjustment better reflects
the hardware's characteristics.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---

Only few board currently use tilcdc not associated to a bridge like the
am335x_evm or the am335x-evmsk.
---
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c     | 16 ----------------
 drivers/gpu/drm/tilcdc/tilcdc_drv.h      |  2 --
 drivers/gpu/drm/tilcdc/tilcdc_external.c |  1 -
 3 files changed, 19 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index 52c95131af5af..b06b1453db2dd 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -47,9 +47,6 @@ struct tilcdc_crtc {
 
 	struct drm_framebuffer *next_fb;
 
-	/* Only set if an external encoder is connected */
-	bool simulate_vesa_sync;
-
 	int sync_lost_count;
 	bool frame_intact;
 	struct work_struct recover_work;
@@ -642,11 +639,6 @@ static bool tilcdc_crtc_mode_fixup(struct drm_crtc *crtc,
 		const struct drm_display_mode *mode,
 		struct drm_display_mode *adjusted_mode)
 {
-	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-
-	if (!tilcdc_crtc->simulate_vesa_sync)
-		return true;
-
 	/*
 	 * tilcdc does not generate VESA-compliant sync but aligns
 	 * VS on the second edge of HS instead of first edge.
@@ -866,14 +858,6 @@ void tilcdc_crtc_set_panel_info(struct drm_crtc *crtc,
 	tilcdc_crtc->info = info;
 }
 
-void tilcdc_crtc_set_simulate_vesa_sync(struct drm_crtc *crtc,
-					bool simulate_vesa_sync)
-{
-	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-
-	tilcdc_crtc->simulate_vesa_sync = simulate_vesa_sync;
-}
-
 void tilcdc_crtc_update_clk(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index 58b276f82a669..3aba3a1155ba0 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -160,8 +160,6 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc);
 void tilcdc_crtc_update_clk(struct drm_crtc *crtc);
 void tilcdc_crtc_set_panel_info(struct drm_crtc *crtc,
 		const struct tilcdc_panel_info *info);
-void tilcdc_crtc_set_simulate_vesa_sync(struct drm_crtc *crtc,
-					bool simulate_vesa_sync);
 void tilcdc_crtc_shutdown(struct drm_crtc *crtc);
 void tilcdc_crtc_destroy(struct drm_crtc *crtc);
 int tilcdc_crtc_update_fb(struct drm_crtc *crtc,
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_external.c
index 3b86d002ef62e..da755a411d9ff 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_external.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c
@@ -80,7 +80,6 @@ int tilcdc_add_component_encoder(struct drm_device *ddev)
 		return -ENODEV;
 
 	/* Only tda998x is supported at the moment. */
-	tilcdc_crtc_set_simulate_vesa_sync(priv->crtc, true);
 	tilcdc_crtc_set_panel_info(priv->crtc, &panel_info_tda998x);
 
 	return 0;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 04/21] drm/tilcdc: Add support for DRM bus flags and simplify panel config
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (2 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 03/21] drm/tilcdc: Remove simulate_vesa_sync flag Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-12-10 18:13   ` Luca Ceresoli
  2025-11-26 17:35 ` [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver Kory Maincent (TI.com)
                   ` (17 subsequent siblings)
  21 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Migrate CRTC mode configuration to use standard DRM bus flags in
preparation for removing the tilcdc_panel driver and its custom
tilcdc_panel_info structure.

Add support for DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE and
DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE flags to control pixel clock and sync
signal edge polarity, while maintaining backward compatibility with the
existing tilcdc panel info structure.

Simplify several hardware parameters by setting them to fixed defaults
based on common usage across existing device trees:
- DMA burst size: 16 (previously configurable via switch statement)
- AC bias frequency: 255 (previously panel-specific)
- FIFO DMA request delay: 128 (previously panel-specific)

These parameters show no variation in real-world usage, so hardcoding
them simplifies the driver without losing functionality.

Preserve FIFO threshold configurability by adding a new "fifo-threshold"
device tree property at the display controller level, as this parameter
varies across different display configurations in existing device trees.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 48 ++++++++++++++----------------------
 drivers/gpu/drm/tilcdc/tilcdc_drv.c  |  2 ++
 drivers/gpu/drm/tilcdc/tilcdc_drv.h  |  2 ++
 3 files changed, 22 insertions(+), 30 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index b06b1453db2dd..1b5475c48f6ad 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -285,27 +285,15 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc)
 
 	/* Configure the Burst Size and fifo threshold of DMA: */
 	reg = tilcdc_read(dev, LCDC_DMA_CTRL_REG) & ~0x00000770;
-	switch (info->dma_burst_sz) {
-	case 1:
-		reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_1);
-		break;
-	case 2:
-		reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_2);
-		break;
-	case 4:
-		reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_4);
-		break;
-	case 8:
-		reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_8);
-		break;
-	case 16:
-		reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_16);
-		break;
-	default:
-		dev_err(dev->dev, "invalid burst size\n");
-		return;
+	/* Use 16 bit DMA burst size by default */
+	reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_16);
+	if (priv->fifo_th) {
+		int fifo_th_val = const_ilog2(priv->fifo_th) - 3;
+
+		reg |= (fifo_th_val << 8);
+	} else {
+		reg |= (info->fifo_th << 8);
 	}
-	reg |= (info->fifo_th << 8);
 	tilcdc_write(dev, LCDC_DMA_CTRL_REG, reg);
 
 	/* Configure timings: */
@@ -321,8 +309,8 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc)
 
 	/* Set AC Bias Period and Number of Transitions per Interrupt: */
 	reg = tilcdc_read(dev, LCDC_RASTER_TIMING_2_REG) & ~0x000fff00;
-	reg |= LCDC_AC_BIAS_FREQUENCY(info->ac_bias) |
-		LCDC_AC_BIAS_TRANSITIONS_PER_INT(info->ac_bias_intrpt);
+	/* Use 255 AC Bias Pin Frequency by default */
+	reg |= LCDC_AC_BIAS_FREQUENCY(255);
 
 	/*
 	 * subtract one from hfp, hbp, hsw because the hardware uses
@@ -392,20 +380,20 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc)
 			return;
 		}
 	}
-	reg |= info->fdd << 12;
+	/* Use 128 FIFO DMA Request Delay by default */
+	reg |= 128 << 12;
 	tilcdc_write(dev, LCDC_RASTER_CTRL_REG, reg);
 
-	if (info->invert_pxl_clk)
+	if (info->invert_pxl_clk ||
+	    mode->flags == DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE)
+
 		tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_PIXEL_CLOCK);
 	else
 		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_PIXEL_CLOCK);
 
-	if (info->sync_ctrl)
-		tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_CTRL);
-	else
-		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_CTRL);
-
-	if (info->sync_edge)
+	tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_CTRL);
+	if (info->sync_edge ||
+	    mode->flags == DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE)
 		tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_EDGE);
 	else
 		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_EDGE);
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 3dcbec312bacb..76eb336b5d4e7 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -309,6 +309,8 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
 
 	DBG("Maximum Pixel Clock Value %dKHz", priv->max_pixelclock);
 
+	of_property_read_u32(node, "fifo-threshold", &priv->fifo_th);
+
 	ret = tilcdc_crtc_create(ddev);
 	if (ret < 0) {
 		dev_err(dev, "failed to create crtc\n");
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index 3aba3a1155ba0..79078b4ae7393 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -61,6 +61,8 @@ struct tilcdc_drm_private {
 	 */
 	uint32_t max_width;
 
+	u32 fifo_th;
+
 	/* Supported pixel formats */
 	const uint32_t *pixelformats;
 	uint32_t num_pixelformats;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (3 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 04/21] drm/tilcdc: Add support for DRM bus flags and simplify panel config Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-12-01 14:13   ` Tomi Valkeinen
  2025-11-26 17:35 ` [PATCH 06/21] dt-bindings: display: tilcdc: Remove panel binding Kory Maincent (TI.com)
                   ` (16 subsequent siblings)
  21 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Use panel-dpi driver instead of the deprecated tilcdc-panel driver in
preparation for removing the tilcdc-panel driver and binding.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---

This patch is not tested. It would be nice if someone with one of this
board could test and validate it.
---
 arch/arm/boot/dts/ti/davinci/da850-evm.dts    | 26 +++++++++++++-------------
 arch/arm/boot/dts/ti/omap/am335x-guardian.dts | 25 +++++++++----------------
 arch/arm/boot/dts/ti/omap/am335x-pdu001.dts   | 21 ++++++++++-----------
 arch/arm/boot/dts/ti/omap/am335x-pepper.dts   | 22 +++++++++++-----------
 arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts | 25 +++++++++++++------------
 arch/arm/boot/dts/ti/omap/am335x-sl50.dts     | 25 ++++++++++++-------------
 6 files changed, 68 insertions(+), 76 deletions(-)

diff --git a/arch/arm/boot/dts/ti/davinci/da850-evm.dts b/arch/arm/boot/dts/ti/davinci/da850-evm.dts
index 38a191fb04149..79cca1f6205ef 100644
--- a/arch/arm/boot/dts/ti/davinci/da850-evm.dts
+++ b/arch/arm/boot/dts/ti/davinci/da850-evm.dts
@@ -40,7 +40,7 @@ backlight: backlight-pwm {
 	};
 
 	panel {
-		compatible = "ti,tilcdc,panel";
+		compatible = "panel-dpi";
 		pinctrl-names = "default";
 		pinctrl-0 = <&lcd_pins>;
 		/*
@@ -50,17 +50,10 @@ panel {
 		 */
 		status = "okay";
 		enable-gpios = <&gpio 40 GPIO_ACTIVE_HIGH>; /* lcd_panel_pwr */
-
-		panel-info {
-			ac-bias = <255>;
-			ac-bias-intrpt = <0>;
-			dma-burst-sz = <16>;
-			bpp = <16>;
-			fdd = <0x80>;
-			sync-edge = <0>;
-			sync-ctrl = <1>;
-			raster-order = <0>;
-			fifo-th = <1>;
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&lcdc_out>;
+			};
 		};
 
 		display-timings {
@@ -222,6 +215,13 @@ &rtc0 {
 };
 
 &lcdc {
+	fifo-threshold = <16>;
+
+	port {
+		lcdc_out: endpoint {
+			remote-endpoint = <&panel_in>;
+		};
+	};
 	status = "okay";
 };
 
@@ -459,7 +459,7 @@ &vpif {
 	pinctrl-0 = <&vpif_capture_pins>, <&vpif_display_pins>;
 	/*
 	 * The vpif and the LCD are mutually exclusive.
-	 * To enable VPIF, disable the ti,tilcdc,panel then
+	 * To enable VPIF, disable the panel-dpi then
 	 * change the status below to 'okay'
 	 */
 	status = "disabled";
diff --git a/arch/arm/boot/dts/ti/omap/am335x-guardian.dts b/arch/arm/boot/dts/ti/omap/am335x-guardian.dts
index 4b070e634b281..f38ce9be2c106 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-guardian.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-guardian.dts
@@ -68,10 +68,15 @@ gpio-poweroff {
 	};
 
 	panel {
-		compatible = "ti,tilcdc,panel";
+		compatible = "panel-dpi";
 		pinctrl-names = "default", "sleep";
 		pinctrl-0 = <&lcd_pins_default &lcd_disen_pins>;
 		pinctrl-1 = <&lcd_pins_sleep>;
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&lcdc_out>;
+			};
+		};
 
 		display-timings {
 			timing-320x240 {
@@ -86,21 +91,9 @@ timing-320x240 {
 				clock-frequency = <9000000>;
 				hsync-active    = <0>;
 				vsync-active    = <0>;
+				pixelclk-active = <1>;
 			};
 		};
-		panel-info {
-			ac-bias           = <255>;
-			ac-bias-intrpt    = <0>;
-			dma-burst-sz      = <16>;
-			bpp               = <24>;
-			bus-width         = <16>;
-			fdd               = <0x80>;
-			sync-edge         = <0>;
-			sync-ctrl         = <1>;
-			raster-order      = <0>;
-			fifo-th           = <0>;
-		};
-
 	};
 
 	guardian_beeper: pwm-7 {
@@ -265,8 +258,8 @@ &lcdc {
 	blue-and-red-wiring = "crossed";
 	status = "okay";
 	port {
-		lcdc_0: endpoint@0 {
-			remote-endpoint = <0>;
+		lcdc_out: endpoint@0 {
+			remote-endpoint = <&panel_in>;
 		};
 	};
 };
diff --git a/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts b/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts
index c9ccb9de21ad7..2c5229d05ade7 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts
@@ -50,20 +50,14 @@ lis3_reg: fixedregulator@1 {
 	};
 
 	panel {
-		compatible = "ti,tilcdc,panel";
+		compatible = "panel-dpi";
 		status = "okay";
 		pinctrl-names = "default";
 		pinctrl-0 = <&lcd_pins_s0>;
-		panel-info {
-			ac-bias           = <255>;
-			ac-bias-intrpt    = <0>;
-			dma-burst-sz      = <16>;
-			bpp               = <16>;
-			fdd               = <0x80>;
-			sync-edge         = <0>;
-			sync-ctrl         = <1>;
-			raster-order      = <0>;
-			fifo-th           = <0>;
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&lcdc_out>;
+			};
 		};
 
 		display-timings {
@@ -395,6 +389,11 @@ &rtc {
 
 &lcdc {
 	status = "okay";
+	port {
+		lcdc_out: endpoint {
+			remote-endpoint = <&panel_in>;
+		};
+	};
 };
 
 &elm {
diff --git a/arch/arm/boot/dts/ti/omap/am335x-pepper.dts b/arch/arm/boot/dts/ti/omap/am335x-pepper.dts
index e7d561a527fdd..2760c0eab50c2 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-pepper.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-pepper.dts
@@ -31,7 +31,7 @@ leds: user-leds-pins {
 	};
 
 	panel: lcd_panel {
-		compatible = "ti,tilcdc,panel";
+		compatible = "panel-dpi";
 	};
 
 	sound: sound_iface {
@@ -189,16 +189,10 @@ &panel {
 	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&lcd_pins>;
-	panel-info {
-		ac-bias = <255>;
-		ac-bias-intrpt = <0>;
-		dma-burst-sz = <16>;
-		bpp = <32>;
-		fdd = <0x80>;
-		sync-edge = <0>;
-		sync-ctrl = <1>;
-		raster-order = <0>;
-		fifo-th = <0>;
+	port {
+		panel_in: endpoint {
+			remote-endpoint = <&lcdc_out>;
+		};
 	};
 	display-timings {
 		native-mode = <&timing0>;
@@ -214,12 +208,18 @@ timing0: timing-480x272 {
 			vsync-len = <10>;
 			hsync-active = <1>;
 			vsync-active = <1>;
+			pixelclk-active = <1>;
 		};
 	};
 };
 
 &lcdc {
 	status = "okay";
+	port {
+		lcdc_out: endpoint {
+			remote-endpoint = <&panel_in>;
+		};
+	};
 };
 
 &am33xx_pinmux {
diff --git a/arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts b/arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts
index 2841e95d9a094..25ee855dd21a7 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts
@@ -13,23 +13,17 @@ / {
 
 	/* DRM display driver */
 	panel {
-		compatible = "ti,tilcdc,panel";
+		compatible = "panel-dpi";
 		status = "okay";
 		pinctrl-names = "default", "sleep";
 		pinctrl-0 = <&lcd_pins_default>;
 		pinctrl-1 = <&lcd_pins_sleep>;
-
-		panel-info {
-			ac-bias           = <255>;
-			ac-bias-intrpt    = <0>;
-			dma-burst-sz      = <16>;
-			bpp               = <32>;
-			fdd               = <0x80>;
-			sync-edge         = <0>;
-			sync-ctrl         = <1>;
-			raster-order      = <0>;
-			fifo-th           = <0>;
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&lcdc_out>;
+			};
 		};
+
 		display-timings {
 			/* Timing selection performed by U-Boot */
 			timing0: lcd {/* 800x480p62 */
@@ -44,6 +38,7 @@ timing0: lcd {/* 800x480p62 */
 				vsync-len = <2>;
 				hsync-active = <1>;
 				vsync-active = <1>;
+				pixelclk-active = <1>;
 			};
 			timing1: dvi { /* 1024x768p60 */
 				clock-frequency = <65000000>;
@@ -57,6 +52,7 @@ timing1: dvi { /* 1024x768p60 */
 				vsync-len = <6>;
 				hsync-active = <0>;
 				vsync-active = <0>;
+				pixelclk-active = <1>;
 			};
 		};
 	};
@@ -173,4 +169,9 @@ lcd-ena-hog {
 /* Display */
 &lcdc {
 	status = "okay";
+	port {
+		lcdc_out: endpoint {
+			remote-endpoint = <&panel_in>;
+		};
+	};
 };
diff --git a/arch/arm/boot/dts/ti/omap/am335x-sl50.dts b/arch/arm/boot/dts/ti/omap/am335x-sl50.dts
index f3524e5ee43e2..b4b2b6d18d646 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-sl50.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-sl50.dts
@@ -123,22 +123,14 @@ audio_mclk: audio_mclk_gate@0 {
 	};
 
 	panel: lcd_panel {
-		compatible = "ti,tilcdc,panel";
+		compatible = "panel-dpi";
 		pinctrl-names = "default";
 		pinctrl-0 = <&lcd_pins>;
 
-		panel-info {
-			ac-bias = <255>;
-			ac-bias-intrpt = <0>;
-			dma-burst-sz = <16>;
-			bpp = <16>;
-			fdd = <0x80>;
-			tft-alt-mode = <0>;
-			mono-8bit-mode = <0>;
-			sync-edge = <0>;
-			sync-ctrl = <1>;
-			raster-order = <0>;
-			fifo-th = <0>;
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&lcdc_out>;
+			};
 		};
 
 		display-timings {
@@ -157,6 +149,8 @@ timing0: 960x128 {
 				vfront-porch = <8>;
 				vsync-len = <4>;
 				vsync-active = <0>;
+
+				pixelclk-active = <1>;
 			};
 		};
 	};
@@ -711,6 +705,11 @@ &ehrpwm1 {
 
 &lcdc {
 	status = "okay";
+	port {
+		lcdc_out: endpoint {
+			remote-endpoint = <&panel_in>;
+		};
+	};
 };
 
 &tscadc {

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 06/21] dt-bindings: display: tilcdc: Remove panel binding
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (4 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 07/21] drm/tilcdc: Remove tilcdc panel driver Kory Maincent (TI.com)
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Remove the deprecated ti,tilcdc,panel binding which violates devicetree
design principles by placing display controller configuration
(DMA burst size, FIFO thresholds, AC bias, etc.) inside the panel node
instead of the controller node where it belongs.

This non-standard binding has several critical issues:
- Mixes controller-specific hardware parameters with panel properties
- Lacks the standard port/endpoint graph for panel connections
- Cannot work with the standard DRM panel infrastructure
- Forces vendor-specific binding instead of reusable panel-dpi binding

The tilcdc driver has been updated to work with standard DRM panels and
bridges, and all in-tree users have been migrated to use the generic
panel-dpi binding with proper port/endpoint connections. Controller
parameters like fifo-threshold are now correctly specified in the
tilcdc node itself.

While removing bindings is exceptional, keeping this binding would:
- Perpetuate incorrect devicetree design patterns
- Require maintaining a non-standard panel driver solely for tilcdc
- Block proper integration with the DRM panel subsystem
- Prevent devicetree reusability across different display controllers

This removal completes the migration to standard DRM panel bindings.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 .../devicetree/bindings/display/tilcdc/panel.txt   | 66 ----------------------
 1 file changed, 66 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/tilcdc/panel.txt b/Documentation/devicetree/bindings/display/tilcdc/panel.txt
deleted file mode 100644
index 808216310ea27..0000000000000
--- a/Documentation/devicetree/bindings/display/tilcdc/panel.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-Device-Tree bindings for tilcdc DRM generic panel output driver
-
-Required properties:
- - compatible: value should be "ti,tilcdc,panel".
- - panel-info: configuration info to configure LCDC correctly for the panel
-   - ac-bias: AC Bias Pin Frequency
-   - ac-bias-intrpt: AC Bias Pin Transitions per Interrupt
-   - dma-burst-sz: DMA burst size
-   - bpp: Bits per pixel
-   - fdd: FIFO DMA Request Delay
-   - sync-edge: Horizontal and Vertical Sync Edge: 0=rising 1=falling
-   - sync-ctrl: Horizontal and Vertical Sync: Control: 0=ignore
-   - raster-order: Raster Data Order Select: 1=Most-to-least 0=Least-to-most
-   - fifo-th: DMA FIFO threshold
- - display-timings: typical videomode of lcd panel.  Multiple video modes
-   can be listed if the panel supports multiple timings, but the 'native-mode'
-   should be the preferred/default resolution.  Refer to
-   Documentation/devicetree/bindings/display/panel/display-timing.txt for display
-   timing binding details.
-
-Optional properties:
-- backlight: phandle of the backlight device attached to the panel
-- enable-gpios: GPIO pin to enable or disable the panel
-
-Recommended properties:
- - pinctrl-names, pinctrl-0: the pincontrol settings to configure
-   muxing properly for pins that connect to TFP410 device
-
-Example:
-
-	/* Settings for CDTech_S035Q01 / LCD3 cape: */
-	lcd3 {
-		compatible = "ti,tilcdc,panel";
-		pinctrl-names = "default";
-		pinctrl-0 = <&bone_lcd3_cape_lcd_pins>;
-		backlight = <&backlight>;
-		enable-gpios = <&gpio3 19 0>;
-
-		panel-info {
-			ac-bias           = <255>;
-			ac-bias-intrpt    = <0>;
-			dma-burst-sz      = <16>;
-			bpp               = <16>;
-			fdd               = <0x80>;
-			sync-edge         = <0>;
-			sync-ctrl         = <1>;
-			raster-order      = <0>;
-			fifo-th           = <0>;
-		};
-		display-timings {
-			native-mode = <&timing0>;
-			timing0: 320x240 {
-				hactive         = <320>;
-				vactive         = <240>;
-				hback-porch     = <21>;
-				hfront-porch    = <58>;
-				hsync-len       = <47>;
-				vback-porch     = <11>;
-				vfront-porch    = <23>;
-				vsync-len       = <2>;
-				clock-frequency = <8000000>;
-				hsync-active    = <0>;
-				vsync-active    = <0>;
-			};
-		};
-	};

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 07/21] drm/tilcdc: Remove tilcdc panel driver
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (5 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 06/21] dt-bindings: display: tilcdc: Remove panel binding Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 08/21] drm/tilcdc: Remove component framework support Kory Maincent (TI.com)
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

The tilcdc panel subdriver is a legacy, non-standard driver that has been
replaced by the standard panel-dpi driver and panel-simple infrastructure.

With the device tree bindings removed and all in-tree users migrated to
use panel-dpi, this driver no longer has any associated device tree
bindings or users. The panel-dpi driver combined with DRM bus flags
provides equivalent functionality in a standard way that is compatible
with the broader DRM panel ecosystem.

This removal eliminates 400+ lines of redundant code and completes the
migration to standard panel handling.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/Makefile       |   1 -
 drivers/gpu/drm/tilcdc/tilcdc_drv.c   |   3 -
 drivers/gpu/drm/tilcdc/tilcdc_panel.c | 408 ----------------------------------
 drivers/gpu/drm/tilcdc/tilcdc_panel.h |  15 --
 4 files changed, 427 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/Makefile b/drivers/gpu/drm/tilcdc/Makefile
index f5190477de721..b24122bea2596 100644
--- a/drivers/gpu/drm/tilcdc/Makefile
+++ b/drivers/gpu/drm/tilcdc/Makefile
@@ -6,7 +6,6 @@ endif
 tilcdc-y := \
 	tilcdc_plane.o \
 	tilcdc_crtc.o \
-	tilcdc_panel.o \
 	tilcdc_external.o \
 	tilcdc_drv.o
 
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 76eb336b5d4e7..411f0767d112d 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -28,7 +28,6 @@
 
 #include "tilcdc_drv.h"
 #include "tilcdc_external.h"
-#include "tilcdc_panel.h"
 #include "tilcdc_regs.h"
 
 static LIST_HEAD(module_list);
@@ -623,7 +622,6 @@ static int __init tilcdc_drm_init(void)
 		return -ENODEV;
 
 	DBG("init");
-	tilcdc_panel_init();
 	return platform_driver_register(&tilcdc_platform_driver);
 }
 
@@ -631,7 +629,6 @@ static void __exit tilcdc_drm_fini(void)
 {
 	DBG("fini");
 	platform_driver_unregister(&tilcdc_platform_driver);
-	tilcdc_panel_fini();
 }
 
 module_init(tilcdc_drm_init);
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
deleted file mode 100644
index 262f290d85d91..0000000000000
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ /dev/null
@@ -1,408 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Copyright (C) 2012 Texas Instruments
- * Author: Rob Clark <robdclark@gmail.com>
- */
-
-#include <linux/backlight.h>
-#include <linux/gpio/consumer.h>
-#include <linux/platform_device.h>
-
-#include <video/display_timing.h>
-#include <video/of_display_timing.h>
-#include <video/videomode.h>
-
-#include <drm/drm_atomic_state_helper.h>
-#include <drm/drm_connector.h>
-#include <drm/drm_modeset_helper_vtables.h>
-#include <drm/drm_probe_helper.h>
-#include <drm/drm_simple_kms_helper.h>
-
-#include "tilcdc_drv.h"
-#include "tilcdc_panel.h"
-
-struct panel_module {
-	struct tilcdc_module base;
-	struct tilcdc_panel_info *info;
-	struct display_timings *timings;
-	struct backlight_device *backlight;
-	struct gpio_desc *enable_gpio;
-};
-#define to_panel_module(x) container_of(x, struct panel_module, base)
-
-
-/*
- * Encoder:
- */
-
-struct panel_encoder {
-	struct drm_encoder base;
-	struct panel_module *mod;
-};
-#define to_panel_encoder(x) container_of(x, struct panel_encoder, base)
-
-static void panel_encoder_dpms(struct drm_encoder *encoder, int mode)
-{
-	struct panel_encoder *panel_encoder = to_panel_encoder(encoder);
-	struct backlight_device *backlight = panel_encoder->mod->backlight;
-	struct gpio_desc *gpio = panel_encoder->mod->enable_gpio;
-
-	if (backlight) {
-		backlight->props.power = mode == DRM_MODE_DPMS_ON ?
-					 BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF;
-		backlight_update_status(backlight);
-	}
-
-	if (gpio)
-		gpiod_set_value_cansleep(gpio,
-					 mode == DRM_MODE_DPMS_ON ? 1 : 0);
-}
-
-static void panel_encoder_prepare(struct drm_encoder *encoder)
-{
-	panel_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
-}
-
-static void panel_encoder_commit(struct drm_encoder *encoder)
-{
-	panel_encoder_dpms(encoder, DRM_MODE_DPMS_ON);
-}
-
-static void panel_encoder_mode_set(struct drm_encoder *encoder,
-		struct drm_display_mode *mode,
-		struct drm_display_mode *adjusted_mode)
-{
-	/* nothing needed */
-}
-
-static const struct drm_encoder_helper_funcs panel_encoder_helper_funcs = {
-		.dpms           = panel_encoder_dpms,
-		.prepare        = panel_encoder_prepare,
-		.commit         = panel_encoder_commit,
-		.mode_set       = panel_encoder_mode_set,
-};
-
-static struct drm_encoder *panel_encoder_create(struct drm_device *dev,
-		struct panel_module *mod)
-{
-	struct panel_encoder *panel_encoder;
-	struct drm_encoder *encoder;
-	int ret;
-
-	panel_encoder = devm_kzalloc(dev->dev, sizeof(*panel_encoder),
-				     GFP_KERNEL);
-	if (!panel_encoder)
-		return NULL;
-
-	panel_encoder->mod = mod;
-
-	encoder = &panel_encoder->base;
-	encoder->possible_crtcs = 1;
-
-	ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_LVDS);
-	if (ret < 0)
-		goto fail;
-
-	drm_encoder_helper_add(encoder, &panel_encoder_helper_funcs);
-
-	return encoder;
-
-fail:
-	drm_encoder_cleanup(encoder);
-	return NULL;
-}
-
-/*
- * Connector:
- */
-
-struct panel_connector {
-	struct drm_connector base;
-
-	struct drm_encoder *encoder;  /* our connected encoder */
-	struct panel_module *mod;
-};
-#define to_panel_connector(x) container_of(x, struct panel_connector, base)
-
-
-static void panel_connector_destroy(struct drm_connector *connector)
-{
-	drm_connector_unregister(connector);
-	drm_connector_cleanup(connector);
-}
-
-static int panel_connector_get_modes(struct drm_connector *connector)
-{
-	struct drm_device *dev = connector->dev;
-	struct panel_connector *panel_connector = to_panel_connector(connector);
-	struct display_timings *timings = panel_connector->mod->timings;
-	int i;
-
-	for (i = 0; i < timings->num_timings; i++) {
-		struct drm_display_mode *mode;
-		struct videomode vm;
-
-		if (videomode_from_timings(timings, &vm, i))
-			break;
-
-		mode = drm_mode_create(dev);
-		if (!mode)
-			break;
-
-		drm_display_mode_from_videomode(&vm, mode);
-
-		mode->type = DRM_MODE_TYPE_DRIVER;
-
-		if (timings->native_mode == i)
-			mode->type |= DRM_MODE_TYPE_PREFERRED;
-
-		drm_mode_set_name(mode);
-		drm_mode_probed_add(connector, mode);
-	}
-
-	return i;
-}
-
-static struct drm_encoder *panel_connector_best_encoder(
-		struct drm_connector *connector)
-{
-	struct panel_connector *panel_connector = to_panel_connector(connector);
-	return panel_connector->encoder;
-}
-
-static const struct drm_connector_funcs panel_connector_funcs = {
-	.destroy            = panel_connector_destroy,
-	.fill_modes         = drm_helper_probe_single_connector_modes,
-	.reset              = drm_atomic_helper_connector_reset,
-	.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
-	.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
-};
-
-static const struct drm_connector_helper_funcs panel_connector_helper_funcs = {
-	.get_modes          = panel_connector_get_modes,
-	.best_encoder       = panel_connector_best_encoder,
-};
-
-static struct drm_connector *panel_connector_create(struct drm_device *dev,
-		struct panel_module *mod, struct drm_encoder *encoder)
-{
-	struct panel_connector *panel_connector;
-	struct drm_connector *connector;
-	int ret;
-
-	panel_connector = devm_kzalloc(dev->dev, sizeof(*panel_connector),
-				       GFP_KERNEL);
-	if (!panel_connector)
-		return NULL;
-
-	panel_connector->encoder = encoder;
-	panel_connector->mod = mod;
-
-	connector = &panel_connector->base;
-
-	drm_connector_init(dev, connector, &panel_connector_funcs,
-			DRM_MODE_CONNECTOR_LVDS);
-	drm_connector_helper_add(connector, &panel_connector_helper_funcs);
-
-	connector->interlace_allowed = 0;
-	connector->doublescan_allowed = 0;
-
-	ret = drm_connector_attach_encoder(connector, encoder);
-	if (ret)
-		goto fail;
-
-	return connector;
-
-fail:
-	panel_connector_destroy(connector);
-	return NULL;
-}
-
-/*
- * Module:
- */
-
-static int panel_modeset_init(struct tilcdc_module *mod, struct drm_device *dev)
-{
-	struct panel_module *panel_mod = to_panel_module(mod);
-	struct tilcdc_drm_private *priv = dev->dev_private;
-	struct drm_encoder *encoder;
-	struct drm_connector *connector;
-
-	encoder = panel_encoder_create(dev, panel_mod);
-	if (!encoder)
-		return -ENOMEM;
-
-	connector = panel_connector_create(dev, panel_mod, encoder);
-	if (!connector)
-		return -ENOMEM;
-
-	priv->encoders[priv->num_encoders++] = encoder;
-	priv->connectors[priv->num_connectors++] = connector;
-
-	tilcdc_crtc_set_panel_info(priv->crtc,
-				   to_panel_encoder(encoder)->mod->info);
-
-	return 0;
-}
-
-static const struct tilcdc_module_ops panel_module_ops = {
-		.modeset_init = panel_modeset_init,
-};
-
-/*
- * Device:
- */
-
-/* maybe move this somewhere common if it is needed by other outputs? */
-static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np)
-{
-	struct device_node *info_np;
-	struct tilcdc_panel_info *info;
-	int ret = 0;
-
-	if (!np) {
-		pr_err("%s: no devicenode given\n", __func__);
-		return NULL;
-	}
-
-	info_np = of_get_child_by_name(np, "panel-info");
-	if (!info_np) {
-		pr_err("%s: could not find panel-info node\n", __func__);
-		return NULL;
-	}
-
-	info = kzalloc(sizeof(*info), GFP_KERNEL);
-	if (!info)
-		goto put_node;
-
-	ret |= of_property_read_u32(info_np, "ac-bias", &info->ac_bias);
-	ret |= of_property_read_u32(info_np, "ac-bias-intrpt", &info->ac_bias_intrpt);
-	ret |= of_property_read_u32(info_np, "dma-burst-sz", &info->dma_burst_sz);
-	ret |= of_property_read_u32(info_np, "bpp", &info->bpp);
-	ret |= of_property_read_u32(info_np, "fdd", &info->fdd);
-	ret |= of_property_read_u32(info_np, "sync-edge", &info->sync_edge);
-	ret |= of_property_read_u32(info_np, "sync-ctrl", &info->sync_ctrl);
-	ret |= of_property_read_u32(info_np, "raster-order", &info->raster_order);
-	ret |= of_property_read_u32(info_np, "fifo-th", &info->fifo_th);
-
-	/* optional: */
-	info->tft_alt_mode      = of_property_read_bool(info_np, "tft-alt-mode");
-	info->invert_pxl_clk    = of_property_read_bool(info_np, "invert-pxl-clk");
-
-	if (ret) {
-		pr_err("%s: error reading panel-info properties\n", __func__);
-		kfree(info);
-		info = NULL;
-	}
-
-put_node:
-	of_node_put(info_np);
-	return info;
-}
-
-static int panel_probe(struct platform_device *pdev)
-{
-	struct device_node *node = pdev->dev.of_node;
-	struct backlight_device *backlight;
-	struct panel_module *panel_mod;
-	struct tilcdc_module *mod;
-	int ret;
-
-	/* bail out early if no DT data: */
-	if (!node) {
-		dev_err(&pdev->dev, "device-tree data is missing\n");
-		return -ENXIO;
-	}
-
-	panel_mod = devm_kzalloc(&pdev->dev, sizeof(*panel_mod), GFP_KERNEL);
-	if (!panel_mod)
-		return -ENOMEM;
-
-	backlight = devm_of_find_backlight(&pdev->dev);
-	if (IS_ERR(backlight))
-		return PTR_ERR(backlight);
-	panel_mod->backlight = backlight;
-
-	panel_mod->enable_gpio = devm_gpiod_get_optional(&pdev->dev, "enable",
-							 GPIOD_OUT_LOW);
-	if (IS_ERR(panel_mod->enable_gpio)) {
-		ret = PTR_ERR(panel_mod->enable_gpio);
-		dev_err(&pdev->dev, "failed to request enable GPIO\n");
-		goto fail_backlight;
-	}
-
-	if (panel_mod->enable_gpio)
-		dev_info(&pdev->dev, "found enable GPIO\n");
-
-	mod = &panel_mod->base;
-	pdev->dev.platform_data = mod;
-
-	tilcdc_module_init(mod, "panel", &panel_module_ops);
-
-	panel_mod->timings = of_get_display_timings(node);
-	if (!panel_mod->timings) {
-		dev_err(&pdev->dev, "could not get panel timings\n");
-		ret = -EINVAL;
-		goto fail_free;
-	}
-
-	panel_mod->info = of_get_panel_info(node);
-	if (!panel_mod->info) {
-		dev_err(&pdev->dev, "could not get panel info\n");
-		ret = -EINVAL;
-		goto fail_timings;
-	}
-
-	return 0;
-
-fail_timings:
-	display_timings_release(panel_mod->timings);
-
-fail_free:
-	tilcdc_module_cleanup(mod);
-
-fail_backlight:
-	if (panel_mod->backlight)
-		put_device(&panel_mod->backlight->dev);
-	return ret;
-}
-
-static void panel_remove(struct platform_device *pdev)
-{
-	struct tilcdc_module *mod = dev_get_platdata(&pdev->dev);
-	struct panel_module *panel_mod = to_panel_module(mod);
-	struct backlight_device *backlight = panel_mod->backlight;
-
-	if (backlight)
-		put_device(&backlight->dev);
-
-	display_timings_release(panel_mod->timings);
-
-	tilcdc_module_cleanup(mod);
-	kfree(panel_mod->info);
-}
-
-static const struct of_device_id panel_of_match[] = {
-		{ .compatible = "ti,tilcdc,panel", },
-		{ },
-};
-
-static struct platform_driver panel_driver = {
-	.probe = panel_probe,
-	.remove = panel_remove,
-	.driver = {
-		.name = "tilcdc-panel",
-		.of_match_table = panel_of_match,
-	},
-};
-
-int __init tilcdc_panel_init(void)
-{
-	return platform_driver_register(&panel_driver);
-}
-
-void __exit tilcdc_panel_fini(void)
-{
-	platform_driver_unregister(&panel_driver);
-}
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.h b/drivers/gpu/drm/tilcdc/tilcdc_panel.h
deleted file mode 100644
index 65d735d773a48..0000000000000
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2012 Texas Instruments
- * Author: Rob Clark <robdclark@gmail.com>
- */
-
-#ifndef __TILCDC_PANEL_H__
-#define __TILCDC_PANEL_H__
-
-/* sub-module for generic lcd panel output */
-
-int tilcdc_panel_init(void);
-void tilcdc_panel_fini(void);
-
-#endif /* __TILCDC_PANEL_H__ */

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 08/21] drm/tilcdc: Remove component framework support
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (6 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 07/21] drm/tilcdc: Remove tilcdc panel driver Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-12-11  9:42   ` Luca Ceresoli
  2025-11-26 17:35 ` [PATCH 09/21] drm/tilcdc: Remove tilcdc_panel_info structure Kory Maincent (TI.com)
                   ` (13 subsequent siblings)
  21 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

The tilcdc driver previously used the component framework to bind
external encoder subdrivers (specifically the TDA998x HDMI encoder).
With the removal of these subdrivers in previous commits, the component
framework is no longer needed.

This commit removes all component framework infrastructure including:
- Component master operations and bind/unbind callbacks
- The is_componentized flag and conditional code paths
- tilcdc_get_external_components() and tilcdc_add_component_encoder()
- TDA998x-specific panel configuration

The driver now uses a simplified initialization path that directly
attaches external devices via the DRM bridge API, eliminating the
complexity of dual code paths for componentized vs non-componentized
configurations.

This cleanup removes approximately 140 lines of code and makes the
driver initialization flow more straightforward.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c     | 10 ----
 drivers/gpu/drm/tilcdc/tilcdc_drv.c      | 80 ++++----------------------------
 drivers/gpu/drm/tilcdc/tilcdc_drv.h      |  1 -
 drivers/gpu/drm/tilcdc/tilcdc_external.c | 65 --------------------------
 drivers/gpu/drm/tilcdc/tilcdc_external.h |  3 --
 5 files changed, 9 insertions(+), 150 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index 1b5475c48f6ad..a244051ab5163 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -1022,16 +1022,6 @@ int tilcdc_crtc_create(struct drm_device *dev)
 
 	drm_crtc_helper_add(crtc, &tilcdc_crtc_helper_funcs);
 
-	if (priv->is_componentized) {
-		crtc->port = of_graph_get_port_by_id(dev->dev->of_node, 0);
-		if (!crtc->port) { /* This should never happen */
-			dev_err(dev->dev, "Port node not found in %pOF\n",
-				dev->dev->of_node);
-			ret = -EINVAL;
-			goto fail;
-		}
-	}
-
 	priv->crtc = crtc;
 	return 0;
 
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 411f0767d112d..2df3957ee0dc1 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -6,7 +6,6 @@
 
 /* LCDC DRM driver, based on da8xx-fb */
 
-#include <linux/component.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/pinctrl/consumer.h>
@@ -212,9 +211,6 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
 	platform_set_drvdata(pdev, ddev);
 	drm_mode_config_init(ddev);
 
-	priv->is_componentized =
-		tilcdc_get_external_components(dev, NULL) > 0;
-
 	priv->wq = alloc_ordered_workqueue("tilcdc", 0);
 	if (!priv->wq) {
 		ret = -ENOMEM;
@@ -328,42 +324,32 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
 	}
 #endif
 
-	if (priv->is_componentized) {
-		ret = component_bind_all(dev, ddev);
-		if (ret < 0)
-			goto unregister_cpufreq_notif;
-
-		ret = tilcdc_add_component_encoder(ddev);
-		if (ret < 0)
-			goto unbind_component;
-	} else {
-		ret = tilcdc_attach_external_device(ddev);
-		if (ret)
-			goto unregister_cpufreq_notif;
-	}
+	ret = tilcdc_attach_external_device(ddev);
+	if (ret)
+		goto unregister_cpufreq_notif;
 
 	if (!priv->external_connector &&
 	    ((priv->num_encoders == 0) || (priv->num_connectors == 0))) {
 		dev_err(dev, "no encoders/connectors found\n");
 		ret = -EPROBE_DEFER;
-		goto unbind_component;
+		goto unregister_cpufreq_notif;
 	}
 
 	ret = drm_vblank_init(ddev, 1);
 	if (ret < 0) {
 		dev_err(dev, "failed to initialize vblank\n");
-		goto unbind_component;
+		goto unregister_cpufreq_notif;
 	}
 
 	ret = platform_get_irq(pdev, 0);
 	if (ret < 0)
-		goto unbind_component;
+		goto unregister_cpufreq_notif;
 	priv->irq = ret;
 
 	ret = tilcdc_irq_install(ddev, priv->irq);
 	if (ret < 0) {
 		dev_err(dev, "failed to install IRQ handler\n");
-		goto unbind_component;
+		goto unregister_cpufreq_notif;
 	}
 
 	drm_mode_config_reset(ddev);
@@ -381,9 +367,6 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
 stop_poll:
 	drm_kms_helper_poll_fini(ddev);
 	tilcdc_irq_uninstall(ddev);
-unbind_component:
-	if (priv->is_componentized)
-		component_unbind_all(dev, ddev);
 unregister_cpufreq_notif:
 #ifdef CONFIG_CPU_FREQ
 	cpufreq_unregister_notifier(&priv->freq_transition,
@@ -532,65 +515,20 @@ static int tilcdc_pm_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(tilcdc_pm_ops,
 				tilcdc_pm_suspend, tilcdc_pm_resume);
 
-/*
- * Platform driver:
- */
-static int tilcdc_bind(struct device *dev)
-{
-	return tilcdc_init(&tilcdc_driver, dev);
-}
-
-static void tilcdc_unbind(struct device *dev)
-{
-	struct drm_device *ddev = dev_get_drvdata(dev);
-
-	/* Check if a subcomponent has already triggered the unloading. */
-	if (!ddev->dev_private)
-		return;
-
-	tilcdc_fini(ddev);
-	dev_set_drvdata(dev, NULL);
-}
-
-static const struct component_master_ops tilcdc_comp_ops = {
-	.bind = tilcdc_bind,
-	.unbind = tilcdc_unbind,
-};
-
 static int tilcdc_pdev_probe(struct platform_device *pdev)
 {
-	struct component_match *match = NULL;
-	int ret;
-
 	/* bail out early if no DT data: */
 	if (!pdev->dev.of_node) {
 		dev_err(&pdev->dev, "device-tree data is missing\n");
 		return -ENXIO;
 	}
 
-	ret = tilcdc_get_external_components(&pdev->dev, &match);
-	if (ret < 0)
-		return ret;
-	else if (ret == 0)
-		return tilcdc_init(&tilcdc_driver, &pdev->dev);
-	else
-		return component_master_add_with_match(&pdev->dev,
-						       &tilcdc_comp_ops,
-						       match);
+	return tilcdc_init(&tilcdc_driver, &pdev->dev);
 }
 
 static void tilcdc_pdev_remove(struct platform_device *pdev)
 {
-	int ret;
-
-	ret = tilcdc_get_external_components(&pdev->dev, NULL);
-	if (ret < 0)
-		dev_err(&pdev->dev, "tilcdc_get_external_components() failed (%pe)\n",
-			ERR_PTR(ret));
-	else if (ret == 0)
-		tilcdc_fini(platform_get_drvdata(pdev));
-	else
-		component_master_del(&pdev->dev, &tilcdc_comp_ops);
+	tilcdc_fini(platform_get_drvdata(pdev));
 }
 
 static void tilcdc_pdev_shutdown(struct platform_device *pdev)
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index 79078b4ae7393..c23b593dc61f6 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -84,7 +84,6 @@ struct tilcdc_drm_private {
 	struct drm_encoder *external_encoder;
 	struct drm_connector *external_connector;
 
-	bool is_componentized;
 	bool irq_enabled;
 };
 
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_external.c
index da755a411d9ff..2970c41d9c3eb 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_external.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c
@@ -4,7 +4,6 @@
  * Author: Jyri Sarha <jsarha@ti.com>
  */
 
-#include <linux/component.h>
 #include <linux/of_graph.h>
 
 #include <drm/drm_atomic_helper.h>
@@ -15,19 +14,6 @@
 #include "tilcdc_drv.h"
 #include "tilcdc_external.h"
 
-static const struct tilcdc_panel_info panel_info_tda998x = {
-		.ac_bias                = 255,
-		.ac_bias_intrpt         = 0,
-		.dma_burst_sz           = 16,
-		.bpp                    = 16,
-		.fdd                    = 0x80,
-		.tft_alt_mode           = 0,
-		.invert_pxl_clk		= 1,
-		.sync_edge              = 1,
-		.sync_ctrl              = 1,
-		.raster_order           = 0,
-};
-
 static const struct tilcdc_panel_info panel_info_default = {
 		.ac_bias                = 255,
 		.ac_bias_intrpt         = 0,
@@ -57,34 +43,6 @@ struct drm_connector *tilcdc_encoder_find_connector(struct drm_device *ddev,
 	return NULL;
 }
 
-int tilcdc_add_component_encoder(struct drm_device *ddev)
-{
-	struct tilcdc_drm_private *priv = ddev->dev_private;
-	struct drm_encoder *encoder = NULL, *iter;
-
-	list_for_each_entry(iter, &ddev->mode_config.encoder_list, head)
-		if (iter->possible_crtcs & (1 << priv->crtc->index)) {
-			encoder = iter;
-			break;
-		}
-
-	if (!encoder) {
-		dev_err(ddev->dev, "%s: No suitable encoder found\n", __func__);
-		return -ENODEV;
-	}
-
-	priv->external_connector =
-		tilcdc_encoder_find_connector(ddev, encoder);
-
-	if (!priv->external_connector)
-		return -ENODEV;
-
-	/* Only tda998x is supported at the moment. */
-	tilcdc_crtc_set_panel_info(priv->crtc, &panel_info_tda998x);
-
-	return 0;
-}
-
 static
 int tilcdc_attach_bridge(struct drm_device *ddev, struct drm_bridge *bridge)
 {
@@ -153,26 +111,3 @@ int tilcdc_attach_external_device(struct drm_device *ddev)
 	drm_encoder_cleanup(priv->external_encoder);
 	return ret;
 }
-
-static int dev_match_of(struct device *dev, void *data)
-{
-	return dev->of_node == data;
-}
-
-int tilcdc_get_external_components(struct device *dev,
-				   struct component_match **match)
-{
-	struct device_node *node;
-
-	node = of_graph_get_remote_node(dev->of_node, 0, 0);
-
-	if (!of_device_is_compatible(node, "nxp,tda998x")) {
-		of_node_put(node);
-		return 0;
-	}
-
-	if (match)
-		drm_of_component_match_add(dev, match, dev_match_of, node);
-	of_node_put(node);
-	return 1;
-}
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.h b/drivers/gpu/drm/tilcdc/tilcdc_external.h
index fb4476694cd89..285a132f3035d 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_external.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_external.h
@@ -7,8 +7,5 @@
 #ifndef __TILCDC_EXTERNAL_H__
 #define __TILCDC_EXTERNAL_H__
 
-int tilcdc_add_component_encoder(struct drm_device *dev);
-int tilcdc_get_external_components(struct device *dev,
-				   struct component_match **match);
 int tilcdc_attach_external_device(struct drm_device *ddev);
 #endif /* __TILCDC_SLAVE_H__ */

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 09/21] drm/tilcdc: Remove tilcdc_panel_info structure
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (7 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 08/21] drm/tilcdc: Remove component framework support Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-12-11  9:44   ` Luca Ceresoli
  2025-11-26 17:35 ` [PATCH 10/21] drm/tilcdc: Remove redundant #endif/#ifdef in debugfs code Kory Maincent (TI.com)
                   ` (12 subsequent siblings)
  21 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Remove the tilcdc_panel_info structure and its associated helper
function as the structure contains only redundant or unused parameters.

Most panel configuration parameters in tilcdc_panel_info are either:
- Already represented by existing DRM mode flags (invert_pxl_clk,
  sync_edge via DRM_BUS_FLAG_*), or
- Set to identical values across all instances (panel_info_default),
  making them effectively constants

The removed fifo_th field is already handled by priv->fifo_th when set.
Other removed fields (tft_alt_mode, raster_order) were always set to 0
in the only instance (panel_info_default) and thus had no effect.

This simplifies the code by eliminating unnecessary abstraction while
preserving all functional behavior.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c     | 29 +++-------------------
 drivers/gpu/drm/tilcdc/tilcdc_drv.h      | 42 --------------------------------
 drivers/gpu/drm/tilcdc/tilcdc_external.c | 14 -----------
 3 files changed, 3 insertions(+), 82 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index a244051ab5163..3955b3b99befe 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -31,7 +31,6 @@ struct tilcdc_crtc {
 	struct drm_crtc base;
 
 	struct drm_plane primary;
-	const struct tilcdc_panel_info *info;
 	struct drm_pending_vblank_event *event;
 	struct mutex enable_lock;
 	bool enabled;
@@ -272,14 +271,10 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc)
 	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 	struct drm_device *dev = crtc->dev;
 	struct tilcdc_drm_private *priv = dev->dev_private;
-	const struct tilcdc_panel_info *info = tilcdc_crtc->info;
 	uint32_t reg, hbp, hfp, hsw, vbp, vfp, vsw;
 	struct drm_display_mode *mode = &crtc->state->adjusted_mode;
 	struct drm_framebuffer *fb = crtc->primary->state->fb;
 
-	if (WARN_ON(!info))
-		return;
-
 	if (WARN_ON(!fb))
 		return;
 
@@ -287,12 +282,11 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc)
 	reg = tilcdc_read(dev, LCDC_DMA_CTRL_REG) & ~0x00000770;
 	/* Use 16 bit DMA burst size by default */
 	reg |= LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_16);
+
 	if (priv->fifo_th) {
 		int fifo_th_val = const_ilog2(priv->fifo_th) - 3;
 
 		reg |= (fifo_th_val << 8);
-	} else {
-		reg |= (info->fifo_th << 8);
 	}
 	tilcdc_write(dev, LCDC_DMA_CTRL_REG, reg);
 
@@ -360,8 +354,6 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc)
 		  LCDC_V2_TFT_24BPP_MODE | LCDC_V2_TFT_24BPP_UNPACK |
 		  0x000ff000 /* Palette Loading Delay bits */);
 	reg |= LCDC_TFT_MODE; /* no monochrome/passive support */
-	if (info->tft_alt_mode)
-		reg |= LCDC_TFT_ALT_ENABLE;
 	if (priv->rev == 2) {
 		switch (fb->format->format) {
 		case DRM_FORMAT_BGR565:
@@ -384,16 +376,13 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc)
 	reg |= 128 << 12;
 	tilcdc_write(dev, LCDC_RASTER_CTRL_REG, reg);
 
-	if (info->invert_pxl_clk ||
-	    mode->flags == DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE)
-
+	if (mode->flags == DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE)
 		tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_PIXEL_CLOCK);
 	else
 		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_PIXEL_CLOCK);
 
 	tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_CTRL);
-	if (info->sync_edge ||
-	    mode->flags == DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE)
+	if (mode->flags == DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE)
 		tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_EDGE);
 	else
 		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_EDGE);
@@ -408,11 +397,6 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc)
 	else
 		tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_VSYNC);
 
-	if (info->raster_order)
-		tilcdc_set(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ORDER);
-	else
-		tilcdc_clear(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ORDER);
-
 	tilcdc_crtc_set_clk(crtc);
 
 	tilcdc_crtc_load_palette(crtc);
@@ -839,13 +823,6 @@ static const struct drm_crtc_helper_funcs tilcdc_crtc_helper_funcs = {
 	.atomic_flush	= tilcdc_crtc_atomic_flush,
 };
 
-void tilcdc_crtc_set_panel_info(struct drm_crtc *crtc,
-		const struct tilcdc_panel_info *info)
-{
-	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
-	tilcdc_crtc->info = info;
-}
-
 void tilcdc_crtc_update_clk(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index c23b593dc61f6..181b9d7a515b6 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -114,53 +114,11 @@ void tilcdc_module_init(struct tilcdc_module *mod, const char *name,
 		const struct tilcdc_module_ops *funcs);
 void tilcdc_module_cleanup(struct tilcdc_module *mod);
 
-/* Panel config that needs to be set in the crtc, but is not coming from
- * the mode timings.  The display module is expected to call
- * tilcdc_crtc_set_panel_info() to set this during modeset.
- */
-struct tilcdc_panel_info {
-
-	/* AC Bias Pin Frequency */
-	uint32_t ac_bias;
-
-	/* AC Bias Pin Transitions per Interrupt */
-	uint32_t ac_bias_intrpt;
-
-	/* DMA burst size */
-	uint32_t dma_burst_sz;
-
-	/* Bits per pixel */
-	uint32_t bpp;
-
-	/* FIFO DMA Request Delay */
-	uint32_t fdd;
-
-	/* TFT Alternative Signal Mapping (Only for active) */
-	bool tft_alt_mode;
-
-	/* Invert pixel clock */
-	bool invert_pxl_clk;
-
-	/* Horizontal and Vertical Sync Edge: 0=rising 1=falling */
-	uint32_t sync_edge;
-
-	/* Horizontal and Vertical Sync: Control: 0=ignore */
-	uint32_t sync_ctrl;
-
-	/* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */
-	uint32_t raster_order;
-
-	/* DMA FIFO threshold */
-	uint32_t fifo_th;
-};
-
 #define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
 
 int tilcdc_crtc_create(struct drm_device *dev);
 irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc);
 void tilcdc_crtc_update_clk(struct drm_crtc *crtc);
-void tilcdc_crtc_set_panel_info(struct drm_crtc *crtc,
-		const struct tilcdc_panel_info *info);
 void tilcdc_crtc_shutdown(struct drm_crtc *crtc);
 void tilcdc_crtc_destroy(struct drm_crtc *crtc);
 int tilcdc_crtc_update_fb(struct drm_crtc *crtc,
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_external.c
index 2970c41d9c3eb..81c90c2754c6c 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_external.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c
@@ -14,18 +14,6 @@
 #include "tilcdc_drv.h"
 #include "tilcdc_external.h"
 
-static const struct tilcdc_panel_info panel_info_default = {
-		.ac_bias                = 255,
-		.ac_bias_intrpt         = 0,
-		.dma_burst_sz           = 16,
-		.bpp                    = 16,
-		.fdd                    = 0x80,
-		.tft_alt_mode           = 0,
-		.sync_edge              = 0,
-		.sync_ctrl              = 1,
-		.raster_order           = 0,
-};
-
 static
 struct drm_connector *tilcdc_encoder_find_connector(struct drm_device *ddev,
 						    struct drm_encoder *encoder)
@@ -55,8 +43,6 @@ int tilcdc_attach_bridge(struct drm_device *ddev, struct drm_bridge *bridge)
 	if (ret)
 		return ret;
 
-	tilcdc_crtc_set_panel_info(priv->crtc, &panel_info_default);
-
 	priv->external_connector =
 		tilcdc_encoder_find_connector(ddev, priv->external_encoder);
 	if (!priv->external_connector)

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 10/21] drm/tilcdc: Remove redundant #endif/#ifdef in debugfs code
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (8 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 09/21] drm/tilcdc: Remove tilcdc_panel_info structure Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-12-10 18:22   ` Luca Ceresoli
  2025-11-26 17:35 ` [PATCH 11/21] drm/tilcdc: Remove unused encoder and connector tracking arrays Kory Maincent (TI.com)
                   ` (11 subsequent siblings)
  21 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Remove the unnecessary #endif/#ifdef CONFIG_DEBUG_FS pair that splits
the debugfs code section. This keeps all debugfs-related code within a
single preprocessor conditional block, improving code readability.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 2df3957ee0dc1..a5623247bc697 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -418,9 +418,6 @@ static const struct {
 #undef REG
 };
 
-#endif
-
-#ifdef CONFIG_DEBUG_FS
 static int tilcdc_regs_show(struct seq_file *m, void *arg)
 {
 	struct drm_info_node *node = (struct drm_info_node *) m->private;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 11/21] drm/tilcdc: Remove unused encoder and connector tracking arrays
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (9 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 10/21] drm/tilcdc: Remove redundant #endif/#ifdef in debugfs code Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 12/21] drm/tilcdc: Rename external_encoder and external_connector to encoder and connector Kory Maincent (TI.com)
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

The num_encoders/encoders and num_connectors/connectors arrays in
tilcdc_drm_private are never populated or used by the driver.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +--
 drivers/gpu/drm/tilcdc/tilcdc_drv.h | 6 ------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index a5623247bc697..c9d4f462ec1bb 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -328,8 +328,7 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
 	if (ret)
 		goto unregister_cpufreq_notif;
 
-	if (!priv->external_connector &&
-	    ((priv->num_encoders == 0) || (priv->num_connectors == 0))) {
+	if (!priv->external_connector) {
 		dev_err(dev, "no encoders/connectors found\n");
 		ret = -EPROBE_DEFER;
 		goto unregister_cpufreq_notif;
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index 181b9d7a515b6..717529a331009 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -75,12 +75,6 @@ struct tilcdc_drm_private {
 
 	struct drm_crtc *crtc;
 
-	unsigned int num_encoders;
-	struct drm_encoder *encoders[8];
-
-	unsigned int num_connectors;
-	struct drm_connector *connectors[8];
-
 	struct drm_encoder *external_encoder;
 	struct drm_connector *external_connector;
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 12/21] drm/tilcdc: Rename external_encoder and external_connector to encoder and connector
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (10 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 11/21] drm/tilcdc: Remove unused encoder and connector tracking arrays Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 13/21] drm/tilcdc: Rename tilcdc_external to tilcdc_encoder Kory Maincent (TI.com)
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Remove the "external_" prefix from encoder and connector members in the
tilcdc driver. These are internal driver structures and the "external"
naming is misleading. The simpler names better reflect that these are
the primary encoder and connector managed by this driver.

Also rename tilcdc_attach_external_device() to tilcdc_encoder_create()
for consistency and to better describe the function's purpose.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c      |  4 ++--
 drivers/gpu/drm/tilcdc/tilcdc_drv.h      |  4 ++--
 drivers/gpu/drm/tilcdc/tilcdc_external.c | 24 ++++++++++++------------
 drivers/gpu/drm/tilcdc/tilcdc_external.h |  2 +-
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index c9d4f462ec1bb..8a4fb75f660fe 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -324,11 +324,11 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
 	}
 #endif
 
-	ret = tilcdc_attach_external_device(ddev);
+	ret = tilcdc_encoder_create(ddev);
 	if (ret)
 		goto unregister_cpufreq_notif;
 
-	if (!priv->external_connector) {
+	if (!priv->connector) {
 		dev_err(dev, "no encoders/connectors found\n");
 		ret = -EPROBE_DEFER;
 		goto unregister_cpufreq_notif;
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index 717529a331009..dafb00908d1d4 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -75,8 +75,8 @@ struct tilcdc_drm_private {
 
 	struct drm_crtc *crtc;
 
-	struct drm_encoder *external_encoder;
-	struct drm_connector *external_connector;
+	struct drm_encoder *encoder;
+	struct drm_connector *connector;
 
 	bool irq_enabled;
 };
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_external.c
index 81c90c2754c6c..0c18d05dc7101 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_external.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c
@@ -37,21 +37,21 @@ int tilcdc_attach_bridge(struct drm_device *ddev, struct drm_bridge *bridge)
 	struct tilcdc_drm_private *priv = ddev->dev_private;
 	int ret;
 
-	priv->external_encoder->possible_crtcs = BIT(0);
+	priv->encoder->possible_crtcs = BIT(0);
 
-	ret = drm_bridge_attach(priv->external_encoder, bridge, NULL, 0);
+	ret = drm_bridge_attach(priv->encoder, bridge, NULL, 0);
 	if (ret)
 		return ret;
 
-	priv->external_connector =
-		tilcdc_encoder_find_connector(ddev, priv->external_encoder);
-	if (!priv->external_connector)
+	priv->connector =
+		tilcdc_encoder_find_connector(ddev, priv->encoder);
+	if (!priv->connector)
 		return -ENODEV;
 
 	return 0;
 }
 
-int tilcdc_attach_external_device(struct drm_device *ddev)
+int tilcdc_encoder_create(struct drm_device *ddev)
 {
 	struct tilcdc_drm_private *priv = ddev->dev_private;
 	struct drm_bridge *bridge;
@@ -65,13 +65,13 @@ int tilcdc_attach_external_device(struct drm_device *ddev)
 	else if (ret)
 		return ret;
 
-	priv->external_encoder = devm_kzalloc(ddev->dev,
-					      sizeof(*priv->external_encoder),
-					      GFP_KERNEL);
-	if (!priv->external_encoder)
+	priv->encoder = devm_kzalloc(ddev->dev,
+				     sizeof(*priv->encoder),
+				     GFP_KERNEL);
+	if (!priv->encoder)
 		return -ENOMEM;
 
-	ret = drm_simple_encoder_init(ddev, priv->external_encoder,
+	ret = drm_simple_encoder_init(ddev, priv->encoder,
 				      DRM_MODE_ENCODER_NONE);
 	if (ret) {
 		dev_err(ddev->dev, "drm_encoder_init() failed %d\n", ret);
@@ -94,6 +94,6 @@ int tilcdc_attach_external_device(struct drm_device *ddev)
 	return 0;
 
 err_encoder_cleanup:
-	drm_encoder_cleanup(priv->external_encoder);
+	drm_encoder_cleanup(priv->encoder);
 	return ret;
 }
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.h b/drivers/gpu/drm/tilcdc/tilcdc_external.h
index 285a132f3035d..c8f87f59024e6 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_external.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_external.h
@@ -7,5 +7,5 @@
 #ifndef __TILCDC_EXTERNAL_H__
 #define __TILCDC_EXTERNAL_H__
 
-int tilcdc_attach_external_device(struct drm_device *ddev);
+int tilcdc_encoder_create(struct drm_device *ddev);
 #endif /* __TILCDC_SLAVE_H__ */

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 13/21] drm/tilcdc: Rename tilcdc_external to tilcdc_encoder
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (11 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 12/21] drm/tilcdc: Rename external_encoder and external_connector to encoder and connector Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 14/21] drm/tilcdc: Remove the useless module list support Kory Maincent (TI.com)
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

The tilcdc_external module describes the encoder part of the tilcdc
driver. Rename it to tilcdc_encoder for better clarity and to make
the naming more consistent with DRM subsystem conventions, where
encoder-related files typically use "encoder" in their names.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/Makefile                                | 2 +-
 drivers/gpu/drm/tilcdc/tilcdc_drv.c                            | 2 +-
 drivers/gpu/drm/tilcdc/{tilcdc_external.c => tilcdc_encoder.c} | 2 +-
 drivers/gpu/drm/tilcdc/{tilcdc_external.h => tilcdc_encoder.h} | 0
 4 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/Makefile b/drivers/gpu/drm/tilcdc/Makefile
index b24122bea2596..25ed8b6f8c5ee 100644
--- a/drivers/gpu/drm/tilcdc/Makefile
+++ b/drivers/gpu/drm/tilcdc/Makefile
@@ -6,7 +6,7 @@ endif
 tilcdc-y := \
 	tilcdc_plane.o \
 	tilcdc_crtc.o \
-	tilcdc_external.o \
+	tilcdc_encoder.o \
 	tilcdc_drv.o
 
 obj-$(CONFIG_DRM_TILCDC)	+= tilcdc.o
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 8a4fb75f660fe..254cc22ad7711 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -26,7 +26,7 @@
 
 
 #include "tilcdc_drv.h"
-#include "tilcdc_external.h"
+#include "tilcdc_encoder.h"
 #include "tilcdc_regs.h"
 
 static LIST_HEAD(module_list);
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_encoder.c
similarity index 98%
rename from drivers/gpu/drm/tilcdc/tilcdc_external.c
rename to drivers/gpu/drm/tilcdc/tilcdc_encoder.c
index 0c18d05dc7101..bca91226351dd 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_external.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_encoder.c
@@ -12,7 +12,7 @@
 #include <drm/drm_simple_kms_helper.h>
 
 #include "tilcdc_drv.h"
-#include "tilcdc_external.h"
+#include "tilcdc_encoder.h"
 
 static
 struct drm_connector *tilcdc_encoder_find_connector(struct drm_device *ddev,
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.h b/drivers/gpu/drm/tilcdc/tilcdc_encoder.h
similarity index 100%
rename from drivers/gpu/drm/tilcdc/tilcdc_external.h
rename to drivers/gpu/drm/tilcdc/tilcdc_encoder.h

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 14/21] drm/tilcdc: Remove the useless module list support
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (12 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 13/21] drm/tilcdc: Rename tilcdc_external to tilcdc_encoder Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 15/21] drm/tilcdc: Modernize driver initialization and cleanup paths Kory Maincent (TI.com)
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

The tilcdc driver previously supported a sub-module system where
external display drivers (panels, encoders) could register themselves
through tilcdc_module_init() and be automatically initialized through
a module list. This infrastructure became unused after the component
framework support and panel driver was removed.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 48 +------------------------------------
 drivers/gpu/drm/tilcdc/tilcdc_drv.h | 27 ---------------------
 2 files changed, 1 insertion(+), 74 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 254cc22ad7711..9b31eaafd2be9 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -7,7 +7,6 @@
 /* LCDC DRM driver, based on da8xx-fb */
 
 #include <linux/mod_devicetable.h>
-#include <linux/module.h>
 #include <linux/pinctrl/consumer.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
@@ -29,8 +28,6 @@
 #include "tilcdc_encoder.h"
 #include "tilcdc_regs.h"
 
-static LIST_HEAD(module_list);
-
 static const u32 tilcdc_rev1_formats[] = { DRM_FORMAT_RGB565 };
 
 static const u32 tilcdc_straight_formats[] = { DRM_FORMAT_RGB565,
@@ -45,20 +42,6 @@ static const u32 tilcdc_legacy_formats[] = { DRM_FORMAT_RGB565,
 					     DRM_FORMAT_RGB888,
 					     DRM_FORMAT_XRGB8888 };
 
-void tilcdc_module_init(struct tilcdc_module *mod, const char *name,
-		const struct tilcdc_module_ops *funcs)
-{
-	mod->name = name;
-	mod->funcs = funcs;
-	INIT_LIST_HEAD(&mod->list);
-	list_add(&mod->list, &module_list);
-}
-
-void tilcdc_module_cleanup(struct tilcdc_module *mod)
-{
-	list_del(&mod->list);
-}
-
 static int tilcdc_atomic_check(struct drm_device *dev,
 			       struct drm_atomic_state *state)
 {
@@ -92,12 +75,6 @@ static const struct drm_mode_config_funcs mode_config_funcs = {
 static void modeset_init(struct drm_device *dev)
 {
 	struct tilcdc_drm_private *priv = dev->dev_private;
-	struct tilcdc_module *mod;
-
-	list_for_each_entry(mod, &module_list, list) {
-		DBG("loading module: %s", mod->name);
-		mod->funcs->modeset_init(mod, dev);
-	}
 
 	dev->mode_config.min_width = 0;
 	dev->mode_config.min_height = 0;
@@ -454,15 +431,9 @@ static struct drm_info_list tilcdc_debugfs_list[] = {
 
 static void tilcdc_debugfs_init(struct drm_minor *minor)
 {
-	struct tilcdc_module *mod;
-
 	drm_debugfs_create_files(tilcdc_debugfs_list,
 				 ARRAY_SIZE(tilcdc_debugfs_list),
 				 minor->debugfs_root, minor);
-
-	list_for_each_entry(mod, &module_list, list)
-		if (mod->funcs->debugfs_init)
-			mod->funcs->debugfs_init(mod, minor);
 }
 #endif
 
@@ -549,24 +520,7 @@ static struct platform_driver tilcdc_platform_driver = {
 		.of_match_table = tilcdc_of_match,
 	},
 };
-
-static int __init tilcdc_drm_init(void)
-{
-	if (drm_firmware_drivers_only())
-		return -ENODEV;
-
-	DBG("init");
-	return platform_driver_register(&tilcdc_platform_driver);
-}
-
-static void __exit tilcdc_drm_fini(void)
-{
-	DBG("fini");
-	platform_driver_unregister(&tilcdc_platform_driver);
-}
-
-module_init(tilcdc_drm_init);
-module_exit(tilcdc_drm_fini);
+module_platform_driver(tilcdc_platform_driver);
 
 MODULE_AUTHOR("Rob Clark <robdclark@gmail.com");
 MODULE_DESCRIPTION("TI LCD Controller DRM Driver");
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index dafb00908d1d4..60e85e29b1063 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -81,33 +81,6 @@ struct tilcdc_drm_private {
 	bool irq_enabled;
 };
 
-/* Sub-module for display.  Since we don't know at compile time what panels
- * or display adapter(s) might be present (for ex, off chip dvi/tfp410,
- * hdmi encoder, various lcd panels), the connector/encoder(s) are split into
- * separate drivers.  If they are probed and found to be present, they
- * register themselves with tilcdc_register_module().
- */
-struct tilcdc_module;
-
-struct tilcdc_module_ops {
-	/* create appropriate encoders/connectors: */
-	int (*modeset_init)(struct tilcdc_module *mod, struct drm_device *dev);
-#ifdef CONFIG_DEBUG_FS
-	/* create debugfs nodes (can be NULL): */
-	int (*debugfs_init)(struct tilcdc_module *mod, struct drm_minor *minor);
-#endif
-};
-
-struct tilcdc_module {
-	const char *name;
-	struct list_head list;
-	const struct tilcdc_module_ops *funcs;
-};
-
-void tilcdc_module_init(struct tilcdc_module *mod, const char *name,
-		const struct tilcdc_module_ops *funcs);
-void tilcdc_module_cleanup(struct tilcdc_module *mod);
-
 #define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
 
 int tilcdc_crtc_create(struct drm_device *dev);

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 15/21] drm/tilcdc: Modernize driver initialization and cleanup paths
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (13 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 14/21] drm/tilcdc: Remove the useless module list support Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 16/21] drm/tilcdc: Remove the use of drm_device private_data Kory Maincent (TI.com)
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Refactor the driver initialization to use modern DRM managed resource
APIs, simplifying the code.

The tilcdc_init and tilcdc_fini wrapper functions are removed since they
served no purpose after the component framework was eliminated. Their
logic is integrated directly into probe and remove.

Key changes:
- Use devm_drm_dev_alloc() instead of drm_dev_alloc().
- Use drmm_mode_config_init() instead of drm_mode_config_init().
- Align the remove path with the probe error path to ensure consistent
  cleanup ordering in both success and failure cases.
- Adjust platform_set_drvdata() to store the private structure instead
  of the drm_device, matching the new allocation pattern.

These changes reduce error-prone code while maintaining the same
functional behavior.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 308 ++++++++++++++++--------------------
 drivers/gpu/drm/tilcdc/tilcdc_drv.h |   2 +
 2 files changed, 139 insertions(+), 171 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 9b31eaafd2be9..e08bea30585e0 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -134,65 +134,149 @@ static void tilcdc_irq_uninstall(struct drm_device *dev)
  * DRM operations:
  */
 
-static void tilcdc_fini(struct drm_device *dev)
+#if defined(CONFIG_DEBUG_FS)
+static const struct {
+	const char *name;
+	uint8_t  rev;
+	uint8_t  save;
+	uint32_t reg;
+} registers[] =		{
+#define REG(rev, save, reg) { #reg, rev, save, reg }
+		/* exists in revision 1: */
+		REG(1, false, LCDC_PID_REG),
+		REG(1, true,  LCDC_CTRL_REG),
+		REG(1, false, LCDC_STAT_REG),
+		REG(1, true,  LCDC_RASTER_CTRL_REG),
+		REG(1, true,  LCDC_RASTER_TIMING_0_REG),
+		REG(1, true,  LCDC_RASTER_TIMING_1_REG),
+		REG(1, true,  LCDC_RASTER_TIMING_2_REG),
+		REG(1, true,  LCDC_DMA_CTRL_REG),
+		REG(1, true,  LCDC_DMA_FB_BASE_ADDR_0_REG),
+		REG(1, true,  LCDC_DMA_FB_CEILING_ADDR_0_REG),
+		REG(1, true,  LCDC_DMA_FB_BASE_ADDR_1_REG),
+		REG(1, true,  LCDC_DMA_FB_CEILING_ADDR_1_REG),
+		/* new in revision 2: */
+		REG(2, false, LCDC_RAW_STAT_REG),
+		REG(2, false, LCDC_MASKED_STAT_REG),
+		REG(2, true, LCDC_INT_ENABLE_SET_REG),
+		REG(2, false, LCDC_INT_ENABLE_CLR_REG),
+		REG(2, false, LCDC_END_OF_INT_IND_REG),
+		REG(2, true,  LCDC_CLK_ENABLE_REG),
+#undef REG
+};
+
+static int tilcdc_regs_show(struct seq_file *m, void *arg)
 {
+	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_device *dev = node->minor->dev;
 	struct tilcdc_drm_private *priv = dev->dev_private;
+	unsigned i;
 
-#ifdef CONFIG_CPU_FREQ
-	if (priv->freq_transition.notifier_call)
-		cpufreq_unregister_notifier(&priv->freq_transition,
-					    CPUFREQ_TRANSITION_NOTIFIER);
+	pm_runtime_get_sync(dev->dev);
+
+	seq_printf(m, "revision: %d\n", priv->rev);
+
+	for (i = 0; i < ARRAY_SIZE(registers); i++)
+		if (priv->rev >= registers[i].rev)
+			seq_printf(m, "%s:\t %08x\n", registers[i].name,
+					tilcdc_read(dev, registers[i].reg));
+
+	pm_runtime_put_sync(dev->dev);
+
+	return 0;
+}
+
+static int tilcdc_mm_show(struct seq_file *m, void *arg)
+{
+	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_device *dev = node->minor->dev;
+	struct drm_printer p = drm_seq_file_printer(m);
+	drm_mm_print(&dev->vma_offset_manager->vm_addr_space_mm, &p);
+	return 0;
+}
+
+static struct drm_info_list tilcdc_debugfs_list[] = {
+		{ "regs", tilcdc_regs_show, 0, NULL },
+		{ "mm",   tilcdc_mm_show,   0, NULL },
+};
+
+static void tilcdc_debugfs_init(struct drm_minor *minor)
+{
+	drm_debugfs_create_files(tilcdc_debugfs_list,
+				 ARRAY_SIZE(tilcdc_debugfs_list),
+				 minor->debugfs_root, minor);
+}
 #endif
 
-	if (priv->crtc)
-		tilcdc_crtc_shutdown(priv->crtc);
+DEFINE_DRM_GEM_DMA_FOPS(fops);
 
-	drm_dev_unregister(dev);
+static const struct drm_driver tilcdc_driver = {
+	.driver_features    = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
+	DRM_GEM_DMA_DRIVER_OPS,
+	DRM_FBDEV_DMA_DRIVER_OPS,
+#ifdef CONFIG_DEBUG_FS
+	.debugfs_init       = tilcdc_debugfs_init,
+#endif
+	.fops               = &fops,
+	.name               = "tilcdc",
+	.desc               = "TI LCD Controller DRM",
+	.major              = 1,
+	.minor              = 0,
+};
 
-	drm_kms_helper_poll_fini(dev);
-	drm_atomic_helper_shutdown(dev);
-	tilcdc_irq_uninstall(dev);
-	drm_mode_config_cleanup(dev);
+/*
+ * Power management:
+ */
 
-	if (priv->clk)
-		clk_put(priv->clk);
+static int tilcdc_pm_suspend(struct device *dev)
+{
+	struct drm_device *ddev = dev_get_drvdata(dev);
+	int ret = 0;
 
-	if (priv->wq)
-		destroy_workqueue(priv->wq);
+	ret = drm_mode_config_helper_suspend(ddev);
+
+	/* Select sleep pin state */
+	pinctrl_pm_select_sleep_state(dev);
 
-	dev->dev_private = NULL;
+	return ret;
+}
 
-	pm_runtime_disable(dev->dev);
+static int tilcdc_pm_resume(struct device *dev)
+{
+	struct drm_device *ddev = dev_get_drvdata(dev);
 
-	drm_dev_put(dev);
+	/* Select default pin state */
+	pinctrl_pm_select_default_state(dev);
+	return  drm_mode_config_helper_resume(ddev);
 }
 
-static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
+static DEFINE_SIMPLE_DEV_PM_OPS(tilcdc_pm_ops,
+				tilcdc_pm_suspend, tilcdc_pm_resume);
+
+static int tilcdc_pdev_probe(struct platform_device *pdev)
 {
-	struct drm_device *ddev;
-	struct platform_device *pdev = to_platform_device(dev);
-	struct device_node *node = dev->of_node;
+	struct device_node *node = pdev->dev.of_node;
+	struct device *dev = &pdev->dev;
 	struct tilcdc_drm_private *priv;
+	struct drm_device *ddev;
 	u32 bpp = 0;
 	int ret;
 
-	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-	if (!priv)
-		return -ENOMEM;
-
-	ddev = drm_dev_alloc(ddrv, dev);
-	if (IS_ERR(ddev))
-		return PTR_ERR(ddev);
+	priv = devm_drm_dev_alloc(dev, &tilcdc_driver,
+				  struct tilcdc_drm_private, ddev);
+	if (IS_ERR(priv))
+		return PTR_ERR(priv);
 
+	platform_set_drvdata(pdev, priv);
+	ddev = &priv->ddev;
 	ddev->dev_private = priv;
-	platform_set_drvdata(pdev, ddev);
-	drm_mode_config_init(ddev);
+	ret = drmm_mode_config_init(ddev);
+	if (ret)
+		return ret;
 
 	priv->wq = alloc_ordered_workqueue("tilcdc", 0);
-	if (!priv->wq) {
-		ret = -ENOMEM;
-		goto put_drm;
-	}
+	if (!priv->wq)
+		return -ENOMEM;
 
 	priv->mmio = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->mmio)) {
@@ -355,152 +439,34 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
 	clk_put(priv->clk);
 free_wq:
 	destroy_workqueue(priv->wq);
-put_drm:
-	platform_set_drvdata(pdev, NULL);
-	ddev->dev_private = NULL;
-	drm_dev_put(ddev);
 
 	return ret;
 }
 
-#if defined(CONFIG_DEBUG_FS)
-static const struct {
-	const char *name;
-	uint8_t  rev;
-	uint8_t  save;
-	uint32_t reg;
-} registers[] =		{
-#define REG(rev, save, reg) { #reg, rev, save, reg }
-		/* exists in revision 1: */
-		REG(1, false, LCDC_PID_REG),
-		REG(1, true,  LCDC_CTRL_REG),
-		REG(1, false, LCDC_STAT_REG),
-		REG(1, true,  LCDC_RASTER_CTRL_REG),
-		REG(1, true,  LCDC_RASTER_TIMING_0_REG),
-		REG(1, true,  LCDC_RASTER_TIMING_1_REG),
-		REG(1, true,  LCDC_RASTER_TIMING_2_REG),
-		REG(1, true,  LCDC_DMA_CTRL_REG),
-		REG(1, true,  LCDC_DMA_FB_BASE_ADDR_0_REG),
-		REG(1, true,  LCDC_DMA_FB_CEILING_ADDR_0_REG),
-		REG(1, true,  LCDC_DMA_FB_BASE_ADDR_1_REG),
-		REG(1, true,  LCDC_DMA_FB_CEILING_ADDR_1_REG),
-		/* new in revision 2: */
-		REG(2, false, LCDC_RAW_STAT_REG),
-		REG(2, false, LCDC_MASKED_STAT_REG),
-		REG(2, true, LCDC_INT_ENABLE_SET_REG),
-		REG(2, false, LCDC_INT_ENABLE_CLR_REG),
-		REG(2, false, LCDC_END_OF_INT_IND_REG),
-		REG(2, true,  LCDC_CLK_ENABLE_REG),
-#undef REG
-};
-
-static int tilcdc_regs_show(struct seq_file *m, void *arg)
-{
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
-	struct drm_device *dev = node->minor->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
-	unsigned i;
-
-	pm_runtime_get_sync(dev->dev);
-
-	seq_printf(m, "revision: %d\n", priv->rev);
-
-	for (i = 0; i < ARRAY_SIZE(registers); i++)
-		if (priv->rev >= registers[i].rev)
-			seq_printf(m, "%s:\t %08x\n", registers[i].name,
-					tilcdc_read(dev, registers[i].reg));
-
-	pm_runtime_put_sync(dev->dev);
-
-	return 0;
-}
-
-static int tilcdc_mm_show(struct seq_file *m, void *arg)
-{
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
-	struct drm_device *dev = node->minor->dev;
-	struct drm_printer p = drm_seq_file_printer(m);
-	drm_mm_print(&dev->vma_offset_manager->vm_addr_space_mm, &p);
-	return 0;
-}
-
-static struct drm_info_list tilcdc_debugfs_list[] = {
-		{ "regs", tilcdc_regs_show, 0, NULL },
-		{ "mm",   tilcdc_mm_show,   0, NULL },
-};
-
-static void tilcdc_debugfs_init(struct drm_minor *minor)
+static void tilcdc_pdev_remove(struct platform_device *pdev)
 {
-	drm_debugfs_create_files(tilcdc_debugfs_list,
-				 ARRAY_SIZE(tilcdc_debugfs_list),
-				 minor->debugfs_root, minor);
-}
-#endif
-
-DEFINE_DRM_GEM_DMA_FOPS(fops);
+	struct tilcdc_drm_private *priv = platform_get_drvdata(pdev);
+	struct drm_device *ddev = &priv->ddev;
 
-static const struct drm_driver tilcdc_driver = {
-	.driver_features    = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
-	DRM_GEM_DMA_DRIVER_OPS,
-	DRM_FBDEV_DMA_DRIVER_OPS,
-#ifdef CONFIG_DEBUG_FS
-	.debugfs_init       = tilcdc_debugfs_init,
+	drm_dev_unregister(ddev);
+	drm_kms_helper_poll_fini(ddev);
+	tilcdc_irq_uninstall(ddev);
+#ifdef CONFIG_CPU_FREQ
+	cpufreq_unregister_notifier(&priv->freq_transition,
+				    CPUFREQ_TRANSITION_NOTIFIER);
 #endif
-	.fops               = &fops,
-	.name               = "tilcdc",
-	.desc               = "TI LCD Controller DRM",
-	.major              = 1,
-	.minor              = 0,
-};
-
-/*
- * Power management:
- */
-
-static int tilcdc_pm_suspend(struct device *dev)
-{
-	struct drm_device *ddev = dev_get_drvdata(dev);
-	int ret = 0;
-
-	ret = drm_mode_config_helper_suspend(ddev);
-
-	/* Select sleep pin state */
-	pinctrl_pm_select_sleep_state(dev);
-
-	return ret;
-}
-
-static int tilcdc_pm_resume(struct device *dev)
-{
-	struct drm_device *ddev = dev_get_drvdata(dev);
-
-	/* Select default pin state */
-	pinctrl_pm_select_default_state(dev);
-	return  drm_mode_config_helper_resume(ddev);
-}
-
-static DEFINE_SIMPLE_DEV_PM_OPS(tilcdc_pm_ops,
-				tilcdc_pm_suspend, tilcdc_pm_resume);
-
-static int tilcdc_pdev_probe(struct platform_device *pdev)
-{
-	/* bail out early if no DT data: */
-	if (!pdev->dev.of_node) {
-		dev_err(&pdev->dev, "device-tree data is missing\n");
-		return -ENXIO;
-	}
-
-	return tilcdc_init(&tilcdc_driver, &pdev->dev);
-}
-
-static void tilcdc_pdev_remove(struct platform_device *pdev)
-{
-	tilcdc_fini(platform_get_drvdata(pdev));
+	tilcdc_crtc_destroy(priv->crtc);
+	pm_runtime_disable(&pdev->dev);
+	clk_put(priv->clk);
+	destroy_workqueue(priv->wq);
 }
 
 static void tilcdc_pdev_shutdown(struct platform_device *pdev)
 {
-	drm_atomic_helper_shutdown(platform_get_drvdata(pdev));
+	struct tilcdc_drm_private *priv = platform_get_drvdata(pdev);
+	struct drm_device *ddev = &priv->ddev;
+
+	drm_atomic_helper_shutdown(ddev);
 }
 
 static const struct of_device_id tilcdc_of_match[] = {
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index 60e85e29b1063..e3d04a3eb25b4 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -48,6 +48,8 @@ struct tilcdc_drm_private {
 
 	unsigned int irq;
 
+	struct drm_device ddev;
+
 	/* don't attempt resolutions w/ higher W * H * Hz: */
 	uint32_t max_bandwidth;
 	/*

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 16/21] drm/tilcdc: Remove the use of drm_device private_data
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (14 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 15/21] drm/tilcdc: Modernize driver initialization and cleanup paths Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-26 17:35 ` [PATCH 17/21] drm/bridge: tda998x: Remove component support Kory Maincent (TI.com)
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

The DRM core documentation recommends against using dev_private:
"Instead of using this pointer it is recommended that drivers use
embed the struct &drm_device in their larger per-device structure."

This patch refactors the tilcdc driver to follow this recommendation
by embedding struct drm_device within struct tilcdc_drm_private and
replacing all dev->dev_private accesses with the ddev_to_tilcdc_priv()
helper macro that uses container_of().

This change aligns the driver with modern DRM best practices.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c    | 28 ++++++++++++++--------------
 drivers/gpu/drm/tilcdc/tilcdc_drv.c     | 11 +++++------
 drivers/gpu/drm/tilcdc/tilcdc_drv.h     |  2 ++
 drivers/gpu/drm/tilcdc/tilcdc_encoder.c |  4 ++--
 drivers/gpu/drm/tilcdc/tilcdc_plane.c   |  2 +-
 drivers/gpu/drm/tilcdc/tilcdc_regs.h    |  8 ++++----
 6 files changed, 28 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index 3955b3b99befe..9e7f1bacf1e4d 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -59,7 +59,7 @@ struct tilcdc_crtc {
 static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb)
 {
 	struct drm_device *dev = crtc->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	struct drm_gem_dma_object *gem;
 	dma_addr_t start, end;
 	u64 dma_base_and_ceiling;
@@ -94,7 +94,7 @@ static void tilcdc_crtc_load_palette(struct drm_crtc *crtc)
 {
 	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 	struct drm_device *dev = crtc->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	int ret;
 
 	reinit_completion(&tilcdc_crtc->palette_loaded);
@@ -136,7 +136,7 @@ static void tilcdc_crtc_load_palette(struct drm_crtc *crtc)
 
 static void tilcdc_crtc_enable_irqs(struct drm_device *dev)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 
 	tilcdc_clear_irqstatus(dev, 0xffffffff);
 
@@ -153,7 +153,7 @@ static void tilcdc_crtc_enable_irqs(struct drm_device *dev)
 
 static void tilcdc_crtc_disable_irqs(struct drm_device *dev)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 
 	/* disable irqs that we might have enabled: */
 	if (priv->rev == 1) {
@@ -173,7 +173,7 @@ static void tilcdc_crtc_disable_irqs(struct drm_device *dev)
 static void reset(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 
 	if (priv->rev != 2)
 		return;
@@ -198,7 +198,7 @@ static unsigned int tilcdc_pclk_diff(unsigned long rate,
 static void tilcdc_crtc_set_clk(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 	unsigned long clk_rate, real_pclk_rate, pclk_rate;
 	unsigned int clkdiv;
@@ -270,7 +270,7 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc)
 {
 	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 	struct drm_device *dev = crtc->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	uint32_t reg, hbp, hfp, hsw, vbp, vfp, vsw;
 	struct drm_display_mode *mode = &crtc->state->adjusted_mode;
 	struct drm_framebuffer *fb = crtc->primary->state->fb;
@@ -557,7 +557,7 @@ static void tilcdc_crtc_recover_work(struct work_struct *work)
 
 void tilcdc_crtc_destroy(struct drm_crtc *crtc)
 {
-	struct tilcdc_drm_private *priv = crtc->dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(crtc->dev);
 
 	tilcdc_crtc_shutdown(crtc);
 
@@ -647,7 +647,7 @@ static int tilcdc_crtc_enable_vblank(struct drm_crtc *crtc)
 {
 	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 	struct drm_device *dev = crtc->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	unsigned long flags;
 
 	spin_lock_irqsave(&tilcdc_crtc->irq_lock, flags);
@@ -670,7 +670,7 @@ static void tilcdc_crtc_disable_vblank(struct drm_crtc *crtc)
 {
 	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 	struct drm_device *dev = crtc->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	unsigned long flags;
 
 	spin_lock_irqsave(&tilcdc_crtc->irq_lock, flags);
@@ -728,7 +728,7 @@ static enum drm_mode_status
 tilcdc_crtc_mode_valid(struct drm_crtc *crtc,
 		       const struct drm_display_mode *mode)
 {
-	struct tilcdc_drm_private *priv = crtc->dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(crtc->dev);
 	unsigned int bandwidth;
 	uint32_t hbp, hfp, hsw, vbp, vfp, vsw;
 
@@ -826,7 +826,7 @@ static const struct drm_crtc_helper_funcs tilcdc_crtc_helper_funcs = {
 void tilcdc_crtc_update_clk(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 
 	drm_modeset_lock(&crtc->mutex, NULL);
@@ -850,7 +850,7 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
 {
 	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 	struct drm_device *dev = crtc->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	uint32_t stat, reg;
 
 	stat = tilcdc_read_irqstatus(dev);
@@ -958,7 +958,7 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
 
 int tilcdc_crtc_create(struct drm_device *dev)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	struct tilcdc_crtc *tilcdc_crtc;
 	struct drm_crtc *crtc;
 	int ret;
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index e08bea30585e0..e6d9f7f53a62d 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -74,7 +74,7 @@ static const struct drm_mode_config_funcs mode_config_funcs = {
 
 static void modeset_init(struct drm_device *dev)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 
 	dev->mode_config.min_width = 0;
 	dev->mode_config.min_height = 0;
@@ -100,14 +100,14 @@ static int cpufreq_transition(struct notifier_block *nb,
 static irqreturn_t tilcdc_irq(int irq, void *arg)
 {
 	struct drm_device *dev = arg;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 
 	return tilcdc_crtc_irq(priv->crtc);
 }
 
 static int tilcdc_irq_install(struct drm_device *dev, unsigned int irq)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	int ret;
 
 	ret = request_irq(irq, tilcdc_irq, 0, dev->driver->name, dev);
@@ -121,7 +121,7 @@ static int tilcdc_irq_install(struct drm_device *dev, unsigned int irq)
 
 static void tilcdc_irq_uninstall(struct drm_device *dev)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 
 	if (!priv->irq_enabled)
 		return;
@@ -169,7 +169,7 @@ static int tilcdc_regs_show(struct seq_file *m, void *arg)
 {
 	struct drm_info_node *node = (struct drm_info_node *) m->private;
 	struct drm_device *dev = node->minor->dev;
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	unsigned i;
 
 	pm_runtime_get_sync(dev->dev);
@@ -269,7 +269,6 @@ static int tilcdc_pdev_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, priv);
 	ddev = &priv->ddev;
-	ddev->dev_private = priv;
 	ret = drmm_mode_config_init(ddev);
 	if (ret)
 		return ret;
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index e3d04a3eb25b4..c69e279a2539d 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -85,6 +85,8 @@ struct tilcdc_drm_private {
 
 #define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
 
+#define ddev_to_tilcdc_priv(x) container_of(x, struct tilcdc_drm_private, ddev)
+
 int tilcdc_crtc_create(struct drm_device *dev);
 irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc);
 void tilcdc_crtc_update_clk(struct drm_crtc *crtc);
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_encoder.c b/drivers/gpu/drm/tilcdc/tilcdc_encoder.c
index bca91226351dd..d01e7a31a286c 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_encoder.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_encoder.c
@@ -34,7 +34,7 @@ struct drm_connector *tilcdc_encoder_find_connector(struct drm_device *ddev,
 static
 int tilcdc_attach_bridge(struct drm_device *ddev, struct drm_bridge *bridge)
 {
-	struct tilcdc_drm_private *priv = ddev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(ddev);
 	int ret;
 
 	priv->encoder->possible_crtcs = BIT(0);
@@ -53,7 +53,7 @@ int tilcdc_attach_bridge(struct drm_device *ddev, struct drm_bridge *bridge)
 
 int tilcdc_encoder_create(struct drm_device *ddev)
 {
-	struct tilcdc_drm_private *priv = ddev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(ddev);
 	struct drm_bridge *bridge;
 	struct drm_panel *panel;
 	int ret;
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_plane.c b/drivers/gpu/drm/tilcdc/tilcdc_plane.c
index aa72ca679598b..a77a5b22ebd96 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_plane.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_plane.c
@@ -101,7 +101,7 @@ static const struct drm_plane_helper_funcs plane_helper_funcs = {
 int tilcdc_plane_init(struct drm_device *dev,
 		      struct drm_plane *plane)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	int ret;
 
 	ret = drm_universal_plane_init(dev, plane, 1, &tilcdc_plane_funcs,
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_regs.h b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
index f90e2dc3457cd..26ebaf1e0f70f 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_regs.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
@@ -113,13 +113,13 @@
 
 static inline void tilcdc_write(struct drm_device *dev, u32 reg, u32 data)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	iowrite32(data, priv->mmio + reg);
 }
 
 static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	volatile void __iomem *addr = priv->mmio + reg;
 
 #if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
@@ -133,7 +133,7 @@ static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
 
 static inline u32 tilcdc_read(struct drm_device *dev, u32 reg)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	return ioread32(priv->mmio + reg);
 }
 
@@ -156,7 +156,7 @@ static inline void tilcdc_clear(struct drm_device *dev, u32 reg, u32 mask)
 /* the register to read/clear irqstatus differs between v1 and v2 of the IP */
 static inline u32 tilcdc_irqstatus_reg(struct drm_device *dev)
 {
-	struct tilcdc_drm_private *priv = dev->dev_private;
+	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
 	return (priv->rev == 2) ? LCDC_MASKED_STAT_REG : LCDC_STAT_REG;
 }
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 17/21] drm/bridge: tda998x: Remove component support
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (15 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 16/21] drm/tilcdc: Remove the use of drm_device private_data Kory Maincent (TI.com)
@ 2025-11-26 17:35 ` Kory Maincent (TI.com)
  2025-11-26 17:36 ` [PATCH 18/21] drm/bridge: tda998x: Move tda998x_create/destroy into probe and remove Kory Maincent (TI.com)
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:35 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

The tilcdc driver no longer uses the component framework to bind the
tda998x bridge driver. The component bind/unbind operations and the
encoder initialization code are now dead code and can be safely removed.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/bridge/tda998x_drv.c | 69 +-----------------------------------
 1 file changed, 1 insertion(+), 68 deletions(-)

diff --git a/drivers/gpu/drm/bridge/tda998x_drv.c b/drivers/gpu/drm/bridge/tda998x_drv.c
index e636459d91857..865285ba2bd8c 100644
--- a/drivers/gpu/drm/bridge/tda998x_drv.c
+++ b/drivers/gpu/drm/bridge/tda998x_drv.c
@@ -4,7 +4,6 @@
  * Author: Rob Clark <robdclark@gmail.com>
  */
 
-#include <linux/component.h>
 #include <linux/gpio/consumer.h>
 #include <linux/hdmi.h>
 #include <linux/i2c.h>
@@ -1963,85 +1962,19 @@ static int tda998x_create(struct device *dev)
 	return ret;
 }
 
-/* DRM encoder functions */
-
-static int tda998x_encoder_init(struct device *dev, struct drm_device *drm)
-{
-	struct tda998x_priv *priv = dev_get_drvdata(dev);
-	u32 crtcs = 0;
-	int ret;
-
-	if (dev->of_node)
-		crtcs = drm_of_find_possible_crtcs(drm, dev->of_node);
-
-	/* If no CRTCs were found, fall back to our old behaviour */
-	if (crtcs == 0) {
-		dev_warn(dev, "Falling back to first CRTC\n");
-		crtcs = 1 << 0;
-	}
-
-	priv->encoder.possible_crtcs = crtcs;
-
-	ret = drm_simple_encoder_init(drm, &priv->encoder,
-				      DRM_MODE_ENCODER_TMDS);
-	if (ret)
-		goto err_encoder;
-
-	ret = drm_bridge_attach(&priv->encoder, &priv->bridge, NULL, 0);
-	if (ret)
-		goto err_bridge;
-
-	return 0;
-
-err_bridge:
-	drm_encoder_cleanup(&priv->encoder);
-err_encoder:
-	return ret;
-}
-
-static int tda998x_bind(struct device *dev, struct device *master, void *data)
-{
-	struct drm_device *drm = data;
-
-	return tda998x_encoder_init(dev, drm);
-}
-
-static void tda998x_unbind(struct device *dev, struct device *master,
-			   void *data)
-{
-	struct tda998x_priv *priv = dev_get_drvdata(dev);
-
-	drm_encoder_cleanup(&priv->encoder);
-}
-
-static const struct component_ops tda998x_ops = {
-	.bind = tda998x_bind,
-	.unbind = tda998x_unbind,
-};
-
 static int
 tda998x_probe(struct i2c_client *client)
 {
-	int ret;
-
 	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
 		dev_warn(&client->dev, "adapter does not support I2C\n");
 		return -EIO;
 	}
 
-	ret = tda998x_create(&client->dev);
-	if (ret)
-		return ret;
-
-	ret = component_add(&client->dev, &tda998x_ops);
-	if (ret)
-		tda998x_destroy(&client->dev);
-	return ret;
+	return tda998x_create(&client->dev);
 }
 
 static void tda998x_remove(struct i2c_client *client)
 {
-	component_del(&client->dev, &tda998x_ops);
 	tda998x_destroy(&client->dev);
 }
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 18/21] drm/bridge: tda998x: Move tda998x_create/destroy into probe and remove
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (16 preceding siblings ...)
  2025-11-26 17:35 ` [PATCH 17/21] drm/bridge: tda998x: Remove component support Kory Maincent (TI.com)
@ 2025-11-26 17:36 ` Kory Maincent (TI.com)
  2025-11-26 17:36 ` [PATCH 19/21] drm/bridge: tda998x: Remove useless tda998x_connector_destroy wrapper Kory Maincent (TI.com)
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:36 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Now that tda998x_create and tda998x_destroy are called only in the probe
function, there is no need for separate functions.
Move the code into the tda998x_probe and tda998x_remove functions.
Rewrite the cleanup path using goto calls in probe and reorder it in the
remove function.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/bridge/tda998x_drv.c | 99 +++++++++++++++++++-----------------
 1 file changed, 51 insertions(+), 48 deletions(-)

diff --git a/drivers/gpu/drm/bridge/tda998x_drv.c b/drivers/gpu/drm/bridge/tda998x_drv.c
index 865285ba2bd8c..4be49dd5bfc01 100644
--- a/drivers/gpu/drm/bridge/tda998x_drv.c
+++ b/drivers/gpu/drm/bridge/tda998x_drv.c
@@ -1748,38 +1748,20 @@ static int tda998x_get_audio_ports(struct tda998x_priv *priv,
 	return 0;
 }
 
-static void tda998x_destroy(struct device *dev)
-{
-	struct tda998x_priv *priv = dev_get_drvdata(dev);
-
-	drm_bridge_remove(&priv->bridge);
-
-	/* disable all IRQs and free the IRQ handler */
-	cec_write(priv, REG_CEC_RXSHPDINTENA, 0);
-	reg_clear(priv, REG_INT_FLAGS_2, INT_FLAGS_2_EDID_BLK_RD);
-
-	if (priv->audio_pdev)
-		platform_device_unregister(priv->audio_pdev);
-
-	if (priv->hdmi->irq)
-		free_irq(priv->hdmi->irq, priv);
-
-	timer_delete_sync(&priv->edid_delay_timer);
-	cancel_work_sync(&priv->detect_work);
-
-	i2c_unregister_device(priv->cec);
-
-	cec_notifier_conn_unregister(priv->cec_notify);
-}
-
-static int tda998x_create(struct device *dev)
+static int
+tda998x_probe(struct i2c_client *client)
 {
-	struct i2c_client *client = to_i2c_client(dev);
 	struct device_node *np = client->dev.of_node;
+	struct device *dev = &client->dev;
 	struct i2c_board_info cec_info;
 	struct tda998x_priv *priv;
-	u32 video;
 	int rev_lo, rev_hi, ret;
+	u32 video;
+
+	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
+		dev_warn(&client->dev, "adapter does not support I2C\n");
+		return -EIO;
+	}
 
 	priv = devm_drm_bridge_alloc(dev, struct tda998x_priv, bridge, &tda998x_bridge_funcs);
 	if (IS_ERR(priv))
@@ -1814,13 +1796,15 @@ static int tda998x_create(struct device *dev)
 	rev_lo = reg_read(priv, REG_VERSION_LSB);
 	if (rev_lo < 0) {
 		dev_err(dev, "failed to read version: %d\n", rev_lo);
-		return rev_lo;
+		ret = rev_lo;
+		goto cancel_work;
 	}
 
 	rev_hi = reg_read(priv, REG_VERSION_MSB);
 	if (rev_hi < 0) {
 		dev_err(dev, "failed to read version: %d\n", rev_hi);
-		return rev_hi;
+		ret = rev_hi;
+		goto cancel_work;
 	}
 
 	priv->rev = rev_lo | rev_hi << 8;
@@ -1843,7 +1827,8 @@ static int tda998x_create(struct device *dev)
 		break;
 	default:
 		dev_err(dev, "found unsupported device: %04x\n", priv->rev);
-		return -ENXIO;
+		ret = -ENXIO;
+		goto cancel_work;
 	}
 
 	/* after reset, enable DDC: */
@@ -1887,7 +1872,7 @@ static int tda998x_create(struct device *dev)
 		if (ret) {
 			dev_err(dev, "failed to request IRQ#%u: %d\n",
 				client->irq, ret);
-			goto err_irq;
+			goto cancel_work;
 		}
 
 		/* enable HPD irq */
@@ -1897,7 +1882,7 @@ static int tda998x_create(struct device *dev)
 	priv->cec_notify = cec_notifier_conn_register(dev, NULL, NULL);
 	if (!priv->cec_notify) {
 		ret = -ENOMEM;
-		goto fail;
+		goto free_irq;
 	}
 
 	priv->cec_glue.parent = dev;
@@ -1924,7 +1909,7 @@ static int tda998x_create(struct device *dev)
 	priv->cec = i2c_new_client_device(client->adapter, &cec_info);
 	if (IS_ERR(priv->cec)) {
 		ret = PTR_ERR(priv->cec);
-		goto fail;
+		goto notifier_conn_unregister;
 	}
 
 	/* enable EDID read irq: */
@@ -1941,7 +1926,7 @@ static int tda998x_create(struct device *dev)
 
 		ret = tda998x_get_audio_ports(priv, np);
 		if (ret)
-			goto fail;
+			goto unregister_dev;
 
 		if (priv->audio_port_enable[AUDIO_ROUTE_I2S] ||
 		    priv->audio_port_enable[AUDIO_ROUTE_SPDIF])
@@ -1956,26 +1941,44 @@ static int tda998x_create(struct device *dev)
 
 	return 0;
 
-fail:
-	tda998x_destroy(dev);
-err_irq:
+unregister_dev:
+	i2c_unregister_device(priv->cec);
+notifier_conn_unregister:
+	cec_notifier_conn_unregister(priv->cec_notify);
+free_irq:
+	if (client->irq) {
+		free_irq(client->irq, priv);
+		cec_write(priv, REG_CEC_RXSHPDINTENA, 0);
+		reg_clear(priv, REG_INT_FLAGS_2, INT_FLAGS_2_EDID_BLK_RD);
+	}
+cancel_work:
+	timer_delete_sync(&priv->edid_delay_timer);
+	cancel_work_sync(&priv->detect_work);
 	return ret;
 }
 
-static int
-tda998x_probe(struct i2c_client *client)
+static void tda998x_remove(struct i2c_client *client)
 {
-	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
-		dev_warn(&client->dev, "adapter does not support I2C\n");
-		return -EIO;
-	}
+	struct tda998x_priv *priv = dev_get_drvdata(&client->dev);
 
-	return tda998x_create(&client->dev);
-}
+	drm_bridge_remove(&priv->bridge);
 
-static void tda998x_remove(struct i2c_client *client)
-{
-	tda998x_destroy(&client->dev);
+	if (priv->audio_pdev)
+		platform_device_unregister(priv->audio_pdev);
+
+	i2c_unregister_device(priv->cec);
+
+	cec_notifier_conn_unregister(priv->cec_notify);
+
+	/* disable all IRQs and free the IRQ handler */
+	if (client->irq) {
+		cec_write(priv, REG_CEC_RXSHPDINTENA, 0);
+		reg_clear(priv, REG_INT_FLAGS_2, INT_FLAGS_2_EDID_BLK_RD);
+		free_irq(priv->hdmi->irq, priv);
+	}
+
+	timer_delete_sync(&priv->edid_delay_timer);
+	cancel_work_sync(&priv->detect_work);
 }
 
 #ifdef CONFIG_OF

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 19/21] drm/bridge: tda998x: Remove useless tda998x_connector_destroy wrapper
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (17 preceding siblings ...)
  2025-11-26 17:36 ` [PATCH 18/21] drm/bridge: tda998x: Move tda998x_create/destroy into probe and remove Kory Maincent (TI.com)
@ 2025-11-26 17:36 ` Kory Maincent (TI.com)
  2025-11-26 17:36 ` [PATCH 20/21] drm/bridge: tda998x: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:36 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Use directly drm_connector_cleanup in the destroy ops instead of having
a custom function that does nothing more.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/bridge/tda998x_drv.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/bridge/tda998x_drv.c b/drivers/gpu/drm/bridge/tda998x_drv.c
index 4be49dd5bfc01..43ace6ee2ca35 100644
--- a/drivers/gpu/drm/bridge/tda998x_drv.c
+++ b/drivers/gpu/drm/bridge/tda998x_drv.c
@@ -1203,16 +1203,11 @@ tda998x_connector_detect(struct drm_connector *connector, bool force)
 			connector_status_disconnected;
 }
 
-static void tda998x_connector_destroy(struct drm_connector *connector)
-{
-	drm_connector_cleanup(connector);
-}
-
 static const struct drm_connector_funcs tda998x_connector_funcs = {
 	.reset = drm_atomic_helper_connector_reset,
 	.fill_modes = drm_helper_probe_single_connector_modes,
 	.detect = tda998x_connector_detect,
-	.destroy = tda998x_connector_destroy,
+	.destroy = drm_connector_cleanup,
 	.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
 };

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 20/21] drm/bridge: tda998x: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (18 preceding siblings ...)
  2025-11-26 17:36 ` [PATCH 19/21] drm/bridge: tda998x: Remove useless tda998x_connector_destroy wrapper Kory Maincent (TI.com)
@ 2025-11-26 17:36 ` Kory Maincent (TI.com)
  2025-11-26 17:36 ` [PATCH 21/21] drm/tilcdc: " Kory Maincent (TI.com)
  2025-12-02 12:25 ` [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Swamil Jain
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:36 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Add support for the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag to allow display
controller drivers to create their own connectors. This modernizes the
driver to work with the current DRM bridge framework.

The implementation includes:
- Refactoring detection and EDID reading into bridge-usable helpers
- Adding bridge operations: edid_read, detect, hpd_enable, hpd_disable
- Setting appropriate bridge ops (DRM_BRIDGE_OP_EDID, DRM_BRIDGE_OP_DETECT,
  DRM_BRIDGE_OP_HPD) and connector type (HDMIA)
- Skipping connector creation when DRM_BRIDGE_ATTACH_NO_CONNECTOR is set
- Handling conditional connector cleanup in bridge_detach

The driver maintains backward compatibility by continuing to create its
own connector when the flag is not set.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/bridge/tda998x_drv.c | 96 +++++++++++++++++++++++++++++++-----
 1 file changed, 85 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/bridge/tda998x_drv.c b/drivers/gpu/drm/bridge/tda998x_drv.c
index 43ace6ee2ca35..4d78615634691 100644
--- a/drivers/gpu/drm/bridge/tda998x_drv.c
+++ b/drivers/gpu/drm/bridge/tda998x_drv.c
@@ -1193,16 +1193,22 @@ static int tda998x_audio_codec_init(struct tda998x_priv *priv,
 
 /* DRM connector functions */
 
-static enum drm_connector_status
-tda998x_connector_detect(struct drm_connector *connector, bool force)
+static enum drm_connector_status tda998x_conn_detect(struct tda998x_priv *priv)
 {
-	struct tda998x_priv *priv = conn_to_tda998x_priv(connector);
 	u8 val = cec_read(priv, REG_CEC_RXSHPDLEV);
 
 	return (val & CEC_RXSHPDLEV_HPD) ? connector_status_connected :
 			connector_status_disconnected;
 }
 
+static enum drm_connector_status
+tda998x_connector_detect(struct drm_connector *connector, bool force)
+{
+	struct tda998x_priv *priv = conn_to_tda998x_priv(connector);
+
+	return tda998x_conn_detect(priv);
+}
+
 static const struct drm_connector_funcs tda998x_connector_funcs = {
 	.reset = drm_atomic_helper_connector_reset,
 	.fill_modes = drm_helper_probe_single_connector_modes,
@@ -1276,11 +1282,10 @@ static int read_edid_block(void *data, u8 *buf, unsigned int blk, size_t length)
 	return ret;
 }
 
-static int tda998x_connector_get_modes(struct drm_connector *connector)
+static const struct drm_edid *tda998x_edid_read(struct tda998x_priv *priv,
+						struct drm_connector *connector)
 {
-	struct tda998x_priv *priv = conn_to_tda998x_priv(connector);
 	const struct drm_edid *drm_edid;
-	int n;
 
 	/*
 	 * If we get killed while waiting for the HPD timeout, return
@@ -1298,6 +1303,16 @@ static int tda998x_connector_get_modes(struct drm_connector *connector)
 	if (priv->rev == TDA19988)
 		reg_set(priv, REG_TX4, TX4_PD_RAM);
 
+	return drm_edid;
+}
+
+static int tda998x_connector_get_modes(struct drm_connector *connector)
+{
+	struct tda998x_priv *priv = conn_to_tda998x_priv(connector);
+	const struct drm_edid *drm_edid;
+	int n;
+
+	drm_edid = tda998x_edid_read(priv, connector);
 	drm_edid_connector_update(connector, drm_edid);
 	cec_notifier_set_phys_addr(priv->cec_notify,
 				   connector->display_info.source_physical_address);
@@ -1365,10 +1380,8 @@ static int tda998x_bridge_attach(struct drm_bridge *bridge,
 {
 	struct tda998x_priv *priv = bridge_to_tda998x_priv(bridge);
 
-	if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) {
-		DRM_ERROR("Fix bridge driver to make connector optional!");
-		return -EINVAL;
-	}
+	if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)
+		return 0;
 
 	return tda998x_connector_init(priv, bridge->dev);
 }
@@ -1377,7 +1390,8 @@ static void tda998x_bridge_detach(struct drm_bridge *bridge)
 {
 	struct tda998x_priv *priv = bridge_to_tda998x_priv(bridge);
 
-	drm_connector_cleanup(&priv->connector);
+	if (priv->connector.dev)
+		drm_connector_cleanup(&priv->connector);
 }
 
 static enum drm_mode_status tda998x_bridge_mode_valid(struct drm_bridge *bridge,
@@ -1677,6 +1691,59 @@ static void tda998x_bridge_mode_set(struct drm_bridge *bridge,
 	mutex_unlock(&priv->audio_mutex);
 }
 
+static const struct drm_edid *
+tda998x_bridge_edid_read(struct drm_bridge *bridge,
+			 struct drm_connector *connector)
+{
+	struct tda998x_priv *priv = bridge_to_tda998x_priv(bridge);
+	const struct drm_edid *drm_edid;
+	const struct edid *edid;
+
+	drm_edid = tda998x_edid_read(priv, connector);
+	if (!drm_edid) {
+		dev_dbg(&priv->hdmi->dev, "failed to get edid\n");
+		return NULL;
+	}
+
+	/*
+	 * FIXME: This should use connector->display_info.has_audio from
+	 * a path that has read the EDID and called
+	 * drm_edid_connector_update().
+	 */
+	edid = drm_edid_raw(drm_edid);
+
+	dev_dbg(&priv->hdmi->dev, "got edid: width[%d] x height[%d]\n",
+		edid->width_cm, edid->height_cm);
+
+	priv->sink_has_audio = drm_detect_monitor_audio(edid);
+	cec_notifier_set_phys_addr_from_edid(priv->cec_notify, edid);
+
+	return drm_edid;
+}
+
+static enum drm_connector_status
+tda998x_bridge_detect(struct drm_bridge *bridge,
+		      struct drm_connector *connector)
+{
+	struct tda998x_priv *priv = bridge_to_tda998x_priv(bridge);
+
+	return tda998x_conn_detect(priv);
+}
+
+static void tda998x_bridge_hpd_enable(struct drm_bridge *bridge)
+{
+	struct tda998x_priv *priv = bridge_to_tda998x_priv(bridge);
+
+	cec_write(priv, REG_CEC_RXSHPDINTENA, CEC_RXSHPDLEV_HPD);
+}
+
+static void tda998x_bridge_hpd_disable(struct drm_bridge *bridge)
+{
+	struct tda998x_priv *priv = bridge_to_tda998x_priv(bridge);
+
+	cec_write(priv, REG_CEC_RXSHPDINTENA, 0);
+}
+
 static const struct drm_bridge_funcs tda998x_bridge_funcs = {
 	.attach = tda998x_bridge_attach,
 	.detach = tda998x_bridge_detach,
@@ -1684,6 +1751,10 @@ static const struct drm_bridge_funcs tda998x_bridge_funcs = {
 	.disable = tda998x_bridge_disable,
 	.mode_set = tda998x_bridge_mode_set,
 	.enable = tda998x_bridge_enable,
+	.edid_read = tda998x_bridge_edid_read,
+	.detect = tda998x_bridge_detect,
+	.hpd_enable = tda998x_bridge_hpd_enable,
+	.hpd_disable = tda998x_bridge_hpd_disable,
 };
 
 /* I2C driver functions */
@@ -1872,6 +1943,7 @@ tda998x_probe(struct i2c_client *client)
 
 		/* enable HPD irq */
 		cec_write(priv, REG_CEC_RXSHPDINTENA, CEC_RXSHPDLEV_HPD);
+		priv->bridge.ops = DRM_BRIDGE_OP_HPD;
 	}
 
 	priv->cec_notify = cec_notifier_conn_register(dev, NULL, NULL);
@@ -1932,6 +2004,8 @@ tda998x_probe(struct i2c_client *client)
 	priv->bridge.of_node = dev->of_node;
 #endif
 
+	priv->bridge.ops |= DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_DETECT;
+	priv->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
 	drm_bridge_add(&priv->bridge);
 
 	return 0;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 21/21] drm/tilcdc: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (19 preceding siblings ...)
  2025-11-26 17:36 ` [PATCH 20/21] drm/bridge: tda998x: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
@ 2025-11-26 17:36 ` Kory Maincent (TI.com)
  2025-12-02 12:25 ` [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Swamil Jain
  21 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-26 17:36 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap,
	Kory Maincent (TI.com)

Convert the driver to use the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag when
attaching bridges. This modernizes the driver by delegating connector
creation to the bridge subsystem through drm_bridge_connector_init()
instead of manually searching for connectors created by the bridge.

The custom tilcdc_encoder_find_connector() function is removed and
replaced with the standard drm_bridge_connector infrastructure, which
simplifies the code and aligns with current DRM bridge best practices.

This change is safe as there are now no in-tree devicetrees that
connect tilcdc to bridges which do not support the
DRM_BRIDGE_ATTACH_NO_CONNECTOR flag.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_encoder.c | 38 ++++++++++++++-------------------
 1 file changed, 16 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_encoder.c b/drivers/gpu/drm/tilcdc/tilcdc_encoder.c
index d01e7a31a286c..11fde3a2be353 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_encoder.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_encoder.c
@@ -8,46 +8,40 @@
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_bridge.h>
+#include <drm/drm_bridge_connector.h>
 #include <drm/drm_of.h>
 #include <drm/drm_simple_kms_helper.h>
 
 #include "tilcdc_drv.h"
 #include "tilcdc_encoder.h"
 
-static
-struct drm_connector *tilcdc_encoder_find_connector(struct drm_device *ddev,
-						    struct drm_encoder *encoder)
-{
-	struct drm_connector *connector;
-
-	list_for_each_entry(connector, &ddev->mode_config.connector_list, head) {
-		if (drm_connector_has_possible_encoder(connector, encoder))
-			return connector;
-	}
-
-	dev_err(ddev->dev, "No connector found for %s encoder (id %d)\n",
-		encoder->name, encoder->base.id);
-
-	return NULL;
-}
-
 static
 int tilcdc_attach_bridge(struct drm_device *ddev, struct drm_bridge *bridge)
 {
 	struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(ddev);
+	struct drm_connector *connector;
 	int ret;
 
 	priv->encoder->possible_crtcs = BIT(0);
 
-	ret = drm_bridge_attach(priv->encoder, bridge, NULL, 0);
+	ret = drm_bridge_attach(priv->encoder, bridge, NULL,
+				DRM_BRIDGE_ATTACH_NO_CONNECTOR);
 	if (ret)
 		return ret;
 
-	priv->connector =
-		tilcdc_encoder_find_connector(ddev, priv->encoder);
-	if (!priv->connector)
-		return -ENODEV;
+	connector = drm_bridge_connector_init(ddev, priv->encoder);
+	if (IS_ERR(connector)) {
+		dev_err(ddev->dev, "bridge_connector create failed\n");
+		return PTR_ERR(connector);
+	}
+
+	ret = drm_connector_attach_encoder(connector, priv->encoder);
+	if (ret) {
+		dev_err(ddev->dev, "attaching encoder to connector failed\n");
+		return ret;
+	}
 
+	priv->connector = connector;
 	return 0;
 }
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [PATCH 02/21] dt-bindings: display: tilcdc: Add fifo-threshold property
  2025-11-26 17:35 ` [PATCH 02/21] dt-bindings: display: tilcdc: Add fifo-threshold property Kory Maincent (TI.com)
@ 2025-11-27  8:22   ` Krzysztof Kozlowski
  2025-11-27  9:37     ` Kory Maincent
  0 siblings, 1 reply; 46+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-27  8:22 UTC (permalink / raw)
  To: Kory Maincent (TI.com)
  Cc: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap

On Wed, Nov 26, 2025 at 06:35:44PM +0100, Kory Maincent (TI.com) wrote:
> Add the fifo-threshold property to control the DMA FIFO threshold level,
> which specifies the number of words that must be loaded before the DMA
> FIFO becomes ready.
> 
> This property is needed to support the da850-evm board configuration
> which requires a non-default FIFO threshold value. Currently, this value
> is specified through the deprecated ti,tilcdc,panel binding. Adding this
> property to the tilcdc binding allows for proper configuration while
> migrating away from the non-standard panel binding.
> 
> The default value is 8 words, with valid values being powers of 2 from
> 8 to 512.
> 
> Related commit: 55da73fa7a68c ("ARM: dts: davinci: da850-evm: Increase
> fifo threshold")

Please use syntax pointed out by checkpatch. The checkpatch error (not
even a warning) is there for reason, so we can apply filter/grep
easily.

> 
> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
> ---
>  Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml
> index 34ac1fd04d5c6..bf6d506e25e17 100644
> --- a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml
> +++ b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml
> @@ -46,6 +46,13 @@ properties:
>        The maximum pixel clock that can be supported by the lcd controller
>        in KHz.
>  
> +  fifo-threshold:

Why this is not deducible from the compatible? Feels like a specific SoC
issue.

Anyway, missing vendor prefix

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [8, 16, 32, 64, 128, 256, 512]
> +    description:
> +      Number of words loaded before the DMA fifo becomes ready. The default
> +      value is 8.

missing default and drop free form text in description.

> +
>    blue-and-red-wiring:
>      enum: [straight, crossed]
>      description:
> 
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 02/21] dt-bindings: display: tilcdc: Add fifo-threshold property
  2025-11-27  8:22   ` Krzysztof Kozlowski
@ 2025-11-27  9:37     ` Kory Maincent
  0 siblings, 0 replies; 46+ messages in thread
From: Kory Maincent @ 2025-11-27  9:37 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap

On Thu, 27 Nov 2025 09:22:56 +0100
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On Wed, Nov 26, 2025 at 06:35:44PM +0100, Kory Maincent (TI.com) wrote:
> > Add the fifo-threshold property to control the DMA FIFO threshold level,
> > which specifies the number of words that must be loaded before the DMA
> > FIFO becomes ready.
> > 
> > This property is needed to support the da850-evm board configuration
> > which requires a non-default FIFO threshold value. Currently, this value
> > is specified through the deprecated ti,tilcdc,panel binding. Adding this
> > property to the tilcdc binding allows for proper configuration while
> > migrating away from the non-standard panel binding.
> > 
> > The default value is 8 words, with valid values being powers of 2 from
> > 8 to 512.
> > 
> > Related commit: 55da73fa7a68c ("ARM: dts: davinci: da850-evm: Increase
> > fifo threshold")  
> 
> Please use syntax pointed out by checkpatch. The checkpatch error (not
> even a warning) is there for reason, so we can apply filter/grep
> easily.
> 
> > 
> > Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
> > ---
> >  Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml
> > b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml index
> > 34ac1fd04d5c6..bf6d506e25e17 100644 ---
> > a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml +++
> > b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.yaml @@ -46,6
> > +46,13 @@ properties: The maximum pixel clock that can be supported by the
> > lcd controller in KHz.
> >  
> > +  fifo-threshold:  
> 
> Why this is not deducible from the compatible? Feels like a specific SoC
> issue.

This is indeed deductible from the compatible as ti,da850-tilcdc is only use in
the related devicetree. Thanks for the pointer this will avoid adding a new dt
parameter.

> 
> Anyway, missing vendor prefix
> 
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    enum: [8, 16, 32, 64, 128, 256, 512]
> > +    description:
> > +      Number of words loaded before the DMA fifo becomes ready. The default
> > +      value is 8.  
> 
> missing default and drop free form text in description.
> 
> > +
> >    blue-and-red-wiring:
> >      enum: [straight, crossed]
> >      description:
> > 
> > -- 
> > 2.43.0
> >   



-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-11-26 17:35 ` [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver Kory Maincent (TI.com)
@ 2025-12-01 14:13   ` Tomi Valkeinen
  2025-12-01 21:46     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 46+ messages in thread
From: Tomi Valkeinen @ 2025-12-01 14:13 UTC (permalink / raw)
  To: Kory Maincent (TI.com)
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap, Jyri Sarha,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Russell King, Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec

Hi Kory,

On 26/11/2025 19:35, Kory Maincent (TI.com) wrote:
> Use panel-dpi driver instead of the deprecated tilcdc-panel driver in
> preparation for removing the tilcdc-panel driver and binding.
> 
> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
> ---
> 
> This patch is not tested. It would be nice if someone with one of this
> board could test and validate it.
> ---
>  arch/arm/boot/dts/ti/davinci/da850-evm.dts    | 26 +++++++++++++-------------
>  arch/arm/boot/dts/ti/omap/am335x-guardian.dts | 25 +++++++++----------------
>  arch/arm/boot/dts/ti/omap/am335x-pdu001.dts   | 21 ++++++++++-----------
>  arch/arm/boot/dts/ti/omap/am335x-pepper.dts   | 22 +++++++++++-----------
>  arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts | 25 +++++++++++++------------
>  arch/arm/boot/dts/ti/omap/am335x-sl50.dts     | 25 ++++++++++++-------------
>  6 files changed, 68 insertions(+), 76 deletions(-)
> 

Doesn't this, or rather the following patches, break DTB compatibility
with all the above boards?

 Tomi

> diff --git a/arch/arm/boot/dts/ti/davinci/da850-evm.dts b/arch/arm/boot/dts/ti/davinci/da850-evm.dts
> index 38a191fb04149..79cca1f6205ef 100644
> --- a/arch/arm/boot/dts/ti/davinci/da850-evm.dts
> +++ b/arch/arm/boot/dts/ti/davinci/da850-evm.dts
> @@ -40,7 +40,7 @@ backlight: backlight-pwm {
>  	};
>  
>  	panel {
> -		compatible = "ti,tilcdc,panel";
> +		compatible = "panel-dpi";
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&lcd_pins>;
>  		/*
> @@ -50,17 +50,10 @@ panel {
>  		 */
>  		status = "okay";
>  		enable-gpios = <&gpio 40 GPIO_ACTIVE_HIGH>; /* lcd_panel_pwr */
> -
> -		panel-info {
> -			ac-bias = <255>;
> -			ac-bias-intrpt = <0>;
> -			dma-burst-sz = <16>;
> -			bpp = <16>;
> -			fdd = <0x80>;
> -			sync-edge = <0>;
> -			sync-ctrl = <1>;
> -			raster-order = <0>;
> -			fifo-th = <1>;
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&lcdc_out>;
> +			};
>  		};
>  
>  		display-timings {
> @@ -222,6 +215,13 @@ &rtc0 {
>  };
>  
>  &lcdc {
> +	fifo-threshold = <16>;
> +
> +	port {
> +		lcdc_out: endpoint {
> +			remote-endpoint = <&panel_in>;
> +		};
> +	};
>  	status = "okay";
>  };
>  
> @@ -459,7 +459,7 @@ &vpif {
>  	pinctrl-0 = <&vpif_capture_pins>, <&vpif_display_pins>;
>  	/*
>  	 * The vpif and the LCD are mutually exclusive.
> -	 * To enable VPIF, disable the ti,tilcdc,panel then
> +	 * To enable VPIF, disable the panel-dpi then
>  	 * change the status below to 'okay'
>  	 */
>  	status = "disabled";
> diff --git a/arch/arm/boot/dts/ti/omap/am335x-guardian.dts b/arch/arm/boot/dts/ti/omap/am335x-guardian.dts
> index 4b070e634b281..f38ce9be2c106 100644
> --- a/arch/arm/boot/dts/ti/omap/am335x-guardian.dts
> +++ b/arch/arm/boot/dts/ti/omap/am335x-guardian.dts
> @@ -68,10 +68,15 @@ gpio-poweroff {
>  	};
>  
>  	panel {
> -		compatible = "ti,tilcdc,panel";
> +		compatible = "panel-dpi";
>  		pinctrl-names = "default", "sleep";
>  		pinctrl-0 = <&lcd_pins_default &lcd_disen_pins>;
>  		pinctrl-1 = <&lcd_pins_sleep>;
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&lcdc_out>;
> +			};
> +		};
>  
>  		display-timings {
>  			timing-320x240 {
> @@ -86,21 +91,9 @@ timing-320x240 {
>  				clock-frequency = <9000000>;
>  				hsync-active    = <0>;
>  				vsync-active    = <0>;
> +				pixelclk-active = <1>;
>  			};
>  		};
> -		panel-info {
> -			ac-bias           = <255>;
> -			ac-bias-intrpt    = <0>;
> -			dma-burst-sz      = <16>;
> -			bpp               = <24>;
> -			bus-width         = <16>;
> -			fdd               = <0x80>;
> -			sync-edge         = <0>;
> -			sync-ctrl         = <1>;
> -			raster-order      = <0>;
> -			fifo-th           = <0>;
> -		};
> -
>  	};
>  
>  	guardian_beeper: pwm-7 {
> @@ -265,8 +258,8 @@ &lcdc {
>  	blue-and-red-wiring = "crossed";
>  	status = "okay";
>  	port {
> -		lcdc_0: endpoint@0 {
> -			remote-endpoint = <0>;
> +		lcdc_out: endpoint@0 {
> +			remote-endpoint = <&panel_in>;
>  		};
>  	};
>  };
> diff --git a/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts b/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts
> index c9ccb9de21ad7..2c5229d05ade7 100644
> --- a/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts
> +++ b/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts
> @@ -50,20 +50,14 @@ lis3_reg: fixedregulator@1 {
>  	};
>  
>  	panel {
> -		compatible = "ti,tilcdc,panel";
> +		compatible = "panel-dpi";
>  		status = "okay";
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&lcd_pins_s0>;
> -		panel-info {
> -			ac-bias           = <255>;
> -			ac-bias-intrpt    = <0>;
> -			dma-burst-sz      = <16>;
> -			bpp               = <16>;
> -			fdd               = <0x80>;
> -			sync-edge         = <0>;
> -			sync-ctrl         = <1>;
> -			raster-order      = <0>;
> -			fifo-th           = <0>;
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&lcdc_out>;
> +			};
>  		};
>  
>  		display-timings {
> @@ -395,6 +389,11 @@ &rtc {
>  
>  &lcdc {
>  	status = "okay";
> +	port {
> +		lcdc_out: endpoint {
> +			remote-endpoint = <&panel_in>;
> +		};
> +	};
>  };
>  
>  &elm {
> diff --git a/arch/arm/boot/dts/ti/omap/am335x-pepper.dts b/arch/arm/boot/dts/ti/omap/am335x-pepper.dts
> index e7d561a527fdd..2760c0eab50c2 100644
> --- a/arch/arm/boot/dts/ti/omap/am335x-pepper.dts
> +++ b/arch/arm/boot/dts/ti/omap/am335x-pepper.dts
> @@ -31,7 +31,7 @@ leds: user-leds-pins {
>  	};
>  
>  	panel: lcd_panel {
> -		compatible = "ti,tilcdc,panel";
> +		compatible = "panel-dpi";
>  	};
>  
>  	sound: sound_iface {
> @@ -189,16 +189,10 @@ &panel {
>  	status = "okay";
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&lcd_pins>;
> -	panel-info {
> -		ac-bias = <255>;
> -		ac-bias-intrpt = <0>;
> -		dma-burst-sz = <16>;
> -		bpp = <32>;
> -		fdd = <0x80>;
> -		sync-edge = <0>;
> -		sync-ctrl = <1>;
> -		raster-order = <0>;
> -		fifo-th = <0>;
> +	port {
> +		panel_in: endpoint {
> +			remote-endpoint = <&lcdc_out>;
> +		};
>  	};
>  	display-timings {
>  		native-mode = <&timing0>;
> @@ -214,12 +208,18 @@ timing0: timing-480x272 {
>  			vsync-len = <10>;
>  			hsync-active = <1>;
>  			vsync-active = <1>;
> +			pixelclk-active = <1>;
>  		};
>  	};
>  };
>  
>  &lcdc {
>  	status = "okay";
> +	port {
> +		lcdc_out: endpoint {
> +			remote-endpoint = <&panel_in>;
> +		};
> +	};
>  };
>  
>  &am33xx_pinmux {
> diff --git a/arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts b/arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts
> index 2841e95d9a094..25ee855dd21a7 100644
> --- a/arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts
> +++ b/arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts
> @@ -13,23 +13,17 @@ / {
>  
>  	/* DRM display driver */
>  	panel {
> -		compatible = "ti,tilcdc,panel";
> +		compatible = "panel-dpi";
>  		status = "okay";
>  		pinctrl-names = "default", "sleep";
>  		pinctrl-0 = <&lcd_pins_default>;
>  		pinctrl-1 = <&lcd_pins_sleep>;
> -
> -		panel-info {
> -			ac-bias           = <255>;
> -			ac-bias-intrpt    = <0>;
> -			dma-burst-sz      = <16>;
> -			bpp               = <32>;
> -			fdd               = <0x80>;
> -			sync-edge         = <0>;
> -			sync-ctrl         = <1>;
> -			raster-order      = <0>;
> -			fifo-th           = <0>;
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&lcdc_out>;
> +			};
>  		};
> +
>  		display-timings {
>  			/* Timing selection performed by U-Boot */
>  			timing0: lcd {/* 800x480p62 */
> @@ -44,6 +38,7 @@ timing0: lcd {/* 800x480p62 */
>  				vsync-len = <2>;
>  				hsync-active = <1>;
>  				vsync-active = <1>;
> +				pixelclk-active = <1>;
>  			};
>  			timing1: dvi { /* 1024x768p60 */
>  				clock-frequency = <65000000>;
> @@ -57,6 +52,7 @@ timing1: dvi { /* 1024x768p60 */
>  				vsync-len = <6>;
>  				hsync-active = <0>;
>  				vsync-active = <0>;
> +				pixelclk-active = <1>;
>  			};
>  		};
>  	};
> @@ -173,4 +169,9 @@ lcd-ena-hog {
>  /* Display */
>  &lcdc {
>  	status = "okay";
> +	port {
> +		lcdc_out: endpoint {
> +			remote-endpoint = <&panel_in>;
> +		};
> +	};
>  };
> diff --git a/arch/arm/boot/dts/ti/omap/am335x-sl50.dts b/arch/arm/boot/dts/ti/omap/am335x-sl50.dts
> index f3524e5ee43e2..b4b2b6d18d646 100644
> --- a/arch/arm/boot/dts/ti/omap/am335x-sl50.dts
> +++ b/arch/arm/boot/dts/ti/omap/am335x-sl50.dts
> @@ -123,22 +123,14 @@ audio_mclk: audio_mclk_gate@0 {
>  	};
>  
>  	panel: lcd_panel {
> -		compatible = "ti,tilcdc,panel";
> +		compatible = "panel-dpi";
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&lcd_pins>;
>  
> -		panel-info {
> -			ac-bias = <255>;
> -			ac-bias-intrpt = <0>;
> -			dma-burst-sz = <16>;
> -			bpp = <16>;
> -			fdd = <0x80>;
> -			tft-alt-mode = <0>;
> -			mono-8bit-mode = <0>;
> -			sync-edge = <0>;
> -			sync-ctrl = <1>;
> -			raster-order = <0>;
> -			fifo-th = <0>;
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&lcdc_out>;
> +			};
>  		};
>  
>  		display-timings {
> @@ -157,6 +149,8 @@ timing0: 960x128 {
>  				vfront-porch = <8>;
>  				vsync-len = <4>;
>  				vsync-active = <0>;
> +
> +				pixelclk-active = <1>;
>  			};
>  		};
>  	};
> @@ -711,6 +705,11 @@ &ehrpwm1 {
>  
>  &lcdc {
>  	status = "okay";
> +	port {
> +		lcdc_out: endpoint {
> +			remote-endpoint = <&panel_in>;
> +		};
> +	};
>  };
>  
>  &tscadc {
> 


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-01 14:13   ` Tomi Valkeinen
@ 2025-12-01 21:46     ` Krzysztof Kozlowski
  2025-12-02  9:42       ` Kory Maincent
  0 siblings, 1 reply; 46+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-01 21:46 UTC (permalink / raw)
  To: Tomi Valkeinen, Kory Maincent (TI.com)
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap, Jyri Sarha,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Russell King, Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec

On 01/12/2025 15:13, Tomi Valkeinen wrote:
> Hi Kory,
> 
> On 26/11/2025 19:35, Kory Maincent (TI.com) wrote:
>> Use panel-dpi driver instead of the deprecated tilcdc-panel driver in
>> preparation for removing the tilcdc-panel driver and binding.
>>
>> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
>> ---
>>
>> This patch is not tested. It would be nice if someone with one of this
>> board could test and validate it.
>> ---
>>  arch/arm/boot/dts/ti/davinci/da850-evm.dts    | 26 +++++++++++++-------------
>>  arch/arm/boot/dts/ti/omap/am335x-guardian.dts | 25 +++++++++----------------
>>  arch/arm/boot/dts/ti/omap/am335x-pdu001.dts   | 21 ++++++++++-----------
>>  arch/arm/boot/dts/ti/omap/am335x-pepper.dts   | 22 +++++++++++-----------
>>  arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts | 25 +++++++++++++------------
>>  arch/arm/boot/dts/ti/omap/am335x-sl50.dts     | 25 ++++++++++++-------------
>>  6 files changed, 68 insertions(+), 76 deletions(-)
>>
> 
> Doesn't this, or rather the following patches, break DTB compatibility
> with all the above boards?

Stuffing DTS change in the middle of the driver change tries to hide
impact, which is not nice on its own.

Please follow soc maintainer profile and submitting patches in DT
regarding DTS patches.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-01 21:46     ` Krzysztof Kozlowski
@ 2025-12-02  9:42       ` Kory Maincent
  2025-12-02 10:28         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent @ 2025-12-02  9:42 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Tomi Valkeinen, Markus Schneider-Pargmann, Luca Ceresoli,
	Louis Chauvet, Thomas Petazzoni, Miguel Gazquez, dri-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-omap,
	Jyri Sarha, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Russell King, Bartosz Golaszewski, Tony Lindgren,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec

On Mon, 1 Dec 2025 22:46:01 +0100
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On 01/12/2025 15:13, Tomi Valkeinen wrote:
> > Hi Kory,
> > 
> > On 26/11/2025 19:35, Kory Maincent (TI.com) wrote:  
> >> Use panel-dpi driver instead of the deprecated tilcdc-panel driver in
> >> preparation for removing the tilcdc-panel driver and binding.
> >>
> >> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
> >> ---
> >>
> >> This patch is not tested. It would be nice if someone with one of this
> >> board could test and validate it.
> >> ---
> >>  arch/arm/boot/dts/ti/davinci/da850-evm.dts    | 26
> >> +++++++++++++------------- arch/arm/boot/dts/ti/omap/am335x-guardian.dts |
> >> 25 +++++++++---------------- arch/arm/boot/dts/ti/omap/am335x-pdu001.dts
> >> | 21 ++++++++++----------- arch/arm/boot/dts/ti/omap/am335x-pepper.dts   |
> >> 22 +++++++++++----------- arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts |
> >> 25 +++++++++++++------------ arch/arm/boot/dts/ti/omap/am335x-sl50.dts
> >> | 25 ++++++++++++------------- 6 files changed, 68 insertions(+), 76
> >> deletions(-) 
> > 
> > Doesn't this, or rather the following patches, break DTB compatibility
> > with all the above boards?  

Yes, I know this but I still wanted to try and begin a discussion on this, as I
really thought it is not a good idea to add and maintain an new non-standard
panel driver solely for this tilcdc panel binding.
I have gathered more arguments on this topic on next patch. 
 
> Stuffing DTS change in the middle of the driver change tries to hide
> impact, which is not nice on its own.

As it needs driver change before the removal for not breaking things it can't
be done at the beginning of the series.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-02  9:42       ` Kory Maincent
@ 2025-12-02 10:28         ` Krzysztof Kozlowski
  2025-12-02 10:44           ` Kory Maincent
  0 siblings, 1 reply; 46+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-02 10:28 UTC (permalink / raw)
  To: Kory Maincent
  Cc: Tomi Valkeinen, Markus Schneider-Pargmann, Luca Ceresoli,
	Louis Chauvet, Thomas Petazzoni, Miguel Gazquez, dri-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-omap,
	Jyri Sarha, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Russell King, Bartosz Golaszewski, Tony Lindgren,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec

On 02/12/2025 10:42, Kory Maincent wrote:
>  
>> Stuffing DTS change in the middle of the driver change tries to hide
>> impact, which is not nice on its own.
> 
> As it needs driver change before the removal for not breaking things it can't
> be done at the beginning of the series.

And that is the problem which should stop you there and rethink how to
organize it without impacting users. DTS cannot go via DRM. If that was
your intention, that's my:

NAK

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-02 10:28         ` Krzysztof Kozlowski
@ 2025-12-02 10:44           ` Kory Maincent
  2025-12-02 10:47             ` Krzysztof Kozlowski
  0 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent @ 2025-12-02 10:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Tomi Valkeinen, Markus Schneider-Pargmann, Luca Ceresoli,
	Louis Chauvet, Thomas Petazzoni, Miguel Gazquez, dri-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-omap,
	Jyri Sarha, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Russell King, Bartosz Golaszewski, Tony Lindgren,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec

On Tue, 2 Dec 2025 11:28:55 +0100
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On 02/12/2025 10:42, Kory Maincent wrote:
> >    
> >> Stuffing DTS change in the middle of the driver change tries to hide
> >> impact, which is not nice on its own.  
> > 
> > As it needs driver change before the removal for not breaking things it
> > can't be done at the beginning of the series.  
> 
> And that is the problem which should stop you there and rethink how to
> organize it without impacting users. DTS cannot go via DRM. If that was
> your intention, that's my:
> 
> NAK

My intention was to raise discussion over the ugly and legacy tilcdc-panel
binding and what to do with it. But it seems you don't want to, that's a shame.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-02 10:44           ` Kory Maincent
@ 2025-12-02 10:47             ` Krzysztof Kozlowski
  2025-12-02 11:18               ` Kory Maincent
  0 siblings, 1 reply; 46+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-02 10:47 UTC (permalink / raw)
  To: Kory Maincent
  Cc: Tomi Valkeinen, Markus Schneider-Pargmann, Luca Ceresoli,
	Louis Chauvet, Thomas Petazzoni, Miguel Gazquez, dri-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-omap,
	Jyri Sarha, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Russell King, Bartosz Golaszewski, Tony Lindgren,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec

On 02/12/2025 11:44, Kory Maincent wrote:
> On Tue, 2 Dec 2025 11:28:55 +0100
> Krzysztof Kozlowski <krzk@kernel.org> wrote:
> 
>> On 02/12/2025 10:42, Kory Maincent wrote:
>>>    
>>>> Stuffing DTS change in the middle of the driver change tries to hide
>>>> impact, which is not nice on its own.  
>>>
>>> As it needs driver change before the removal for not breaking things it
>>> can't be done at the beginning of the series.  
>>
>> And that is the problem which should stop you there and rethink how to
>> organize it without impacting users. DTS cannot go via DRM. If that was
>> your intention, that's my:
>>
>> NAK
> 
> My intention was to raise discussion over the ugly and legacy tilcdc-panel
> binding and what to do with it. But it seems you don't want to, that's a shame.

I don't see how you get to these conclusions. I comment that putting
here DTS in the middle without any explanation of the impact is not
correct and this one alone I disagree with.

From that you claim I don't want to fix things...

DTS cannot go to drm, which means you either need to separate the change
and make entire work bisectable and backwards compatible for some time
OR at least document clearly the impact as we always ask.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-02 10:47             ` Krzysztof Kozlowski
@ 2025-12-02 11:18               ` Kory Maincent
  2025-12-02 11:51                 ` Tomi Valkeinen
  2025-12-02 12:19                 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 46+ messages in thread
From: Kory Maincent @ 2025-12-02 11:18 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Tomi Valkeinen, Markus Schneider-Pargmann, Luca Ceresoli,
	Louis Chauvet, Thomas Petazzoni, Miguel Gazquez, dri-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-omap,
	Jyri Sarha, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Russell King, Bartosz Golaszewski, Tony Lindgren,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec

On Tue, 2 Dec 2025 11:47:40 +0100
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On 02/12/2025 11:44, Kory Maincent wrote:
> > On Tue, 2 Dec 2025 11:28:55 +0100
> > Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >   
> >> On 02/12/2025 10:42, Kory Maincent wrote:  
> >>>      
> >>>> Stuffing DTS change in the middle of the driver change tries to hide
> >>>> impact, which is not nice on its own.    
> >>>
> >>> As it needs driver change before the removal for not breaking things it
> >>> can't be done at the beginning of the series.    
> >>
> >> And that is the problem which should stop you there and rethink how to
> >> organize it without impacting users. DTS cannot go via DRM. If that was
> >> your intention, that's my:
> >>
> >> NAK  
> > 
> > My intention was to raise discussion over the ugly and legacy tilcdc-panel
> > binding and what to do with it. But it seems you don't want to, that's a
> > shame.  
> 
> I don't see how you get to these conclusions. I comment that putting
> here DTS in the middle without any explanation of the impact is not
> correct and this one alone I disagree with.

Because you didn't replied to the first line of my answer:
"Yes, I know this but I still wanted to try and begin a discussion on this, as I
really thought it is not a good idea to add and maintain an new non-standard
panel driver solely for this tilcdc panel binding."

But indeed you are right, I should have put more explanation on why there is DTS
and binding change in the middle of the series. Sorry for that.
 
> From that you claim I don't want to fix things...
> 
> DTS cannot go to drm, which means you either need to separate the change
> and make entire work bisectable and backwards compatible for some time
> OR at least document clearly the impact as we always ask.

The thing is, if I split it, it has to be in 3. One for the of DRM bus flags
support, a second for the the devicetree and binding change and a third for the
whole tilcdc and tda998x cleaning stuff. I think I will go for one series, with
better documentation.

Now, what is your point of view on my question. Will you nak any binding
removal even if the binding is ugly and legacy and imply maintaining an
non-standard tilcdc panel driver? I know it breaks DTB compatibility but there
is several argument to not keep it. See patch 6.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-02 11:18               ` Kory Maincent
@ 2025-12-02 11:51                 ` Tomi Valkeinen
  2025-12-02 12:20                   ` Krzysztof Kozlowski
  2025-12-02 12:56                   ` Kory Maincent
  2025-12-02 12:19                 ` Krzysztof Kozlowski
  1 sibling, 2 replies; 46+ messages in thread
From: Tomi Valkeinen @ 2025-12-02 11:51 UTC (permalink / raw)
  To: Kory Maincent, Krzysztof Kozlowski
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap, Jyri Sarha,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Russell King, Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec

Hi Kory,

On 02/12/2025 13:18, Kory Maincent wrote:
> On Tue, 2 Dec 2025 11:47:40 +0100
> Krzysztof Kozlowski <krzk@kernel.org> wrote:
> 
>> On 02/12/2025 11:44, Kory Maincent wrote:
>>> On Tue, 2 Dec 2025 11:28:55 +0100
>>> Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>>   
>>>> On 02/12/2025 10:42, Kory Maincent wrote:  
>>>>>      
>>>>>> Stuffing DTS change in the middle of the driver change tries to hide
>>>>>> impact, which is not nice on its own.    
>>>>>
>>>>> As it needs driver change before the removal for not breaking things it
>>>>> can't be done at the beginning of the series.    
>>>>
>>>> And that is the problem which should stop you there and rethink how to
>>>> organize it without impacting users. DTS cannot go via DRM. If that was
>>>> your intention, that's my:
>>>>
>>>> NAK  
>>>
>>> My intention was to raise discussion over the ugly and legacy tilcdc-panel
>>> binding and what to do with it. But it seems you don't want to, that's a
>>> shame.  
>>
>> I don't see how you get to these conclusions. I comment that putting
>> here DTS in the middle without any explanation of the impact is not
>> correct and this one alone I disagree with.
> 
> Because you didn't replied to the first line of my answer:
> "Yes, I know this but I still wanted to try and begin a discussion on this, as I
> really thought it is not a good idea to add and maintain an new non-standard
> panel driver solely for this tilcdc panel binding."
> 
> But indeed you are right, I should have put more explanation on why there is DTS
> and binding change in the middle of the series. Sorry for that.
>  
>> From that you claim I don't want to fix things...
>>
>> DTS cannot go to drm, which means you either need to separate the change
>> and make entire work bisectable and backwards compatible for some time
>> OR at least document clearly the impact as we always ask.
> 
> The thing is, if I split it, it has to be in 3. One for the of DRM bus flags
> support, a second for the the devicetree and binding change and a third for the
> whole tilcdc and tda998x cleaning stuff. I think I will go for one series, with
> better documentation.
> 
> Now, what is your point of view on my question. Will you nak any binding
> removal even if the binding is ugly and legacy and imply maintaining an
> non-standard tilcdc panel driver? I know it breaks DTB compatibility but there
> is several argument to not keep it. See patch 6.
The binding being ugly and having to maintain non-standard tilcdc panel
driver may be nice things for us, the users don't care. The users care
if their board no longer works.

And how does this sync with u-boot? It also has code for at least for a
few of these boards.

Are there even users for these boards? If not, maybe they can be just
removed? I'm personally not familiar with these boards, so I have no
idea of their age or distribution.

One trick that can be done is to modify the loaded DTB at boot time,
detecting the old format, converting it to the new one, so that when the
drivers are probed they only see the new DTB.

 Tomi


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-02 11:18               ` Kory Maincent
  2025-12-02 11:51                 ` Tomi Valkeinen
@ 2025-12-02 12:19                 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-02 12:19 UTC (permalink / raw)
  To: Kory Maincent
  Cc: Tomi Valkeinen, Markus Schneider-Pargmann, Luca Ceresoli,
	Louis Chauvet, Thomas Petazzoni, Miguel Gazquez, dri-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-omap,
	Jyri Sarha, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Russell King, Bartosz Golaszewski, Tony Lindgren,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec

On 02/12/2025 12:18, Kory Maincent wrote:
> On Tue, 2 Dec 2025 11:47:40 +0100
> Krzysztof Kozlowski <krzk@kernel.org> wrote:
> 
>> On 02/12/2025 11:44, Kory Maincent wrote:
>>> On Tue, 2 Dec 2025 11:28:55 +0100
>>> Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>>   
>>>> On 02/12/2025 10:42, Kory Maincent wrote:  
>>>>>      
>>>>>> Stuffing DTS change in the middle of the driver change tries to hide
>>>>>> impact, which is not nice on its own.    
>>>>>
>>>>> As it needs driver change before the removal for not breaking things it
>>>>> can't be done at the beginning of the series.    
>>>>
>>>> And that is the problem which should stop you there and rethink how to
>>>> organize it without impacting users. DTS cannot go via DRM. If that was
>>>> your intention, that's my:
>>>>
>>>> NAK  
>>>
>>> My intention was to raise discussion over the ugly and legacy tilcdc-panel
>>> binding and what to do with it. But it seems you don't want to, that's a
>>> shame.  
>>
>> I don't see how you get to these conclusions. I comment that putting
>> here DTS in the middle without any explanation of the impact is not
>> correct and this one alone I disagree with.
> 
> Because you didn't replied to the first line of my answer:
> "Yes, I know this but I still wanted to try and begin a discussion on this, as I
> really thought it is not a good idea to add and maintain an new non-standard
> panel driver solely for this tilcdc panel binding."
> 
> But indeed you are right, I should have put more explanation on why there is DTS
> and binding change in the middle of the series. Sorry for that.
>  
>> From that you claim I don't want to fix things...
>>
>> DTS cannot go to drm, which means you either need to separate the change
>> and make entire work bisectable and backwards compatible for some time
>> OR at least document clearly the impact as we always ask.
> 
> The thing is, if I split it, it has to be in 3. One for the of DRM bus flags
> support, a second for the the devicetree and binding change and a third for the
> whole tilcdc and tda998x cleaning stuff. I think I will go for one series, with
> better documentation.
> 
> Now, what is your point of view on my question. Will you nak any binding
> removal even if the binding is ugly and legacy and imply maintaining an
> non-standard tilcdc panel driver? I know it breaks DTB compatibility but there
> is several argument to not keep it. See patch 6.

I will not NAK, removing bindings and breaking users is under some
conditions acceptable. You just need to come with the reasons and impact.

Reason "is ugly" is usually not good enough. Especially if things were
working.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-02 11:51                 ` Tomi Valkeinen
@ 2025-12-02 12:20                   ` Krzysztof Kozlowski
  2025-12-02 12:56                   ` Kory Maincent
  1 sibling, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-02 12:20 UTC (permalink / raw)
  To: Tomi Valkeinen, Kory Maincent
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap, Jyri Sarha,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Russell King, Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec

On 02/12/2025 12:51, Tomi Valkeinen wrote:
> Hi Kory,
> 
> On 02/12/2025 13:18, Kory Maincent wrote:
>> On Tue, 2 Dec 2025 11:47:40 +0100
>> Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>>> On 02/12/2025 11:44, Kory Maincent wrote:
>>>> On Tue, 2 Dec 2025 11:28:55 +0100
>>>> Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>>>   
>>>>> On 02/12/2025 10:42, Kory Maincent wrote:  
>>>>>>      
>>>>>>> Stuffing DTS change in the middle of the driver change tries to hide
>>>>>>> impact, which is not nice on its own.    
>>>>>>
>>>>>> As it needs driver change before the removal for not breaking things it
>>>>>> can't be done at the beginning of the series.    
>>>>>
>>>>> And that is the problem which should stop you there and rethink how to
>>>>> organize it without impacting users. DTS cannot go via DRM. If that was
>>>>> your intention, that's my:
>>>>>
>>>>> NAK  
>>>>
>>>> My intention was to raise discussion over the ugly and legacy tilcdc-panel
>>>> binding and what to do with it. But it seems you don't want to, that's a
>>>> shame.  
>>>
>>> I don't see how you get to these conclusions. I comment that putting
>>> here DTS in the middle without any explanation of the impact is not
>>> correct and this one alone I disagree with.
>>
>> Because you didn't replied to the first line of my answer:
>> "Yes, I know this but I still wanted to try and begin a discussion on this, as I
>> really thought it is not a good idea to add and maintain an new non-standard
>> panel driver solely for this tilcdc panel binding."
>>
>> But indeed you are right, I should have put more explanation on why there is DTS
>> and binding change in the middle of the series. Sorry for that.
>>  
>>> From that you claim I don't want to fix things...
>>>
>>> DTS cannot go to drm, which means you either need to separate the change
>>> and make entire work bisectable and backwards compatible for some time
>>> OR at least document clearly the impact as we always ask.
>>
>> The thing is, if I split it, it has to be in 3. One for the of DRM bus flags
>> support, a second for the the devicetree and binding change and a third for the
>> whole tilcdc and tda998x cleaning stuff. I think I will go for one series, with
>> better documentation.
>>
>> Now, what is your point of view on my question. Will you nak any binding
>> removal even if the binding is ugly and legacy and imply maintaining an
>> non-standard tilcdc panel driver? I know it breaks DTB compatibility but there
>> is several argument to not keep it. See patch 6.
> The binding being ugly and having to maintain non-standard tilcdc panel
> driver may be nice things for us, the users don't care. The users care
> if their board no longer works.

Exactly.

> 
> And how does this sync with u-boot? It also has code for at least for a
> few of these boards.

+1

> 
> Are there even users for these boards? If not, maybe they can be just
> removed? I'm personally not familiar with these boards, so I have no
> idea of their age or distribution.
> 
> One trick that can be done is to modify the loaded DTB at boot time,
> detecting the old format, converting it to the new one, so that when the
> drivers are probed they only see the new DTB.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR
  2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
                   ` (20 preceding siblings ...)
  2025-11-26 17:36 ` [PATCH 21/21] drm/tilcdc: " Kory Maincent (TI.com)
@ 2025-12-02 12:25 ` Swamil Jain
  2025-12-03 10:49   ` Kory Maincent
  21 siblings, 1 reply; 46+ messages in thread
From: Swamil Jain @ 2025-12-02 12:25 UTC (permalink / raw)
  To: Kory Maincent (TI.com), Jyri Sarha, Tomi Valkeinen,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Russell King, Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap

Hi Kory,
Thanks for the series.

On 11/26/25 23:05, Kory Maincent (TI.com) wrote:
> The starting point for this work was adding support for the HDMI cape:
> https://www.seeedstudio.com/Seeed-Studio-BeagleBone-Green-HDMI-Cape.html
> This will be sent in a later series.
> 
> Initially, Miguel proposed modifying the ite-it66121 bridge to support
> the legacy behavior without the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag:
> https://lore.kernel.org/lkml/20250909-it66121-fix-v1-1-bc79ca83df17@bootlin.com/
> This patch was NAK'd as we don't want to add more legacy code. Maxime
> requested that the tilcdc driver be updated to use
> DRM_BRIDGE_ATTACH_NO_CONNECTOR instead.
> 
> While working on this update, I discovered that the tilcdc driver
> contained significant amounts of legacy code that needed cleaning.
> Since this driver was developed alongside the tda998x driver for
> several AM335x boards, the tda998x driver also required cleanup and
> support for the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag.
> 
> This series is based on the tilcdc fix sent to mainline:
> https://lore.kernel.org/lkml/20251125090546.137193-1-kory.maincent@bootlin.com/
> 
> Patch 1-7: Convert tilcdc binding to YAML and remove the ti,tilcdc,panel
> 	   sub-binding and driver
> Patch 8-16: Clean up tilcdc driver
> Patch 17-19: Clean up tda998x driver
> Patch 20: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support to tda998x
> Patch 21: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support to tilcdc
> 
> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
> ---
> Kory Maincent (TI.com) (21):
>        dt-bindings: display: tilcdc: Convert to DT schema
>        dt-bindings: display: tilcdc: Add fifo-threshold property
>        drm/tilcdc: Remove simulate_vesa_sync flag
>        drm/tilcdc: Add support for DRM bus flags and simplify panel config
>        ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
>        dt-bindings: display: tilcdc: Remove panel binding
>        drm/tilcdc: Remove tilcdc panel driver
>        drm/tilcdc: Remove component framework support
>        drm/tilcdc: Remove tilcdc_panel_info structure
>        drm/tilcdc: Remove redundant #endif/#ifdef in debugfs code
>        drm/tilcdc: Remove unused encoder and connector tracking arrays
>        drm/tilcdc: Rename external_encoder and external_connector to encoder and connector
>        drm/tilcdc: Rename tilcdc_external to tilcdc_encoder
>        drm/tilcdc: Remove the useless module list support
>        drm/tilcdc: Modernize driver initialization and cleanup paths
>        drm/tilcdc: Remove the use of drm_device private_data
>        drm/bridge: tda998x: Remove component support
>        drm/bridge: tda998x: Move tda998x_create/destroy into probe and remove
>        drm/bridge: tda998x: Remove useless tda998x_connector_destroy wrapper
>        drm/bridge: tda998x: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
>        drm/tilcdc: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
> 
>   .../devicetree/bindings/display/tilcdc/panel.txt   |  66 ---
>   .../devicetree/bindings/display/tilcdc/tilcdc.txt  |  82 ----
>   .../devicetree/bindings/display/tilcdc/tilcdc.yaml | 103 +++++
>   arch/arm/boot/dts/ti/davinci/da850-evm.dts         |  26 +-
>   arch/arm/boot/dts/ti/omap/am335x-guardian.dts      |  25 +-
>   arch/arm/boot/dts/ti/omap/am335x-pdu001.dts        |  21 +-
>   arch/arm/boot/dts/ti/omap/am335x-pepper.dts        |  22 +-
>   arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts      |  25 +-
>   arch/arm/boot/dts/ti/omap/am335x-sl50.dts          |  25 +-
>   drivers/gpu/drm/bridge/tda998x_drv.c               | 251 ++++++------
>   drivers/gpu/drm/tilcdc/Makefile                    |   3 +-
>   drivers/gpu/drm/tilcdc/tilcdc_crtc.c               | 117 ++----
>   drivers/gpu/drm/tilcdc/tilcdc_drv.c                | 456 +++++++--------------
>   drivers/gpu/drm/tilcdc/tilcdc_drv.h                |  88 +---
>   drivers/gpu/drm/tilcdc/tilcdc_encoder.c            |  93 +++++
>   .../tilcdc/{tilcdc_external.h => tilcdc_encoder.h} |   5 +-
>   drivers/gpu/drm/tilcdc/tilcdc_external.c           | 179 --------
>   drivers/gpu/drm/tilcdc/tilcdc_panel.c              | 408 ------------------
>   drivers/gpu/drm/tilcdc/tilcdc_panel.h              |  15 -
>   drivers/gpu/drm/tilcdc/tilcdc_plane.c              |   2 +-
>   drivers/gpu/drm/tilcdc/tilcdc_regs.h               |   8 +-
>   21 files changed, 589 insertions(+), 1431 deletions(-)
> ---
> base-commit: 670bacfc7579bdd79a3069cfb5ab60a6a7923003

I was trying to test the patches, unable to find the base-commit, are
you using drm-misc-next?

Regards,
Swamil.

> change-id: 20251014-feature_tilcdc-79cd49e67bf9
> 
> Best regards,


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-02 11:51                 ` Tomi Valkeinen
  2025-12-02 12:20                   ` Krzysztof Kozlowski
@ 2025-12-02 12:56                   ` Kory Maincent
  2025-12-03  8:30                     ` Krzysztof Kozlowski
  1 sibling, 1 reply; 46+ messages in thread
From: Kory Maincent @ 2025-12-02 12:56 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Krzysztof Kozlowski, Markus Schneider-Pargmann, Luca Ceresoli,
	Louis Chauvet, Thomas Petazzoni, Miguel Gazquez, dri-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-omap,
	Jyri Sarha, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Russell King, Bartosz Golaszewski, Tony Lindgren,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec

On Tue, 2 Dec 2025 13:51:59 +0200
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> wrote:

> Hi Kory,
> 
> On 02/12/2025 13:18, Kory Maincent wrote:
> > On Tue, 2 Dec 2025 11:47:40 +0100
> > Krzysztof Kozlowski <krzk@kernel.org> wrote:

> I will not NAK, removing bindings and breaking users is under some
> conditions acceptable. You just need to come with the reasons and impact.
> 
> Reason "is ugly" is usually not good enough. Especially if things were
> working.

Thanks for you reply.

> >>
> >> DTS cannot go to drm, which means you either need to separate the change
> >> and make entire work bisectable and backwards compatible for some time
> >> OR at least document clearly the impact as we always ask.  
> > 
> > The thing is, if I split it, it has to be in 3. One for the of DRM bus flags
> > support, a second for the the devicetree and binding change and a third for
> > the whole tilcdc and tda998x cleaning stuff. I think I will go for one
> > series, with better documentation.
> > 
> > Now, what is your point of view on my question. Will you nak any binding
> > removal even if the binding is ugly and legacy and imply maintaining an
> > non-standard tilcdc panel driver? I know it breaks DTB compatibility but
> > there is several argument to not keep it. See patch 6.  
> The binding being ugly and having to maintain non-standard tilcdc panel
> driver may be nice things for us, the users don't care. The users care
> if their board no longer works.

Yes I understand but then I have another question. At what cost should we
continue to support legacy binding?

Just figured out this case already happened, ti,tilcdc,slave binding was
removed from the tilcdc driver:
739acd85ffdb7 ("drm/tilcdc: Remove obsolete "ti,tilcdc,slave" dts binding
support")

Even if there is still one mainline device tree that uses it:
am335x-base0033.dts. :/

> And how does this sync with u-boot? It also has code for at least for a
> few of these boards.

U-boot has indeed a driver for the ti,tilcdc,panel binding.
Changing this devicetree would beak display for these board in U-boot as it
currently does not support the "panel-dpi" binding.

> Are there even users for these boards? If not, maybe they can be just
> removed? I'm personally not familiar with these boards, so I have no
> idea of their age or distribution.

These boards are quite old (>10 years) but I don't know if they are still used
by people. After a quick look they seem not available on the market.

> One trick that can be done is to modify the loaded DTB at boot time,
> detecting the old format, converting it to the new one, so that when the
> drivers are probed they only see the new DTB.

Yes, indeed that could do the trick. The things is, I don't have one of
theses board to test it. I will try to look for an other way to test it.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver
  2025-12-02 12:56                   ` Kory Maincent
@ 2025-12-03  8:30                     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-03  8:30 UTC (permalink / raw)
  To: Kory Maincent
  Cc: Tomi Valkeinen, Markus Schneider-Pargmann, Luca Ceresoli,
	Louis Chauvet, Thomas Petazzoni, Miguel Gazquez, dri-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-omap,
	Jyri Sarha, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Russell King, Bartosz Golaszewski, Tony Lindgren,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec

On Tue, Dec 02, 2025 at 01:56:05PM +0100, Kory Maincent wrote:
> On Tue, 2 Dec 2025 13:51:59 +0200
> Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> wrote:
> 
> > Hi Kory,
> > 
> > On 02/12/2025 13:18, Kory Maincent wrote:
> > > On Tue, 2 Dec 2025 11:47:40 +0100
> > > Krzysztof Kozlowski <krzk@kernel.org> wrote:
> 
> > I will not NAK, removing bindings and breaking users is under some
> > conditions acceptable. You just need to come with the reasons and impact.
> > 
> > Reason "is ugly" is usually not good enough. Especially if things were
> > working.
> 
> Thanks for you reply.
> 
> > >>
> > >> DTS cannot go to drm, which means you either need to separate the change
> > >> and make entire work bisectable and backwards compatible for some time
> > >> OR at least document clearly the impact as we always ask.  
> > > 
> > > The thing is, if I split it, it has to be in 3. One for the of DRM bus flags
> > > support, a second for the the devicetree and binding change and a third for
> > > the whole tilcdc and tda998x cleaning stuff. I think I will go for one
> > > series, with better documentation.
> > > 
> > > Now, what is your point of view on my question. Will you nak any binding
> > > removal even if the binding is ugly and legacy and imply maintaining an
> > > non-standard tilcdc panel driver? I know it breaks DTB compatibility but
> > > there is several argument to not keep it. See patch 6.  
> > The binding being ugly and having to maintain non-standard tilcdc panel
> > driver may be nice things for us, the users don't care. The users care
> > if their board no longer works.
> 
> Yes I understand but then I have another question. At what cost should we
> continue to support legacy binding?

That's mostly question to platform maintainers and users. Extrapolating
kernel rule - we never break the user-space - we never break the users,
thus we take significant cost.

And that significant cost can be the cost of making the transition
smooth or smoother.

> 
> Just figured out this case already happened, ti,tilcdc,slave binding was
> removed from the tilcdc driver:
> 739acd85ffdb7 ("drm/tilcdc: Remove obsolete "ti,tilcdc,slave" dts binding
> support")
> 
> Even if there is still one mainline device tree that uses it:
> am335x-base0033.dts. :/

If that commit broke existing users, it is a good argument for your
changes, but you need to explicitly use that argument in commit msg.

> 
> > And how does this sync with u-boot? It also has code for at least for a
> > few of these boards.
> 
> U-boot has indeed a driver for the ti,tilcdc,panel binding.
> Changing this devicetree would beak display for these board in U-boot as it
> currently does not support the "panel-dpi" binding.

Thanks for checking, regardless of decision this also should be in
commit msg.

Maybe things were not working correctly for long time, so there is a
choice of fixing Linux side while breaking U-boot and not fixing, but
keeping bootloader working.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR
  2025-12-02 12:25 ` [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Swamil Jain
@ 2025-12-03 10:49   ` Kory Maincent
  2025-12-03 12:13     ` Swamil Jain
  0 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent @ 2025-12-03 10:49 UTC (permalink / raw)
  To: Swamil Jain
  Cc: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap

On Tue, 2 Dec 2025 17:55:15 +0530
Swamil Jain <s-jain1@ti.com> wrote:

> Hi Kory,
> Thanks for the series.
> 
> On 11/26/25 23:05, Kory Maincent (TI.com) wrote:
> > The starting point for this work was adding support for the HDMI cape:
> > https://www.seeedstudio.com/Seeed-Studio-BeagleBone-Green-HDMI-Cape.html
> > This will be sent in a later series.
> > 
> > Initially, Miguel proposed modifying the ite-it66121 bridge to support
> > the legacy behavior without the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag:
> > https://lore.kernel.org/lkml/20250909-it66121-fix-v1-1-bc79ca83df17@bootlin.com/
> > This patch was NAK'd as we don't want to add more legacy code. Maxime
> > requested that the tilcdc driver be updated to use
> > DRM_BRIDGE_ATTACH_NO_CONNECTOR instead.
> > 
> > While working on this update, I discovered that the tilcdc driver
> > contained significant amounts of legacy code that needed cleaning.
> > Since this driver was developed alongside the tda998x driver for
> > several AM335x boards, the tda998x driver also required cleanup and
> > support for the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag.
> > 
> > This series is based on the tilcdc fix sent to mainline:
> > https://lore.kernel.org/lkml/20251125090546.137193-1-kory.maincent@bootlin.com/
> > 
> > Patch 1-7: Convert tilcdc binding to YAML and remove the ti,tilcdc,panel
> > 	   sub-binding and driver
> > Patch 8-16: Clean up tilcdc driver
> > Patch 17-19: Clean up tda998x driver
> > Patch 20: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support to tda998x
> > Patch 21: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support to tilcdc
> > 
> > Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
> > ---
> > Kory Maincent (TI.com) (21):
> >        dt-bindings: display: tilcdc: Convert to DT schema
> >        dt-bindings: display: tilcdc: Add fifo-threshold property
> >        drm/tilcdc: Remove simulate_vesa_sync flag
> >        drm/tilcdc: Add support for DRM bus flags and simplify panel config
> >        ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel
> > driver dt-bindings: display: tilcdc: Remove panel binding
> >        drm/tilcdc: Remove tilcdc panel driver
> >        drm/tilcdc: Remove component framework support
> >        drm/tilcdc: Remove tilcdc_panel_info structure
> >        drm/tilcdc: Remove redundant #endif/#ifdef in debugfs code
> >        drm/tilcdc: Remove unused encoder and connector tracking arrays
> >        drm/tilcdc: Rename external_encoder and external_connector to
> > encoder and connector drm/tilcdc: Rename tilcdc_external to tilcdc_encoder
> >        drm/tilcdc: Remove the useless module list support
> >        drm/tilcdc: Modernize driver initialization and cleanup paths
> >        drm/tilcdc: Remove the use of drm_device private_data
> >        drm/bridge: tda998x: Remove component support
> >        drm/bridge: tda998x: Move tda998x_create/destroy into probe and
> > remove drm/bridge: tda998x: Remove useless tda998x_connector_destroy wrapper
> >        drm/bridge: tda998x: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
> >        drm/tilcdc: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
> > 
> >   .../devicetree/bindings/display/tilcdc/panel.txt   |  66 ---
> >   .../devicetree/bindings/display/tilcdc/tilcdc.txt  |  82 ----
> >   .../devicetree/bindings/display/tilcdc/tilcdc.yaml | 103 +++++
> >   arch/arm/boot/dts/ti/davinci/da850-evm.dts         |  26 +-
> >   arch/arm/boot/dts/ti/omap/am335x-guardian.dts      |  25 +-
> >   arch/arm/boot/dts/ti/omap/am335x-pdu001.dts        |  21 +-
> >   arch/arm/boot/dts/ti/omap/am335x-pepper.dts        |  22 +-
> >   arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts      |  25 +-
> >   arch/arm/boot/dts/ti/omap/am335x-sl50.dts          |  25 +-
> >   drivers/gpu/drm/bridge/tda998x_drv.c               | 251 ++++++------
> >   drivers/gpu/drm/tilcdc/Makefile                    |   3 +-
> >   drivers/gpu/drm/tilcdc/tilcdc_crtc.c               | 117 ++----
> >   drivers/gpu/drm/tilcdc/tilcdc_drv.c                | 456
> > +++++++-------------- drivers/gpu/drm/tilcdc/tilcdc_drv.h                |
> > 88 +--- drivers/gpu/drm/tilcdc/tilcdc_encoder.c            |  93 +++++
> >   .../tilcdc/{tilcdc_external.h => tilcdc_encoder.h} |   5 +-
> >   drivers/gpu/drm/tilcdc/tilcdc_external.c           | 179 --------
> >   drivers/gpu/drm/tilcdc/tilcdc_panel.c              | 408
> > ------------------ drivers/gpu/drm/tilcdc/tilcdc_panel.h              |  15
> > - drivers/gpu/drm/tilcdc/tilcdc_plane.c              |   2 +-
> >   drivers/gpu/drm/tilcdc/tilcdc_regs.h               |   8 +-
> >   21 files changed, 589 insertions(+), 1431 deletions(-)
> > ---
> > base-commit: 670bacfc7579bdd79a3069cfb5ab60a6a7923003  
> 
> I was trying to test the patches, unable to find the base-commit, are
> you using drm-misc-next?

It is based on the tilcdc fix as explained in the cover letter.
https://lore.kernel.org/lkml/20251125090546.137193-1-kory.maincent@bootlin.com/
Therefore you won't be able to find this base commit hash. 

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR
  2025-12-03 10:49   ` Kory Maincent
@ 2025-12-03 12:13     ` Swamil Jain
  0 siblings, 0 replies; 46+ messages in thread
From: Swamil Jain @ 2025-12-03 12:13 UTC (permalink / raw)
  To: Kory Maincent
  Cc: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Markus Schneider-Pargmann, Luca Ceresoli, Louis Chauvet,
	Thomas Petazzoni, Miguel Gazquez, dri-devel, devicetree,
	linux-kernel, linux-arm-kernel, linux-omap



On 12/3/25 16:19, Kory Maincent wrote:
> On Tue, 2 Dec 2025 17:55:15 +0530
> Swamil Jain <s-jain1@ti.com> wrote:
> 
>> Hi Kory,
>> Thanks for the series.
>>
>> On 11/26/25 23:05, Kory Maincent (TI.com) wrote:
>>> The starting point for this work was adding support for the HDMI cape:
>>> https://www.seeedstudio.com/Seeed-Studio-BeagleBone-Green-HDMI-Cape.html
>>> This will be sent in a later series.
>>>
>>> Initially, Miguel proposed modifying the ite-it66121 bridge to support
>>> the legacy behavior without the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag:
>>> https://lore.kernel.org/lkml/20250909-it66121-fix-v1-1-bc79ca83df17@bootlin.com/
>>> This patch was NAK'd as we don't want to add more legacy code. Maxime
>>> requested that the tilcdc driver be updated to use
>>> DRM_BRIDGE_ATTACH_NO_CONNECTOR instead.
>>>
>>> While working on this update, I discovered that the tilcdc driver
>>> contained significant amounts of legacy code that needed cleaning.
>>> Since this driver was developed alongside the tda998x driver for
>>> several AM335x boards, the tda998x driver also required cleanup and
>>> support for the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag.
>>>
>>> This series is based on the tilcdc fix sent to mainline:
>>> https://lore.kernel.org/lkml/20251125090546.137193-1-kory.maincent@bootlin.com/
>>>
>>> Patch 1-7: Convert tilcdc binding to YAML and remove the ti,tilcdc,panel
>>> 	   sub-binding and driver
>>> Patch 8-16: Clean up tilcdc driver
>>> Patch 17-19: Clean up tda998x driver
>>> Patch 20: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support to tda998x
>>> Patch 21: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support to tilcdc
>>>
>>> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
>>> ---
>>> Kory Maincent (TI.com) (21):
>>>         dt-bindings: display: tilcdc: Convert to DT schema
>>>         dt-bindings: display: tilcdc: Add fifo-threshold property
>>>         drm/tilcdc: Remove simulate_vesa_sync flag
>>>         drm/tilcdc: Add support for DRM bus flags and simplify panel config
>>>         ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel
>>> driver dt-bindings: display: tilcdc: Remove panel binding
>>>         drm/tilcdc: Remove tilcdc panel driver
>>>         drm/tilcdc: Remove component framework support
>>>         drm/tilcdc: Remove tilcdc_panel_info structure
>>>         drm/tilcdc: Remove redundant #endif/#ifdef in debugfs code
>>>         drm/tilcdc: Remove unused encoder and connector tracking arrays
>>>         drm/tilcdc: Rename external_encoder and external_connector to
>>> encoder and connector drm/tilcdc: Rename tilcdc_external to tilcdc_encoder
>>>         drm/tilcdc: Remove the useless module list support
>>>         drm/tilcdc: Modernize driver initialization and cleanup paths
>>>         drm/tilcdc: Remove the use of drm_device private_data
>>>         drm/bridge: tda998x: Remove component support
>>>         drm/bridge: tda998x: Move tda998x_create/destroy into probe and
>>> remove drm/bridge: tda998x: Remove useless tda998x_connector_destroy wrapper
>>>         drm/bridge: tda998x: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
>>>         drm/tilcdc: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
>>>
>>>    .../devicetree/bindings/display/tilcdc/panel.txt   |  66 ---
>>>    .../devicetree/bindings/display/tilcdc/tilcdc.txt  |  82 ----
>>>    .../devicetree/bindings/display/tilcdc/tilcdc.yaml | 103 +++++
>>>    arch/arm/boot/dts/ti/davinci/da850-evm.dts         |  26 +-
>>>    arch/arm/boot/dts/ti/omap/am335x-guardian.dts      |  25 +-
>>>    arch/arm/boot/dts/ti/omap/am335x-pdu001.dts        |  21 +-
>>>    arch/arm/boot/dts/ti/omap/am335x-pepper.dts        |  22 +-
>>>    arch/arm/boot/dts/ti/omap/am335x-sbc-t335.dts      |  25 +-
>>>    arch/arm/boot/dts/ti/omap/am335x-sl50.dts          |  25 +-
>>>    drivers/gpu/drm/bridge/tda998x_drv.c               | 251 ++++++------
>>>    drivers/gpu/drm/tilcdc/Makefile                    |   3 +-
>>>    drivers/gpu/drm/tilcdc/tilcdc_crtc.c               | 117 ++----
>>>    drivers/gpu/drm/tilcdc/tilcdc_drv.c                | 456
>>> +++++++-------------- drivers/gpu/drm/tilcdc/tilcdc_drv.h                |
>>> 88 +--- drivers/gpu/drm/tilcdc/tilcdc_encoder.c            |  93 +++++
>>>    .../tilcdc/{tilcdc_external.h => tilcdc_encoder.h} |   5 +-
>>>    drivers/gpu/drm/tilcdc/tilcdc_external.c           | 179 --------
>>>    drivers/gpu/drm/tilcdc/tilcdc_panel.c              | 408
>>> ------------------ drivers/gpu/drm/tilcdc/tilcdc_panel.h              |  15
>>> - drivers/gpu/drm/tilcdc/tilcdc_plane.c              |   2 +-
>>>    drivers/gpu/drm/tilcdc/tilcdc_regs.h               |   8 +-
>>>    21 files changed, 589 insertions(+), 1431 deletions(-)
>>> ---
>>> base-commit: 670bacfc7579bdd79a3069cfb5ab60a6a7923003
>>
>> I was trying to test the patches, unable to find the base-commit, are
>> you using drm-misc-next?
> 
> It is based on the tilcdc fix as explained in the cover letter.
> https://lore.kernel.org/lkml/20251125090546.137193-1-kory.maincent@bootlin.com/
> Therefore you won't be able to find this base commit hash.

Sorry I missed it. Thanks for pointing.

Regards,
Swamil.

> 
> Regards,


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 03/21] drm/tilcdc: Remove simulate_vesa_sync flag
  2025-11-26 17:35 ` [PATCH 03/21] drm/tilcdc: Remove simulate_vesa_sync flag Kory Maincent (TI.com)
@ 2025-12-10 18:10   ` Luca Ceresoli
  2025-12-11  9:40     ` Kory Maincent
  0 siblings, 1 reply; 46+ messages in thread
From: Luca Ceresoli @ 2025-12-10 18:10 UTC (permalink / raw)
  To: Kory Maincent (TI.com), Jyri Sarha, Tomi Valkeinen,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Russell King, Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Louis Chauvet, Thomas Petazzoni,
	Miguel Gazquez, dri-devel, devicetree, linux-kernel,
	linux-arm-kernel, linux-omap

Hi Köry,

On Wed Nov 26, 2025 at 6:35 PM CET, Kory Maincent (TI.com) wrote:
> The tilcdc hardware does not generate VESA-compliant sync signals. It
> aligns the vertical sync (VS) on the second edge of the horizontal sync
> (HS) instead of the first edge. To compensate for this hardware
> behavior, the driver applies a timing adjustment in mode_fixup().
>
> Previously, this adjustment was conditional based on the simulate_vesa_sync
> flag, which was only set when using external encoders. This appears
> problematic because:
>
> 1. The timing adjustment seems needed for the hardware behavior regardless
>    of whether an external encoder is used
> 2. The external encoder infrastructure is driver-specific and being
>    removed due to design issues
> 3. Boards using tilcdc without bridges (e.g., am335x-evm, am335x-evmsk)
>    may not be getting the necessary timing adjustments
>
> Remove the simulate_vesa_sync flag and apply the VESA sync timing
> adjustment unconditionally, ensuring consistent behavior across all
> configurations. While it's unclear if the previous conditional behavior
> was causing actual issues, the unconditional adjustment better reflects
> the hardware's characteristics.
>
> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
> ---
>
> Only few board currently use tilcdc not associated to a bridge like the
> am335x_evm or the am335x-evmsk.

Have you tested this change on any affected board?

The change looks good to me but without some testing it would be risky.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 04/21] drm/tilcdc: Add support for DRM bus flags and simplify panel config
  2025-11-26 17:35 ` [PATCH 04/21] drm/tilcdc: Add support for DRM bus flags and simplify panel config Kory Maincent (TI.com)
@ 2025-12-10 18:13   ` Luca Ceresoli
  0 siblings, 0 replies; 46+ messages in thread
From: Luca Ceresoli @ 2025-12-10 18:13 UTC (permalink / raw)
  To: Kory Maincent (TI.com), Jyri Sarha, Tomi Valkeinen,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Russell King, Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Louis Chauvet, Thomas Petazzoni,
	Miguel Gazquez, dri-devel, devicetree, linux-kernel,
	linux-arm-kernel, linux-omap

On Wed Nov 26, 2025 at 6:35 PM CET, Kory Maincent (TI.com) wrote:
> Migrate CRTC mode configuration to use standard DRM bus flags in
> preparation for removing the tilcdc_panel driver and its custom
> tilcdc_panel_info structure.
>
> Add support for DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE and
> DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE flags to control pixel clock and sync
> signal edge polarity, while maintaining backward compatibility with the
> existing tilcdc panel info structure.
>
> Simplify several hardware parameters by setting them to fixed defaults
> based on common usage across existing device trees:
> - DMA burst size: 16 (previously configurable via switch statement)
> - AC bias frequency: 255 (previously panel-specific)
> - FIFO DMA request delay: 128 (previously panel-specific)
>
> These parameters show no variation in real-world usage, so hardcoding
> them simplifies the driver without losing functionality.
>
> Preserve FIFO threshold configurability by adding a new "fifo-threshold"
> device tree property at the display controller level, as this parameter
> varies across different display configurations in existing device trees.
>
> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>

Apart from the "fifo-threshold" property, which as discussed should instead
be inferred from the compatible, the patch looks good. I checked the values
which are being removed and they have all the same value in the code
defaults and all in-tree dts files.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 10/21] drm/tilcdc: Remove redundant #endif/#ifdef in debugfs code
  2025-11-26 17:35 ` [PATCH 10/21] drm/tilcdc: Remove redundant #endif/#ifdef in debugfs code Kory Maincent (TI.com)
@ 2025-12-10 18:22   ` Luca Ceresoli
  0 siblings, 0 replies; 46+ messages in thread
From: Luca Ceresoli @ 2025-12-10 18:22 UTC (permalink / raw)
  To: Kory Maincent (TI.com), Jyri Sarha, Tomi Valkeinen,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Russell King, Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Louis Chauvet, Thomas Petazzoni,
	Miguel Gazquez, dri-devel, devicetree, linux-kernel,
	linux-arm-kernel, linux-omap

On Wed Nov 26, 2025 at 6:35 PM CET, Kory Maincent (TI.com) wrote:
> Remove the unnecessary #endif/#ifdef CONFIG_DEBUG_FS pair that splits
> the debugfs code section. This keeps all debugfs-related code within a
> single preprocessor conditional block, improving code readability.
>
> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 03/21] drm/tilcdc: Remove simulate_vesa_sync flag
  2025-12-10 18:10   ` Luca Ceresoli
@ 2025-12-11  9:40     ` Kory Maincent
  2025-12-11  9:47       ` Luca Ceresoli
  0 siblings, 1 reply; 46+ messages in thread
From: Kory Maincent @ 2025-12-11  9:40 UTC (permalink / raw)
  To: Luca Ceresoli
  Cc: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Markus Schneider-Pargmann, Louis Chauvet, Thomas Petazzoni,
	Miguel Gazquez, dri-devel, devicetree, linux-kernel,
	linux-arm-kernel, linux-omap

On Wed, 10 Dec 2025 19:10:45 +0100
"Luca Ceresoli" <luca.ceresoli@bootlin.com> wrote:

> Hi Köry,
> 
> On Wed Nov 26, 2025 at 6:35 PM CET, Kory Maincent (TI.com) wrote:
> > The tilcdc hardware does not generate VESA-compliant sync signals. It
> > aligns the vertical sync (VS) on the second edge of the horizontal sync
> > (HS) instead of the first edge. To compensate for this hardware
> > behavior, the driver applies a timing adjustment in mode_fixup().
> >
> > Previously, this adjustment was conditional based on the simulate_vesa_sync
> > flag, which was only set when using external encoders. This appears
> > problematic because:
> >
> > 1. The timing adjustment seems needed for the hardware behavior regardless
> >    of whether an external encoder is used
> > 2. The external encoder infrastructure is driver-specific and being
> >    removed due to design issues
> > 3. Boards using tilcdc without bridges (e.g., am335x-evm, am335x-evmsk)
> >    may not be getting the necessary timing adjustments
> >
> > Remove the simulate_vesa_sync flag and apply the VESA sync timing
> > adjustment unconditionally, ensuring consistent behavior across all
> > configurations. While it's unclear if the previous conditional behavior
> > was causing actual issues, the unconditional adjustment better reflects
> > the hardware's characteristics.
> >
> > Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
> > ---
> >
> > Only few board currently use tilcdc not associated to a bridge like the
> > am335x_evm or the am335x-evmsk.  
> 
> Have you tested this change on any affected board?
> 
> The change looks good to me but without some testing it would be risky.

I have tested it on few boards but not these mainline devicetree as I don't
have them.

I have tested a tilcdc with tda998x bridge (BeagleBone Black), a tilcdc with
ti,tilcdc,panel panel (BeagleBone with LCD cape), a tilcdc with it66121 bridge
(new Beagle Bone Green Eco board with HDMI cape).
That's all the boards I have.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 08/21] drm/tilcdc: Remove component framework support
  2025-11-26 17:35 ` [PATCH 08/21] drm/tilcdc: Remove component framework support Kory Maincent (TI.com)
@ 2025-12-11  9:42   ` Luca Ceresoli
  0 siblings, 0 replies; 46+ messages in thread
From: Luca Ceresoli @ 2025-12-11  9:42 UTC (permalink / raw)
  To: Kory Maincent (TI.com), Jyri Sarha, Tomi Valkeinen,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Russell King, Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Louis Chauvet, Thomas Petazzoni,
	Miguel Gazquez, dri-devel, devicetree, linux-kernel,
	linux-arm-kernel, linux-omap

On Wed Nov 26, 2025 at 6:35 PM CET, Kory Maincent (TI.com) wrote:
> The tilcdc driver previously used the component framework to bind
> external encoder subdrivers (specifically the TDA998x HDMI encoder).
> With the removal of these subdrivers in previous commits, the component
> framework is no longer needed.
>
> This commit removes all component framework infrastructure including:
> - Component master operations and bind/unbind callbacks
> - The is_componentized flag and conditional code paths
> - tilcdc_get_external_components() and tilcdc_add_component_encoder()
> - TDA998x-specific panel configuration
>
> The driver now uses a simplified initialization path that directly
> attaches external devices via the DRM bridge API, eliminating the
> complexity of dual code paths for componentized vs non-componentized
> configurations.
>
> This cleanup removes approximately 140 lines of code and makes the
> driver initialization flow more straightforward.
>
> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>

This driver is complex already, supporting two different modes (one of
which used in a single case only) makes it just worse. So this cleanup
looks very useful.

Provided it's tested on hardware:
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 09/21] drm/tilcdc: Remove tilcdc_panel_info structure
  2025-11-26 17:35 ` [PATCH 09/21] drm/tilcdc: Remove tilcdc_panel_info structure Kory Maincent (TI.com)
@ 2025-12-11  9:44   ` Luca Ceresoli
  0 siblings, 0 replies; 46+ messages in thread
From: Luca Ceresoli @ 2025-12-11  9:44 UTC (permalink / raw)
  To: Kory Maincent (TI.com), Jyri Sarha, Tomi Valkeinen,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Russell King, Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec
  Cc: Markus Schneider-Pargmann, Louis Chauvet, Thomas Petazzoni,
	Miguel Gazquez, dri-devel, devicetree, linux-kernel,
	linux-arm-kernel, linux-omap

On Wed Nov 26, 2025 at 6:35 PM CET, Kory Maincent (TI.com) wrote:
> Remove the tilcdc_panel_info structure and its associated helper
> function as the structure contains only redundant or unused parameters.
>
> Most panel configuration parameters in tilcdc_panel_info are either:
> - Already represented by existing DRM mode flags (invert_pxl_clk,
>   sync_edge via DRM_BUS_FLAG_*), or
> - Set to identical values across all instances (panel_info_default),
>   making them effectively constants
>
> The removed fifo_th field is already handled by priv->fifo_th when set.
> Other removed fields (tft_alt_mode, raster_order) were always set to 0
> in the only instance (panel_info_default) and thus had no effect.
>
> This simplifies the code by eliminating unnecessary abstraction while
> preserving all functional behavior.
>
> Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 03/21] drm/tilcdc: Remove simulate_vesa_sync flag
  2025-12-11  9:40     ` Kory Maincent
@ 2025-12-11  9:47       ` Luca Ceresoli
  0 siblings, 0 replies; 46+ messages in thread
From: Luca Ceresoli @ 2025-12-11  9:47 UTC (permalink / raw)
  To: Kory Maincent
  Cc: Jyri Sarha, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King,
	Bartosz Golaszewski, Tony Lindgren, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Markus Schneider-Pargmann, Louis Chauvet, Thomas Petazzoni,
	Miguel Gazquez, dri-devel, devicetree, linux-kernel,
	linux-arm-kernel, linux-omap

On Thu Dec 11, 2025 at 10:40 AM CET, Kory Maincent wrote:
> On Wed, 10 Dec 2025 19:10:45 +0100
> "Luca Ceresoli" <luca.ceresoli@bootlin.com> wrote:
>
>> Hi Köry,
>>
>> On Wed Nov 26, 2025 at 6:35 PM CET, Kory Maincent (TI.com) wrote:
>> > The tilcdc hardware does not generate VESA-compliant sync signals. It
>> > aligns the vertical sync (VS) on the second edge of the horizontal sync
>> > (HS) instead of the first edge. To compensate for this hardware
>> > behavior, the driver applies a timing adjustment in mode_fixup().
>> >
>> > Previously, this adjustment was conditional based on the simulate_vesa_sync
>> > flag, which was only set when using external encoders. This appears
>> > problematic because:
>> >
>> > 1. The timing adjustment seems needed for the hardware behavior regardless
>> >    of whether an external encoder is used
>> > 2. The external encoder infrastructure is driver-specific and being
>> >    removed due to design issues
>> > 3. Boards using tilcdc without bridges (e.g., am335x-evm, am335x-evmsk)
>> >    may not be getting the necessary timing adjustments
>> >
>> > Remove the simulate_vesa_sync flag and apply the VESA sync timing
>> > adjustment unconditionally, ensuring consistent behavior across all
>> > configurations. While it's unclear if the previous conditional behavior
>> > was causing actual issues, the unconditional adjustment better reflects
>> > the hardware's characteristics.
>> >
>> > Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
>> > ---
>> >
>> > Only few board currently use tilcdc not associated to a bridge like the
>> > am335x_evm or the am335x-evmsk.
>>
>> Have you tested this change on any affected board?
>>
>> The change looks good to me but without some testing it would be risky.
>
> I have tested it on few boards but not these mainline devicetree as I don't
> have them.
>
> I have tested a tilcdc with tda998x bridge (BeagleBone Black), a tilcdc with
> ti,tilcdc,panel panel (BeagleBone with LCD cape), a tilcdc with it66121 bridge
> (new Beagle Bone Green Eco board with HDMI cape).
> That's all the boards I have.

OK, thanks for the info. For future iterations, I think it's useful to
mention, for all patches that may potentially break existing hardware, such
info on which hardware you have tested.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2025-12-11  9:47 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-26 17:35 [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
2025-11-26 17:35 ` [PATCH 01/21] dt-bindings: display: tilcdc: Convert to DT schema Kory Maincent (TI.com)
2025-11-26 17:35 ` [PATCH 02/21] dt-bindings: display: tilcdc: Add fifo-threshold property Kory Maincent (TI.com)
2025-11-27  8:22   ` Krzysztof Kozlowski
2025-11-27  9:37     ` Kory Maincent
2025-11-26 17:35 ` [PATCH 03/21] drm/tilcdc: Remove simulate_vesa_sync flag Kory Maincent (TI.com)
2025-12-10 18:10   ` Luca Ceresoli
2025-12-11  9:40     ` Kory Maincent
2025-12-11  9:47       ` Luca Ceresoli
2025-11-26 17:35 ` [PATCH 04/21] drm/tilcdc: Add support for DRM bus flags and simplify panel config Kory Maincent (TI.com)
2025-12-10 18:13   ` Luca Ceresoli
2025-11-26 17:35 ` [PATCH 05/21] ARM: dts: omap: Bind panel to panel-dpi instead of ti,tilcdc,panel driver Kory Maincent (TI.com)
2025-12-01 14:13   ` Tomi Valkeinen
2025-12-01 21:46     ` Krzysztof Kozlowski
2025-12-02  9:42       ` Kory Maincent
2025-12-02 10:28         ` Krzysztof Kozlowski
2025-12-02 10:44           ` Kory Maincent
2025-12-02 10:47             ` Krzysztof Kozlowski
2025-12-02 11:18               ` Kory Maincent
2025-12-02 11:51                 ` Tomi Valkeinen
2025-12-02 12:20                   ` Krzysztof Kozlowski
2025-12-02 12:56                   ` Kory Maincent
2025-12-03  8:30                     ` Krzysztof Kozlowski
2025-12-02 12:19                 ` Krzysztof Kozlowski
2025-11-26 17:35 ` [PATCH 06/21] dt-bindings: display: tilcdc: Remove panel binding Kory Maincent (TI.com)
2025-11-26 17:35 ` [PATCH 07/21] drm/tilcdc: Remove tilcdc panel driver Kory Maincent (TI.com)
2025-11-26 17:35 ` [PATCH 08/21] drm/tilcdc: Remove component framework support Kory Maincent (TI.com)
2025-12-11  9:42   ` Luca Ceresoli
2025-11-26 17:35 ` [PATCH 09/21] drm/tilcdc: Remove tilcdc_panel_info structure Kory Maincent (TI.com)
2025-12-11  9:44   ` Luca Ceresoli
2025-11-26 17:35 ` [PATCH 10/21] drm/tilcdc: Remove redundant #endif/#ifdef in debugfs code Kory Maincent (TI.com)
2025-12-10 18:22   ` Luca Ceresoli
2025-11-26 17:35 ` [PATCH 11/21] drm/tilcdc: Remove unused encoder and connector tracking arrays Kory Maincent (TI.com)
2025-11-26 17:35 ` [PATCH 12/21] drm/tilcdc: Rename external_encoder and external_connector to encoder and connector Kory Maincent (TI.com)
2025-11-26 17:35 ` [PATCH 13/21] drm/tilcdc: Rename tilcdc_external to tilcdc_encoder Kory Maincent (TI.com)
2025-11-26 17:35 ` [PATCH 14/21] drm/tilcdc: Remove the useless module list support Kory Maincent (TI.com)
2025-11-26 17:35 ` [PATCH 15/21] drm/tilcdc: Modernize driver initialization and cleanup paths Kory Maincent (TI.com)
2025-11-26 17:35 ` [PATCH 16/21] drm/tilcdc: Remove the use of drm_device private_data Kory Maincent (TI.com)
2025-11-26 17:35 ` [PATCH 17/21] drm/bridge: tda998x: Remove component support Kory Maincent (TI.com)
2025-11-26 17:36 ` [PATCH 18/21] drm/bridge: tda998x: Move tda998x_create/destroy into probe and remove Kory Maincent (TI.com)
2025-11-26 17:36 ` [PATCH 19/21] drm/bridge: tda998x: Remove useless tda998x_connector_destroy wrapper Kory Maincent (TI.com)
2025-11-26 17:36 ` [PATCH 20/21] drm/bridge: tda998x: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR Kory Maincent (TI.com)
2025-11-26 17:36 ` [PATCH 21/21] drm/tilcdc: " Kory Maincent (TI.com)
2025-12-02 12:25 ` [PATCH 00/21] Clean and update tilcdc driver to support DRM_BRIDGE_ATTACH_NO_CONNECTOR Swamil Jain
2025-12-03 10:49   ` Kory Maincent
2025-12-03 12:13     ` Swamil Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).