<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: Kevin Wang <kevin1.wang@amd.com></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Best Regards,</p>
<p style="margin-top:0;margin-bottom:0">Kevin</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> Quan, Evan<br>
<b>Sent:</b> Tuesday, July 16, 2019 11:01:43 AM<br>
<b>To:</b> Quan, Evan; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Wang, Kevin(Yang)<br>
<b>Subject:</b> RE: [PATCH] drm/amd/powerplay: fix deadlock around smu_handle_task V2</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Ping..<br>
<br>
> -----Original Message-----<br>
> From: Evan Quan <evan.quan@amd.com><br>
> Sent: Friday, July 12, 2019 1:51 PM<br>
> To: amd-gfx@lists.freedesktop.org<br>
> Cc: Wang, Kevin(Yang) <Kevin1.Wang@amd.com>; Quan, Evan<br>
> <Evan.Quan@amd.com><br>
> Subject: [PATCH] drm/amd/powerplay: fix deadlock around<br>
> smu_handle_task V2<br>
> <br>
> As the lock was already held on the entrance to smu_handle_task.<br>
> <br>
> - V2: lock in small granularity<br>
> <br>
> Change-Id: I5388aa917ef0e330974e26c59db42d1354b6a865<br>
> Signed-off-by: Evan Quan <evan.quan@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 --<br>
> 1 file changed, 2 deletions(-)<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> index 961f4e54ed18..eb255a6bd3a9 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> @@ -3049,11 +3049,9 @@ void amdgpu_pm_compute_clocks(struct<br>
> amdgpu_device *adev)<br>
> if (is_support_sw_smu(adev)) {<br>
> struct smu_context *smu = &adev->smu;<br>
> struct smu_dpm_context *smu_dpm = &adev-<br>
> >smu.smu_dpm;<br>
> - mutex_lock(&(smu->mutex));<br>
> smu_handle_task(&adev->smu,<br>
> smu_dpm->dpm_level,<br>
> AMD_PP_TASK_DISPLAY_CONFIG_CHANGE);<br>
> - mutex_unlock(&(smu->mutex));<br>
> } else {<br>
> if (adev->powerplay.pp_funcs->dispatch_tasks) {<br>
> if (!amdgpu_device_has_dc_support(adev)) {<br>
> --<br>
> 2.21.0<br>
<br>
</div>
</span></font></div>
</body>
</html>