Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: drop the huge page flag

Not needed any more since we now free PDs/PTs on demand.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Christian König and committed by
Alex Deucher
adc7bfe5 e35fb064

+1 -14
+1 -13
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
··· 1371 1371 uint64_t pde, pt, flags; 1372 1372 unsigned level; 1373 1373 1374 - /* Don't update huge pages here */ 1375 - if (entry->huge) 1376 - return; 1377 - 1378 1374 for (level = 0, pbo = bo->parent; pbo; ++level) 1379 1375 pbo = pbo->parent; 1380 1376 ··· 1634 1638 continue; 1635 1639 } 1636 1640 1637 - /* If it isn't already handled it can't be a huge page */ 1638 - if (cursor.entry->huge) { 1639 - /* Add the entry to the relocated list to update it. */ 1640 - cursor.entry->huge = false; 1641 - amdgpu_vm_bo_relocated(&cursor.entry->base); 1642 - } 1643 - 1644 1641 shift = amdgpu_vm_level_shift(adev, cursor.level); 1645 1642 parent_shift = amdgpu_vm_level_shift(adev, cursor.level - 1); 1646 1643 if (adev->asic_type < CHIP_VEGA10) { ··· 1692 1703 } while (frag_start < entry_end); 1693 1704 1694 1705 if (amdgpu_vm_pt_descendant(adev, &cursor)) { 1695 - /* Mark all child entries as huge */ 1706 + /* Free all child entries */ 1696 1707 while (cursor.pfn < frag_start) { 1697 - cursor.entry->huge = true; 1698 1708 amdgpu_vm_free_pts(adev, params->vm, &cursor); 1699 1709 amdgpu_vm_pt_next(adev, &cursor); 1700 1710 }
-1
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
··· 140 140 141 141 struct amdgpu_vm_pt { 142 142 struct amdgpu_vm_bo_base base; 143 - bool huge; 144 143 145 144 /* array of page tables, one for each directory entry */ 146 145 struct amdgpu_vm_pt *entries;