Skip to contentSkip to conversation

Driver for pre-DCP apple display controller.

PATCH Superseded Sasha Finkelstein 6 participants 19 messages Nov 26, 2024 – Jan 12, 2025

Subsystems (6)

v2 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v2 cover Driver for pre-DCP apple display controller.

Hi.

This patch series adds support for a secondary display controller present on Apple M1/M2 chips and used to drive the display of the "touchbar" touch panel present on those.

---
Changes in v2:
- Addressing the review feedback.
- Split out the mipi part of the display controller into a separate device
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Sasha Finkelstein (5):
dt-bindings: display: Add Apple pre-DCP display controller bindings
drm: adp: Add Apple Display Pipe driver
drm: panel: Add a panel driver for the Summit display
arm64: dts: apple: Add touchbar screen nodes
MAINTAINERS: Add entries for touchbar display driver

 .../display/apple,h7-display-pipe-mipi.yaml        |  89 +++
 .../bindings/display/apple,h7-display-pipe.yaml    |  77 +++
 .../bindings/display/panel/apple,summit.yaml       |  58 ++
 MAINTAINERS                                        |   5 +
 arch/arm64/boot/dts/apple/t8103-j293.dts           |  31 ++
 arch/arm64/boot/dts/apple/t8103.dtsi               |  61 +++
 arch/arm64/boot/dts/apple/t8112-j493.dts           |  31 ++
 arch/arm64/boot/dts/apple/t8112.dtsi               |  62 +++
 drivers/gpu/drm/Kconfig                            |   2 +
 drivers/gpu/drm/Makefile                           |   1 +
 drivers/gpu/drm/adp/Kconfig                        |  16 +
 drivers/gpu/drm/adp/Makefile                       |   4 +
 drivers/gpu/drm/adp/adp-mipi.c                     | 251 +++++++++
 drivers/gpu/drm/adp/adp_drv.c                      | 594 +++++++++++++++++++++
 drivers/gpu/drm/panel/Kconfig                      |   9 +
 drivers/gpu/drm/panel/Makefile                     |   1 +
 drivers/gpu/drm/panel/panel-summit.c               | 143 +++++
 17 files changed, 1435 insertions(+)

---
base-commit: 9f16d5e6f220661f73b36a4be1b21575651d8833
change-id: 20241124-adpdrm-25fce3dd8a71

#1 lore raw

PATCH v2 1/5 dt-bindings: display: Add Apple pre-DCP display controller bindings

Add bindings for a secondary display controller present on certain Apple laptops.

---
 .../display/apple,h7-display-pipe-mipi.yaml        | 89 ++++++++++++++++++++++
 .../bindings/display/apple,h7-display-pipe.yaml    | 77 +++++++++++++++++++
 .../bindings/display/panel/apple,summit.yaml       | 58 ++++++++++++++
 3 files changed, 224 insertions(+)
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +89 -0
new file mode 100644
index 0000000000000000000000000000000000000000..2cf2f50e9fc7329a5b424d5ddf8c34cad2ebb6be
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/apple,h7-display-pipe-mipi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Apple pre-DCP display controller MIPI interface.
+
+maintainers:
+  - [email protected]
+  - Sasha Finkelstein <[email protected]>
+
+description:
+  The MIPI controller part of the pre-DCP Apple display controller
+
+allOf:
+  - $ref: dsi-controller.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,t8112-display-pipe-mipi
+          - apple,t8103-display-pipe-mipi
+      - const: apple,h7-display-pipe-mipi
+
+  reg:
+    maxItems: 1
+
+  reg-names:
+    const: mipi
+
+  power-domains:
+    maxItems: 1
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/properties/port
+
+      port@1:
+        $ref: /schemas/graph.yaml#/properties/port
+
+    required:
+      - port@0
+      - port@1
+
+  '#address-cells': true
+
+  '#size-cells': true
+
+patternProperties:
+  "^panel@[0-3]$": true
+
+required:
+  - compatible
+  - reg
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    display_dfr: dsi@228200000 {
+    	compatible = "apple,t8103-display-pipe-mipi", "apple,h7-display-pipe-mipi";
+    	reg-names = "mipi";
+    	reg = <0x28200000 0xc000>;
+    	power-domains = <&ps_dispdfr_mipi>;
+
+    	ports {
+    		#address-cells = <1>;
+    		#size-cells = <0>;
+
+    		dfr_mipi_in: port@0 {
+    			#address-cells = <1>;
+    			#size-cells = <0>;
+    			reg = <0>;
+    		};
+
+    		dfr_mipi_out: port@1 {
+    			#address-cells = <1>;
+    			#size-cells = <0>;
+    			reg = <1>;
+    		};
+    	};
+    };
+...
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +77 -0

77 lines not on this page · raw message

Documentation/devicetree/bindings/display/panel/apple,summit.yaml new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
2.47.1
#9 lore raw

PATCH v2 2/5 drm: adp: Add Apple Display Pipe driver

In reply to Sasha Finkelstein

This display controller is present on M-series chips and is used to drive the touchbar display.

---
 drivers/gpu/drm/Kconfig        |   2 +
 drivers/gpu/drm/Makefile       |   1 +
 drivers/gpu/drm/adp/Kconfig    |  16 ++
 drivers/gpu/drm/adp/Makefile   |   4 +
 drivers/gpu/drm/adp/adp-mipi.c | 251 +++++++++++++++++
 drivers/gpu/drm/adp/adp_drv.c  | 594 +++++++++++++++++++++++++++++++++++++++++
 6 files changed, 868 insertions(+)
