projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73d0a44
)
drm/amd/powerplay: hint when power profile setting is not supported
author
Evan Quan
<
[email protected]
>
Wed, 10 Oct 2018 07:24:59 +0000
(15:24 +0800)
committer
Alex Deucher
<
[email protected]
>
Fri, 12 Oct 2018 17:22:16 +0000
(12:22 -0500)
Give user some hints when the power profile setting is not supported.
Signed-off-by: Evan Quan <
[email protected]
>
Reviewed-by: Alex Deucher <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 75b56ae032ce77e495f8549c0ca49e0a350f2090..e8964cae6b93dba0c3d183dcc5383fa12734fca3 100644
(file)
--- a/
drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/
drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@
-894,9
+894,14
@@
static int pp_set_power_profile_mode(void *handle, long *input, uint32_t size)
pr_info("%s was not implemented.\n", __func__);
return ret;
}
+
+ if (hwmgr->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL) {
+ pr_info("power profile setting is for manual dpm mode only.\n");
+ return ret;
+ }
+
mutex_lock(&hwmgr->smu_lock);
- if (hwmgr->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL)
- ret = hwmgr->hwmgr_func->set_power_profile_mode(hwmgr, input, size);
+ ret = hwmgr->hwmgr_func->set_power_profile_mode(hwmgr, input, size);
mutex_unlock(&hwmgr->smu_lock);
return ret;
}