<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<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_gmail_extra"><br>
<div class="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="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>
</body>
</html>