<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">I'll grab it for my -fixes pull this week.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Alex<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> Kuehling, Felix<br>
<b>Sent:</b> Monday, November 19, 2018 3:02:27 PM<br>
<b>To:</b> Deucher, Alexander; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Joerg Roedel<br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: Fix oops when pp_funcs->switch_power_profile is unset</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">I pushed the change to amd-staging-drm-next. I'd also like to get it<br>
into drm-fixes. Should I cherry-pick it to your drm-fixes-4.20 branch on<br>
fd.o?<br>
<br>
<br>
Thanks,<br>
Felix<br>
<br>
<br>
On 2018-11-15 4:59 p.m., Deucher, Alexander wrote:<br>
><br>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
><br>
> ------------------------------------------------------------------------<br>
> *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of<br>
> Kuehling, Felix <Felix.Kuehling@amd.com><br>
> *Sent:* Thursday, November 15, 2018 4:56:51 PM<br>
> *To:* amd-gfx@lists.freedesktop.org<br>
> *Cc:* Kuehling, Felix; Joerg Roedel<br>
> *Subject:* [PATCH] drm/amdgpu: Fix oops when<br>
> pp_funcs->switch_power_profile is unset<br>
> <br>
> On Vega20 and other pre-production GPUs, powerplay is not enabled yet.<br>
> Check for NULL pointers before calling pp_funcs function pointers.<br>
><br>
> Also affects Kaveri.<br>
><br>
> CC: Joerg Roedel <jroedel@suse.de><br>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++++--<br>
> 1 file changed, 5 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c<br>
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c<br>
> index a9c7597..1c1fed6 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c<br>
> @@ -503,8 +503,11 @@ void amdgpu_amdkfd_set_compute_idle(struct<br>
> kgd_dev *kgd, bool idle)<br>
> {<br>
> struct amdgpu_device *adev = (struct amdgpu_device *)kgd;<br>
> <br>
> - amdgpu_dpm_switch_power_profile(adev,<br>
> - PP_SMC_POWER_PROFILE_COMPUTE,<br>
> !idle);<br>
> + if (adev->powerplay.pp_funcs &&<br>
> + adev->powerplay.pp_funcs->switch_power_profile)<br>
> + amdgpu_dpm_switch_power_profile(adev,<br>
> + <br>
> PP_SMC_POWER_PROFILE_COMPUTE,<br>
> + !idle);<br>
> }<br>
> <br>
> bool amdgpu_amdkfd_is_kfd_vmid(struct amdgpu_device *adev, u32 vmid)<br>
> -- <br>
> 2.7.4<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>