Skip to contentSkip to conversation

Driver for pre-DCP apple display controller.

PATCH Applied Sasha Finkelstein 7 participants 19 messages Feb 17, 2025 – Mar 5, 2025

Subsystems (6)

v7 of 8 Applied Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v7 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 v7:
- No changes aside from adding r-b trailers, effectively a resend.
- Link to v6: https://lore.kernel.org/r/[email protected]

Changes in v6:
- Use the drm_connector_helper_get_modes_fixed helper.
- Split out into a separate MAINTAINERS entry
- Link to v5: https://lore.kernel.org/r/[email protected]

Changes in v5:
- Moved to using the component framework.
- Other lifetime fixes
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Fixed dt bindings.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Fixed building as module after splitting out mipi block
- Addressing the review feedback.
- Link to v2: https://lore.kernel.org/r/[email protected]

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
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        |  83 +++
 .../bindings/display/apple,h7-display-pipe.yaml    |  88 +++
 .../bindings/display/panel/apple,summit.yaml       |  58 ++
 MAINTAINERS                                        |  16 +
 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               |  61 ++
 drivers/gpu/drm/Kconfig                            |   2 +
 drivers/gpu/drm/Makefile                           |   1 +
 drivers/gpu/drm/adp/Kconfig                        |  17 +
 drivers/gpu/drm/adp/Makefile                       |   5 +
 drivers/gpu/drm/adp/adp-mipi.c                     | 276 +++++++++
 drivers/gpu/drm/adp/adp_drv.c                      | 617 +++++++++++++++++++++
 drivers/gpu/drm/panel/Kconfig                      |   9 +
 drivers/gpu/drm/panel/Makefile                     |   1 +
 drivers/gpu/drm/panel/panel-summit.c               | 132 +++++
 17 files changed, 1489 insertions(+)

---
base-commit: b62cef9a5c673f1b8083159f5dc03c1c5daced2f
change-id: 20241124-adpdrm-25fce3dd8a71

#1 lore raw

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

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

---
 .../display/apple,h7-display-pipe-mipi.yaml        | 83 ++++++++++++++++++++
 .../bindings/display/apple,h7-display-pipe.yaml    | 88 ++++++++++++++++++++++
 .../bindings/display/panel/apple,summit.yaml       | 58 ++++++++++++++
 3 files changed, 229 insertions(+)
Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml new file +83 -0
new file mode 100644
index 0000000000000000000000000000000000000000..5e6da66499a508c001670f68fa00d6bab13591d6
@@ -0,0 +1,83 @@
+# 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:
+  - 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
+
+  power-domains:
+    maxItems: 1
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/properties/port
+        description: Input port. Always connected to the primary controller
+
+      port@1:
+        $ref: /schemas/graph.yaml#/properties/port
+        description: Output MIPI DSI port to the panel
+
+    required:
+      - port@0
+      - port@1
+
+required:
+  - compatible
+  - reg
+  - ports
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    dsi@28200000 {
+        compatible = "apple,t8103-display-pipe-mipi", "apple,h7-display-pipe-mipi";
+        reg = <0x28200000 0xc000>;
+        power-domains = <&ps_dispdfr_mipi>;
+
+        ports {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@0 {
+                reg = <0>;
+
+                dfr_adp_out_mipi: endpoint {
+                    remote-endpoint = <&dfr_adp_out_mipi>;
+                };
+            };
+
+            port@1 {
+                reg = <1>;
+
+                dfr_panel_in: endpoint {
+                    remote-endpoint = <&dfr_mipi_out_panel>;
+                };
+            };
+        };
+    };
+...
Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml new file +88 -0

88 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.48.1
#2 lore raw

PATCH v7 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    |  17 ++
 drivers/gpu/drm/adp/Makefile   |   5 +
 drivers/gpu/drm/adp/adp-mipi.c | 276 ++++++++++++++++++
 drivers/gpu/drm/adp/adp_drv.c  | 617 +++++++++++++++++++++++++++++++++++++++++
 6 files changed, 918 insertions(+)
drivers/gpu/drm/Kconfig +2 -0
index 772fc7625639de07de873afa0e5e0c37bf4f4420..bba7a9c1f1d213c9cf0418a388646da7a8504f4f 100644
@@ -503,6 +503,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 +17 -0
new file mode 100644
index 0000000000000000000000000000000000000000..9fcc27eb200dbc5c3005d732b937b45e2dde66ac
@@ -0,0 +1,17 @@
+# 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 DRM_PANEL_BRIDGE
+	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 +5 -0
new file mode 100644
index 0000000000000000000000000000000000000000..8e7b618edd35591ce9b480a8fd3819cce41557f5
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-only OR MIT
+
+adpdrm-y := adp_drv.o
+adpdrm-mipi-y := adp-mipi.o
+obj-$(CONFIG_DRM_ADP) += adpdrm.o adpdrm-mipi.o
drivers/gpu/drm/adp/adp-mipi.c new file +276 -0

276 lines not on this page · raw message

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

617 lines not on this page · raw message

Signature · 1 line
2.48.1
#5 lore raw

