<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
thanks chris.</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);">
<a id="OWAAM471300" class="_1OtrSZdhKXVv3UhaivrdJ4 mention ms-bgc-nlr ms-fcl-b" href="mailto:Alexander.Deucher@amd.com">@Deucher, Alexander</a> <a id="OWAAM172244" class="_1OtrSZdhKXVv3UhaivrdJ4 mention ms-bgc-nlr ms-fcl-b" href="mailto:Hawking.Zhang@amd.com">@Zhang,
Hawking</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
from the view of driver, could you help me review it, then give me a RB.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
thanks.</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);">
Best Regards,<br>
Kevin</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Koenig, Christian <Christian.Koenig@amd.com><br>
<b>Sent:</b> Wednesday, March 25, 2020 6:28 PM<br>
<b>To:</b> Wang, Kevin(Yang) <Kevin1.Wang@amd.com><br>
<b>Cc:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Feng, Kenneth <Kenneth.Feng@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: fix hpd bo size calculation error</font>
<div> </div>
</div>
<div>
<div>
<div dir="auto">Good catch! mem.size is actually the backing store size (usually in pages).
<div dir="auto"><br>
</div>
<div dir="auto">Patch is Acked-by: Christian König <Christian.Koenig@amd.com></div>
</div>
<div class="x_x_gmail_extra"><br>
<div class="x_x_gmail_quote">Am 25.03.2020 11:19 schrieb "Wang, Kevin(Yang)" <Kevin1.Wang@amd.com>:<br type="attribution">
</div>
</div>
</div>
<font size="2"><span style="font-size:11pt">
<div class="x_PlainText">the HPD bo size calculation error.<br>
the "mem.size" can't present actual BO size all time.<br>
<br>
Signed-off-by: Kevin Wang <kevin1.wang@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-<br>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-<br>
2 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
index 7f9ac1a14e6f..91c82383b016 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
@@ -1113,7 +1113,7 @@ static int gfx_v10_0_mec_init(struct amdgpu_device *adev)<br>
return r;<br>
}<br>
<br>
- memset(hpd, 0, adev->gfx.mec.hpd_eop_obj->tbo.mem.size);<br>
+ memset(hpd, 0, mec_hpd_size);<br>
<br>
amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);<br>
amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
index fb567cf5671b..01b22dad52fd 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
@@ -1946,7 +1946,7 @@ static int gfx_v9_0_mec_init(struct amdgpu_device *adev)<br>
return r;<br>
}<br>
<br>
- memset(hpd, 0, adev->gfx.mec.hpd_eop_obj->tbo.mem.size);<br>
+ memset(hpd, 0, mec_hpd_size);<br>
<br>
amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);<br>
amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);<br>
-- <br>
2.17.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>