drivers/gpu/drm/Kconfig +2 -0
index 5504721007cc190e7d768d42aa9633baa0115f5e..acd1111f1773ef044c306c62ad9f850996259ef1 100644
@@ -499,6 +499,8 @@ source "drivers/gpu/drm/mcde/Kconfig"
 
 source "drivers/gpu/drm/tidss/Kconfig"
 
+source "drivers/gpu/drm/adp/Kconfig"
+
 source "drivers/gpu/drm/xlnx/Kconfig"
 
 source "drivers/gpu/drm/gud/Kconfig"
drivers/gpu/drm/Makefile +1 -0
index 463afad1b5ca6275e61223adc8ca036c3d4d6b03..acd8d8943ef2bf85c80db7c218c59a7ec2df56da 100644
@@ -213,6 +213,7 @@ obj-y			+= mxsfb/
 obj-y			+= tiny/
 obj-$(CONFIG_DRM_PL111) += pl111/
 obj-$(CONFIG_DRM_TVE200) += tve200/
+obj-$(CONFIG_DRM_ADP) += adp/
 obj-$(CONFIG_DRM_XEN) += xen/
 obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
 obj-$(CONFIG_DRM_LIMA)  += lima/
drivers/gpu/drm/adp/Kconfig new file +16 -0
new file mode 100644
index 0000000000000000000000000000000000000000..7e70b2e26555a2c2ddf71350bce74c97dfe292da
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0-only OR MIT
+config DRM_ADP
+	tristate "DRM Support for pre-DCP Apple display controllers"
+	depends on DRM && OF && ARM64
+	depends on ARCH_APPLE || COMPILE_TEST
+	select DRM_KMS_HELPER
+	select DRM_BRIDGE_CONNECTOR
+	select DRM_DISPLAY_HELPER
+	select DRM_KMS_DMA_HELPER
+	select DRM_GEM_DMA_HELPER
+	select VIDEOMODE_HELPERS
+	select DRM_MIPI_DSI
+	help
+	  Chose this option if you have an Apple Arm laptop with a touchbar.
+
+	  If M is selected, this module will be called adpdrm.
drivers/gpu/drm/adp/Makefile new file +4 -0
new file mode 100644
index 0000000000000000000000000000000000000000..7531fddfe6706ace716b288739e420379d98a8cc
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only OR MIT
+
+adpdrm-y := adp_drv.o adp-mipi.o
+obj-$(CONFIG_DRM_ADP) += adpdrm.o
drivers/gpu/drm/adp/adp-mipi.c new file +251 -0

251 lines not on this page · raw message

drivers/gpu/drm/adp/adp_drv.c new file +594 -0

594 lines not on this page · raw message

Signature · 1 line
2.47.1
#11 lore raw

PATCH v2 3/5 drm: panel: Add a panel driver for the Summit display

In reply to Sasha Finkelstein

This is the display panel used for the touchbar on laptops that have it.

---
 drivers/gpu/drm/panel/Kconfig        |   9 +++
 drivers/gpu/drm/panel/Makefile       |   1 +
 drivers/gpu/drm/panel/panel-summit.c | 143 +++++++++++++++++++++++++++++++++++
 3 files changed, 153 insertions(+)
drivers/gpu/drm/panel/Kconfig +9 -0
index d7469c565d1db8b8e974dd6c45d03d9352d99d63..5085a82e4bc695e85cabbc3200859bbe10cb0f91 100644
@@ -925,6 +925,15 @@ config DRM_PANEL_SIMPLE
 	  that it can be automatically turned off when the panel goes into a
 	  low power state.
 
+config DRM_PANEL_SUMMIT
+	tristate "Apple Summit display panel"
+	depends on OF
+	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
+	help
+	  Say Y if you want to enable support for the "Summit" display panel
+	  used as a touchbar on certain Apple laptops.
+
 config DRM_PANEL_SYNAPTICS_R63353
 	tristate "Synaptics R63353-based panels"
 	depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
index 7dcf72646cacff11bab90c78e3b8b1f357e5f14a..10ac2e850f5cd6d6546439de75483466e4015d1a 100644
@@ -89,6 +89,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LS060T1SX01) += panel-sharp-ls060t1sx01.o
 obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o
 obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o
 obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o
+obj-$(CONFIG_DRM_PANEL_SUMMIT) += panel-summit.o
 obj-$(CONFIG_DRM_PANEL_SYNAPTICS_R63353) += panel-synaptics-r63353.o
 obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o
 obj-$(CONFIG_DRM_PANEL_SONY_TD4353_JDI) += panel-sony-td4353-jdi.o
drivers/gpu/drm/panel/panel-summit.c new file +143 -0

143 lines not on this page · raw message

Signature · 1 line
2.47.1
#16 lore raw

PATCH v2 4/5 arm64: dts: apple: Add touchbar screen nodes

In reply to Sasha Finkelstein

Adds device tree entries for the touchbar screen

---
 arch/arm64/boot/dts/apple/t8103-j293.dts | 31 ++++++++++++++++
 arch/arm64/boot/dts/apple/t8103.dtsi     | 61 +++++++++++++++++++++++++++++++
 arch/arm64/boot/dts/apple/t8112-j493.dts | 31 ++++++++++++++++
 arch/arm64/boot/dts/apple/t8112.dtsi     | 62 ++++++++++++++++++++++++++++++++
 4 files changed, 185 insertions(+)