PATCH v7 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 | 132 +++++++++++++++++++++++++++++++++++
 3 files changed, 142 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 +132 -0

132 lines not on this page · raw message

Signature · 1 line
2.48.1
#6 lore raw

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

In reply to Sasha Finkelstein

From: Sasha Finkelstein <[email protected]>

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     | 61 ++++++++++++++++++++++++++++++++
 4 files changed, 184 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 +61 -0

67 lines not on this page · raw message

Signature · 1 line
2.48.1
#7 lore raw

PATCH v7 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 | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
MAINTAINERS +16 -0
index a87ddad78e26f28ffd0f3433560d6db1518f9f95..895d682bcf4e351971b04c6515ebf685fd39b662 100644
@@ -7746,6 +7746,22 @@ F:	drivers/gpu/host1x/
 F:	include/linux/host1x.h
 F:	include/uapi/drm/tegra_drm.h
 
+DRM DRIVERS FOR PRE-DCP APPLE DISPLAY OUTPUT
+M:	Sasha Finkelstein <[email protected]>
+R:	Janne Grunau <[email protected]>
+L:	[email protected]
+L:	[email protected]
+S:	Maintained
+W:	https://asahilinux.org
+B:	https://github.com/AsahiLinux/linux/issues
+C:	irc://irc.oftc.net/asahi-dev
+T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
+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:	drivers/gpu/drm/adp/
+F:	drivers/gpu/drm/panel/panel-summit.c
+
 DRM DRIVERS FOR RENESAS R-CAR
 M:	Laurent Pinchart <[email protected]>
 M:	Kieran Bingham <[email protected]>
Signature · 1 line
2.48.1
#3 lore raw

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

In reply to Sasha Finkelstein

Hi

Am 17.02.25 um 12:39 schrieb Sasha Finkelstein via B4 Relay:
[...]

drivers/gpu/drm/adp/adp_drv.c line 67

