summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2020-04-07 14:37:42 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-04-22 18:11:45 -0400
commit774e335b878c1edf5e8e5d0138adaf86a892f025 (patch)
tree6004430c5dd9b2a66509a4d94d5d61162d4dc95c /drivers/gpu/drm/amd/powerplay/vega20_ppt.c
parent94e0805ba929d7907c63fde8ef676feca62412e3 (diff)
drm/amd/powerplay: properly set the dpm_enabled state
On the ASIC powered down(in baco or system suspend), the dpm_enabled will be set as false. Then all access (e.g. df state setting issued on RAS error event) to SMU will be blocked. Signed-off-by: Evan Quan <evan.quan@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/vega20_ppt.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/vega20_ppt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
index 3f1044326dcb..61923530b2e4 100644
--- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
@@ -1796,7 +1796,7 @@ static int vega20_get_power_profile_mode(struct smu_context *smu, char *buf)
"PD_Data_error_rate_coeff"};
int result = 0;
- if (!smu->pm_enabled || !buf)
+ if (!buf)
return -EINVAL;
size += sprintf(buf + size, "%16s %s %s %s %s %s %s %s %s %s %s\n",
@@ -1887,8 +1887,6 @@ static int vega20_set_power_profile_mode(struct smu_context *smu, long *input, u
smu->power_profile_mode = input[size];
- if (!smu->pm_enabled)
- return ret;
if (smu->power_profile_mode > PP_SMC_POWER_PROFILE_CUSTOM) {
pr_err("Invalid power profile mode %d\n", smu->power_profile_mode);
return -EINVAL;