<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">
<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">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</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 Shaoyun Liu <Shaoyun.Liu@amd.com><br>
<b>Sent:</b> Wednesday, May 30, 2018 4:29:51 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Liu, Shaoyun<br>
<b>Subject:</b> [PATCH] drm/amdgpu: Fix NULL pointer when load kfd driver with PP block is disabled</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Change-Id: If34e3517b6cb6f31e898bbe7921485fbddb79fb9<br>
Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 4 ++--<br>
 1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c<br>
index 887702c..bc55e9a 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c<br>
@@ -310,7 +310,7 @@ void get_local_mem_info(struct kgd_dev *kgd,<br>
                         mem_info->local_mem_size_public,<br>
                         mem_info->local_mem_size_private);<br>
 <br>
-       if (amdgpu_emu_mode == 1) {<br>
+       if (!adev->powerplay.pp_funcs) {<br>
                 mem_info->mem_clk_max = 100;<br>
                 return;<br>
         }<br>
@@ -335,7 +335,7 @@ uint32_t get_max_engine_clock_in_mhz(struct kgd_dev *kgd)<br>
         struct amdgpu_device *adev = (struct amdgpu_device *)kgd;<br>
 <br>
         /* the sclk is in quantas of 10kHz */<br>
-       if (amdgpu_emu_mode == 1)<br>
+       if (!adev->powerplay.pp_funcs)<br>
                 return 100;<br>
 <br>
         if (amdgpu_sriov_vf(adev))<br>
-- <br>
1.9.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>