Quoted 7 lines
drivers/gpu/drm/adp/adp_drv.c new file +7 -0
+
+static int adp_open(struct inode *inode, struct file *filp)
+{
+	/*
+	 * The modesetting driver does not check the non-desktop connector
+	 * property and keeps the device open and locked. If the touchbar daemon
+	 * opens the device first modesetting breaks the whole X session.

I find this sentence hard to understand. Should there be a comma after 'first' for better readability?

drivers/gpu/drm/adp/adp_drv.c line 69

Quoted 2 lines
drivers/gpu/drm/adp/adp_drv.c new file +2 -0
+	 * Simply refuse to open the device for X11 server processes as
+	 * workaround.

This is a platform device, so Xorg will not use it automatically. There exists a list of acceptable DRM drivers in the Xorg source code. [1] You'd have to add adp there. Unless the described problem really happens in practice, I'd drop this workaround. There's no point in working around legacy userspace in modern drivers.

Best regards
Thomas

[1] https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/hw/xfree86/common/xf86platformBus.c#L582

Quoted 549 lines
drivers/gpu/drm/adp/adp_drv.c new file +548 -0
+	 */
+	if (current->comm[0] == 'X')
+		return -EBUSY;
+
+	return drm_open(inode, filp);
+}
+
+static const struct file_operations adp_fops = {
+	.owner          = THIS_MODULE,
+	.open           = adp_open,
+	.release        = drm_release,
+	.unlocked_ioctl = drm_ioctl,
+	.compat_ioctl   = drm_compat_ioctl,
+	.poll           = drm_poll,
+	.read           = drm_read,
+	.llseek         = noop_llseek,
+	.mmap           = drm_gem_mmap,
+	.fop_flags      = FOP_UNSIGNED_OFFSET,
+	DRM_GEM_DMA_UNMAPPED_AREA_FOPS
+};
+
+static int adp_drm_gem_dumb_create(struct drm_file *file_priv,
+					struct drm_device *drm,
+					struct drm_mode_create_dumb *args)
+{
+	args->height = ALIGN(args->height, 64);
+	args->size = args->pitch * args->height;
+
+	return drm_gem_dma_dumb_create_internal(file_priv, drm, args);
+}
+
+static const struct drm_driver adp_driver = {
+	.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
+	.fops = &adp_fops,
+	DRM_GEM_DMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE(adp_drm_gem_dumb_create),
+	.name = "adp",
+	.desc = "Apple Display Pipe DRM Driver",
+	.date = "20230412",
+	.major = 0,
+	.minor = 1,
+};
+
+struct adp_drv_private {
+	struct drm_device drm;
+	struct drm_crtc crtc;
+	struct drm_encoder *encoder;
+	struct drm_connector *connector;
+	struct drm_bridge *next_bridge;
+	void __iomem *be;
+	void __iomem *fe;
+	u32 *mask_buf;
+	u64 mask_buf_size;
+	dma_addr_t mask_iova;
+	int be_irq;
+	int fe_irq;
+	spinlock_t irq_lock;
+	struct drm_pending_vblank_event *event;
+};
+
+#define to_adp(x) container_of(x, struct adp_drv_private, drm)
+#define crtc_to_adp(x) container_of(x, struct adp_drv_private, crtc)
+
+static int adp_plane_atomic_check(struct drm_plane *plane,
+				    struct drm_atomic_state *state)
+{
+	struct drm_plane_state *new_plane_state;
+	struct drm_crtc_state *crtc_state;
+
+	new_plane_state = drm_atomic_get_new_plane_state(state, plane);
+
+	if (!new_plane_state->crtc)
+		return 0;
+
+	crtc_state = drm_atomic_get_crtc_state(state, new_plane_state->crtc);
+	if (IS_ERR(crtc_state))
+		return PTR_ERR(crtc_state);
+
+	return drm_atomic_helper_check_plane_state(new_plane_state,
+						   crtc_state,
+						   DRM_PLANE_NO_SCALING,
+						   DRM_PLANE_NO_SCALING,
+						   true, true);
+}
+
+static void adp_plane_atomic_update(struct drm_plane *plane,
+				    struct drm_atomic_state *state)
+{
+	struct adp_drv_private *adp;
+	struct drm_rect src_rect;
+	struct drm_gem_dma_object *obj;
+	struct drm_framebuffer *fb;
+	struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state, plane);
+	u32 src_pos, src_size, dst_pos, dst_size;
+
+	if (!plane || !new_state)
+		return;
+
+	fb = new_state->fb;
+	if (!fb)
+		return;
+	adp = to_adp(plane->dev);
+
+	drm_rect_fp_to_int(&src_rect, &new_state->src);
+	src_pos = src_rect.x1 << 16 | src_rect.y1;
+	dst_pos = new_state->dst.x1 << 16 | new_state->dst.y1;
+	src_size = drm_rect_width(&src_rect) << 16 | drm_rect_height(&src_rect);
+	dst_size = drm_rect_width(&new_state->dst) << 16 |
+		drm_rect_height(&new_state->dst);
+	writel(src_pos, adp->be + ADBE_SRC_START);
+	writel(src_size, adp->be + ADBE_SRC_SIZE);
+	writel(dst_pos, adp->be + ADBE_DST_START);
+	writel(dst_size, adp->be + ADBE_DST_SIZE);
+	writel(fb->pitches[0], adp->be + ADBE_STRIDE);
+	obj = drm_fb_dma_get_gem_obj(fb, 0);
+	if (obj)
+		writel(obj->dma_addr + fb->offsets[0], adp->be + ADBE_FB_BASE);
+
+	writel(BIT(0), adp->be + ADBE_LAYER_EN1);
+	writel(BIT(0), adp->be + ADBE_LAYER_EN2);
+	writel(BIT(0), adp->be + ADBE_LAYER_EN3);
+	writel(BIT(0), adp->be + ADBE_LAYER_EN4);
+	writel(ADBE_SCALE_CTL_BYPASS, adp->be + ADBE_SCALE_CTL);
+	writel(ADBE_LAYER_CTL_ENABLE | BIT(0), adp->be + ADBE_LAYER_CTL);
+	writel(ADBE_PIX_FMT_XRGB32, adp->be + ADBE_PIX_FMT);
+}
+
+static void adp_plane_atomic_disable(struct drm_plane *plane,
+				     struct drm_atomic_state *state)
+{
+	struct adp_drv_private *adp = to_adp(plane->dev);
+
+	writel(0x0, adp->be + ADBE_LAYER_EN1);
+	writel(0x0, adp->be + ADBE_LAYER_EN2);
+	writel(0x0, adp->be + ADBE_LAYER_EN3);
+	writel(0x0, adp->be + ADBE_LAYER_EN4);
+	writel(ADBE_LAYER_CTL_ENABLE, adp->be + ADBE_LAYER_CTL);
+}
+
+static const struct drm_plane_helper_funcs adp_plane_helper_funcs = {
+	.atomic_check = adp_plane_atomic_check,
+	.atomic_update = adp_plane_atomic_update,
+	.atomic_disable = adp_plane_atomic_disable,
+	DRM_GEM_SHADOW_PLANE_HELPER_FUNCS
+};
+
+static const struct drm_plane_funcs adp_plane_funcs = {
+	.update_plane = drm_atomic_helper_update_plane,
+	.disable_plane = drm_atomic_helper_disable_plane,
+	DRM_GEM_SHADOW_PLANE_FUNCS
+};
+
+static const u32 plane_formats[] = {
+	DRM_FORMAT_XRGB8888,
+};
+
+#define ALL_CRTCS 1
+
+static struct drm_plane *adp_plane_new(struct adp_drv_private *adp)
+{
+	struct drm_device *drm = &adp->drm;
+	struct drm_plane *plane;
+
+	plane = __drmm_universal_plane_alloc(drm, sizeof(struct drm_plane), 0,
+					     ALL_CRTCS, &adp_plane_funcs,
+					     plane_formats, ARRAY_SIZE(plane_formats),
+					     NULL, DRM_PLANE_TYPE_PRIMARY, "plane");
+	if (!plane) {
+		drm_err(drm, "failed to allocate plane");
+		return ERR_PTR(-ENOMEM);
+	}
+
+	drm_plane_helper_add(plane, &adp_plane_helper_funcs);
+	return plane;
+}
+
+static void adp_enable_vblank(struct adp_drv_private *adp)
+{
+	u32 cur_ctrl;
+
+	writel(ADP_INT_STATUS_INT_MASK, adp->fe + ADP_INT_STATUS);
+
+	cur_ctrl = readl(adp->fe + ADP_CTRL);
+	writel(cur_ctrl | ADP_CTRL_VBLANK_ON, adp->fe + ADP_CTRL);
+}
+
+static int adp_crtc_enable_vblank(struct drm_crtc *crtc)
+{
+	struct drm_device *dev = crtc->dev;
+	struct adp_drv_private *adp = to_adp(dev);
+
+	adp_enable_vblank(adp);
+
+	return 0;
+}
+
+static void adp_disable_vblank(struct adp_drv_private *adp)
+{
+	u32 cur_ctrl;
+
+	cur_ctrl = readl(adp->fe + ADP_CTRL);
+	writel(cur_ctrl & ~ADP_CTRL_VBLANK_ON, adp->fe + ADP_CTRL);
+	writel(ADP_INT_STATUS_INT_MASK, adp->fe + ADP_INT_STATUS);
+}
+
+static void adp_crtc_disable_vblank(struct drm_crtc *crtc)
+{
+	struct drm_device *dev = crtc->dev;
+	struct adp_drv_private *adp = to_adp(dev);
+
+	adp_disable_vblank(adp);
+}
+
+static void adp_crtc_atomic_enable(struct drm_crtc *crtc,
+				   struct drm_atomic_state *state)
+{
+	struct adp_drv_private *adp = crtc_to_adp(crtc);
+
+	writel(BIT(0), adp->be + ADBE_BLEND_EN2);
+	writel(BIT(4), adp->be + ADBE_BLEND_EN1);
+	writel(BIT(0), adp->be + ADBE_BLEND_EN3);
+	writel(BIT(0), adp->be + ADBE_BLEND_BYPASS);
+	writel(BIT(0), adp->be + ADBE_BLEND_EN4);
+}
+
+static void adp_crtc_atomic_disable(struct drm_crtc *crtc,
+				    struct drm_atomic_state *state)
+{
+	struct adp_drv_private *adp = crtc_to_adp(crtc);
+	struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc);
+
+	drm_atomic_helper_disable_planes_on_crtc(old_state, false);
+
+	writel(0x0, adp->be + ADBE_BLEND_EN2);
+	writel(0x0, adp->be + ADBE_BLEND_EN1);
+	writel(0x0, adp->be + ADBE_BLEND_EN3);
+	writel(0x0, adp->be + ADBE_BLEND_BYPASS);
+	writel(0x0, adp->be + ADBE_BLEND_EN4);
+	drm_crtc_vblank_off(crtc);
+}
+
+static void adp_crtc_atomic_flush(struct drm_crtc *crtc,
+				  struct drm_atomic_state *state)
+{
+	u32 frame_num = 1;
+	struct adp_drv_private *adp = crtc_to_adp(crtc);
+	struct drm_crtc_state *new_state = drm_atomic_get_new_crtc_state(state, crtc);
+	u64 new_size = ALIGN(new_state->mode.hdisplay *
+			     new_state->mode.vdisplay * 4, PAGE_SIZE);
+
+	if (new_size != adp->mask_buf_size) {
+		if (adp->mask_buf)
+			dma_free_coherent(crtc->dev->dev, adp->mask_buf_size,
+					  adp->mask_buf, adp->mask_iova);
+		adp->mask_buf = NULL;
+		if (new_size != 0) {
+			adp->mask_buf = dma_alloc_coherent(crtc->dev->dev, new_size,
+							   &adp->mask_iova, GFP_KERNEL);
+			memset(adp->mask_buf, 0xFF, new_size);
+			writel(adp->mask_iova, adp->be + ADBE_MASK_BUF);
+		}
+		adp->mask_buf_size = new_size;
+	}
+	writel(ADBE_FIFO_SYNC | frame_num, adp->be + ADBE_FIFO);
+	//FIXME: use adbe flush interrupt
+	spin_lock_irq(&crtc->dev->event_lock);
+	if (crtc->state->event) {
+		drm_crtc_vblank_get(crtc);
+		adp->event = crtc->state->event;
+	}
+	crtc->state->event = NULL;
+	spin_unlock_irq(&crtc->dev->event_lock);
+}
+
+static const struct drm_crtc_funcs adp_crtc_funcs = {
+	.destroy = drm_crtc_cleanup,
+	.set_config = drm_atomic_helper_set_config,
+	.page_flip = drm_atomic_helper_page_flip,
+	.reset = drm_atomic_helper_crtc_reset,
+	.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
+	.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
+	.enable_vblank = adp_crtc_enable_vblank,
+	.disable_vblank = adp_crtc_disable_vblank,
+};
+
+
+static const struct drm_crtc_helper_funcs adp_crtc_helper_funcs = {
+	.atomic_enable = adp_crtc_atomic_enable,
+	.atomic_disable = adp_crtc_atomic_disable,
+	.atomic_flush = adp_crtc_atomic_flush,
+};
+
+static int adp_setup_crtc(struct adp_drv_private *adp)
+{
+	struct drm_device *drm = &adp->drm;
+	struct drm_plane *primary;
+	int ret;
+
+	primary = adp_plane_new(adp);
+	if (IS_ERR(primary))
+		return PTR_ERR(primary);
+
+	ret = drm_crtc_init_with_planes(drm, &adp->crtc, primary,
+					NULL, &adp_crtc_funcs, NULL);
+	if (ret)
+		return ret;
+
+	drm_crtc_helper_add(&adp->crtc, &adp_crtc_helper_funcs);
+	return 0;
+}
+
+static const struct drm_mode_config_funcs adp_mode_config_funcs = {
+	.fb_create = drm_gem_fb_create_with_dirty,
+	.atomic_check = drm_atomic_helper_check,
+	.atomic_commit = drm_atomic_helper_commit,
+};
+
+static int adp_setup_mode_config(struct adp_drv_private *adp)
+{
+	struct drm_device *drm = &adp->drm;
+	int ret;
+	u32 size;
+
+	ret = drmm_mode_config_init(drm);
+	if (ret)
+		return ret;
+
+	/*
+	 * Query screen size restrict the frame buffer size to the screen size
+	 * aligned to the next multiple of 64. This is not necessary but can be
+	 * used as simple check for non-desktop devices.
+	 * Xorg's modesetting driver does not care about the connector
+	 * "non-desktop" property. The max frame buffer width or height can be
+	 * easily checked and a device can be reject if the max width/height is
+	 * smaller than 120 for example.
+	 * Any touchbar daemon is not limited by this small framebuffer size.
+	 */
+	size = readl(adp->fe + ADP_SCREEN_SIZE);
+
+	drm->mode_config.min_width = 32;
+	drm->mode_config.min_height = 32;
+	drm->mode_config.max_width = ALIGN(FIELD_GET(ADP_SCREEN_HSIZE, size), 64);
+	drm->mode_config.max_height = ALIGN(FIELD_GET(ADP_SCREEN_VSIZE, size), 64);
+	drm->mode_config.preferred_depth = 24;
+	drm->mode_config.prefer_shadow = 0;
+	drm->mode_config.funcs = &adp_mode_config_funcs;
+
+	ret = adp_setup_crtc(adp);
+	if (ret) {
+		drm_err(drm, "failed to create crtc");
+		return ret;
+	}
+
+	adp->encoder = drmm_plain_encoder_alloc(drm, NULL, DRM_MODE_ENCODER_DSI, NULL);
+	if (IS_ERR(adp->encoder)) {
+		drm_err(drm, "failed to init encoder");
+		return PTR_ERR(adp->encoder);
+	}
+	adp->encoder->possible_crtcs = ALL_CRTCS;
+
+	ret = drm_bridge_attach(adp->encoder, adp->next_bridge, NULL,
+				DRM_BRIDGE_ATTACH_NO_CONNECTOR);
+	if (ret) {
+		drm_err(drm, "failed to init bridge chain");
+		return ret;
+	}
+
+	adp->connector = drm_bridge_connector_init(drm, adp->encoder);
+	if (IS_ERR(adp->connector))
+		return PTR_ERR(adp->connector);
+
+	drm_connector_attach_encoder(adp->connector, adp->encoder);
+
+	ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
+	if (ret < 0) {
+		drm_err(drm, "failed to initialize vblank");
+		return ret;
+	}
+
+	drm_mode_config_reset(drm);
+
+	return 0;
+}
+
+static int adp_parse_of(struct platform_device *pdev, struct adp_drv_private *adp)
+{
+	struct device *dev = &pdev->dev;
+
+	adp->be = devm_platform_ioremap_resource_byname(pdev, "be");
+	if (IS_ERR(adp->be)) {
+		dev_err(dev, "failed to map display backend mmio");
+		return PTR_ERR(adp->be);
+	}
+
+	adp->fe = devm_platform_ioremap_resource_byname(pdev, "fe");
+	if (IS_ERR(adp->fe)) {
+		dev_err(dev, "failed to map display pipe mmio");
+		return PTR_ERR(adp->fe);
+	}
+
+	adp->be_irq = platform_get_irq_byname(pdev, "be");
+	if (adp->be_irq < 0) {
+		dev_err(dev, "failed to find be irq");
+		return adp->be_irq;
+	}
+
+	adp->fe_irq = platform_get_irq_byname(pdev, "fe");
+	if (adp->fe_irq < 0) {
+		dev_err(dev, "failed to find fe irq");
+		return adp->fe_irq;
+	}
+
+	return 0;
+}
+
+static irqreturn_t adp_fe_irq(int irq, void *arg)
+{
+	struct adp_drv_private *adp = (struct adp_drv_private *)arg;
+	u32 int_status;
+	u32 int_ctl;
+
+	spin_lock(&adp->irq_lock);
+
+	int_status = readl(adp->fe + ADP_INT_STATUS);
+	if (int_status & ADP_INT_STATUS_VBLANK) {
+		drm_crtc_handle_vblank(&adp->crtc);
+		spin_lock(&adp->crtc.dev->event_lock);
+		if (adp->event) {
+			int_ctl = readl(adp->fe + ADP_CTRL);
+			if ((int_ctl & 0xF00) == 0x600) {
+				drm_crtc_send_vblank_event(&adp->crtc, adp->event);
+				adp->event = NULL;
+				drm_crtc_vblank_put(&adp->crtc);
+			}
+		}
+		spin_unlock(&adp->crtc.dev->event_lock);
+	}
+
+	writel(int_status, adp->fe + ADP_INT_STATUS);
+
+	spin_unlock(&adp->irq_lock);
+
+	return IRQ_HANDLED;
+}
+
+static int adp_drm_bind(struct device *dev)
+{
+	struct drm_device *drm = dev_get_drvdata(dev);
+	struct adp_drv_private *adp = to_adp(drm);
+	int err;
+
+	adp_disable_vblank(adp);
+	writel(ADP_CTRL_FIFO_ON | ADP_CTRL_VBLANK_ON, adp->fe + ADP_CTRL);
+
+	adp->next_bridge = drmm_of_get_bridge(&adp->drm, dev->of_node, 0, 0);
+	if (IS_ERR(adp->next_bridge)) {
+		dev_err(dev, "failed to find next bridge");
+		return PTR_ERR(adp->next_bridge);
+	}
+
+	err = adp_setup_mode_config(adp);
+	if (err < 0)
+		return err;
+
+	err = request_irq(adp->fe_irq, adp_fe_irq, 0, "adp-fe", adp);
+	if (err)
+		return err;
+
+	err = drm_dev_register(&adp->drm, 0);
+	if (err)
+		return err;
+
+	return 0;
+}
+
+static void adp_drm_unbind(struct device *dev)
+{
+	struct drm_device *drm = dev_get_drvdata(dev);
+	struct adp_drv_private *adp = to_adp(drm);
+
+	drm_dev_unregister(drm);
+	drm_atomic_helper_shutdown(drm);
+	free_irq(adp->fe_irq, adp);
+}
+
+static const struct component_master_ops adp_master_ops = {
+	.bind	= adp_drm_bind,
+	.unbind = adp_drm_unbind,
+};
+
+static int compare_dev(struct device *dev, void *data)
+{
+	return dev->of_node == data;
+}
+
+static int adp_probe(struct platform_device *pdev)
+{
+	struct device_node *port;
+	struct component_match *match = NULL;
+	struct adp_drv_private *adp;
+	int err;
+
+	adp = devm_drm_dev_alloc(&pdev->dev, &adp_driver, struct adp_drv_private, drm);
+	if (IS_ERR(adp))
+		return PTR_ERR(adp);
+
+	spin_lock_init(&adp->irq_lock);
+
+	dev_set_drvdata(&pdev->dev, &adp->drm);
+
+	err = adp_parse_of(pdev, adp);
+	if (err < 0)
+		return err;
+
+	port = of_graph_get_remote_node(pdev->dev.of_node, 0, 0);
+	if (!port)
+		return -ENODEV;
+
+	drm_of_component_match_add(&pdev->dev, &match, compare_dev, port);
+	of_node_put(port);
+
+	return component_master_add_with_match(&pdev->dev, &adp_master_ops, match);
+}
+
+static void adp_remove(struct platform_device *pdev)
+{
+	component_master_del(&pdev->dev, &adp_master_ops);
+	dev_set_drvdata(&pdev->dev, NULL);
+}
+
+static const struct of_device_id adp_of_match[] = {
+	{ .compatible = "apple,h7-display-pipe", },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, adp_of_match);
+
+static struct platform_driver adp_platform_driver = {
+	.driver = {
+		.name = "adp",
+		.of_match_table = adp_of_match,
+	},
+	.probe = adp_probe,
+	.remove = adp_remove,
+};
+
+module_platform_driver(adp_platform_driver);
+
+MODULE_DESCRIPTION("Apple Display Pipe DRM driver");
+MODULE_LICENSE("GPL");
Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
#4 lore raw

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

