Alex Deucher
90ebf11857
drm/amd/powerplay: update phm_get_voltage_evv_on_sclk for iceland
...
Was missing the handling for iceland.
bugs:
https://bugzilla.kernel.org/show_bug.cgi?id=185681
https://bugs.freedesktop.org/show_bug.cgi?id=98357
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-11-10 11:11:33 -05:00
Alex Deucher
0a866d38ef
drm/amd/powerplay: propagate errors in phm_get_voltage_evv_on_sclk
...
Missing for one case.
bugs:
https://bugzilla.kernel.org/show_bug.cgi?id=185681
https://bugs.freedesktop.org/show_bug.cgi?id=98357
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-11-10 11:10:27 -05:00
Rex Zhu
a2941d0126
drm/amd/powerplay: fix bug get wrong evv voltage of Polaris.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-10-27 13:59:36 -04:00
Rex Zhu
ab4f06d3ad
drm/amd/powerplay: use smu7 hwmgr to manager iceland
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-19 13:22:17 -04:00
Rex Zhu
fb044ed90c
drm/amd/powerplay: use smu7_hwmgr to manager tonga.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-19 13:22:13 -04:00
Rex Zhu
b859c20703
drm/amd/powerplay: use smu7 hwmgr to manager fiji
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-19 13:22:12 -04:00
Rex Zhu
4be051aeb3
drm/amd/powerplay: use smu7 hwmgr to manager polaris10/11
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-19 13:22:11 -04:00
Rex Zhu
c07aefc268
drm/amd/powerplay: fix potential issue of array access violation
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-19 13:22:08 -04:00
Rex Zhu
72f417a2e0
drm/amd/powerplay: Partially revert change initialize platform caps
...
partially revert commit I36f3c9e3a28cbf290652edfb6e19109da660c4f1
this will lead APU can't work.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-16 15:52:51 -04:00
Rex Zhu
aa0ef3ccd6
drm/amd/powerplay: add pptable point check before use it
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-16 15:52:50 -04:00
Rex Zhu
b1c8e1e21f
drm/amd/powerplay: add pp_table_version in hwmgr.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-16 15:52:49 -04:00
Rex Zhu
41698abb4d
drm/amd/powerplay: delete duplicated function and definition.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:36 -04:00
Rex Zhu
026c881046
drm/amd/powerplay: wrap get evv voltage functions
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:35 -04:00
Rex Zhu
8bea2527fa
drm/amd/powerplay: add helper function to get voltage id in votage table
...
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:34 -04:00
Rex Zhu
9597f40365
drm/amd/powerplay: initialize platform caps in hwmgr_init.
...
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:34 -04:00
Rex Zhu
48fad3aff6
drm/amd/powerplay: original power state table should not be changed.
...
power state table was set based on vbios and should not be changed.
when client need to change power state, just make a copy and send to
smu.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-02 11:32:09 -04:00
Rex Zhu
075f101cee
drm/amd/powerplay: simplify struct amd_pp_init.
...
delete the members not needed when amd_powerplay_init.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-25 12:23:41 -04:00
Rex Zhu
6391b6ab32
drm/amd/powrplay: workaround Memory EDC Error for certain partner boards.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:06 -04:00
Rex Zhu
08bd8b9f6f
drm/amd/powerplay: delete useless code in hwmgr.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:02 -04:00
Rex Zhu
af223dfaf0
drm/amdgpu: add module parameters to ctrl powerplay feature
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:52 -04:00
Huang Rui
025f8bfb84
drm/amd/powerplay: add iceland HW manager
...
This patch introduces the iceland HW manager of powerplay which
includes HW manager, clockpowergating, thermal, and powertune.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:26 -04:00
Edward O'Callaghan
5969a8c76b
drivers/amdgpu: Remove redundant casts on kzalloc() calls
...
Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:50 -04:00
Tom St Denis
bb06d7ef99
drm/amd/powerplay: Unify family defines
...
s/AMD_FAMILY_/AMDGPU_FAMILY_/
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-07 15:06:19 -04:00
Eric Huang
4dcf9e6f2e
drm/amd/powerplay: add uploading pptable and resetting powerplay support
...
Necessary for re-initializing dpm with new pptables at runtime.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-07 14:51:38 -04:00
Huang Rui
6bb6b2972d
drm/amdgpu: add powercontainment module parameter
...
This patch makes powercontainment feature configurable. Currently, the
powercontainment is not very stable, so add a module parameter to
enable/disable it via user mode.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-07 14:50:55 -04:00
Rex Zhu
d2e312183b
drm/amd/powerplay: fix bug visit array out of bounds
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-06-09 10:49:15 -04:00
Monk Liu
61da601b95
drm/amdgpu: fix mem leak in pplib/hwmgr
...
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-06-09 10:49:03 -04:00
Rex Zhu
8b41e7a03a
drm/amd/powerplay: move asic unrelated function to hwmgr.c.
...
It's generic and used by multiple asics.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-13 14:26:42 -04:00
Flora Cui
2cc0c0b5cd
drm/amdgpu: change ELM/BAF to Polaris10/Polaris11
...
Adjust to preferred code names.
Signed-off-by: Flora Cui <Flora.Cui@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:27:57 -04:00
Rex Zhu
b83c4ab9ca
drm/amd/powerplay: init hwmgr for ELM/BAF
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:25:56 -04:00
Rex Zhu
c15c8d7020
drm/amd/powerplay: fix Smatch static checker warnings
...
1. return -1 instead of -ENOMEM
2. The struct type mismatch warnings.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-01-08 15:39:23 -05:00
Rex Zhu
17c00a2fed
drm/amd/powerplay: move shared function of vi to hwmgr. (v2)
...
v2: agd: rebase on upstream
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
2015-12-21 16:42:51 -05:00
rezhu
09b7a98622
drm/amd/powerplay: fix warning of cast to pointer from integer of different size.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:38 -05:00
Eric Huang
aabcb7c11e
drm/amd/powerplay: add Fiji DPM support.
...
This enabled DPM support for Fiji. DPM is dynamic
clock and voltage scaling.
v2: rename fiji_hwmgr_early_init to fiji_hwmgr_init
v3: (agd) fold in endian fix, additional function addition
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:17 -05:00
yanyang1
c82baa2818
drm/amd/powerplay: add Tonga dpm support (v3)
...
This implements DPM for tonga. DPM handles dynamic
clock and voltage scaling.
v2: merge all the patches related with tonga dpm
v3: merge dpm force level fix, cgs display fix, spelling fix
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: yanyang1 <young.yang@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:15 -05:00
Rex Zhu
28a18bab2e
drm/amd/powerplay: add CG and PG support for carrizo
...
This adds clock and powergating support for CZ.
v2: squash in fixes
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:11 -05:00
Jammy Zhou
bdecc20a98
drm/amd/powerplay: add Carrizo dpm support
...
This patch enables basic DPM support for Carrizo.
DPM handles dynamic clock and voltage scaling.
v3: delete peci sub-module
v2: use cgs interface directly
correct define SMU_EnabledFeatureScoreboard_SclkDpmOn
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:10 -05:00
Jammy Zhou
3bace35914
drm/amd/powerplay: add hardware manager sub-component
...
The hwmgr handles all hardware related calls, including clock/power
gating control, DPM, read and parse PPTable, etc.
v5: squash in fixes
v4: implement acpi's atcs function use cgs interface
v3: fix code style error and add big-endian mode support.
v2: use cgs interface directly in hwmgr sub-module
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:09 -05:00