Skip to content

Commit f6f35c0

Browse files
committed
drm/asahi: RiiR page tables
1 parent ecf9fc5 commit f6f35c0

File tree

5 files changed

+617
-238
lines changed

5 files changed

+617
-238
lines changed

drivers/gpu/drm/asahi/alloc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ impl RawAllocation for SimpleAllocation {
435435
pub(crate) struct SimpleAllocator {
436436
dev: AsahiDevRef,
437437
range: Range<u64>,
438-
prot: u32,
438+
prot: mmu::Prot,
439439
vm: mmu::Vm,
440440
min_align: usize,
441441
cpu_maps: bool,
@@ -450,7 +450,7 @@ impl SimpleAllocator {
450450
vm: &mmu::Vm,
451451
range: Range<u64>,
452452
min_align: usize,
453-
prot: u32,
453+
prot: mmu::Prot,
454454
_block_size: usize,
455455
mut cpu_maps: bool,
456456
_name: fmt::Arguments<'_>,
@@ -642,7 +642,7 @@ pub(crate) struct HeapAllocator {
642642
dev: AsahiDevRef,
643643
range: Range<u64>,
644644
top: u64,
645-
prot: u32,
645+
prot: mmu::Prot,
646646
vm: mmu::Vm,
647647
min_align: usize,
648648
block_size: usize,
@@ -662,7 +662,7 @@ impl HeapAllocator {
662662
vm: &mmu::Vm,
663663
range: Range<u64>,
664664
min_align: usize,
665-
prot: u32,
665+
prot: mmu::Prot,
666666
block_size: usize,
667667
mut cpu_maps: bool,
668668
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
@@ -77,7 +77,7 @@ impl ObjectRef {
7777
vm: &crate::mmu::Vm,
7878
range: Range<u64>,
7979
alignment: u64,
80-
prot: u32,
80+
prot: mmu::Prot,
8181
guard: bool,
8282
) -> Result<crate::mmu::KernelMapping> {
8383
// Only used for kernel objects now
@@ -94,7 +94,7 @@ impl ObjectRef {
9494
obj_range: Range<usize>,
9595
range: Range<u64>,
9696
alignment: u64,
97-
prot: u32,
97+
prot: mmu::Prot,
9898
guard: bool,
9999
) -> Result<crate::mmu::KernelMapping> {
100100
if obj_range.end > self.gem.size() {
@@ -113,7 +113,7 @@ impl ObjectRef {
113113
&mut self,
114114
vm: &crate::mmu::Vm,
115115
addr: u64,
116-
prot: u32,
116+
prot: mmu::Prot,
117117
guard: bool,
118118
) -> Result<crate::mmu::KernelMapping> {
119119
if self.gem.flags & uapi::ASAHI_GEM_VM_PRIVATE != 0 && vm.is_extobj(&self.gem) {

0 commit comments

Comments
 (0)