<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">
<p style="font-family:Arial;font-size:10pt;color:#317100;margin:15pt;" align="Left">
[AMD Public Use]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt">
You can probably just squash patches 2-5 into one patch. Either way, series is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt">
<br>
</div>
<br>
</div>
<div id="appendonsend"></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 <Evan.Quan@amd.com><br>
<b>Sent:</b> Monday, August 17, 2020 4:29 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Quan, Evan <Evan.Quan@amd.com><br>
<b>Subject:</b> [PATCH 1/5] drm/amd/pm: disable/enable deep sleep features on UMD pstate enter/exit</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Add deep sleep disablement/enablement on UMD pstate entering/exiting.<br>
<br>
Change-Id: I4fbc02bb4a390ab82293a5ff9c91f2a8beb0a3c9<br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
---<br>
drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 1 +<br>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 ++<br>
drivers/gpu/drm/amd/pm/swsmu/smu_internal.h | 1 +<br>
3 files changed, 4 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h<br>
index 7cc707ec21c3..4c5c041af4ee 100644<br>
--- a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h<br>
+++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h<br>
@@ -597,6 +597,7 @@ struct pptable_funcs {<br>
ssize_t (*get_gpu_metrics)(struct smu_context *smu, void **table);<br>
int (*enable_mgpu_fan_boost)(struct smu_context *smu);<br>
int (*gfx_ulv_control)(struct smu_context *smu, bool enablement);<br>
+ int (*deep_sleep_control)(struct smu_context *smu, bool enablement);<br>
};<br>
<br>
typedef enum {<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
index 221b5c923ce1..8eb5b92903cd 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
@@ -1441,6 +1441,7 @@ static int smu_enable_umd_pstate(void *handle,<br>
AMD_IP_BLOCK_TYPE_GFX,<br>
AMD_CG_STATE_UNGATE);<br>
smu_gfx_ulv_control(smu, false);<br>
+ smu_deep_sleep_control(smu, false);<br>
}<br>
} else {<br>
/* exit umd pstate, restore level, enable gfx cg*/<br>
@@ -1448,6 +1449,7 @@ static int smu_enable_umd_pstate(void *handle,<br>
if (*level == AMD_DPM_FORCED_LEVEL_PROFILE_EXIT)<br>
*level = smu_dpm_ctx->saved_dpm_level;<br>
smu_dpm_ctx->enable_umd_pstate = false;<br>
+ smu_deep_sleep_control(smu, true);<br>
smu_gfx_ulv_control(smu, true);<br>
amdgpu_device_ip_set_clockgating_state(smu->adev,<br>
AMD_IP_BLOCK_TYPE_GFX,<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_internal.h b/drivers/gpu/drm/amd/pm/swsmu/smu_internal.h<br>
index 2fe29c6a00ce..c88f8fab1bae 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_internal.h<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_internal.h<br>
@@ -93,6 +93,7 @@<br>
#define smu_get_pp_feature_mask(smu, buf) smu_ppt_funcs(get_pp_feature_mask, 0, smu, buf)<br>
#define smu_set_pp_feature_mask(smu, new_mask) smu_ppt_funcs(set_pp_feature_mask, 0, smu, new_mask)<br>
#define smu_gfx_ulv_control(smu, enablement) smu_ppt_funcs(gfx_ulv_control, 0, smu, enablement)<br>
+#define smu_deep_sleep_control(smu, enablement) smu_ppt_funcs(deep_sleep_control, 0, smu, enablement)<br>
<br>
#endif<br>
#endif<br>
-- <br>
2.28.0<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>