mirror of
https://github.com/torvalds/linux.git
synced 2026-05-03 14:02:43 -04:00
drm/amdgpu: cleanup mtype mapping
Unify how we map the UAPI flags to the PTE hardware flags for a mapping. Only the MTYPE is actually ASIC dependent, all other flags should be copied over 1 to 1 and ASIC differences are handled later on. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
1dd077bbba
commit
71776b6dae
@@ -1571,8 +1571,10 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev,
|
||||
if (!(mapping->flags & AMDGPU_PTE_WRITEABLE))
|
||||
flags &= ~AMDGPU_PTE_WRITEABLE;
|
||||
|
||||
flags &= ~AMDGPU_PTE_EXECUTABLE;
|
||||
flags |= mapping->flags & AMDGPU_PTE_EXECUTABLE;
|
||||
if (adev->asic_type >= CHIP_TONGA) {
|
||||
flags &= ~AMDGPU_PTE_EXECUTABLE;
|
||||
flags |= mapping->flags & AMDGPU_PTE_EXECUTABLE;
|
||||
}
|
||||
|
||||
if (adev->asic_type >= CHIP_NAVI10) {
|
||||
flags &= ~AMDGPU_PTE_MTYPE_NV10_MASK;
|
||||
|
||||
Reference in New Issue
Block a user