Rex Zhu
effa290caa
drm/amd/powerplay: correct UlvOffsetVid on 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-04-28 17:33:10 -04:00
Rex Zhu
4bae05e196
drm/amd/powerplay: Fix AVFS param.
...
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-04-28 17:32:51 -04:00
Rex Zhu
afc0255c9a
drm/amd/powerplay: enable clock stretch feature on Vega10.
...
Correctly calculate CKSVidOffset
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-04-28 17:32:51 -04:00
Rex Zhu
2d5f5f9496
drm/amd/powerplay: enable pcie dpm on 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-04-28 17:32:50 -04:00
Rex Zhu
d475ce6296
drm/amd/powerplay: allocate fb for avfs fuse table on 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-04-28 17:32:50 -04:00
Rex Zhu
67131aa525
drm/amd/powerplay: enable AGM logging while dpm disabled.
...
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-04-28 17:32:49 -04:00
Huang Rui
42f72d0b37
drm/amd/powerplay: add error message to remind user updating firmware
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:32:48 -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
Rex Zhu
2211a787de
drm/amd/powerplay: delete dead functions in vega10.
...
Vega10 does not support AVFS BTC, remove function.
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-04-28 17:32:39 -04:00
Huang Rui
4573f0f21d
drm/amd/powerplay: fix suspend error on DPM disabled
...
Don't fail if DPM is disabled.
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-04-28 17:32:12 -04:00
Rex Zhu
6524e494a8
drm/amd/powerplay: align with VBIOS to support new AVFS structure
...
Align the driver with the latest vbios structures.
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-04-28 16:37:55 -04:00
Rex Zhu
8250880ed8
drm/amd/powerplay: add fan controller table v11 support.
...
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-04-07 15:15:44 -04:00
Rex Zhu
1e1eb6a893
drm/amd/powerplay: port newest process pptable code 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-04-07 15:15:43 -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
Dan Carpenter
99147e6442
drm/amd/powerplay: fix a couple locking issues
...
We should return unlock on the error path in pp_dpm_dispatch_tasks()
and there is a double lock bug in pp_dpm_set_sclk_od().
Fixes: 2a5071056e ("drm/amd/powerplay: add global PowerPlay mutex.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-04 13:40:34 -04:00
Dan Carpenter
0f987cd0d7
drm/amd/powerplay: fix pp_dpm_get_current_power_state() (v2)
...
This switch statement is missing breaks.
v2: agd: break in default case as well
Fixes: 2a5071056e ("drm/amd/powerplay: add global PowerPlay mutex.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-04 13:40:33 -04:00
Alex Deucher
ad4febd9b7
drm/amdgpu/powerplay: fix locking typo
...
Fixes: 2a5071056e ("drm/amd/powerplay: add global PowerPlay mutex.")
Reported-by: Julia Lawall <julia.lawall@lip6.fr >
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-04 13:40:30 -04:00
Rex Zhu
a7c7bc4c0c
drm/amd/powerplay: reduce sample period time
...
for power readings.
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:55:22 -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
0d2c7569e1
drm/amdgpu: add new atomfirmware based helpers for powerplay
...
New helpers for fetching info out of atomfirmware.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Ken Wang <Ken.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:54:51 -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
923d26db85
drm/amd/powerplay: restore disabling power containment on Fiji (v2)
...
Power containment will degrade performance in some compute tests.
Restore disabling it as before code refining in powerplay.
v2: only in the compute profile
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:54:14 -04:00
Andrew F. Davis
93a4aec218
drm/amd/powerplay: remove unneeded conversions to bool
...
Found with scripts/coccinelle/misc/boolconv.cocci.
Signed-off-by: Andrew F. Davis <afd@ti.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:58 -04:00
Eric Huang
35011d398e
drm/amd/powerplay: simplify avfs control code in smu7
...
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:28 -04:00
Eric Huang
f9c993ceb1
drm/amd/powerplay: add function avfs control in smu7
...
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:28 -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
2245b60f9c
drm/amd/powerplay: implement gpu power display for smu7_hwmgr
...
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:54 -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
03609ebc4c
drm/amd/powerplay: add power profile support for Polaris
...
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:51 -04:00
Eric Huang
43f6d14455
drm/amd/powerplay: add power profile support for Fiji
...
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:51 -04:00
Eric Huang
3ed2584f0b
drm/amd/powerplay: add power profile support for tonga
...
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:50 -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
789fd60fa6
drm/amd/powerplay: reapply power profile when force dpm level to auto
...
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
Monk Liu
8fdf269258
drm/amdgpu:fix powerplay logic
...
1,like pp_hw_init, we shouldn't report error if PP disabled
2,disable pp_en if sriov
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:52:37 -04:00
Rex Zhu
8c53ad2139
drm/amd/powerplay: fix copy error in smu7_clockpoweragting.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-03-14 14:04:07 -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
Rex Zhu
187368a5c7
drm/amd/powerplay: fix PSI feature on Polars12.
...
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-02-22 17:54:23 -05:00
Huang Rui
fce293ca3d
drm/amd/powerplay: add didt config table for polaris kicker
...
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:32 -05:00
Huang Rui
28a488848f
drm/amd/powerplay: modify VddcPhase value for polaris kicker
...
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:22 -05: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
Alex Deucher
a52d120f62
drm/amdgpu: add support for new smc firmware on polaris
...
Some polaris variants require new smc firmware.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-02-09 10:54:45 -05:00