Kenneth Feng
5d41535c5d
drm/amd/powerplay: Enable ACG SS feature
...
Port the atomfirmware.h and populates the
updated pptable to SMU.With the new parameters
in the new pptable, the ACG SS feature is enabled.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-04-03 13:08:43 -05:00
Rex Zhu
09695ad78f
drm/amd/pp: clean header file 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 >
2018-03-23 09:42:42 -05:00
Rex Zhu
4d2003721c
drm/amd/pp: Refine register_thermal_interrupt function
...
v2: add Vega12 support
1. delete useless argument in function register_thermal_interrupt
2. rename function name register_thermal_interrupt to register_irq_handlers
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 >
2018-03-21 14:36:58 -05:00
Rex Zhu
160b8e7593
drm/amdgpu: Remove wrapper layer of cgs irq handling
...
v2: add Vega12 support
1. remove struct cgs_os_ops
2. delete cgs_linux.h
3. refine the irq code for vega10, can fix set pp table
failed issue.
4. add common smu irq process function
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Junwei Zhang <Jerry.Zhang@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:58 -05:00
Evan Quan
2cac05dee6
drm/amd/powerplay: add the hw manager for vega12 (v4)
...
handles the driver power state setup
v2: squash in the following:
- handle negative temperature ranges
- add vega12 thermal ranges
- use ffs/fls
- remove ACG code
- resend NumOfDisplays message
- correct max dpm levels
- remove power containment settings
- fix warnings
- add sensors interface
- delete unused overdrive arbiter
- drop get_temperature callback
- smu table cleanup
- atomfirmware smu dpm table updates
v3: rebase
v4: rebase
Acked-by: Christian König <christian.koenig@amd.com >
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 >
2018-03-21 14:36:56 -05:00
Evan Quan
c4a4f4b6cb
drm/amd/powerplay: add vega12_ppsmc.h
...
Defines the smc message interface with the driver.
Acked-by: Christian König <christian.koenig@amd.com >
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 >
2018-03-21 14:36:54 -05:00
Evan Quan
97ea8ebe49
drm/amd/powerplay: add new smu9_driver_if.h for vega12 (v2)
...
Add driver firmware interface header.
v2: squash in interface updates.
Acked-by: Christian König <christian.koenig@amd.com >
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 >
2018-03-21 14:36:54 -05:00
Rex Zhu
3f9ca14a1d
drm/amd/pp: Move functions to smu backend table for vega10
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-19 13:35:30 -05:00
Rex Zhu
bcd8377b6f
drm/amd/pp: Remove dead header file pp_asicblocks.h
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-15 09:58:16 -05:00
Rex Zhu
b905090d2b
drm/amdgpu: Remove wrapper layer of smu ip functions
...
1. delete amdgpu_powerplay.c used for wrapping smu ip functions
2. delete struct pp_instance,
3. make struct hwmgr as the smu hw handle.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-15 09:57:50 -05:00
Rex Zhu
8e68627958
drm/amd/pp: Move helper functions to smu_help.c
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-15 09:57:21 -05:00
Rex Zhu
c425688520
drm/amd/pp: Replace rv_* with smu10_*
...
Powerplay is for the hw ip smu, for RV, smu10 is used,
so use smu10 as the prefix of the files name/function name.
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 >
2018-03-15 09:57:12 -05:00
Rex Zhu
0d8a81d926
drm/amd/pp: Add rv_copy_table_from/to_smc to smu backend 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 >
2018-03-15 09:56:53 -05:00
Rex Zhu
56088be9af
drm/amd/pp: Add new smu backend function smc_table_manager
...
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 >
2018-03-15 09:56:44 -05:00
Rex Zhu
116af45059
drm/amd/pp: Simplified the avfs btc state on smu7
...
AVFS feature support/not support is enough to driver.
so remove the complex define of the avfs btc state.
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 >
2018-03-15 09:55:38 -05:00
Rex Zhu
bb03c9c4a9
drm/amd/pp: Drop wrapper functions for upper/lower_32_bits
...
replace smu_upper_32_bits/smu_lower_32_bits with
the standard kernel macros
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 >
2018-03-07 16:10:11 -05:00
Rex Zhu
ecc124b035
drm/amd/pp: Delete the wrapper layer of smu_allocate/free_memory
...
use amdgpu_bo_create/free_kernel instand.
Reviewed-by: Alex Deucher <alexdeucher@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 >
2018-03-07 16:10:10 -05:00
Rex Zhu
cdd02dda4f
Revert "drm/amd/pp: Add a pp feature mask bit for AutoWattman feature"
...
This reverts commit e429ea87b2939c4cce1b439baf6d76535a0767f2.
Implement Workload Aware Dynamic power management instand of
AutoWattman feature in linux.
Reviewed-by: Alex Deucher <alexdeucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-07 16:10:09 -05:00
Rex Zhu
052fe96d93
drm/amd/pp: Add auto power profilng switch based on workloads (v2)
...
Add power profiling mode dynamic switch based on the workloads.
Currently, support Cumpute, VR, Video, 3D,power saving with Cumpute
have highest prority, power saving have lowest prority.
in manual dpm mode, driver will stop auto switch, just save the client's
requests. user can set power profiling mode through sysfs.
when exit manual dpm mode, driver will response the client's requests.
switch based on the client's prority.
v2: squash in fixes from Rex
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-07 16:10:09 -05:00
Rex Zhu
a5278e511d
drm/amd/pp: Revert gfx/compute profile switch sysfs
...
The gfx/compute profiling mode switch is only for internally
test. Not a complete solution and unexpectly upstream.
so revert it.
Reviewed-by: Evan Quan <evan.quan@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 >
2018-03-06 13:12:38 -05:00
Rex Zhu
40cee3b9e5
drm/amd/pp: Add a helper to set field in u32
...
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 >
2018-03-05 15:39:36 -05:00
Rex Zhu
31bc45de13
drm/amd/pp: Add common interface in smu for update dpm setting
...
it is used for adjust part of dpm settigs per workloads
to change the natural dpm behavior for better perf or perf/watt.
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 >
2018-03-05 15:39:28 -05:00
Rex Zhu
15826fbfef
drm/amd/pp: Add PCC feature support on Vega
...
This features controls vega peak current protection to allow
for a wider compatibility with power supplies.
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 >
2018-03-05 15:39:20 -05:00
Rex Zhu
cc1bb66fbc
drm/amd/pp: Export new smu message for PCC feature on Vega10
...
used to set PccThrottleLevel and PccResidencyThreshold
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 >
2018-03-05 15:39:12 -05:00
Rex Zhu
6848d73e88
drm/amd/pp: Remove the wrap functions for acpi 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 >
2018-03-05 15:38:57 -05:00
Rex Zhu
65ad7cac38
drm/amd/pp: Refine powerplay instance
...
Include adev in powerplay instance.
so can visit adev directly instand of through cgs interface.
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 >
2018-03-05 15:38:20 -05:00
Rex Zhu
a2c120ce6b
drm/amd/pp: Simplify the create of powerplay instance
...
use adev as input parameter to create powerplay instance
directly. delete cgs wrap layer for power play create.
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 >
2018-03-05 15:38:12 -05:00
Rex Zhu
3214e02199
drm/amd/pp: Add a pp feature mask bit for AutoWattman feature
...
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 >
2018-02-26 23:09:37 -05:00
Corentin Labbe
fc3703a0b6
drm/amd/powerplay: remove unused headers
...
All thoses headers are not used by any source files.
Lets just remove them.
Signed-off-by: Corentin Labbe <clabbe@baylibre.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:20:20 -05:00
Rex Zhu
9ac870c777
drm/amd/pp: Restore power profile mode in auto dpm level on Vega10
...
As auto power profile mode still not support on vega10, so
just restore default profile mode in auto dpm level.
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 >
2018-02-19 14:19:46 -05:00
Rex Zhu
6ab8555e04
drm/amd/pp: Expose set/get_power_limit for DGPU
...
User can change power limit between
[0, 1] * max power limit.
Set power limit to 0, restore to max power limit.
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 >
2018-02-19 14:19:44 -05:00
Eric Huang
72d7619106
drm/amd/powerplay: add mmhub powergating by smu in powerplay
...
new generic interface is added in powerplay.
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 >
2018-02-19 14:19:40 -05:00
Eric Huang
b01a4f4897
drm/amd/powerplay: implement set_mmhub_powergating_by_smu for Raven
...
mmhub PG is enabled by SMU FW only for Raven.
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 >
2018-02-19 14:19:40 -05:00
Dan Carpenter
858bef6e89
drm/amd/powerplay: delete some dead code
...
We deleted some code in e154162ef7
("drm/amd/powerplay: refine pp code
for raven") but there were a few related bits that were missed. Let's
delete them as well.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:19:38 -05:00
Alex Deucher
21a381f79e
drm/amdgpu/pp: remove the get_temperature API
...
This is also supported with the read_sensor API and there
were no more users of the get_temperature API.
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:51 -05:00
Rex Zhu
897e1bbeec
drm/amd/pp: Add hwmgr interface for edit dpm table
...
Add odn_edit_dpm_table function
points for setting user assigned clock/voltage.
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 >
2018-02-19 14:18:16 -05:00
Hawking Zhang
48569ffce9
drm/amd/pp: include new ip and ip offset headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:13 -05:00
Rex Zhu
11f64ff5f3
drm/amd/pp: Add a new pp feature mask bit for OD feature
...
when this bit was set on module load,
driver will allow the user over/under gpu
clock and voltage through sysfs.
by default, this bit was not set.
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 >
2018-02-19 14:17:55 -05:00
Rex Zhu
59fc8cde73
drm/amd/pp: Move DPMTABLE_* definitions to common header file
...
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 >
2018-02-19 14:17:54 -05:00
Rex Zhu
ee85c07abe
drm/amd/pp: Refine code abbreviate variable name
...
abbreviate variable name number_of_performance_levels
to num_of_pl in struct phm_odn_clock_levels
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 >
2018-02-19 14:17:54 -05:00
Rex Zhu
dd70949d90
drm/amd/pp: Store stable Pstate clocks
...
User can use to calculate profiling ratios when
set UMD Pstate.
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 >
2018-02-19 14:17:53 -05:00
Rex Zhu
6390258a2f
drm/amd/pp: Add custom power profile mode support on Vega10
...
v2: delete uncessary blank line.
Add static const modifiers to an array
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 >
2018-02-19 14:17:52 -05:00
Rex Zhu
53241e01b9
drm/amd/pp: Implement voltage regulator config on CI
...
Store the voltage regulator configuration
so we can properly query the voltage
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 >
2018-02-19 14:17:50 -05:00
Rex Zhu
59655cb6ab
drm/amd/pp: Add querying current gfx voltage for Vega10
...
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 >
2018-02-19 14:17:50 -05:00
Rex Zhu
4efe9b4794
drm/amd/pp: Refine code shorten variable name
...
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 >
2018-02-19 14:17:16 -05:00
Rex Zhu
9bd2bae13d
drm/amd/pp: Add a helper to convert VID to voltage value
...
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 >
2018-02-19 14:17:15 -05:00
Evan Quan
4ba082572a
drm/amd/powerplay: export the thermal ranges of VI asics (V2)
...
V2: move the SMU7Thermal structure to newly created header file
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 >
2018-02-19 14:17:08 -05:00
Evan Quan
0a91ee0775
drm/amd/powerplay: export vega10 specific thermal ranges (V2)
...
V2: new header file to hold the common SMU7Thermal structure
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 >
2018-02-19 14:17:08 -05:00
Evan Quan
80cfd1db67
drm/amd/powerplay: new hw manager interface for retrieving device specific thermal range
...
Added a new callback for asic specific backends to specify the temperature ranges.
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 >
2018-02-19 14:17:07 -05:00
Evan Quan
4ad9d4dd65
drm/amd/powerplay: correct PP_TemperatureRange member type since negative values are part of the valid range
...
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 >
2018-02-19 14:17:05 -05:00