diff options
author | Christian König <christian.koenig@amd.com> | 2019-09-02 14:52:30 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-09-16 09:59:21 -0500 |
commit | 71776b6daef66b6d7afdd404c2175dbcac7e1a05 (patch) | |
tree | 62428d5dd84ecd75c4333ca6f4711d16b9b66fef /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 1dd077bbbaacc1302e510871669dc62ee1ef0f70 (diff) | |
download | linux-71776b6daef66b6d7afdd404c2175dbcac7e1a05.tar.bz2 |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index d34f14440eee..928c2cd456b3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -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; |