arch/arm64/boot/dts/apple/t8103-j293.dts +31 -0
index 56b0c67bfcda321b60c621de092643017693ff91..3af8536da779b56bf856cf40befd74d4737baa8f 100644
@@ -49,3 +49,34 @@ &i2c4 {
 &fpwm1 {
 	status = "okay";
 };
+
+&display_dfr {
+	status = "okay";
+};
+
+&dfr_mipi_out {
+	dfr_mipi_out_panel: endpoint@0 {
+		reg = <0>;
+		remote-endpoint = <&dfr_panel_in>;
+	};
+};
+
+&displaydfr_mipi {
+	status = "okay";
+
+	dfr_panel: panel@0 {
+		compatible = "apple,j293-summit", "apple,summit";
+		reg = <0>;
+		max-brightness = <255>;
+
+		port {
+			dfr_panel_in: endpoint {
+				remote-endpoint = <&dfr_mipi_out_panel>;
+			};
+		};
+	};
+};
+
+&displaydfr_dart {
+	status = "okay";
+};
arch/arm64/boot/dts/apple/t8103.dtsi +61 -0

67 lines not on this page · raw message

arch/arm64/boot/dts/apple/t8112-j493.dts +31 -0
index 0ad908349f55406783942735a2e9dad54cda00ec..372fe69a96f6b84f576221101a4127d68bb54691 100644
@@ -35,6 +35,37 @@ led-0 {
 	};
 };
 