Quoted 3 lines · Thomas Zimmermann

Unless the described problem really happens
in practice, I'd drop this workaround. There's no point in working around legacy userspace in modern drivers.

This workaround was put in place after we noticed x11 either preventing the userspace daemon from working, or breaking itself. So, yes, it does happen in practice.

maintainer Applied
#8 lore raw

Re: (subset) [PATCH v7 0/5] Driver for pre-DCP apple display controller.

In reply to Sasha Finkelstein

Hi,

Quoted 5 lines · Sasha Finkelstein

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.

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

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

      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/40115947b59f2ca361a47615304dff0a2b69a2b4
Signature · 1 line
Neil
#9 lore raw

Re: (subset) [PATCH v7 0/5] Driver for pre-DCP apple display controller.

Quoted 10 lines · Neil Armstrong

Hi,

Quoted 5 lines · Sasha Finkelstein

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.

Quoted 4 lines

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

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

      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/40115947b59f2ca361a47615304dff0a2b69a2b4

Without the bindings?!

Signature · 2 lines
With best wishes
Dmitry
maintainer
#10 lore raw

Re: (subset) [PATCH v7 0/5] Driver for pre-DCP apple display controller.

Quoted 11 lines · Dmitry Baryshkov
Quoted 10 lines · Neil Armstrong

