Skip to content

Commit 69a27db

Browse files
committed
Merge branch 'bits/210-gpu' into asahi-wip
2 parents 2f70eb1 + ce5529b commit 69a27db

File tree

139 files changed

+30096
-379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+30096
-379
lines changed

drivers/block/rnull.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use kernel::{
2020
error::Result,
2121
new_mutex, pr_info,
2222
prelude::*,
23+
str::CStr,
2324
sync::{Arc, Mutex},
2425
types::ARef,
2526
};
@@ -36,7 +37,7 @@ struct NullBlkModule {
3637
}
3738

3839
impl kernel::Module for NullBlkModule {
39-
fn init(_module: &'static ThisModule) -> Result<Self> {
40+
fn init(_name: &'static CStr, _module: &'static ThisModule) -> Result<Self> {
4041
pr_info!("Rust null_blk loaded\n");
4142
let tagset = Arc::pin_init(TagSet::new(1, 256, 1), flags::GFP_KERNEL)?;
4243

drivers/gpu/drm/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ config DRM_VGEM
340340

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

343+
source "drivers/gpu/drm/asahi/Kconfig"
344+
343345
source "drivers/gpu/drm/exynos/Kconfig"
344346

345347
source "drivers/gpu/drm/rockchip/Kconfig"

drivers/gpu/drm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,4 @@ obj-y += solomon/
219219
obj-$(CONFIG_DRM_SPRD) += sprd/
220220
obj-$(CONFIG_DRM_LOONGSON) += loongson/
221221
obj-$(CONFIG_DRM_POWERVR) += imagination/
222+
obj-$(CONFIG_DRM_ASAHI) += asahi/

drivers/gpu/drm/asahi/Kconfig

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
config RUST_DRM_SCHED
4+
bool
5+
select DRM_SCHED
6+
7+
config RUST_DRM_GEM_SHMEM_HELPER
8+
bool
9+
select DRM_GEM_SHMEM_HELPER
10+
11+
config RUST_DRM_GPUVM
12+
bool
13+
select DRM_GPUVM
14+
15+
config RUST_APPLE_RTKIT
16+
bool
17+
select APPLE_RTKIT
18+
select APPLE_MBOX
19+
20+
config DRM_ASAHI
21+
tristate "Asahi (DRM support for Apple AGX GPUs)"
22+
depends on RUST
23+
depends on DRM
24+
depends on (ARM64 && ARCH_APPLE) || (COMPILE_TEST && !GENERIC_ATOMIC64)
25+
depends on MMU
26+
select RUST_DRM_SCHED
27+
select IOMMU_SUPPORT
28+
select IOMMU_IO_PGTABLE_LPAE
29+
select RUST_DRM_GEM_SHMEM_HELPER
30+
select RUST_DRM_GPUVM
31+
select RUST_APPLE_RTKIT
32+
help
33+
DRM driver for Apple AGX GPUs (G13x, found in the M1 SoC family)
34+
35+
config DRM_ASAHI_DEBUG_ALLOCATOR
36+
bool "Use debug allocator"
37+
depends on DRM_ASAHI
38+
help
39+
Use an alternate, simpler allocator which significantly reduces
40+
performance, but can help find firmware- or GPU-side memory safety
41+
issues. However, it can also trigger firmware bugs more easily,
42+
so expect GPU crashes.
43+
44+
Say N unless you are debugging firmware structures or porting to a
45+
new firmware version.

drivers/gpu/drm/asahi/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
obj-$(CONFIG_DRM_ASAHI) += asahi.o

0 commit comments

Comments
 (0)