diff options
author | Dave Airlie <airlied@redhat.com> | 2018-11-15 11:14:42 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-11-15 11:15:00 -0500 |
commit | 9826b1138e497dfb48f5cc64a82c219b4d0932da (patch) | |
tree | 778dffa61d1195fa1cad4f59153db5df5d319539 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 7b74026d9c4ee0cfc5b24e51b7f8d5771bdef1f8 (diff) | |
parent | c1a17777eb45d9f3821f35e9869c0a08cd2e664e (diff) |
Merge branch 'drm-fixes-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Fixes for 4.20:
- Fix for huge page handling that caused a GPUVM fault in some cases
- Fix IH ring setup
- Fix for xgmi aperture setup
- Fix for watermark setup for SMU
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181114171853.2866-1-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 | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 352b30409060..dad0e2342df9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -1632,13 +1632,6 @@ static int amdgpu_vm_update_ptes(struct amdgpu_pte_update_params *params, | |||
1632 | continue; | 1632 | continue; |
1633 | } | 1633 | } |
1634 | 1634 | ||
1635 | /* First check if the entry is already handled */ | ||
1636 | if (cursor.pfn < frag_start) { | ||
1637 | cursor.entry->huge = true; | ||
1638 | amdgpu_vm_pt_next(adev, &cursor); | ||
1639 | continue; | ||
1640 | } | ||
1641 | |||
1642 | /* If it isn't already handled it can't be a huge page */ | 1635 | /* If it isn't already handled it can't be a huge page */ |
1643 | if (cursor.entry->huge) { | 1636 | if (cursor.entry->huge) { |
1644 | /* Add the entry to the relocated list to update it. */ | 1637 | /* Add the entry to the relocated list to update it. */ |
@@ -1701,8 +1694,17 @@ static int amdgpu_vm_update_ptes(struct amdgpu_pte_update_params *params, | |||
1701 | } | 1694 | } |
1702 | } while (frag_start < entry_end); | 1695 | } while (frag_start < entry_end); |
1703 | 1696 | ||
1704 | if (frag >= shift) | 1697 | if (amdgpu_vm_pt_descendant(adev, &cursor)) { |
1698 | /* Mark all child entries as huge */ | ||
1699 | while (cursor.pfn < frag_start) { | ||
1700 | cursor.entry->huge = true; | ||
1701 | amdgpu_vm_pt_next(adev, &cursor); | ||
1702 | } | ||
1703 | |||
1704 | } else if (frag >= shift) { | ||
1705 | /* or just move on to the next on the same level. */ | ||
1705 | amdgpu_vm_pt_next(adev, &cursor); | 1706 | amdgpu_vm_pt_next(adev, &cursor); |
1707 | } | ||
1706 | } | 1708 | } |
1707 | 1709 | ||
1708 | return 0; | 1710 | return 0; |