diff options
author | Christian König <christian.koenig@amd.com> | 2018-09-07 08:21:15 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-13 16:14:10 -0400 |
commit | 1b1d5c43db58d236d4a6c9700ef9395b3fc129fb (patch) | |
tree | 2ab3fdfba88ec0629935b583044feaf4b9bf247f /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | dfcd99f6273e7ae9aae10eafacc5521018bee143 (diff) |
drm/amdgpu: use the maximum possible fragment size on Vega/Raven
The fragment size controls only the L1 on Vega/Raven and we now don't
have any extra overhead any more because of larger fragments.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Junwei Zhang <Jerry.Zhang@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 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 45343501c1f3..2d2d6197c3dc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -1540,8 +1540,16 @@ static void amdgpu_vm_fragment(struct amdgpu_pte_update_params *params, | |||
1540 | * larger. Thus, we try to use large fragments wherever possible. | 1540 | * larger. Thus, we try to use large fragments wherever possible. |
1541 | * Userspace can support this by aligning virtual base address and | 1541 | * Userspace can support this by aligning virtual base address and |
1542 | * allocation size to the fragment size. | 1542 | * allocation size to the fragment size. |
1543 | * | ||
1544 | * Starting with Vega10 the fragment size only controls the L1. The L2 | ||
1545 | * is now directly feed with small/huge/giant pages from the walker. | ||
1543 | */ | 1546 | */ |
1544 | unsigned max_frag = params->adev->vm_manager.fragment_size; | 1547 | unsigned max_frag; |
1548 | |||
1549 | if (params->adev->asic_type < CHIP_VEGA10) | ||
1550 | max_frag = params->adev->vm_manager.fragment_size; | ||
1551 | else | ||
1552 | max_frag = 31; | ||
1545 | 1553 | ||
1546 | /* system pages are non continuously */ | 1554 | /* system pages are non continuously */ |
1547 | if (params->src || !(flags & AMDGPU_PTE_VALID)) { | 1555 | if (params->src || !(flags & AMDGPU_PTE_VALID)) { |