<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">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 14.6667px;">Reviewed-by: Rex Zhu<rezhu@amd.com></span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 14.6667px;">
<br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 14.6667px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 14.6667px;">Best Regards</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 14.6667px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 14.6667px;">Rex</span><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<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> Christian König <ckoenig.leichtzumerken@gmail.com><br>
<b>Sent:</b> Tuesday, March 6, 2018 9:58 PM<br>
<b>To:</b> Zhu, Rex; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> [PATCH] drm/amd/pp: fix "Delete the wrapper layer of smu_allocate/free_memory"</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">For amdgpu_bo_create_kernel to work the handle must be NULL initialized,<br>
otherwise we only try to pin and map the BO.<br>
<br>
Signed-off-by: Christian König <christian.koenig@amd.com><br>
---<br>
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 2 +-<br>
drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 2 +-<br>
2 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c<br>
index cf9ef7add56b..e2ee23ade5c5 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c<br>
@@ -327,10 +327,10 @@ static int rv_start_smu(struct pp_hwmgr *hwmgr)<br>
<br>
static int rv_smu_init(struct pp_hwmgr *hwmgr)<br>
{<br>
+ struct amdgpu_bo *handle = NULL;<br>
struct rv_smumgr *priv;<br>
uint64_t mc_addr;<br>
void *kaddr = NULL;<br>
- struct amdgpu_bo *handle;<br>
int r;<br>
<br>
priv = kzalloc(sizeof(struct rv_smumgr), GFP_KERNEL);<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c<br>
index b7be91e7235b..15e1afa28018 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c<br>
@@ -377,11 +377,11 @@ static int vega10_verify_smc_interface(struct pp_hwmgr *hwmgr)<br>
<br>
static int vega10_smu_init(struct pp_hwmgr *hwmgr)<br>
{<br>
+ struct amdgpu_bo *handle = NULL;<br>
struct vega10_smumgr *priv;<br>
uint64_t mc_addr;<br>
void *kaddr = NULL;<br>
unsigned long tools_size;<br>
- struct amdgpu_bo *handle;<br>
int ret;<br>
struct cgs_firmware_info info = {0};<br>
<br>
-- <br>
2.14.1<br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>