Hi,

Quoted 5 lines · Sasha Finkelstein

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.

Quoted 7 lines
Quoted 4 lines

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

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

       https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/40115947b59f2ca361a47615304dff0a2b69a2b4

Without the bindings?!

Bindings will be funneled with the rest of the ADP driver, the panel driver can be applied individually.

Neil

#11 lore raw

Re: (subset) [PATCH v7 0/5] Driver for pre-DCP apple display controller.

Quoted 15 lines · Neil Armstrong
Quoted 13 lines · Dmitry Baryshkov
Quoted 12 lines · Neil Armstrong

Hi,

Quoted 5 lines · Sasha Finkelstein

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.

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

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

       https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/40115947b59f2ca361a47615304dff0a2b69a2b4

Without the bindings?!

Bindings will be funneled with the rest of the ADP driver, the panel driver can be applied individually.

Okay.....

Signature · 2 lines
With best wishes
Dmitry
maintainer
#12 lore raw

Re: (subset) [PATCH v7 0/5] Driver for pre-DCP apple display controller.

In reply to Neil Armstrong
Quoted 15 lines · Neil Armstrong
Quoted 13 lines · Dmitry Baryshkov
Quoted 12 lines · Neil Armstrong

Hi,

Quoted 5 lines · Sasha Finkelstein

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.

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

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

       https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/40115947b59f2ca361a47615304dff0a2b69a2b4