+&display_dfr {
+	status = "okay";
+};
+
+&dfr_mipi_out {
+	dfr_mipi_out_panel: endpoint@0 {
+		reg = <0>;
+		remote-endpoint = <&dfr_panel_in>;
+	};
+};
+
+&displaydfr_mipi {
+	status = "okay";
+
+	dfr_panel: panel@0 {
+		compatible = "apple,j493-summit", "apple,summit";
+		reg = <0>;
+		max-brightness = <255>;
+
+		port {
+			dfr_panel_in: endpoint {
+				remote-endpoint = <&dfr_mipi_out_panel>;
+			};
+		};
+	};
+};
+
+&displaydfr_dart {
+	status = "okay";
+};
+
 /*
  * Force the bus number assignments so that we can declare some of the
  * on-board devices and properties that are populated by the bootloader
arch/arm64/boot/dts/apple/t8112.dtsi +62 -0

68 lines not on this page · raw message

Signature · 1 line
2.47.1
#18 lore raw

PATCH v2 5/5 MAINTAINERS: Add entries for touchbar display driver

In reply to Sasha Finkelstein

From: Sasha Finkelstein <[email protected]>

Add the MAINTAINERS entries for the driver

---
 MAINTAINERS | 5 +++++
 1 file changed, 5 insertions(+)
MAINTAINERS +5 -0
index e7f0170977013889ca7c39b17727ba36d32e92dc..9a2fb7cd80e09f24932b91cd33d0cd2b3514b31c 100644
@@ -2164,6 +2164,9 @@ F:	Documentation/devicetree/bindings/arm/apple.yaml
 F:	Documentation/devicetree/bindings/arm/apple/*
 F:	Documentation/devicetree/bindings/clock/apple,nco.yaml
 F:	Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml
+F:	Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml
+F:	Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml
+F:	Documentation/devicetree/bindings/display/panel/apple,summit.yaml
 F:	Documentation/devicetree/bindings/dma/apple,admac.yaml
 F:	Documentation/devicetree/bindings/i2c/apple,i2c.yaml
 F:	Documentation/devicetree/bindings/interrupt-controller/apple,*
@@ -2183,6 +2186,8 @@ F:	drivers/bluetooth/hci_bcm4377.c
 F:	drivers/clk/clk-apple-nco.c
 F:	drivers/cpufreq/apple-soc-cpufreq.c
 F:	drivers/dma/apple-admac.c
+F:	drivers/gpu/drm/adp/
+F:	drivers/gpu/drm/panel/panel-summit.c
 F:	drivers/pmdomain/apple/
 F:	drivers/i2c/busses/i2c-pasemi-core.c
 F:	drivers/i2c/busses/i2c-pasemi-platform.c
Signature · 1 line
2.47.1
#2 lore raw

Re: [PATCH v2 1/5] dt-bindings: display: Add Apple pre-DCP display controller bindings

In reply to Sasha Finkelstein
Quoted 5 lines · On 26/11/2024 17:34, Sasha Finkelstein via B4 Relay wrote:

From: Sasha Finkelstein <[email protected]>

Add bindings for a secondary display controller present on certain Apple laptops.

A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings. See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18

Quoted 13 lines
---
 .../display/apple,h7-display-pipe-mipi.yaml        | 89 ++++++++++++++++++++++
 .../bindings/display/apple,h7-display-pipe.yaml    | 77 +++++++++++++++++++
 .../bindings/display/panel/apple,summit.yaml       | 58 ++++++++++++++
 3 files changed, 224 insertions(+)
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..2cf2f50e9fc7329a5b424d5ddf8c34cad2ebb6be

Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml line 7

Quoted 7 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +7 -0
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/apple,h7-display-pipe-mipi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Apple pre-DCP display controller MIPI interface.

Drop final stop, that's a title so it could be capitalized, but anyway it is not a sentence

Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml line 10

Quoted 3 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +3 -0
+
+maintainers:
+  - [email protected]

Drop, maintainer boxes are not allowed for bindings.

Quoted 28 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +28 -0
+  - Sasha Finkelstein <[email protected]>
+
+description:
+  The MIPI controller part of the pre-DCP Apple display controller
+
+allOf:
+  - $ref: dsi-controller.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,t8112-display-pipe-mipi
+          - apple,t8103-display-pipe-mipi
+      - const: apple,h7-display-pipe-mipi
+
+  reg:
+    maxItems: 1
+
+  reg-names:
+    const: mipi
+
+  power-domains:
+    maxItems: 1
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+

Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml line 48

Quoted 10 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +10 -0
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/properties/port
+
+      port@1:
+        $ref: /schemas/graph.yaml#/properties/port
+
+    required:
+      - port@0
+      - port@1

Please take a look how other bindings define ports. You miss here several items and more important - description what are these ports for.

Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml line 55

Quoted 7 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +7 -0
+
+  '#address-cells': true
+
+  '#size-cells': true
+
+patternProperties:
+  "^panel@[0-3]$": true

These look unusual. Is this a DSI controller? If so, then reference dsi-controller. See other bindings how this is done.

Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml line 66

Quoted 11 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +11 -0
+
+required:
+  - compatible
+  - reg
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    display_dfr: dsi@228200000 {

Drop unused label

Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml line 69

Quoted 3 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +3 -0
+    	compatible = "apple,t8103-display-pipe-mipi", "apple,h7-display-pipe-mipi";
+    	reg-names = "mipi";
+    	reg = <0x28200000 0xc000>;

Order fields according to DTS coding style.

Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml line 73

Quoted 4 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +4 -0
+    	power-domains = <&ps_dispdfr_mipi>;
+
+    	ports {
+    		#address-cells = <1>;

Messed indentation. Use 4 spaces for example indentation.

Quoted 26 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +16 -0
+    		#size-cells = <0>;
+
+    		dfr_mipi_in: port@0 {
+    			#address-cells = <1>;
+    			#size-cells = <0>;
+    			reg = <0>;
+    		};
+
+    		dfr_mipi_out: port@1 {
+    			#address-cells = <1>;
+    			#size-cells = <0>;
+    			reg = <1>;
+    		};
+    	};
+    };
+...
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +4 -0
new file mode 100644
index 0000000000000000000000000000000000000000..98982da9c5f672167d67e4cd3b47e1fbdafc9510
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/apple,h7-display-pipe.yaml#

Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml line 14

Quoted 10 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +10 -0
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Apple pre-DCP display controller.
+
+maintainers:
+  - [email protected]
+  - Sasha Finkelstein <[email protected]>
+
+description:
+  A secondary display controller used to drive the "touchbar" on certain Apple laptops.

Please wrap code according to coding style (checkpatch is not a coding style description, but only a tool).

Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml line 25

Quoted 11 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +11 -0
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,t8112-display-pipe
+          - apple,t8103-display-pipe
+      - const: apple,h7-display-pipe
+
+  reg:
+    maxItems: 2

List and describe the items instead, because be and fe are a bit cryptic.

Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml line 33

Quoted 8 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +8 -0
+
+  reg-names:
+    items:
+      - const: be
+      - const: fe
+
+  power-domains:
+    maxItems: 2

Need to list the items instead.

Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml line 36

Quoted 3 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +3 -0
+
+  interrupts:
+    maxItems: 2

Ditto

Quoted 14 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +14 -0
+
+  interrupt-names:
+    items:
+      - const: be
+      - const: fe
+
+  iommus:
+    maxItems: 1
+
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+
+required:
+  - compatible

Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml line 60

Quoted 10 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +10 -0
+  - reg
+  - interrupts
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/apple-aic.h>
+    display_dfr: display-pipe@228200000 {

Drop unused label.

Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml line 64

Quoted 4 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +4 -0
+    	compatible = "apple,t8103-display-pipe", "apple,h7-display-pipe";
+    	reg-names = "be", "fe";
+    	reg = <0x28200000 0xc000>,
+    		<0x28400000 0x4000>;

Messed alignment, in other places as well.

Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml line 72

Quoted 8 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +8 -0
+    	power-domains = <&ps_dispdfr_fe>, <&ps_dispdfr_be>;
+    	interrupt-parent = <&aic>;
+    	interrupts = <AIC_IRQ 502 IRQ_TYPE_LEVEL_HIGH>,
+    		<AIC_IRQ 506 IRQ_TYPE_LEVEL_HIGH>;
+    	interrupt-names = "be", "fe";
+    	iommus = <&displaydfr_dart 0>;
+    	port {
+    		dfr_adp_out_mipi: endpoint {

Messed indentation.

Quoted 24 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +5 -0
+    			remote-endpoint = <&dfr_mipi_in_adp>;
+    		};
+    	};
+    };
+...
Documentation/devicetree/bindings/display/panel/apple,summit.yaml new file +13 -0
new file mode 100644
index 0000000000000000000000000000000000000000..db14f7af3787076c84ccdda08fedeb8912d5514d
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/apple,summit.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Apple "Summit" display panel.
+
+maintainers:
+  - [email protected]
+  - Sasha Finkelstein <[email protected]>
+
+allOf:

Documentation/devicetree/bindings/display/panel/apple,summit.yaml line 23

Quoted 10 lines
Documentation/devicetree/bindings/display/panel/apple,summit.yaml new file +10 -0
+  - $ref: panel-common.yaml#
+  - $ref: /schemas/leds/backlight/common.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,j293-summit
+          - apple,j493-summit
+      - const: apple,summit

Summit tells me nothing - no description, title repeats it, so I suggest using device specific compatible.

Documentation/devicetree/bindings/display/panel/apple,summit.yaml line 30

Quoted 7 lines
Documentation/devicetree/bindings/display/panel/apple,summit.yaml new file +7 -0
+
+  reg:
+    maxItems: 1
+
+  max-brightness: true
+
+  port: true

No, these cannot be true without definition. Again, please open existing bindings and use them as example. You probably miss here some reference, but max-brightness for panel is a bit confusing. I asked already and did not get answer: isn't this backlight property? What is this device - backlight or panel? If panel, then what bus?

Best regards,
Krzysztof

#17 lore raw

Re: [PATCH v2 4/5] arm64: dts: apple: Add touchbar screen nodes

In reply to Sasha Finkelstein
Quoted 8 lines · On 26/11/2024 17:34, Sasha Finkelstein via B4 Relay wrote:

/*
* Force the bus number assignments so that we can declare some of the
* on-board devices and properties that are populated by the bootloader

arch/arm64/boot/dts/apple/t8112.dtsi +0 -0
index 1666e6ab250bc0be9b8318e3c8fc903ccd3f3760..b8d2d22ab81adfb7642ea362c6a6af4c04a9bf9d 100644

arch/arm64/boot/dts/apple/t8112.dtsi cpufreq_p: cpufreq@211e20000 { · line 386

Quoted 8 lines
arch/arm64/boot/dts/apple/t8112.dtsi +5 -0
@@ -379,6 +379,68 @@ cpufreq_p: cpufreq@211e20000 {
 			#performance-domain-cells = <0>;
 		};
 
+		display_dfr: display-pipe@228200000 {
+			compatible = "apple,t8112-display-pipe", "apple,h7-display-pipe";
+			reg-names = "be", "fe";
+			reg = <0x2 0x28200000 0x0 0xc000>,
+				<0x2 0x28400000 0x0 0x4000>;

Please follow DTS coding style in respect of order of properties and indentation/alignment.

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH v2 1/5] dt-bindings: display: Add Apple pre-DCP display controller bindings

In reply to Krzysztof Kozlowski
Quoted 14 lines · Krzysztof Kozlowski

Documentation/devicetree/bindings/display/panel/apple,summit.yaml line 30

Quoted 8 lines
Documentation/devicetree/bindings/display/panel/apple,summit.yaml new file +7 -0
+
+  reg:
+    maxItems: 1
+
+  max-brightness: true
+
+  port: true

No, these cannot be true without definition. Again, please open existing bindings and use them as example. You probably miss here some reference, but max-brightness for panel is a bit confusing. I asked already and did not get answer: isn't this backlight property? What is this device - backlight or panel? If panel, then what bus?

You responded to my comment in exactly the same moment you sent this patchset which gives me around 0 seconds to reply to your comment.

Give reviewers some time if you disagree with them, otherwise I find wrong sending next version immediately.

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH v2 1/5] dt-bindings: display: Add Apple pre-DCP display controller bindings

In reply to Krzysztof Kozlowski
Quoted 2 lines · Krzysztof Kozlowski
Quoted 2 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +2 -0
+allOf:
+  - $ref: dsi-controller.yaml#

...

Quoted 5 lines

Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml line 55

Quoted 2 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +2 -0
+patternProperties:
+  "^panel@[0-3]$": true

These look unusual. Is this a DSI controller? If so, then reference dsi-controller. See other bindings how this is done.

This is a DSI controller, as referenced above. Those properties are from dsi-controller.yaml

Quoted 10 lines

Documentation/devicetree/bindings/display/panel/apple,summit.yaml line 23

Quoted 7 lines
Documentation/devicetree/bindings/display/panel/apple,summit.yaml new file +7 -0
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,j293-summit
+          - apple,j493-summit
+      - const: apple,summit

Summit tells me nothing - no description, title repeats it, so I suggest using device specific compatible.

The j293/j493 are the device-specific compatibles, those are chassis names for the specific laptops the panel is present in.

Quoted 5 lines

No, these cannot be true without definition. Again, please open existing bindings and use them as example. You probably miss here some reference, but max-brightness for panel is a bit confusing. I asked already and did not get answer: isn't this backlight property? What is this device - backlight or panel? If panel, then what bus?

Per my response on previous version, it's both, kind of. This is a self-emissive panel on
a mipi-dsi bus, which can change brightness in response to mipi dcs backlight commands.

#5 lore raw

Re: [PATCH v2 1/5] dt-bindings: display: Add Apple pre-DCP display controller bindings

Quoted 4 lines · Sasha Finkelstein
Quoted 2 lines · Krzysztof Kozlowski
Quoted 2 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +2 -0
+allOf:
+  - $ref: dsi-controller.yaml#

...

Quoted 8 lines
Quoted 5 lines

Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml line 55

Quoted 2 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +2 -0
+patternProperties:
+  "^panel@[0-3]$": true

These look unusual. Is this a DSI controller? If so, then reference dsi-controller. See other bindings how this is done.

This is a DSI controller, as referenced above. Those properties are from dsi-controller.yaml

Ahh, indeed, I missed that and focused on the additionalProperties. Instead use unevaluatedProperties: false and drop all properties already in dsi-controller.yaml.

Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Documentation/devicetree/bindings/display/panel/apple,summit.yaml new file +7 -0
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,j293-summit
+          - apple,j493-summit
+      - const: apple,summit
Quoted 5 lines
Quoted 2 lines

Summit tells me nothing - no description, title repeats it, so I suggest using device specific compatible.

The j293/j493 are the device-specific compatibles, those are chassis names for the specific laptops the panel is present in.

This does not address my comment. Use specific compatibles as fallback, just like we recommend for every device. This should not be different. If you do not know the hardware details, using generic is even less appropriate.

Quoted 10 lines
Quoted 7 lines

No, these cannot be true without definition. Again, please open existing bindings and use them as example. You probably miss here some reference, but max-brightness for panel is a bit confusing. I asked already and did not get answer: isn't this backlight property? What is this device - backlight or panel? If panel, then what bus?

Per my response on previous version, it's both, kind of. This is a self-emissive panel on

I see, I think I again totally missed that you have there references to backlight, so binding is in general fine. Describe the hardware in description field (see commit for mentioned Samsung panel).

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH v2 1/5] dt-bindings: display: Add Apple pre-DCP display controller bindings

Quoted 13 lines · Krzysztof Kozlowski
Quoted 12 lines · Sasha Finkelstein
Quoted 10 lines · Krzysztof Kozlowski

Documentation/devicetree/bindings/display/panel/apple,summit.yaml line 23

Quoted 7 lines
Documentation/devicetree/bindings/display/panel/apple,summit.yaml new file +7 -0
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,j293-summit
+          - apple,j493-summit
+      - const: apple,summit

Summit tells me nothing - no description, title repeats it, so I suggest using device specific compatible.

Quoted 7 lines
Quoted 2 lines

The j293/j493 are the device-specific compatibles, those are chassis names for the specific laptops the panel is present in.

This does not address my comment. Use specific compatibles as fallback, just like we recommend for every device. This should not be different. If you do not know the hardware details, using generic is even less appropriate.

The panel is codenamed "summit", and that tells you everything. It's a panel sold and marketed by Apple. It is used on two devices, which are specifically referred to as the device names "j293" and "j493". There is no further information to be added here, the names chosen already contain 100% of the available information and are completely and fully specific as to what devices are involved here. There is no more specific or appropriate compatible possible. "summit" literally comes from Apple's own device tree compatible in the macOS world, which is "lcd,summit". If Apple uses it as a DT compatible, then it's a good bet it is precisely what it needs to be to identify a device. The chassis-specific versions are something we added on top of that and likely aren't even necessary since it's almost certainly precisely the same exact panel in both laptops, but as you know, it's best to be specific with DT compatibles just in case.

There is plenty of prior art for compatibles that don't look like random product code gobbledygook (which I think is what you were expecting?), e.g. these panels:

ti,nspire-cx-lcd-panel
ste,mcde-dsi
raspberrypi,7inch-touchscreen-panel
olimex,lcd-olinuxino
focaltech,gpt3

So yeah, the correct compatible is in fact "apple,summit". Anything else would be making things up for no reason. The vendor has chosen to call this panel "summit", so "summit" it is. We're not in the business of gratuitously assigning our own product names/codes when a suitable one already exists here.

- Hector

#8 lore raw

Re: [PATCH v2 1/5] dt-bindings: display: Add Apple pre-DCP display controller bindings

In reply to Sasha Finkelstein

On 27/11/2024 00:34, Sasha Finkelstein via B4 Relay wrote:

[...]

Quoted 5 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..2cf2f50e9fc7329a5b424d5ddf8c34cad2ebb6be

[...]

Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml line 32

Quoted 7 lines
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +7 -0
+
+  reg:
+    maxItems: 1
+
+  reg-names:
+    const: mipi
+

Drop. Not needed as there is only one reg now.

[...]

Nick Chan

#7 lore raw

Re: [PATCH v2 1/5] dt-bindings: display: Add Apple pre-DCP display controller bindings

In reply to Krzysztof Kozlowski
Quoted 2 lines · Krzysztof Kozlowski

Please take a look how other bindings define ports. You miss here several items and more important - description what are these ports for.

Aside from missing descriptions, this definition is copied almost verbatim from snps,dw-mipi-dsi.
Ack on the rest of the comments, those and the descriptions will be fixed for v3.

#10 lore raw

Re: [PATCH v2 2/5] drm: adp: Add Apple Display Pipe driver

In reply to Sasha Finkelstein
Quoted 1 line · On Tue, Nov 26, 2024 at 05:34:21PM +0100, Sasha Finkelstein via B4 Relay wrote:

+module_platform_driver(adp_mipi_platform_driver);

This is part of the same driver as adp_drv.c, so I don't think there's supposed to be another module_platform_driver() call here?

/nix/store/hni09p7jhc8szjr2h5j5m0lhi2x0djjg-binutils-2.43.1/bin/ld: drivers/gpu/drm/adp/adp-mipi.o: in function `adp_mipi_platform_driver_init':
adp-mipi.c:(.init.text+0x0): multiple definition of `init_module'; drivers/gpu/drm/adp/adp_drv.o:adp_drv.c:(.init.text+0x0): first defined here /nix/store/hni09p7jhc8szjr2h5j5m0lhi2x0djjg-binutils-2.43.1/bin/ld: drivers/gpu/drm/adp/adp-mipi.o: in function `adp_mipi_platform_driver_exit':
adp-mipi.c:(.exit.text+0x0): multiple definition of `cleanup_module'; drivers/gpu/drm/adp/adp_drv.o:adp_drv.c:(.exit.text+0x0): first defined here

BTW: would have been nice to have been CCed, given I provided feedback on the previous version of this patch.

#12 lore raw

Re: [PATCH v2 3/5] drm: panel: Add a panel driver for the Summit display

In reply to Sasha Finkelstein
Quoted 64 lines · On Tue, Nov 26, 2024 at 05:34:22PM +0100, Sasha Finkelstein via B4 Relay wrote:

From: Sasha Finkelstein <[email protected]>

This is the display panel used for the touchbar on laptops that have it.

---
 drivers/gpu/drm/panel/Kconfig        |   9 +++
 drivers/gpu/drm/panel/Makefile       |   1 +
 drivers/gpu/drm/panel/panel-summit.c | 143 +++++++++++++++++++++++++++++++++++
 3 files changed, 153 insertions(+)
drivers/gpu/drm/panel/Kconfig +9 -0
index d7469c565d1db8b8e974dd6c45d03d9352d99d63..5085a82e4bc695e85cabbc3200859bbe10cb0f91 100644
@@ -925,6 +925,15 @@ config DRM_PANEL_SIMPLE
 	  that it can be automatically turned off when the panel goes into a
 	  low power state.
 
+config DRM_PANEL_SUMMIT
+	tristate "Apple Summit display panel"
+	depends on OF
+	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
+	help
+	  Say Y if you want to enable support for the "Summit" display panel
+	  used as a touchbar on certain Apple laptops.
+
 config DRM_PANEL_SYNAPTICS_R63353
 	tristate "Synaptics R63353-based panels"
 	depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
index 7dcf72646cacff11bab90c78e3b8b1f357e5f14a..10ac2e850f5cd6d6546439de75483466e4015d1a 100644
@@ -89,6 +89,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LS060T1SX01) += panel-sharp-ls060t1sx01.o
 obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o
 obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o
 obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o
+obj-$(CONFIG_DRM_PANEL_SUMMIT) += panel-summit.o
 obj-$(CONFIG_DRM_PANEL_SYNAPTICS_R63353) += panel-synaptics-r63353.o
 obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o
 obj-$(CONFIG_DRM_PANEL_SONY_TD4353_JDI) += panel-sony-td4353-jdi.o
drivers/gpu/drm/panel/panel-summit.c new file +13 -0
new file mode 100644
index 0000000000000000000000000000000000000000..16bd9fa1213d7bc3f022b878ea5cfeadbd468995
@@ -0,0 +1,143 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include <linux/backlight.h>
+#include <drm/drm_device.h>
+#include <drm/drm_mipi_dsi.h>
+#include <drm/drm_mode.h>
+#include <drm/drm_modes.h>
+#include <drm/drm_panel.h>
+#include <video/mipi_display.h>
+
+struct summit_data {
+	struct mipi_dsi_device *dsi;
+	struct backlight_device *bl;

drivers/gpu/drm/panel/panel-summit.c line 23

Quoted 10 lines
drivers/gpu/drm/panel/panel-summit.c new file +10 -0
+	struct drm_panel panel;
+};
+
+static int summit_set_brightness(struct device *dev)
+{
+	struct summit_data *s_data = dev_get_drvdata(dev);
+	int level = backlight_get_brightness(s_data->bl);
+
+	return mipi_dsi_dcs_set_display_brightness(s_data->dsi, level);
+}

Inline this function.

drivers/gpu/drm/panel/panel-summit.c line 33

Quoted 10 lines
drivers/gpu/drm/panel/panel-summit.c new file +10 -0
+
+static int summit_bl_update_status(struct backlight_device *dev)
+{
+	return summit_set_brightness(&dev->dev);
+}
+
+static int summit_bl_get_brightness(struct backlight_device *dev)
+{
+	return backlight_get_brightness(dev);
+}

Should not be necessary, please drop. Moreover backlight_get_brightness() uses blanking information to override brightness. As such it is not suitable for the .get_brightness() callback.

Quoted 68 lines
drivers/gpu/drm/panel/panel-summit.c new file +68 -0
+
+static const struct backlight_ops summit_bl_ops = {
+	.get_brightness = summit_bl_get_brightness,
+	.update_status	= summit_bl_update_status,
+};
+
+static int summit_get_modes(struct drm_panel *panel,
+			    struct drm_connector *connector)
+{
+	struct drm_display_mode *mode = drm_mode_create(connector->dev);
+
+	connector->display_info.non_desktop = true;
+	drm_object_property_set_value(&connector->base,
+				      connector->dev->mode_config.non_desktop_property,
+				      connector->display_info.non_desktop);
+
+	mode->vdisplay = 2008;
+	mode->hdisplay = 60;
+	mode->hsync_start = mode->hdisplay + 8;
+	mode->hsync_end = mode->hsync_start + 80;
+	mode->htotal = mode->hsync_end + 40;
+	mode->vsync_start = mode->vdisplay + 1;
+	mode->vsync_end = mode->vsync_start + 15;
+	mode->vtotal = mode->vsync_end + 6;
+	mode->clock = (mode->vtotal * mode->htotal * 60) / 1000;
+	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
+	mode->flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC;
+	drm_mode_set_name(mode);
+	drm_mode_probed_add(connector, mode);
+	return 1;
+}
+
+static const struct drm_panel_funcs summit_panel_funcs = {
+	.get_modes = summit_get_modes,
+};
+
+static int summit_probe(struct mipi_dsi_device *dsi)
+{
+	struct backlight_properties props = { 0 };
+	struct device *dev = &dsi->dev;
+	struct summit_data *s_data;
+	int ret;
+
+	s_data = devm_kzalloc(dev, sizeof(*s_data), GFP_KERNEL);
+	if (!s_data)
+		return -ENOMEM;
+
+	mipi_dsi_set_drvdata(dsi, s_data);
+	s_data->dsi = dsi;
+
+	ret = device_property_read_u32(dev, "max-brightness", &props.max_brightness);
+	if (ret)
+		return ret;
+	props.type = BACKLIGHT_RAW;
+
+	s_data->bl = devm_backlight_device_register(dev, dev_name(dev),
+						   dev, s_data, &summit_bl_ops, &props);
+	if (IS_ERR(s_data->bl))
+		return PTR_ERR(s_data->bl);
+
+	drm_panel_init(&s_data->panel, dev, &summit_panel_funcs,
+		       DRM_MODE_CONNECTOR_DSI);
+	drm_panel_add(&s_data->panel);
+
+	return mipi_dsi_attach(dsi);
+}
+
+static void summit_remove(struct mipi_dsi_device *dsi)

drivers/gpu/drm/panel/panel-summit.c line 111

Quoted 10 lines
drivers/gpu/drm/panel/panel-summit.c new file +10 -0
+{
+	struct summit_data *s_data = mipi_dsi_get_drvdata(dsi);
+
+	mipi_dsi_detach(dsi);
+	drm_panel_remove(&s_data->panel);
+}
+
+static int summit_resume(struct device *dev)
+{
+	return summit_set_brightness(dev);

Doesn't the generic code already handle that for you?

drivers/gpu/drm/panel/panel-summit.c line 118

Quoted 7 lines
drivers/gpu/drm/panel/panel-summit.c new file +7 -0
+}
+
+static int summit_suspend(struct device *dev)
+{
+	struct summit_data *s_data = dev_get_drvdata(dev);
+
+	return mipi_dsi_dcs_set_display_brightness(s_data->dsi, 0);

And here too.

Quoted 30 lines
drivers/gpu/drm/panel/panel-summit.c new file +25 -0
+}
+
+static DEFINE_SIMPLE_DEV_PM_OPS(summit_pm_ops, summit_suspend,
+				summit_resume);
+
+static const struct of_device_id summit_of_match[] = {
+	{ .compatible = "apple,summit" },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, summit_of_match);
+
+static struct mipi_dsi_driver summit_driver = {
+	.probe = summit_probe,
+	.remove = summit_remove,
+	.driver = {
+		.name = "panel-summit",
+		.of_match_table = summit_of_match,
+		.pm = pm_sleep_ptr(&summit_pm_ops),
+	},
+};
+module_mipi_dsi_driver(summit_driver);
+
+MODULE_DESCRIPTION("Summit Display Panel Driver");
+MODULE_LICENSE("GPL");
Signature · 2 lines
-- 
2.47.1
Signature · 2 lines
With best wishes
Dmitry
#13 lore raw

Re: [PATCH v2 3/5] drm: panel: Add a panel driver for the Summit display

Quoted 6 lines · Dmitry Baryshkov

drivers/gpu/drm/panel/panel-summit.c line 111

Quoted 4 lines
drivers/gpu/drm/panel/panel-summit.c new file +4 -0
+
+static int summit_resume(struct device *dev)
+{
+     return summit_set_brightness(dev);

Doesn't the generic code already handle that for you?

Apparently not, I have commented out the pm ops, entered sleep and the display stayed on.

#14 lore raw

Re: [PATCH v2 3/5] drm: panel: Add a panel driver for the Summit display

Quoted 11 lines · Sasha Finkelstein
Quoted 6 lines · Dmitry Baryshkov

drivers/gpu/drm/panel/panel-summit.c line 111

Quoted 4 lines
drivers/gpu/drm/panel/panel-summit.c new file +4 -0
+
+static int summit_resume(struct device *dev)
+{
+     return summit_set_brightness(dev);

Doesn't the generic code already handle that for you?

Apparently not, I have commented out the pm ops, entered sleep and the display stayed on.

Please add BL_CORE_SUSPENDRESUME option to the backlight device. But interestingly enough, none of the panels set that flag.

Signature · 2 lines
With best wishes
Dmitry
#15 lore raw

Re: [PATCH v2 3/5] drm: panel: Add a panel driver for the Summit display

Quoted 2 lines · Dmitry Baryshkov

Please add BL_CORE_SUSPENDRESUME option to the backlight device. But interestingly enough, none of the panels set that flag.

It appears that setting that option re-orders something in the resume process in such a way that the entire display locks up and becomes unusable until the machine is rebooted. I will be sending v3 without this change.