Skip to content

Commit 20579c1

Browse files
hoshinolinajannau
authored andcommitted
drm/asahi: RiiR page tables
1 parent 77aa68b commit 20579c1

5 files changed

Lines changed: 609 additions & 225 deletions

File tree

drivers/gpu/drm/asahi/alloc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ impl RawAllocation for SimpleAllocation {
452452
pub(crate) struct SimpleAllocator {
453453
dev: AsahiDevRef,
454454
range: Range<u64>,
455-
prot: u32,
455+
prot: mmu::Prot,
456456
vm: mmu::Vm,
457457
min_align: usize,
458458
cpu_maps: bool,
@@ -467,7 +467,7 @@ impl SimpleAllocator {
467467
vm: &mmu::Vm,
468468
range: Range<u64>,
469469
min_align: usize,
470-
prot: u32,
470+
prot: mmu::Prot,
471471
_block_size: usize,
472472
mut cpu_maps: bool,
473473
_name: fmt::Arguments<'_>,
@@ -661,7 +661,7 @@ pub(crate) struct HeapAllocator {
661661
dev: AsahiDevRef,
662662
range: Range<u64>,
663663
top: u64,
664-
prot: u32,
664+
prot: mmu::Prot,
665665
vm: mmu::Vm,
666666
min_align: usize,
667667
block_size: usize,
@@ -681,7 +681,7 @@ impl HeapAllocator {
681681
vm: &mmu::Vm,
682682
range: Range<u64>,
683683
min_align: usize,
684-
prot: u32,
684+
prot: mmu::Prot,
685685
block_size: usize,
686686
mut cpu_maps: bool,
687687
name: fmt::Arguments<'_>,

drivers/gpu/drm/asahi/asahi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ mod mem;
2020
mod microseq;
2121
mod mmu;
2222
mod object;
23+
mod pgtable;
2324
mod queue;
2425
mod regs;
2526
mod slotalloc;

drivers/gpu/drm/asahi/gem.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl ObjectRef {
8787
vm: &crate::mmu::Vm,
8888
range: Range<u64>,
8989
alignment: u64,
90-
prot: u32,
90+
prot: mmu::Prot,
9191
guard: bool,
9292
) -> Result<crate::mmu::KernelMapping> {
9393
// Only used for kernel objects now
@@ -104,7 +104,7 @@ impl ObjectRef {
104104
obj_range: Range<usize>,
105105
range: Range<u64>,
106106
alignment: u64,
107-
prot: u32,
107+
prot: mmu::Prot,
108108
guard: bool,
109109
) -> Result<crate::mmu::KernelMapping> {
110110
if obj_range.end > self.gem.size() {
@@ -125,7 +125,7 @@ impl ObjectRef {
125125
&mut self,
126126
vm: &crate::mmu::Vm,
127127
addr: u64,
128-
prot: u32,
128+
prot: mmu::Prot,
129129
guard: bool,
130130
) -> Result<crate::mmu::KernelMapping> {
131131
if self.gem.flags & uapi::drm_asahi_gem_flags_DRM_ASAHI_GEM_VM_PRIVATE != 0

0 commit comments

Comments
 (0)