<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:#317100;margin:15pt;" align="Left">
[AMD Public Use]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
You might want to add a comment to the code here.  It looks wrong to use the OFFSET.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Wenhui.Sheng <Wenhui.Sheng@amd.com><br>
<b>Sent:</b> Monday, June 29, 2020 2:07 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Sheng, Wenhui <Wenhui.Sheng@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: correct discovery_tmr_size init val</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">From: Wenhui Sheng <Wenhui.Sheng@amd.com><br>
<br>
The legacy way to initialize discovery_tmr_size<br>
is using DISCOVERY_TMR_SIZE, while after we reduce<br>
DISCOVERY_TMR_SIZE from 64KB to 4KB, variable<br>
discovery_tmr_size is also reduced to 4KB, this is not<br>
correct, it still should be 64KB, discovery_tmr_size<br>
will be used to calculate ip_discovery reserved mem's<br>
start address and size.<br>
<br>
Using DISCOVERY_TMR_OFFSET to init discovery_tmr_size instead.<br>
<br>
Signed-off-by: Wenhui Sheng <Wenhui.Sheng@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
index 7d51768684dd..56beafbd3ab9 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
@@ -1872,7 +1872,7 @@ static int amdgpu_ttm_reserve_tmr(struct amdgpu_device *adev)<br>
         adev->discovery_tmr_size =<br>
                 amdgpu_atomfirmware_get_fw_reserved_fb_size(adev);<br>
         if (!adev->discovery_tmr_size)<br>
-               adev->discovery_tmr_size = DISCOVERY_TMR_SIZE;<br>
+               adev->discovery_tmr_size = DISCOVERY_TMR_OFFSET;<br>
 <br>
         if (mem_train_support) {<br>
                 /* reserve vram for mem train according to TMR location */<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7Cba68c480e1fc4e73952408d81bf2ca8a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637290077543935012&amp;sdata=R0g%2FzsOg%2BoH5%2BccXgnGAhRd0JfMgCTuXlv6yuIQSVuY%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7Cba68c480e1fc4e73952408d81bf2ca8a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637290077543935012&amp;sdata=R0g%2FzsOg%2BoH5%2BccXgnGAhRd0JfMgCTuXlv6yuIQSVuY%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>