Alex Deucher
45b0cf54bc
amd/powerplay: don't enable ucode fan control if vbios has no fan table
...
Some systems have a single fan controlled by ACPI or some other
method.
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:58 -05:00
Rex Zhu
605ed21929
drm/amd/powerplay: show gpu load when print gpu performance for Cz. (v2)
...
Show GPU load in in the debugfs output.
v2: integrate Tom's optimization
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
2015-12-21 16:42:58 -05:00
Rex Zhu
cae9b9c81b
drm/amd/powerplay: check whether need to enable thermal control. (v2)
...
In I+A platform(skylake), it is controlled by intel.
v2: integrate Tom's fix
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
2015-12-21 16:42:57 -05:00
Rex Zhu
88b8dcbe21
drm/amd/powerplay: add point check to avoid NULL point hang.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:57 -05:00
David Rokhvarg
c90e5d20fc
drm/amdgpu/powerplay: Program a calculated value as Deep Sleep clock.
...
This replaces programming of a hardcoded value.
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com >
2015-12-21 16:42:56 -05:00
Alex Deucher
283b1a8bfb
drm/amd/powerplay: Don't return an error if fan table is missing
...
It's a valid configuration on some laptops.
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:56 -05:00
Alex Deucher
aa22ae4b1f
drm/powerplay/hwmgr: log errors in tonga_hwmgr_backend_init
...
Helpful in debugging init issues.
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:55 -05:00
Alex Deucher
a71e06d972
drm/powerplay: add debugging output to processpptables.c
...
To help track down init errors.
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:55 -05:00
Alex Deucher
1d5498c23e
drm/powerplay: add debugging output to tonga_processpptables.c
...
To help track down init errors.
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:54 -05:00
Eric Yang
14f634110f
amd/powerplay: Add structures required to report configuration change
...
Add required structures for amd_powerplay_display_configuration_change
Signed-off-by: Eric Yang <eric.yang2@amd.com >
2015-12-21 16:42:54 -05:00
Vitaly Prosyak
1c9a90820b
amd/powerplay: Fix get dal power level
...
Simplify data struct for get dal power level
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
2015-12-21 16:42:53 -05:00
Vitaly Prosyak
c4dd206be1
amd\powerplay Implement get dal power level
...
Implement get dal power level and simple clock info
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
2015-12-21 16:42:52 -05:00
Rex Zhu
9c5f8de6ef
drm/amd/powerplay: display gpu load when print performance for tonga.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
2015-12-21 16:42:52 -05:00
Alex Deucher
898b1dead9
drm/amdgpu/powerplay: enable sysfs and debugfs interfaces late
...
To avoid users accessing them before the module has finished
initializing them and make sure they are only created if
dpm has properly initialized.
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:51 -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
Rex Zhu
1ea6c1e8e4
drm/amd/powerplay: check whether enable dpm in powerplay.
...
Change-Id: I0a2dbf8ef7d4a3e9788fe211fc5964dd2487c519
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
2015-12-21 16:42:50 -05:00
Rex Zhu
7ad4e7f093
drm/amd/powerplay: fix bug that dpm funcs in debugfs/sysfs missing.
...
in dpm module, sysfs init func move to late_init from sw_init.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Change-Id: Ice4a73212d8e3106d05f04a27043820ffd32929e
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
2015-12-21 16:42:50 -05:00
kbuild test robot
195567e99b
drm/amd/powerplay: fix boolreturn.cocci warnings
...
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomctrl.c:475:10-11: WARNING: return of 0/1 in function 'atomctrl_lookup_gpio_pin' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
CC: yanyang1 <young.yang@amd.com >
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:49 -05:00
Eric Huang
db18ce397c
drm/amd/powerplay: add functions set/get_fan_control_mode in hwmgr for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:49 -05:00
Eric Huang
9dcfc1936a
drm/amd/powerplay: add functions set/get_fan_control_mode in hwmgr for Tonga.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:48 -05:00
Eric Huang
7ae0a66134
drm/amd/powerplay: Fix a bug in fan control setting default mode for Tonga and Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:48 -05:00
Eric Huang
601038142f
drm/amd/powerplay: Add thermal protection support for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:47 -05:00
Eric Huang
ea617bc9f9
drm/amd/powerplay: add display configeration changed function in hwmgr for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:47 -05:00
Qiang Yu
bd90dd89e5
drm/amdgpu: Prepare DKMS build for powerplay module.
...
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:46 -05:00
Eric Huang
0bbb817618
drm/amd/amdgpu: enable uvd&vce clock gating for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:46 -05:00
Eric Huang
0689a57013
drm/amd/amdgpu: add vce3.0 clock gating support. (v2)
...
v2: fix grbm locking
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:45 -05:00
Eric Huang
9b08a30647
drm/amd/amdgpu: add uvd6.0 clock gating support. (v2)
...
v2: fix bug in register mask setting.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:45 -05:00
Eric Huang
91c4c98155
drm/amd/powerplay: add multimedia power gating support for Fiji.
...
Acked-by: Jammy Zhou <Jammy.Zhou@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:44 -05:00
Jammy Zhou
b57fd5663e
drm/amdgpu: rename fiji_smumgr.h to fiji_smum.h
...
This conflicts with fiji_smumgr.h from powerplay
in DKMS environment
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com >
2015-12-21 16:42:44 -05:00
Jammy Zhou
dbd29f0d85
drm/amdgpu: rename tonga_smumgr.h to tonga_smum.h
...
This conflicts with the tonga_smumgr.h from powerplay
in DKMS environement
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com >
2015-12-21 16:42:43 -05:00
David Rokhvarg
6bd48d2404
drm/amd/powerplay: Add PPLib debug print macro.
...
- The macro is silent by default.
- Use the macro to print Display Configuration - related changes.
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com >
2015-12-21 16:42:42 -05:00
Rex Zhu
0f8b106e11
drm/amd/powerplay: enable/disable NB pstate feature for Carrizo.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:42 -05:00
Rex Zhu
73afe62101
drm/amd/powerplay: enable set_cpu_power_state task. (v2)
...
v2: integrate Jammy's crash fix
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:41 -05:00
Rex Zhu
7fb72a1fc0
drm/amd/powerplay: export interface to DAL to init/change display configuration.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:41 -05:00
Rex Zhu
aceae1bfd9
drm/amd/powerplay: add smc msg for NB P-State switch
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:40 -05:00
Rex Zhu
73c9f22288
drm/amd/powerplay: add new function point in hwmgr.
...
1. for set_cpu_power_state
2. restore display configuration
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-12-21 16:42:40 -05:00
Tom St Denis
9c97e75f0f
amdgpu/powerplay: Add Stoney to list of early init cases
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:39 -05:00
Rex Zhu
c9fe74e68b
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:39 -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
Alex Deucher
9c0bad9074
drm/amd/powerplay: implement smc state upload for CZ
...
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:38 -05:00
Alex Deucher
d39d5c2c9d
drm/amd/powerplay: add atomctrl function to calculate CZ sclk dividers
...
Use atombios to calculate the values.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:37 -05:00
Eric Huang
92b05d827d
drm/amd/powerplay: enable clock gating for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:37 -05:00
Eric Huang
6cec2655fa
drm/amd/powerplay: add parts of system clock gating support for Fiji. (v2)
...
Removed fiji_mgcg_cgcg_init that is affected and redundant for new implementation.
v2: re-add mgcg_cgcg init
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:36 -05:00
Eric Huang
3c997d2412
drm/amdgpu: add sdma clock gating support for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:36 -05:00
Eric Huang
a0d69786b5
drm/amd/amdgpu: add gmc clock gating support for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:35 -05:00
Eric Huang
6e378858df
drm/amd/amdgpu: add gfx clock gating support for Fiji.
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
2015-12-21 16:42:35 -05:00
Alex Deucher
0104aa21a9
drm/amd/powerplay/tonga: Add UVD DPM init
...
Load the UVD DPM state into the SMC.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:34 -05:00
kbuild test robot
62a03f6d58
drm/amd/powerplay: fix boolreturn.cocci warnings
...
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:2653:9-10: WARNING: return of 0/1 in function 'is_pcie_gen2_supported' with return type bool
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:2645:9-10: WARNING: return of 0/1 in function 'is_pcie_gen3_supported' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
CC: yanyang1 <young.yang@amd.com >
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:34 -05:00
Alex Deucher
464cea3e35
drm/amdgpu/powerplay/fiji: query supported pcie info from cgs (v2)
...
Rather than hardcode it.
v2: integrate spc fix from Rex
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:33 -05:00
Alex Deucher
834b694cc3
drm/amdgpu/powerplay/tonga: query supported pcie info from cgs (v2)
...
Rather than hardcode it.
v2: integrate spc fix from Rex
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-12-21 16:42:33 -05:00