Rex Zhu [Thu, 17 Dec 2015 06:20:06 +0000 (14:20 +0800)]
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>
Rex Zhu [Fri, 11 Dec 2015 07:21:33 +0000 (15:21 +0800)]
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>
David Rokhvarg [Fri, 11 Dec 2015 17:06:25 +0000 (12:06 -0500)]
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>
Alex Deucher [Mon, 14 Dec 2015 15:46:52 +0000 (10:46 -0500)]
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>
Alex Deucher [Fri, 11 Dec 2015 17:39:01 +0000 (12:39 -0500)]
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>
Alex Deucher [Fri, 11 Dec 2015 17:32:55 +0000 (12:32 -0500)]
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>
Alex Deucher [Fri, 11 Dec 2015 17:12:32 +0000 (12:12 -0500)]
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>
Eric Yang [Tue, 1 Dec 2015 18:23:07 +0000 (13:23 -0500)]
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>
Vitaly Prosyak [Thu, 3 Dec 2015 15:27:57 +0000 (10:27 -0500)]
amd/powerplay: Fix get dal power level
Simplify data struct for get dal power level
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Vitaly Prosyak [Mon, 30 Nov 2015 21:39:53 +0000 (16:39 -0500)]
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>
Rex Zhu [Tue, 8 Dec 2015 06:31:13 +0000 (14:31 +0800)]
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>
Alex Deucher [Tue, 8 Dec 2015 22:28:28 +0000 (17:28 -0500)]
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>
Rex Zhu [Thu, 3 Dec 2015 06:16:01 +0000 (14:16 +0800)]
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>
Rex Zhu [Mon, 23 Nov 2015 06:50:10 +0000 (14:50 +0800)]
drm/amd/powerplay: check whether enable dpm in powerplay.
Change-Id: I0a2dbf8ef7d4a3e9788fe211fc5964dd2487c519
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Rex Zhu [Mon, 7 Dec 2015 08:42:35 +0000 (16:42 +0800)]
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>
kbuild test robot [Sat, 5 Dec 2015 00:13:27 +0000 (19:13 -0500)]
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>
Eric Huang [Fri, 4 Dec 2015 20:49:02 +0000 (15:49 -0500)]
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>
Eric Huang [Fri, 4 Dec 2015 15:57:22 +0000 (10:57 -0500)]
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>
Eric Huang [Thu, 3 Dec 2015 20:13:46 +0000 (15:13 -0500)]
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>
Eric Huang [Fri, 27 Nov 2015 19:09:53 +0000 (14:09 -0500)]
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>
Eric Huang [Tue, 24 Nov 2015 22:00:56 +0000 (17:00 -0500)]
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>
Qiang Yu [Wed, 2 Dec 2015 02:56:57 +0000 (10:56 +0800)]
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>
Eric Huang [Tue, 24 Nov 2015 15:53:27 +0000 (10:53 -0500)]
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>
Eric Huang [Mon, 23 Nov 2015 21:57:53 +0000 (16:57 -0500)]
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>
Eric Huang [Mon, 23 Nov 2015 16:20:36 +0000 (11:20 -0500)]
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>
Eric Huang [Fri, 20 Nov 2015 20:58:11 +0000 (15:58 -0500)]
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>
Jammy Zhou [Wed, 21 Oct 2015 09:18:10 +0000 (17:18 +0800)]
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>
Jammy Zhou [Wed, 21 Oct 2015 09:15:45 +0000 (17:15 +0800)]
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>
David Rokhvarg [Thu, 19 Nov 2015 19:45:39 +0000 (14:45 -0500)]
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>
Rex Zhu [Thu, 19 Nov 2015 05:48:14 +0000 (13:48 +0800)]
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>
Rex Zhu [Thu, 19 Nov 2015 05:47:02 +0000 (13:47 +0800)]
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>
Rex Zhu [Thu, 19 Nov 2015 05:35:30 +0000 (13:35 +0800)]
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>
Rex Zhu [Thu, 19 Nov 2015 05:47:36 +0000 (13:47 +0800)]
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>
Rex Zhu [Thu, 19 Nov 2015 05:46:01 +0000 (13:46 +0800)]
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>
Tom St Denis [Fri, 20 Nov 2015 18:33:44 +0000 (13:33 -0500)]
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>
Rex Zhu [Mon, 16 Nov 2015 03:24:35 +0000 (11:24 +0800)]
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>
rezhu [Thu, 12 Nov 2015 08:40:50 +0000 (16:40 +0800)]
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>
Alex Deucher [Sat, 14 Nov 2015 04:51:40 +0000 (23:51 -0500)]
drm/amd/powerplay: implement smc state upload for CZ
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Sat, 14 Nov 2015 03:00:01 +0000 (22:00 -0500)]
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>
Eric Huang [Thu, 12 Nov 2015 22:30:52 +0000 (17:30 -0500)]
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>
Eric Huang [Thu, 12 Nov 2015 21:59:47 +0000 (16:59 -0500)]
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>
Eric Huang [Wed, 11 Nov 2015 16:49:11 +0000 (11:49 -0500)]
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>
Eric Huang [Tue, 10 Nov 2015 16:27:39 +0000 (11:27 -0500)]
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>
Eric Huang [Tue, 10 Nov 2015 15:50:25 +0000 (10:50 -0500)]
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>
Alex Deucher [Fri, 13 Nov 2015 15:46:30 +0000 (10:46 -0500)]
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>
kbuild test robot [Thu, 12 Nov 2015 17:58:34 +0000 (12:58 -0500)]
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>
Alex Deucher [Thu, 12 Nov 2015 02:02:16 +0000 (21:02 -0500)]
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>
Alex Deucher [Thu, 12 Nov 2015 01:58:55 +0000 (20:58 -0500)]
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>
Alex Deucher [Thu, 12 Nov 2015 01:35:32 +0000 (20:35 -0500)]
drm/amdgpu/cgs: add sys info query for pcie gen and link width
Needed by powerplay to properly handle pcie dpm switching.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Thu, 12 Nov 2015 00:45:06 +0000 (19:45 -0500)]
drm/amdgpu: store pcie gen mask and link width
We'll need this later for pcie dpm.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Thu, 12 Nov 2015 04:14:39 +0000 (23:14 -0500)]
drm: add drm_pcie_get_max_link_width helper (v2)
Add a helper to get the max link width of the port.
Similar to the helper to get the max link speed.
v2: fix typo in commit message
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Thu, 12 Nov 2015 01:18:52 +0000 (20:18 -0500)]
drm/amdgpu: extract pcie helpers to common header
These will be used by multiple powerplay drivers and
other IP modules.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Wed, 11 Nov 2015 05:31:00 +0000 (00:31 -0500)]
drm/amd/powerplay/fiji: enable pcie and mclk forcing for low
When forcing the lowest state also force mclk and pcie.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Wed, 11 Nov 2015 05:23:57 +0000 (00:23 -0500)]
drm/amd/powerplay/tonga: enable pcie and mclk forcing for low
When forcing the lowest state also force mclk and pcie.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Wed, 4 Nov 2015 06:56:56 +0000 (14:56 +0800)]
drm/amd/powerplay: refine the logic of whether need to update power state.
Better handle power state changes.
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>
Rex Zhu [Wed, 4 Nov 2015 03:21:35 +0000 (11:21 +0800)]
drm/amd/powerplay: implement new funcs to check current states for tonga.
Implement the new callbacks for tonga.
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>
Rex Zhu [Wed, 4 Nov 2015 03:07:34 +0000 (11:07 +0800)]
drm/amd/powerplay: add and export hwmgr interface to eventmgr to check hw states.
Interface between hwmgr and eventmgr.
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>
Jammy Zhou [Tue, 10 Nov 2015 23:31:08 +0000 (18:31 -0500)]
drm/amdgpu: support per device powerplay enablement (v2)
The amdgu_powerplay variable is global for multiple GPU instances.
v2: fold in Flora's module option change, protect adev reference in
macros
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Rex Zhu [Tue, 10 Nov 2015 23:29:11 +0000 (18:29 -0500)]
drm/amdgpu: enable sysfs interface for powerplay
Same interface exposed in pre-powerplay dpm code.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Thu, 15 Oct 2015 09:23:43 +0000 (17:23 +0800)]
drm/amdgpu: export fan control functions to amdgpu
Hook up the amdgpu thermal control callbacks for powerplay.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Fri, 16 Oct 2015 03:48:21 +0000 (11:48 +0800)]
drm/amdgpu/powerplay: implement fan control interface in amd_powerplay_funcs
This adds the interface needed to expose powerplay fan control to sysfs
via hwmon.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Tue, 20 Oct 2015 10:06:23 +0000 (18:06 +0800)]
drm/amdgpu/powerplay: implement thermal control for tonga.
Implement thermal and fan control for tonga.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Fri, 16 Oct 2015 12:32:36 +0000 (20:32 +0800)]
drm/amdgpu/powerplay: enable thermal interrupt task in eventmgr.
Add thermal handling to the event manager.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Wed, 21 Oct 2015 02:34:22 +0000 (10:34 +0800)]
drm/amdgpu/powerplay: add thermal control interface in hwmgr.
Thermal controller interface.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Wed, 21 Oct 2015 02:30:02 +0000 (10:30 +0800)]
drm/amdgpu/powerplay: mv ppinterrupt.h to inc folder to share with other submodule.
Redefine interrupt callback function in accordance with cgs.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Fri, 16 Oct 2015 03:46:51 +0000 (11:46 +0800)]
drm/amdgpu/powerplay: add new function point in hwmgr_funcs for thermal control
Add the interface for fan and thermal control.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Thu, 15 Oct 2015 13:12:58 +0000 (21:12 +0800)]
drm/amd/powerplay: Add CG and PG support for tonga
Implement clock and power gating support for tonga. On Tonga
this is handles by the SMU rather than direct register settings
in the driver.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Wed, 30 Sep 2015 05:28:49 +0000 (13:28 +0800)]
drm/amd/powerplay: add new function point in hwmgr_func for CG/PG.
Add callbacks interface for clock and powergating.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Fri, 9 Oct 2015 10:43:28 +0000 (18:43 +0800)]
drm/amdgpu/powerplay: add some definition for other ip block to update cg pg.
Interface for clock and power gating handling.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Tue, 20 Oct 2015 03:05:45 +0000 (11:05 +0800)]
drm/amdgpu: enable powerplay module by default for fiji.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Sat, 17 Oct 2015 09:57:58 +0000 (17:57 +0800)]
drm/amdgpu: enable powerplay module by default for tonga.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Fri, 16 Oct 2015 07:02:04 +0000 (15:02 +0800)]
drm/amdgpu/powerplay: program display gap for tonga.
Implement displaygap programming for tonga. This is
required for properly mclk switching.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Fri, 16 Oct 2015 06:59:17 +0000 (14:59 +0800)]
drm/amdgpu/powerplay: implement pem_task for display_configuration_change
Add support for display configuration changes to the event manager.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Fri, 16 Oct 2015 06:55:03 +0000 (14:55 +0800)]
drm/amdgpu/poweprlay: export program display gap function to eventmgr
This allows the eventmgr to properly update the displaygap on
certain power events.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Fri, 16 Oct 2015 06:51:09 +0000 (14:51 +0800)]
drm/amdgpu/powerplay: add function point in hwmgr_funcs for program display gap
Displaygap support is required for proper mclk switching.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Eric Huang [Tue, 29 Sep 2015 18:58:53 +0000 (14:58 -0400)]
drm/amd/amdgpu: enable powerplay and smc firmware loading for Fiji.
Switch over to handling in the powerplay module.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Jammy Zhou [Tue, 21 Jul 2015 06:01:50 +0000 (14:01 +0800)]
drm/amdgpu: add amdgpu.powerplay module option
This option can be used to enable the new powerplay implementation,
and it is disabled by default.
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Eric Huang [Wed, 26 Aug 2015 20:52:28 +0000 (16:52 -0400)]
drm/amd/powerplay: add Fiji DPM support.
This enabled DPM support for Fiji. DPM is dynamic
clock and voltage scaling.
v2: rename fiji_hwmgr_early_init to fiji_hwmgr_init
v3: (agd) fold in endian fix, additional function addition
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Eric Huang [Wed, 26 Aug 2015 20:50:59 +0000 (16:50 -0400)]
drm/amd/powerplay: add Fiji SMU support.
Add support for the SMU manager for Fiji. This handles the
firmware loading for other IP blocks (GFX, SDMA, etc.).
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Eric Huang [Mon, 9 Nov 2015 22:35:45 +0000 (17:35 -0500)]
drm/amd/powerplay: update atomctrl for fiji
Add some new functions to support Fiji. Split out
from the previous patch.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Eric Huang [Mon, 9 Nov 2015 22:34:31 +0000 (17:34 -0500)]
drm/amd/powerplay: add/update headers for Fiji SMU and DPM
New headers for Fiji.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
yanyang1 [Tue, 18 Aug 2015 07:28:32 +0000 (15:28 +0800)]
drm/amd/powerplay: add Tonga dpm support (v3)
This implements DPM for tonga. DPM handles dynamic
clock and voltage scaling.
v2: merge all the patches related with tonga dpm
v3: merge dpm force level fix, cgs display fix, spelling fix
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: yanyang1 <young.yang@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Jammy Zhou [Wed, 22 Jul 2015 03:29:58 +0000 (11:29 +0800)]
drm/amd/powerplay: Add Tonga SMU support
The SMU manager handles firmware loading for other IP
blocks (GFX, SDMA, etc.). This implements it for Tonga.
v3: delete peci sub-module
v2: use cgs interface directly
Signed-off-by: Young Yang <Young.Yang@amd.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
yanyang1 [Mon, 17 Aug 2015 06:15:20 +0000 (14:15 +0800)]
drm/amd/powerplay: add header file for tonga smu and dpm
These headers provide the SMU interface used by the driver.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: yanyang1 <young.yang@amd.com>
yanyang1 [Wed, 19 Aug 2015 04:22:34 +0000 (12:22 +0800)]
drm/amd/powerplay: Move smu7*.h from amdgpu to powerplay.
Move smu7.h, smu7_discrete.h and smu7_fusion.h from amdgpu to powerplay.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: yanyang1 <young.yang@amd.com>
yanyang1 [Mon, 17 Aug 2015 06:15:20 +0000 (14:15 +0800)]
drm/amd/powerplay: Add ixSWRST_COMMAND_1 in bif_5_0_d.h
Add ixSWRST_COMMAND_1 in bif_5_0_d.h. Required by
new powerplay code for tonga and fiji.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: yanyang1 <young.yang@amd.com>
Rex Zhu [Fri, 28 Aug 2015 04:56:43 +0000 (12:56 +0800)]
drm/amd/powerplay: implement functions of amd_powerplay_func
This is the common interface for interacting with the powerplay
module.
v2: squash in fixes
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Acked-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Wed, 23 Sep 2015 07:14:54 +0000 (15:14 +0800)]
drm/amd/powerplay: add event manager sub-component
The event manager handles power related driver events.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Wed, 23 Sep 2015 07:14:38 +0000 (15:14 +0800)]
drm/amd/powerplay: add CG and PG support for carrizo
This adds clock and powergating support for CZ.
v2: squash in fixes
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Jammy Zhou [Wed, 22 Jul 2015 02:41:30 +0000 (10:41 +0800)]
drm/amd/powerplay: add Carrizo dpm support
This patch enables basic DPM support for Carrizo.
DPM handles dynamic clock and voltage scaling.
v3: delete peci sub-module
v2: use cgs interface directly
correct define SMU_EnabledFeatureScoreboard_SclkDpmOn
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Jammy Zhou [Wed, 22 Jul 2015 01:54:16 +0000 (09:54 +0800)]
drm/amd/powerplay: add Carrizo smu support
This implements the SMU firmware manager interface for CZ.
Some header files are moved from amdgpu folder to powerplay as well.
v3: delete peci sub-module.
v2: use cgs interface directly
add load_mec_firmware function
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Jammy Zhou [Tue, 21 Jul 2015 13:18:15 +0000 (21:18 +0800)]
drm/amd/powerplay: add hardware manager sub-component
The hwmgr handles all hardware related calls, including clock/power
gating control, DPM, read and parse PPTable, etc.
v5: squash in fixes
v4: implement acpi's atcs function use cgs interface
v3: fix code style error and add big-endian mode support.
v2: use cgs interface directly in hwmgr sub-module
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Jammy Zhou [Tue, 21 Jul 2015 09:43:02 +0000 (17:43 +0800)]
drm/amd/powerplay: add SMU manager sub-component
The SMUMGR is one sub-component of powerplay for SMU firmware support.
The SMU handles firmware loading for other IP blocks (GFX, SDMA, etc.)
on VI parts. The adds the core powerplay infrastructure to handle that.
v3: direct use printk in powerplay module.
v2: direct use cgs_read/write_register functions in smu-modules
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Tue, 10 Nov 2015 23:25:24 +0000 (18:25 -0500)]
drm/amdgpu: export amd_powerplay_func to amdgpu and other ip block
Update amdgpu to deal with the new powerplay module properly.
v2: squash in fixes
v3: squash in Rex's power state reporting fix
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Acked-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Sat, 7 Nov 2015 01:33:24 +0000 (20:33 -0500)]
drm/amdgpu: disable legacy path of firmware check if powerplay is enabled
Powerplay will use a different interface once it's integrated. These
legacy pathes will be removed once powerplay is enabled by default.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Wed, 2 Dec 2015 22:46:21 +0000 (17:46 -0500)]
drm/amd/powerplay: add basic powerplay framework
amdgpu_pp_ip_funcs is introduced to handle the two code paths,
the legacy one and the new powerplay implementation.
CONFIG_DRM_AMD_POWERPLAY kernel configuration option is
introduced for the powerplay component.
v4: squash in fixes
v3: register debugfs file when powerplay module enable
v2: add amdgpu_ucode_init_bo in hw init when amdgpu_powerplay enable.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Thu, 17 Sep 2015 08:34:14 +0000 (16:34 +0800)]
drm/amdgpu: add new cgs interface to get display info (v2)
Add new CGS interfaces to query display info across modules.
This is nedded by the powerplay module for synchronizing with
the display module.
v2: (agd): fold in refresh rate fix, rebase
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Wed, 23 Sep 2015 12:11:54 +0000 (20:11 +0800)]
drm/amdgpu: implement cgs interface to query system info
Add a query to get the bus number and function of the
device.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Rex Zhu [Tue, 15 Sep 2015 06:44:44 +0000 (14:44 +0800)]
drm/amdgpu: implement new cgs interface for acpi function
Add a new driver internal interface for accessing ACPI
methods. These will be used by various new components
including powerplay.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu [Fri, 18 Sep 2015 08:35:17 +0000 (16:35 +0800)]
drm/amdgpu: mv amdgpu_acpi.h to amd/include/amd_acpi.h
This will be shared with the new powerplay module.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>