[PATCH 2/2] drm/amdgpu: Add stolen reserved memory for MI25 SRIOV.

Deucher, Alexander Alexander.Deucher at amd.com
Tue Mar 15 14:38:35 UTC 2022


[Public]

Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: Sun, Yongqiang <Yongqiang.Sun at amd.com>
Sent: Tuesday, March 15, 2022 10:11 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Sun, Yongqiang <Yongqiang.Sun at amd.com>
Subject: [PATCH 2/2] 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.

Signed-off-by: Yongqiang Sun <yongqiang.sun at amd.com>
Change-Id: Ia1d1c4392fb792fa0186250dfc6270f35ffd6bed
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index f18d050a14cf..7021e8f390bd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -643,6 +643,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;
--
2.25.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20220315/65042ca5/attachment.htm>


More information about the amd-gfx mailing list