<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Series is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Sun, Yongqiang <Yongqiang.Sun@amd.com><br>
<b>Sent:</b> Tuesday, March 15, 2022 10:11 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Sun, Yongqiang <Yongqiang.Sun@amd.com><br>
<b>Subject:</b> [PATCH 2/2] drm/amdgpu: Add stolen reserved memory for MI25 SRIOV.</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">MI25 SRIOV guest driver loading failed due to allocated memory overlaps<br>
with firmware reserved area.<br>
Allocate stolen reserved memory for MI25 SRIOV specifically to avoid the<br>
memory overlap.<br>
<br>
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com><br>
Change-Id: Ia1d1c4392fb792fa0186250dfc6270f35ffd6bed<br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 9 +++++++++<br>
1 file changed, 9 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c<br>
index f18d050a14cf..7021e8f390bd 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c<br>
@@ -643,6 +643,15 @@ void amdgpu_gmc_get_vbios_allocations(struct amdgpu_device *adev)<br>
*/<br>
switch (adev->asic_type) {<br>
case CHIP_VEGA10:<br>
+ adev->mman.keep_stolen_vga_memory = true;<br>
+ /*<br>
+ * VEGA10 SRIOV VF needs some firmware reserved area.<br>
+ */<br>
+ if (amdgpu_sriov_vf(adev)) {<br>
+ adev->mman.stolen_reserved_offset = 0x100000;<br>
+ adev->mman.stolen_reserved_size = 0x600000;<br>
+ }<br>
+ break;<br>
case CHIP_RAVEN:<br>
case CHIP_RENOIR:<br>
adev->mman.keep_stolen_vga_memory = true;<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>