Without the bindings?!

Bindings will be funneled with the rest of the ADP driver, the panel driver can be applied individually.

Uh, no. The bindings go with the user. Now 'make dt_compatible_check' reports apple,summit is not documented.

Rob

maintainer
#13 lore raw
In reply to Sasha Finkelstein

Hi,

Quoted 62 lines · On 17/02/2025 12:39, Sasha Finkelstein via B4 Relay wrote:

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 v7:
- No changes aside from adding r-b trailers, effectively a resend.
- Link to v6: https://lore.kernel.org/r/[email protected]

Changes in v6:
- Use the drm_connector_helper_get_modes_fixed helper.
- Split out into a separate MAINTAINERS entry
- Link to v5: https://lore.kernel.org/r/[email protected]

Changes in v5:
- Moved to using the component framework.
- Other lifetime fixes
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Fixed dt bindings.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Fixed building as module after splitting out mipi block
- Addressing the review feedback.
- Link to v2: https://lore.kernel.org/r/[email protected]

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
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        |  83 +++
  .../bindings/display/apple,h7-display-pipe.yaml    |  88 +++
  .../bindings/display/panel/apple,summit.yaml       |  58 ++
  MAINTAINERS                                        |  16 +
  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               |  61 ++
  drivers/gpu/drm/Kconfig                            |   2 +
  drivers/gpu/drm/Makefile                           |   1 +
  drivers/gpu/drm/adp/Kconfig                        |  17 +
  drivers/gpu/drm/adp/Makefile                       |   5 +
  drivers/gpu/drm/adp/adp-mipi.c                     | 276 +++++++++
  drivers/gpu/drm/adp/adp_drv.c                      | 617 +++++++++++++++++++++
  drivers/gpu/drm/panel/Kconfig                      |   9 +
  drivers/gpu/drm/panel/Makefile                     |   1 +
  drivers/gpu/drm/panel/panel-summit.c               | 132 +++++
  17 files changed, 1489 insertions(+)
