OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cb738a
)
drm/amd/powerplay: correct power limit retrieving based on current power source
author
Evan Quan
<evan.quan@amd.com>
Mon, 8 Jun 2020 09:33:03 +0000
(17:33 +0800)
committer
Alex Deucher
<alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:18 +0000
(
01:59
-0400)
Instead of hard coding it as SMU_POWER_SOURCE_AC.
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smu_v11_0.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
index
a15460b
..
e60b7cb
100644
(file)
--- a/
drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+++ b/
drivers/gpu/drm/amd/powerplay/smu_v11_0.c
@@
-1065,7
+1065,10
@@
int smu_v11_0_get_current_power_limit(struct smu_context *smu,
if (!smu_feature_is_enabled(smu, SMU_FEATURE_PPT_BIT))
return -EINVAL;
- power_src = smu_power_get_index(smu, SMU_POWER_SOURCE_AC);
+ power_src = smu_power_get_index(smu,
+ smu->adev->pm.ac_power ?
+ SMU_POWER_SOURCE_AC :
+ SMU_POWER_SOURCE_DC);
if (power_src < 0)
return -EINVAL;