aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
diff options
context:
space:
mode:
authorYongqiang Sun <[email protected]>2022-03-15 13:43:41 +0000
committerAlex Deucher <[email protected]>2022-03-15 19:01:12 +0000
commitfaad5ccac1eaae584f9ac2ea66278bd137edcbe3 (patch)
tree13d38091c5741a80020d1d0d7a7ba39b164c3c53 /drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
parentdrm/amdgpu: Merge get_reserved_allocation to get_vbios_allocations. (diff)
downloadkernel-faad5ccac1eaae584f9ac2ea66278bd137edcbe3.tar.gz
kernel-faad5ccac1eaae584f9ac2ea66278bd137edcbe3.zip
drm/amdgpu: Add stolen reserved memory for MI25 SRIOV.
MI25 SRIOV guest driver loading failed due to allocated memory overlaps with firmware reserved area. Allocate stolen reserved memory for MI25 SRIOV specifically to avoid the memory overlap. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Yongqiang Sun <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index a25ae3b51256..ca2cfb65f976 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -639,6 +639,15 @@ void amdgpu_gmc_get_vbios_allocations(struct amdgpu_device *adev)
*/
switch (adev->asic_type) {
case CHIP_VEGA10:
+ adev->mman.keep_stolen_vga_memory = true;
+ /*
+ * VEGA10 SRIOV VF needs some firmware reserved area.
+ */
+ if (amdgpu_sriov_vf(adev)) {
+ adev->mman.stolen_reserved_offset = 0x100000;
+ adev->mman.stolen_reserved_size = 0x600000;
+ }
+ break;
case CHIP_RAVEN:
case CHIP_RENOIR:
adev->mman.keep_stolen_vga_memory = true;