Quoted 5 lines

---
base-commit: b62cef9a5c673f1b8083159f5dc03c1c5daced2f
change-id: 20241124-adpdrm-25fce3dd8a71

All patches are reviewed, can we funnel patches 1, 2 & 5 via drm-misc-next now ?

Neil

#14 lore raw
Quoted 31 lines
Quoted 25 lines

Sasha Finkelstein (5):
dt-bindings: display: Add Apple pre-DCP display controller
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        |  83 +++
  .../bindings/display/apple,h7-display-pipe.yaml    |  88 +++
  .../bindings/display/panel/apple,summit.yaml       |  58 ++
  MAINTAINERS                                        |  16 +
  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               |  61 ++
  drivers/gpu/drm/Kconfig                            |   2 +
  drivers/gpu/drm/Makefile                           |   1 +
  drivers/gpu/drm/adp/Kconfig                        |  17 +
  drivers/gpu/drm/adp/Makefile                       |   5 +
  drivers/gpu/drm/adp/adp-mipi.c                     | 276 +++++++++
  drivers/gpu/drm/adp/adp_drv.c                      | 617 +++++++++++++++++++++
  drivers/gpu/drm/panel/Kconfig                      |   9 +
  drivers/gpu/drm/panel/Makefile                     |   1 +
  drivers/gpu/drm/panel/panel-summit.c               | 132 +++++
  17 files changed, 1489 insertions(+)
