Evan Quan
547f1091b9
drm/amd/powerplay: ACG frequency added in PPTable
...
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 >
2017-08-24 11:48:43 -04:00
Junwei Zhang
b59eb8984f
drm/amd/powerplay: add vclk/dclkSoftMin support for raven
...
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-15 14:46:01 -04:00
Evan Quan
9b7b8154cd
drm/amd/powerplay: added didt support for vega10
...
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 >
2017-07-14 11:06:26 -04:00
Rex Zhu
ce09d8ecb1
drm/amd/powerplay: move VI common AVFS code to smu7_smumgr.c
...
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-07-14 11:06:16 -04:00
Rex Zhu
fc3a4fc631
drm/amd/powerplay: add acg support in pptable for vega10
...
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-07-14 11:06:08 -04:00
Rex Zhu
3272cfcf73
drm/amd/powerplay: export ACG related smu message for vega10
...
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-07-14 11:06:08 -04:00
Eric Huang
4490332651
drm/amd/powerplay: change PPSMC_MSG_GetCurrPkgPwr for Vega10
...
To follow up SMU FW 28.35.0.
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-06-29 12:43:51 -04:00
Eric Huang
4b1d63600e
drm/amd/powerplay: update vega10_ppsmc.h
...
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-06-15 11:50:24 -04:00
Hawking Zhang
5746f36dac
drm/amd/powerplay: update magic number for rv hw backend
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-25 16:12:12 -04:00
Rex Zhu
96cda84a67
drm/amd/powerplay: add new clock type in struct gfx_arbit.
...
Add the new clock type to the gfx arbitor so we can determine
the proper clock floors for it.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:29:39 -04:00
Rex Zhu
746eb864a2
drm/amd/powerplay: add new clock type for Rv
...
New clock type on RV.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:27:59 -04:00
Rex Zhu
e5432ebd0d
drm/amd/powerplay: add new smu message for Rv
...
Add additional smu messages.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:25:14 -04:00
Rex Zhu
a960d61cbd
drm/amd/powerplay: add raven support in hwmgr. (v2)
...
hwmgr handles the GPU power state management.
v2: squash in updates (Alex)
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:52 -04:00
Rex Zhu
4fa483e5b3
drm/amd/powerplay: add raven support in smumgr. (v2)
...
smumgr provides the interface for interacting with the
smu firmware which handles power management.
v2: squash in updates (Alex)
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:51 -04:00
Rex Zhu
adfc7f077d
drm/amd/powerplay: add ppt_v3 define
...
defines clock dependencies for raven.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:51 -04:00
Rex Zhu
07c5b4ed21
drm/amdgpu/powerplay: add header file for smu10. (v2)
...
Headers define the driver/fw interface for smu10.
v2: squash in updates (Alex)
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:49 -04:00
Rex Zhu
9312d9a6a0
drm/amd/powerplay: update vega10 smu interface version to E.
...
need update smu firmware to version 0x1c20.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewws-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:39:43 -04:00
Rex Zhu
fbf66a3c9c
drm/amd/powerplay: Add Vega10 Powertune Table v3 support.
...
Handle the latest powerplay table format; includes Boost
State support.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewws-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:39:41 -04:00
Rex Zhu
2fde9ab218
drm/amd/powerplay: refine pwm1_enable callback functions for vi.
...
Use the new enums for setting and getting the fan control mode.
Fixes problems due to previous inconsistencies between enums.
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-05-10 13:36:35 -04:00
Rex Zhu
ded96c7389
drm/amd/powerplay: add more smu message on Vega10.
...
Add some new SMU messages.
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-05-10 13:36:06 -04:00
Rex Zhu
652bd0c344
drm/amd/powerplay: delete dead code in powerplay.
...
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-05-05 18:14:44 -04:00
Rex Zhu
1dfc41d44c
drm/amd/powerplay: add disable_smc_ctf callback in hwmgr.
...
export disablesmcctf to eventmgr.
need to disable temperature alert when s3/s4.
otherwise, when resume back,enable temperature
alert will fail.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:33:15 -04:00
Evan Quan
e0b2f8cff1
drm/amdgpu: update smu9 driver interface
...
Updated interface between the driver and the SMU controller.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:32:46 -04:00
Evan Quan
ba8a21cfbc
drm/amdgpu/smu9: update to latest driver interface
...
Signed-off-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-06 13:27:26 -04:00
Eric Huang
f83a999164
drm/amd/powerplay: add Vega10 powerplay support (v5)
...
Adds power management support for vega10.
v2: squash in fan control and led config fixes from Rex
v3: squash in dead code removal and socvid fixes from Rex
v4: squash in dpm force level fix from Rex
v5: squash in latest headless, gpu load fixes from Rex
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:54:54 -04:00
Eric Huang
d018772748
drm/amd/powerplay: add some display/powerplay interfaces
...
New interfaces needed to handle the new clock trees and
bandwidth requirements on vega10.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Tony Cheng <tony.cheng@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:54:54 -04:00
Eric Huang
e29922795f
drm/amd/powerplay: add some new structures for Vega10
...
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:54:52 -04:00
Rex Zhu
2a5071056e
drm/amd/powerplay: add global PowerPlay mutex.
...
Acked-by: Christian König <christian.koenig@amd.com >
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-03-29 23:54:52 -04:00
Eric Huang
bcea239686
drm/amd/powerplay: add new Vega10's ppsmc header file
...
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:54:51 -04:00
Eric Huang
25e2196cc8
drm/amd/powerplay: add smu9 header files for Vega10
...
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:54:50 -04:00
Eric Huang
dd4bdf3b35
drm/amd/powerplay: add voltage change support through pp_table
...
Disable avfs to make voltage change take effect.
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-03-29 23:53:27 -04:00
Joe Perches
98a36749eb
drivers/gpu: Convert remaining uses of pr_warning to pr_warn
...
To enable eventual removal of pr_warning
This makes pr_warn use consistent for drivers/gpu
Prior to this patch, there were 15 uses of pr_warning and
20 uses of pr_warn in drivers/gpu
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Joe Perches <joe@perches.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:22 -04:00
Alex Deucher
7bb0613ebb
drm/amdgpu/powerplay: enable LEDs on Fiji boards
...
This enables the LEDs that light up based on DPM states
on some Fiji boards.
bug:
https://bugs.freedesktop.org/show_bug.cgi?id=97590
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:20 -04:00
Tom St Denis
9f8df7d71e
drm/amd/amdgpu: Update read_sensor calls to have size parameter (v3)
...
This update allows sensors to return more than 1 value and
indicates to the caller how many bytes are written.
The debugfs interface has been updated to handle reading all
of the values. Simply seek to the enum value (multiplied
by 4) and then read as many bytes as the sensor provides.
(v2): Don't set size to 4 before reading GPU_POWER
(v3): agd: rebase
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-03-29 23:52:59 -04:00
Eric Huang
4f9afc9bd2
drm/amd/powerplay: add power consumption display support in debugfs
...
The additional output are:
vddc power in Watt;
vddci power in Watt;
max gpu power in Watt;
average gpu power in Watt.
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-03-29 23:52:53 -04:00
Eric Huang
cd7b0c66ce
drm/amd/powerplay: change parameter type pointer from int32_t to void in read sensor
...
As well as fix print format for uint32_t type.
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-03-29 23:52:52 -04:00
Eric Huang
ff3953d49c
drm/amd/powerplay: add power profile support for SMU7
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Acked-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:52:49 -04:00
Eric Huang
34bb2734d1
drm/amd/amdgpu: add power profile sysfs entry
...
Add the sysfs entries pp_gfx_power_profile and
pp_compute_power_profile which give user a way to set
power profile through parameters minimum sclk, minimum mclk,
activity threshold, up hysteresis and down hysteresis only
when the entry power_dpm_force_performance_level is in
default value "auto". It is read and write. Example:
echo 500 800 20 0 5 > /sys/class/drm/card0/device/pp_*_power_profile
cat /sys/class/drm/card0/device/pp_*_power_profile
500 800 20 0 5
Note: first parameter is sclk in MHz, second is mclk in MHz,
third is activity threshold in percentage, fourth is up hysteresis
in ms and fifth is down hysteresis in ms.
echo set > /sys/class/drm/card0/device/pp_*_power_profile
To set power profile state if it exists.
echo reset > /sys/class/drm/card0/device/pp_*_power_profile
To restore default state and clear previous setting.
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Acked-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:52:48 -04:00
Masahiro Yamada
03671057c3
scripts/spelling.txt: add "overrided" pattern and fix typo instances
...
Fix typos and add the following to the scripts/spelling.txt:
overrided||overridden
Link: http://lkml.kernel.org/r/1481573103-11329-22-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2017-02-27 18:43:47 -08:00
Huang Rui
5d7213b0be
drm/amd/powerplay: add kicker flag into smumgr
...
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 >
2017-02-16 11:43:11 -05:00
Rex Zhu
570272d229
drm/amdgpu: extend profiling mode.
...
in profiling mode, powerplay will fix power state
as stable as possible.and disable gfx cg and LBPW feature.
profile_standard: as a prerequisite, ensure power and thermal
sustainable, set clocks ratio as close to the highest clock
ratio as possible.
profile_min_sclk: fix mclk as profile_normal, set lowest sclk
profile_min_mclk: fix sclk as profile_normal, set lowest mclk
profile_peak: set highest sclk and mclk, power and thermal not
sustainable
profile_exit: exit profile mode. enable gfx cg/lbpw 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 >
2017-01-27 11:13:14 -05:00
Rex Zhu
7ef600e808
drm/amd/powerplay: add new smu message.
...
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-01-27 11:13:13 -05:00
Rex Zhu
a5b580e119
drm/amd/powerplay: change function name to make code more readable
...
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-01-27 11:13:02 -05:00
Rex Zhu
63b55943b3
drm/amd/powerplay: refine smumgr code
...
1. delete asic_smum_init functions, export asic private functions
to smumgr directly, make code more readable.
2. create asic private data in asic_init_func.
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-01-27 11:13:01 -05:00
Rex Zhu
a0aa70463e
drm/amd/powerplay: fix memory leak in smu7_hwmgr
...
add pp_smu7_thermal_fini function to free related
data when smu7_hwmgr_fini.
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-01-27 11:13:01 -05:00
Rex Zhu
6f4dc24a88
drm/amd/powerplay: not use module parameter in powerplay.
...
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-01-27 11:12:59 -05:00
Rex Zhu
1c86380248
drm/amd/powerplay: refine powerplay interface.
...
v2: add pp_check function to check pp_instance
valid.
1. powerplay export two new interface to amdgpu,
amd_powerplay_create/amd_powerplay_destroy.
2. create pp_instance/smumgr/hwmgr/eventmgr in
early init, destroy them when lata_fini.
3. in sw_init, create and init asic private smumgr
data, and free them when sw_fini.
4. in hw_init, create and init asic private hwmgr
data, and free them when hw_fini.
5. export powerplay state: PP_DPM_DISABLED.
when user disabled powerplay or hwmgr/eventmgr
init failed, powerplay return this state to amdgpu.
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-01-27 11:12:58 -05:00
Rex Zhu
e5d03ac2b8
drm/amd/powerplay: Unify dpm level defines
...
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-01-27 11:12:53 -05:00
Huang Rui
7739b1e7e1
drm/amd/powerplay: add prefix for all powerplay pr_* prints
...
Powerplay will use them instead of raw printk, and we can dynamic
change the debug level with it.
The prefix is like below:
[ xxx.xxxxxx] amdgpu: [powerplay] ...
Suggested-by: Grazvydas Ignotas <notasas@gmail.com >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Cc: Arindam Nath <Arindam.Nath@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-01-27 11:12:48 -05:00
Huang Rui
167112bff8
drm/amd/powerplay: add callbacks to move smc firmware request into sw_init phase
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-01-27 11:12:36 -05:00