aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2019-03-28 12:51:23 +0000
committerAlex Deucher <[email protected]>2019-04-03 15:00:30 +0000
commitb6f3a51e0a3427fe6e737c37f911d07afb50683f (patch)
tree294236e148f36711fde7e5f53e7c1b62fbda493c /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parentdrm/amdgpu: fix ATC handling for Ryzen (diff)
downloadkernel-b6f3a51e0a3427fe6e737c37f911d07afb50683f.tar.gz
kernel-b6f3a51e0a3427fe6e737c37f911d07afb50683f.zip
drm/amdgpu: handle leaf PDEs as PTEs on Vega
This way we get retry faults for missing PDs. Signed-off-by: Christian König <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index eb8a5064eadf..fc7236af6a41 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -787,15 +787,22 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
}
if (entries) {
- uint64_t value = 0;
+ uint64_t value = 0, flags = 0;
- /* Workaround for fault priority problem on GMC9 */
- if (level == AMDGPU_VM_PTB &&
- adev->asic_type >= CHIP_VEGA10)
- value = AMDGPU_PTE_EXECUTABLE;
+ if (adev->asic_type >= CHIP_VEGA10) {
+ if (level != AMDGPU_VM_PTB) {
+ /* Handle leaf PDEs as PTEs */
+ flags |= AMDGPU_PDE_PTE;
+ amdgpu_gmc_get_vm_pde(adev, level,
+ &value, &flags);
+ } else {
+ /* Workaround for fault priority problem on GMC9 */
+ flags = AMDGPU_PTE_EXECUTABLE;
+ }
+ }
r = vm->update_funcs->update(&params, bo, addr, 0, entries,
- 0, value);
+ value, flags);
if (r)
return r;
}