Quoted 5 lines

---
base-commit: b62cef9a5c673f1b8083159f5dc03c1c5daced2f
change-id: 20241124-adpdrm-25fce3dd8a71

Quoted 1 line

All patches are reviewed, can we funnel patches 1, 2 & 5 via drm-misc-next now ?

I'm planning to do so today, just need to get dim setup first :)

maintainer
#15 lore raw
Quoted 31 lines · Alyssa Rosenzweig
Quoted 31 lines
Quoted 30 lines

Sasha Finkelstein (5):
dt-bindings: display: Add Apple pre-DCP display controller
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        |  83 +++
   .../bindings/display/apple,h7-display-pipe.yaml    |  88 +++
   .../bindings/display/panel/apple,summit.yaml       |  58 ++
   MAINTAINERS                                        |  16 +
   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               |  61 ++
   drivers/gpu/drm/Kconfig                            |   2 +
   drivers/gpu/drm/Makefile                           |   1 +
   drivers/gpu/drm/adp/Kconfig                        |  17 +
   drivers/gpu/drm/adp/Makefile                       |   5 +
   drivers/gpu/drm/adp/adp-mipi.c                     | 276 +++++++++
   drivers/gpu/drm/adp/adp_drv.c                      | 617 +++++++++++++++++++++
   drivers/gpu/drm/panel/Kconfig                      |   9 +
   drivers/gpu/drm/panel/Makefile                     |   1 +
   drivers/gpu/drm/panel/panel-summit.c               | 132 +++++
   17 files changed, 1489 insertions(+)

---
base-commit: b62cef9a5c673f1b8083159f5dc03c1c5daced2f
change-id: 20241124-adpdrm-25fce3dd8a71

Quoted 3 lines
Quoted 1 line

All patches are reviewed, can we funnel patches 1, 2 & 5 via drm-misc-next now ?

I'm planning to do so today, just need to get dim setup first :)

Nice, go ahead then !

Neil

#18 lore raw

Re: (subset) [PATCH v7 0/5] Driver for pre-DCP apple display controller.

In reply to Sasha Finkelstein
Quoted 5 lines · Sasha Finkelstein

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.

Since the dt-bindings are now part of drm-misc-next I've also applied the dts change, thanks!

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

      commit: 7275e795e520c7064af52ba67c74d7bac27eea4f

Best regards,

Signature · 1 line
Sven Peter <[email protected]>
#16 lore raw
In reply to Alyssa Rosenzweig
Quoted 31 lines · Alyssa Rosenzweig
Quoted 31 lines
Quoted 30 lines

Sasha Finkelstein (5):
dt-bindings: display: Add Apple pre-DCP display controller
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        |  83 +++
  .../bindings/display/apple,h7-display-pipe.yaml    |  88 +++
  .../bindings/display/panel/apple,summit.yaml       |  58 ++
  MAINTAINERS                                        |  16 +
  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               |  61 ++
  drivers/gpu/drm/Kconfig                            |   2 +
  drivers/gpu/drm/Makefile                           |   1 +
  drivers/gpu/drm/adp/Kconfig                        |  17 +
  drivers/gpu/drm/adp/Makefile                       |   5 +
  drivers/gpu/drm/adp/adp-mipi.c                     | 276 +++++++++
  drivers/gpu/drm/adp/adp_drv.c                      | 617 +++++++++++++++++++++
  drivers/gpu/drm/panel/Kconfig                      |   9 +
  drivers/gpu/drm/panel/Makefile                     |   1 +
  drivers/gpu/drm/panel/panel-summit.c               | 132 +++++
  17 files changed, 1489 insertions(+)

---
base-commit: b62cef9a5c673f1b8083159f5dc03c1c5daced2f
change-id: 20241124-adpdrm-25fce3dd8a71

Quoted 3 lines
Quoted 1 line

All patches are reviewed, can we funnel patches 1, 2 & 5 via drm-misc-next now ?

I'm planning to do so today, just need to get dim setup first :)

Nice! As a heads up, it would be really-really nice if you can send any kind of 'applied' message. If you are using 'dim b4-shazam', then 'b4 ty -a' might do that for you. Otherwise just a simple 'hey, applied' email is useful enough.

Signature · 2 lines
With best wishes
Dmitry
#17 lore raw
Quoted 8 lines
Quoted 3 lines
Quoted 1 line

All patches are reviewed, can we funnel patches 1, 2 & 5 via drm-misc-next now ?

I'm planning to do so today, just need to get dim setup first :)

Nice! As a heads up, it would be really-really nice if you can send any kind of 'applied' message. If you are using 'dim b4-shazam', then 'b4 ty -a' might do that for you. Otherwise just a simple 'hey, applied' email is useful enough.

Oh cool, it didn't occur to me that b4 ty would compose with dim b4-shazam. Sent a very belated message and will try to make a habit of it going forward.

Thanks for the tip!

Cheers,
Alyssa