Rex Zhu
aec8d5cc28
drm/amd/powerplay: delete dead code in smumgr
...
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 >
2017-09-26 15:14:36 -04:00
Rex Zhu
63196fe79b
drm/amd/powerplay: delete SMUM_FIELD_MASK
...
repeated defining in hwmgr.h
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 >
2017-09-26 15:14:36 -04:00
Rex Zhu
0041e6007e
drm/amd/powerplay: delete SMUM_WAIT_INDIRECT_FIELD
...
repeated defining in hwmgr.h
use PHM_WAIT_INDIRECT_FIELD instand.
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 >
2017-09-26 15:14:35 -04:00
Rex Zhu
515113f5e5
drm/amd/powerplay: delete SMUM_READ_FIELD
...
repeated defining in hwmgr.h
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 >
2017-09-26 15:14:34 -04:00
Rex Zhu
95175869bd
drm/amd/powerplay: delete SMUM_SET_FIELD
...
repeated defining in hwmgr.h
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 >
2017-09-26 15:14:34 -04:00
Rex Zhu
f0f6e3752a
drm/amd/powerplay: delete SMUM_READ_VFPF_INDIRECT_FIELD
...
repeated defining in hwmgr.h
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 >
2017-09-26 15:14:33 -04:00
Rex Zhu
37192704d9
drm/amd/powerplay: delete SMUM_WRITE_VFPF_INDIRECT_FIELD
...
repeated defining in hwmgr.h
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 >
2017-09-26 15:14:33 -04:00
Rex Zhu
a9eca3a685
drm/amd/powerplay: delete SMUM_WRITE_FIELD
...
the macro is as same as PHM_WRITE_FIELD
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 >
2017-09-26 15:14:32 -04:00
Rex Zhu
fbabae4696
drm/amd/powerplay: delete SMU_WRITE_INDIRECT_FIELD
...
the macro is as same as PHM_WRITE_INDIRECT_FIELD
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 >
2017-09-26 15:14:32 -04:00
Rex Zhu
538fdf1fe7
drm/amd/powerplay: move macros to hwmgr.h
...
the macro is not relevant to SMU,
so rename SMU_WAIT_FIELD_UNEQUAL to
PHM_WAIT_FIELD_UNEQUAL and move to hwmgr.h
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 >
2017-09-26 15:14:31 -04:00
Rex Zhu
57d13f794d
drm/amd/powerplay: move PHM_WAIT_VFPF_INDIRECT_FIELD to hwmgr.h
...
the macro is not relevant to SMU, so move to hwmgr.h
and rename to PHM_WAIT_VFPF_INDIRECT_FIELD
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 >
2017-09-26 15:14:30 -04:00
Rex Zhu
554d95da39
drm/amd/powerplay: move SMUM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL to hwmgr.h
...
the macro is not relevant to SMU, so move to hwmgr.h
and rename to PHM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL
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 >
2017-09-26 15:14:30 -04:00
Rex Zhu
b05720cbf6
drm/amd/powerplay: move SMUM_WAIT_INDIRECT_FIELD_UNEQUAL to hwmgr.h
...
the macro is not relevent to SMU, so move to hwmgr.h
and rename to PHM_WAIT_INDIRECT_FIELD_UNEQUAL
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 >
2017-09-26 15:14:29 -04:00
Rex Zhu
d92cb1629b
drm/amd/powerplay: add new helper functions in hwmgr.h
...
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 >
2017-09-26 15:14:29 -04:00
Rex Zhu
be49be4085
drm/amd/powerplay: use SMU_IND_INDEX/DATA_11 pair
...
in VFPF macros to support virtualization
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 >
2017-09-26 15:14:28 -04:00
Rex Zhu
b3b030520d
drm/amd/powerplay: refine powerplay code.
...
delete struct smumgr, put smu backend function table
in struct hwmgr
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 >
2017-09-26 15:14:27 -04:00
Rex Zhu
221c89f980
drm/amd/powerplay: delete dead code in hwmgr.h
...
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 >
2017-09-26 15:14:27 -04:00
Rex Zhu
d3f8c0abf4
drm/amd/powerplay: refine interface in struct pp_smumgr_func
...
unify to use struct hwmgr as function parameter in
smumgr.
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 >
2017-09-26 15:14:26 -04:00
Rex Zhu
6042e8560e
drm/amd/powerplay: refine phm_register_thermal_interrupt interface
...
currently, not all asics implement this callback function
so not return error to avoid powerplay initialize failed
in those asices
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 >
2017-09-26 15:14:19 -04:00
Eric Huang
fafa359840
drm/amd/powerplay: change alert temperature range
...
Change to more meaningful range that triggers thermal
interrupts.
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 15:14:18 -04:00
Eric Huang
a1665a55c8
drm/amd/powerplay: implement register thermal interrupt for Vega10
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 15:14:17 -04:00
Eric Huang
2a5b64c9fc
drm/amd/powerplay: add register thermal interrupt in hwmgr_hw_init
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 15:14:16 -04:00
Rex Zhu
0596df6b09
drm/amd/powerplay: Simplify smu7_voting_clients()
...
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 >
2017-09-26 13:07:01 -04:00
Rex Zhu
86457c3b21
drm/amd/powerplay: Add support for CI asics to hwmgr
...
Add support for CI asics (Bonaire, Hawaii) to
the powerplay hwmgr
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 >
2017-09-26 13:06:59 -04:00
Rex Zhu
970d9804b0
drm/amd/powerplay: Add support functions for CI to ppatomctrl.c
...
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 >
2017-09-26 13:06:59 -04:00
Rex Zhu
89c67699ad
drm/amd/powerplay: refine dmesg info under powerplay
...
Use pr_debug to prevent spamming unimportant dmesg.
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 >
2017-09-26 13:06:58 -04:00
Rex Zhu
2a527680a1
drm/amd/powerplay: fix set target TDP error on tonga/iceland
...
ConfigurableTDP do not exist from Fiji.
so only use in previous ASIC.
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 >
2017-09-26 13:06:58 -04:00
Rex Zhu
9f4b35411c
drm/amd/powerplay: add CI asics support to smumgr (v3)
...
This ports support for CI asics (Bonaire, Hawaii)
to the powerplay smumgr
v2: warning fix (Alex)
v3: squash in fix for thermal (Tom)
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 >
2017-09-26 13:06:57 -04:00
Rex Zhu
510c2558b9
drm/amd/powerplay: fix pcie max lane define error
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-18 23:30:37 -04:00
Rex Zhu
e71b7ae673
drm/amd/powerplay: fix spelling typo in function name
...
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 >
2017-09-18 23:30:36 -04:00
Rex Zhu
f93f0c3a7e
drm/amd/powerplay: use struct amd_pm_funcs in powerplay
...
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 >
2017-09-18 23:30:34 -04:00
Rex Zhu
cfa289fd49
drm/amdgpu: rename amdgpu_dpm_funcs to amd_pm_funcs
...
renamed amdgpu_dpm_funcs and moved to amd_shared.h
so can shared with powerplay.
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 >
2017-09-18 23:30:34 -04:00
Rex Zhu
698f88e697
drm/amd/powerplay: delete dead code in powerplay
...
delete functiontable related codes
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 >
2017-09-18 23:30:33 -04:00
Rex Zhu
cf2623d951
drm/amd/powerplay: refine powerplay code for RV
...
use function points instand of function table.
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 >
2017-09-18 23:30:32 -04:00
Rex Zhu
06d31a69ca
drm/amd/powerplay: refine powerplay code for CZ/ST
...
1. add function points instand of creat function tables
2. implement stop dpm tasks for CZ/ST
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 >
2017-09-18 23:30:32 -04:00
Rex Zhu
1ab4720441
drm/amd/powerplay: refine code for thermal control in powerplay
...
add function point start_thermal_controller in hwmgr,
delete thermal function table and related functions
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 >
2017-09-18 23:30:31 -04:00
Christian König
88531913a8
drm/amd: remove min/max addr handling from cgs
...
Nobody is actually using this and it causes a bunch of unused and buggy code.
Signed-off-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 >
2017-09-13 12:10:13 -04:00
Tom St Denis
c9232d9ee8
drm/amd/powerplay: lock grbm_gfx index when changing instance
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:11 -04:00
Tom St Denis
9f8ccae9d6
drm/amd/powerplay: Tidy up smu7_enable_didt()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:10 -04:00
Tom St Denis
0120ad13ac
drm/amd/powerplay: Make use of PP_CAP in smu7_powertune.c
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:09 -04:00
Tom St Denis
a10ad69c83
drm/amd/powerplay: Remove unneeded return from pp_smu7_thermal_fini()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:09 -04:00
Tom St Denis
30f111fca0
drm/amd/powerplay: Make use of PP_CAP in smu7_thermal.c
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:08 -04:00
Tom St Denis
3efabd5eda
drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_rpm()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:08 -04:00
Tom St Denis
8b39f031b7
drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_info()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:07 -04:00
Himanshu Jha
4a00f21db8
drm/amd/powerplay: remove unnecessary call to memset
...
call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.
Semantic patch used to resolve this issue:
@@
expression e,e2; constant c;
statement S;
@@
e = kzalloc(e2, c);
if(e == NULL) S
- memset(e, 0, e2);
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:55 -04:00
Tom St Denis
298e87c95f
drm/amd/powerplay: Tidy up vega10_thermal_initialize()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:36 -04:00
Tom St Denis
23db59e48a
drm/amd/powerplay: Tidy up vega10_thermal_set_temperature_range()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:29 -04:00
Tom St Denis
657b1f4697
drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_fan_speed_rpm()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:22 -04:00
Tom St Denis
1f9ba3bec6
drm/amd/powerplay: Fix indentation in vega10_fan_ctrl_reset_fan_speed_to_default()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:14 -04:00
Tom St Denis
0dba3739a7
drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_fan_speed_percent()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:07 -04:00