Add apldcp(4) and apldrm(4). Together these drivers provide KMS
authorkettenis <kettenis@openbsd.org>
Mon, 22 Jan 2024 18:54:01 +0000 (18:54 +0000)
committerkettenis <kettenis@openbsd.org>
Mon, 22 Jan 2024 18:54:01 +0000 (18:54 +0000)
commit5dd0baa8251145fcf503b060e3a9291086883454
tree9ebeb1ba70451745fa3b1787fd98f4c97d140313
parent68465c52de160eb2ce540eed5547b4a109987dcc
Add apldcp(4) and apldrm(4).  Together these drivers provide KMS
functionality on Apple Silicom machines.  At this point the drivers
provide significant power savings when the display is blanked (and
during suspend) and backlight control.  Some support for HDMI output
is also included, but for now only when HDMI is used as the primary output.
In the future this should also provide displayport support.

This is a port of the the Asahi Linux drivers which can be found at

  https://github.com/AsahiLinux/linux/tree/asahi-wip

Note that this branch gets rebased from time to time.

These drivers do *not* bring us GPU accelerated graphics.  But there
are reports that things run "smoother".

There are some known bugs with backlight control: the backlight level
may not be restored properly after the display has been blanked, and
changing the backlight quickly un succession may break the backlight
control.

ok jsg@
33 files changed:
sys/arch/arm64/conf/GENERIC
sys/dev/pci/drm/apple/afk.c [new file with mode: 0644]
sys/dev/pci/drm/apple/afk.h [new file with mode: 0644]
sys/dev/pci/drm/apple/apldcp.c [new file with mode: 0644]
sys/dev/pci/drm/apple/apldrm.c [new file with mode: 0644]
sys/dev/pci/drm/apple/apple_drv.c [new file with mode: 0644]
sys/dev/pci/drm/apple/dcp-internal.h [new file with mode: 0644]
sys/dev/pci/drm/apple/dcp.c [new file with mode: 0644]
sys/dev/pci/drm/apple/dcp.h [new file with mode: 0644]
sys/dev/pci/drm/apple/dcp_backlight.c [new file with mode: 0644]
sys/dev/pci/drm/apple/dptxep.c [new file with mode: 0644]
sys/dev/pci/drm/apple/dptxep.h [new file with mode: 0644]
sys/dev/pci/drm/apple/ibootep.c [new file with mode: 0644]
sys/dev/pci/drm/apple/iomfb.c [new file with mode: 0644]
sys/dev/pci/drm/apple/iomfb.h [new file with mode: 0644]
sys/dev/pci/drm/apple/iomfb_internal.h [new file with mode: 0644]
sys/dev/pci/drm/apple/iomfb_template.c [new file with mode: 0644]
sys/dev/pci/drm/apple/iomfb_template.h [new file with mode: 0644]
sys/dev/pci/drm/apple/iomfb_v12_3.c [new file with mode: 0644]
sys/dev/pci/drm/apple/iomfb_v12_3.h [new file with mode: 0644]
sys/dev/pci/drm/apple/iomfb_v13_3.c [new file with mode: 0644]
sys/dev/pci/drm/apple/iomfb_v13_3.h [new file with mode: 0644]
sys/dev/pci/drm/apple/parser.c [new file with mode: 0644]
sys/dev/pci/drm/apple/parser.h [new file with mode: 0644]
sys/dev/pci/drm/apple/systemep.c [new file with mode: 0644]
sys/dev/pci/drm/apple/trace.c [new file with mode: 0644]
sys/dev/pci/drm/apple/trace.h [new file with mode: 0644]
sys/dev/pci/drm/apple/version_utils.h [new file with mode: 0644]
sys/dev/pci/drm/files.drm
sys/dev/pci/drm/include/generated/autoconf.h
sys/dev/pci/drm/include/linux/apple-mailbox.h [new file with mode: 0644]
sys/dev/pci/drm/include/linux/args.h [new file with mode: 0644]
sys/dev/pci/drm/include/linux/soc/apple/rtkit.h [new file with mode: 0644]