mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-26 08:20:18 +00:00
m1n1.hw.uat: Add ioperm()
Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
cc1284f264
commit
b4c687ce13
1 changed files with 12 additions and 0 deletions
|
@ -455,6 +455,18 @@ class UAT(Reloadable):
|
||||||
|
|
||||||
return ranges
|
return ranges
|
||||||
|
|
||||||
|
def ioperm(self, ctx, addr):
|
||||||
|
page = align_down(addr, self.PAGE_SIZE)
|
||||||
|
|
||||||
|
table_addr = self.gpu_region + ctx * 16
|
||||||
|
for (offset, size, ptecls) in self.LEVELS:
|
||||||
|
pte = self.fetch_pte(table_addr, page >> offset, size, ptecls)
|
||||||
|
if not pte.valid():
|
||||||
|
break
|
||||||
|
table_addr = pte.offset()
|
||||||
|
|
||||||
|
return pte
|
||||||
|
|
||||||
def get_pt(self, addr, size=None, uncached=False):
|
def get_pt(self, addr, size=None, uncached=False):
|
||||||
if size is None:
|
if size is None:
|
||||||
size = self.Lx_SIZE
|
size = self.Lx_SIZE
|
||||||
|
|
Loading…
Reference in a new issue