Skip to content

Commit

Permalink
drm/asahi: RiiR page tables
Browse files Browse the repository at this point in the history
  • Loading branch information
asahilina committed Jan 20, 2025
1 parent ecf9fc5 commit 4915ecf
Show file tree
Hide file tree
Showing 5 changed files with 616 additions and 238 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/asahi/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ impl RawAllocation for SimpleAllocation {
pub(crate) struct SimpleAllocator {
dev: AsahiDevRef,
range: Range<u64>,
prot: u32,
prot: mmu::Prot,
vm: mmu::Vm,
min_align: usize,
cpu_maps: bool,
Expand All @@ -450,7 +450,7 @@ impl SimpleAllocator {
vm: &mmu::Vm,
range: Range<u64>,
min_align: usize,
prot: u32,
prot: mmu::Prot,
_block_size: usize,
mut cpu_maps: bool,
_name: fmt::Arguments<'_>,
Expand Down Expand Up @@ -642,7 +642,7 @@ pub(crate) struct HeapAllocator {
dev: AsahiDevRef,
range: Range<u64>,
top: u64,
prot: u32,
prot: mmu::Prot,
vm: mmu::Vm,
min_align: usize,
block_size: usize,
Expand All @@ -662,7 +662,7 @@ impl HeapAllocator {
vm: &mmu::Vm,
range: Range<u64>,
min_align: usize,
prot: u32,
prot: mmu::Prot,
block_size: usize,
mut cpu_maps: bool,
name: fmt::Arguments<'_>,
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/asahi/asahi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ mod mem;
mod microseq;
mod mmu;
mod object;
mod pgtable;
mod queue;
mod regs;
mod slotalloc;
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/asahi/gem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl ObjectRef {
vm: &crate::mmu::Vm,
range: Range<u64>,
alignment: u64,
prot: u32,
prot: mmu::Prot,
guard: bool,
) -> Result<crate::mmu::KernelMapping> {
// Only used for kernel objects now
Expand All @@ -94,7 +94,7 @@ impl ObjectRef {
obj_range: Range<usize>,
range: Range<u64>,
alignment: u64,
prot: u32,
prot: mmu::Prot,
guard: bool,
) -> Result<crate::mmu::KernelMapping> {
if obj_range.end > self.gem.size() {
Expand All @@ -113,7 +113,7 @@ impl ObjectRef {
&mut self,
vm: &crate::mmu::Vm,
addr: u64,
prot: u32,
prot: mmu::Prot,
guard: bool,
) -> Result<crate::mmu::KernelMapping> {
if self.gem.flags & uapi::ASAHI_GEM_VM_PRIVATE != 0 && vm.is_extobj(&self.gem) {
Expand Down
Loading

0 comments on commit 4915ecf

Please sign in to comment.