Skip to content

WIP: Implement DCP 14.7 ABI - #562

Draft
chadmed wants to merge 14 commits into
AsahiLinux:asahi-wipfrom
chadmed:dcp/14.8.3
Draft

WIP: Implement DCP 14.7 ABI#562
chadmed wants to merge 14 commits into
AsahiLinux:asahi-wipfrom
chadmed:dcp/14.8.3

Conversation

@chadmed

@chadmed chadmed commented Aug 2, 2026

Copy link
Copy Markdown
Member

Depends on #520

Implements the macOS 14.7 EPIC IPC interface for DCP and drops 12.x (partially, WIP). Required for M3 series (excluding Ultra).

Draft until below is addressed

TODO:

  • Start RTKit
  • Start IOMFB
  • Modesetting
  • Single IOSurface
  • Multiple IOSurfaces
  • ARGB8888
  • ARGB2101010
  • Semiplanar Y'UV
  • Premultiplied alpha on surface 0
  • Clear empty/null surfaces (!! currently DCP still tries to read the destroyed framebuffer causing IOVA faults)
  • Backlight on laptops
  • Set colour transformation matrix
  • Get ColorElements and TimingElements
  • Start dcpext
  • Start AVService/s (looks like it initialises properly but never does anything)
  • Handle hotplug
  • Enumerate modes
  • Modeset external display
  • Output on external display
  • HDMI audio (AVService commands don't look like they've changed but service never responds)
  • Get EDID (as above)

chadmed added 14 commits August 1, 2026 11:29
DCP is an interesting little bit of hardware. Each variant has quite
different scanout capabilities, including which hardware planes are
actually present. The firmware interface will always accept four
IOSurface structs, however the hardware will fail in weird and
wonderful ways if the firmware then tries to program the corresponding
scanout planes when they do not actually work. We need a way to
declare to KMS which hardware planes actually work on which SoCs.

Add an array to the Devicetree node representing the working hardware
surfaces (relative to the four possible IOSurfaces), and use this to
decide which KMS planes get created at driver init. Since we now
guarantee that every instantiated DRM plane corresponds to a valid
hardware surface, we can remove some superfluous sanity checks in
crtc_atomic_check too.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
All T602x DCPs support simultaneous scanout on surfaces 0, 1, and 3.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
All T600x DCPs support simultaneous scanout on surfaces 0 and 1.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
All T8103 DCPs support simultaneous scanout on surfaces 0 and 1.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
All T8112 DCPs support simultaneous scanout on surfaces 0, 1, and 3.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Now that we can safely declare the working hardware surfaces on
each SoC, let the driver test all possible positions for a working
surface.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
This firmware version was only ever used for extremely early alpha
installs based on ALARM (so basically just for developers testing things).
Remove support for it to make way for a new target ABI for M3 machines.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
WIP

This currently breaks with overlays and on machines that do not
use surface 0 by default. I am also not 100% sure about some of
the new fields and offsets. There seems to be some data at the
bottom of the blob that gets sent to swap_submit, but it's all
garbage. Also not sure why overlay surfaces now crash DCP.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Because we have not yet figured out how to clear surfaces, freeing old
framebuffer references crashes DCP with IOVA errors. Don't destroy them
for now so that we can continue working.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Some of this is 0xaa padding, some of it is zeroes, and
there is a conspicuous empty byte at the end.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant