Skip to content

Commit

Permalink
drm/asahi: Add the Asahi driver for Apple AGX GPUs
Browse files Browse the repository at this point in the history
Signed-off-by: Asahi Lina <lina@asahilina.net>
  • Loading branch information
asahilina authored and jannau committed Dec 21, 2024
1 parent ca142e0 commit 8514c7e
Show file tree
Hide file tree
Showing 45 changed files with 17,996 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ config DRM_VGEM

source "drivers/gpu/drm/vkms/Kconfig"

source "drivers/gpu/drm/asahi/Kconfig"

source "drivers/gpu/drm/exynos/Kconfig"

source "drivers/gpu/drm/rockchip/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,4 @@ obj-y += solomon/
obj-$(CONFIG_DRM_SPRD) += sprd/
obj-$(CONFIG_DRM_LOONGSON) += loongson/
obj-$(CONFIG_DRM_POWERVR) += imagination/
obj-$(CONFIG_DRM_ASAHI) += asahi/
35 changes: 35 additions & 0 deletions drivers/gpu/drm/asahi/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-License-Identifier: GPL-2.0

config RUST_DRM_SCHED
bool
select DRM_SCHED

config RUST_DRM_GEM_SHMEM_HELPER
bool
select DRM_GEM_SHMEM_HELPER

config DRM_ASAHI
tristate "Asahi (DRM support for Apple AGX GPUs)"
depends on RUST
depends on DRM
depends on (ARM64 && ARCH_APPLE) || (COMPILE_TEST && !GENERIC_ATOMIC64)
depends on MMU
select RUST_DRM_SCHED
select IOMMU_SUPPORT
select IOMMU_IO_PGTABLE_LPAE
select RUST_DRM_GEM_SHMEM_HELPER
select RUST_APPLE_RTKIT
help
DRM driver for Apple AGX GPUs (G13x, found in the M1 SoC family)

config DRM_ASAHI_DEBUG_ALLOCATOR
bool "Use debug allocator"
depends on DRM_ASAHI
help
Use an alternate, simpler allocator which significantly reduces
performance, but can help find firmware- or GPU-side memory safety
issues. However, it can also trigger firmware bugs more easily,
so expect GPU crashes.

Say N unless you are debugging firmware structures or porting to a
new firmware version.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/asahi/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_DRM_ASAHI) += asahi.o
Loading

0 comments on commit 8514c7e

Please sign in to comment.