drm/radeon: Remove rdev->gart.pages_addr array
radeon_vm_map_gart can use rdev->gart.pages_entry instead. Also move the masking of the page address to radeon_vm_map_gart from its callers. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
5636d2f842
commit
16653dbae0
@@ -587,10 +587,8 @@ uint64_t radeon_vm_map_gart(struct radeon_device *rdev, uint64_t addr)
|
||||
uint64_t result;
|
||||
|
||||
/* page table offset */
|
||||
result = rdev->gart.pages_addr[addr >> PAGE_SHIFT];
|
||||
|
||||
/* in case cpu page size != gpu page size*/
|
||||
result |= addr & (~PAGE_MASK);
|
||||
result = rdev->gart.pages_entry[addr >> RADEON_GPU_PAGE_SHIFT];
|
||||
result &= ~RADEON_GPU_PAGE_MASK;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user