summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2015-12-21drm/amd/powerplay: export interface to DAL to init/change display configuration.Rex Zhu5-0/+45
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-21drm/amd/powerplay: add smc msg for NB P-State switchRex Zhu2-0/+9
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-21drm/amd/powerplay: add new function point in hwmgr.Rex Zhu1-1/+5
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-21amdgpu/powerplay: Add Stoney to list of early init casesTom St Denis1-0/+1
Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-12-21drm/amd/powerplay: fix warning of cast to pointer from integer of different ↵Rex Zhu1-2/+2
size. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-12-21drm/amd/powerplay: fix warning of cast to pointer from integer of different ↵rezhu3-6/+6
size. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-12-21drm/amd/powerplay: implement smc state upload for CZAlex Deucher4-22/+141
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-12-21drm/amd/powerplay: add atomctrl function to calculate CZ sclk dividersAlex Deucher2-0/+25
Use atombios to calculate the values. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-12-21drm/amd/powerplay: enable clock gating for Fiji.Eric Huang1-1/+8
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-21drm/amd/powerplay: add parts of system clock gating support for Fiji. (v2)Eric Huang1-0/+86
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-21drm/amdgpu: add sdma clock gating support for Fiji.Eric Huang1-0/+105
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-21drm/amd/amdgpu: add gmc clock gating support for Fiji.Eric Huang1-0/+172
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-21drm/amd/amdgpu: add gfx clock gating support for Fiji.Eric Huang1-0/+254
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-21drm/amd/powerplay/tonga: Add UVD DPM initAlex Deucher1-0/+56
Load the UVD DPM state into the SMC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-12-21drm/amd/powerplay: fix boolreturn.cocci warningskbuild test robot1-4/+4
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-21drm/amdgpu/powerplay/fiji: query supported pcie info from cgs (v2)Alex Deucher1-2/+18
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-21drm/amdgpu/powerplay/tonga: query supported pcie info from cgs (v2)Alex Deucher1-2/+18
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-21drm/amdgpu/cgs: add sys info query for pcie gen and link widthAlex Deucher2-0/+8
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>
2015-12-21drm/amdgpu: store pcie gen mask and link widthAlex Deucher4-20/+99
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>
2015-12-21drm: add drm_pcie_get_max_link_width helper (v2)Alex Deucher1-0/+20
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>
2015-12-21drm/amdgpu: extract pcie helpers to common headerAlex Deucher6-137/+193
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>
2015-12-21drm/amd/powerplay/fiji: enable pcie and mclk forcing for lowAlex Deucher1-5/+25
When forcing the lowest state also force mclk and pcie. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-12-21drm/amd/powerplay/tonga: enable pcie and mclk forcing for lowAlex Deucher1-11/+37
When forcing the lowest state also force mclk and pcie. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-12-21drm/amd/powerplay: refine the logic of whether need to update power state.Rex Zhu2-3/+11
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>
2015-12-21drm/amd/powerplay: implement new funcs to check current states for tonga.Rex Zhu1-0/+62
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>
2015-12-21drm/amd/powerplay: add and export hwmgr interface to eventmgr to check hw ↵Rex Zhu3-0/+34
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>
2015-12-21drm/amdgpu: support per device powerplay enablement (v2)Jammy Zhou6-61/+65
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>
2015-12-21drm/amdgpu: enable sysfs interface for powerplayRex Zhu1-9/+11
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>
2015-12-21drm/amdgpu: export fan control functions to amdgpuRex Zhu1-5/+25
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>
2015-12-21drm/amdgpu/powerplay: implement fan control interface in amd_powerplay_funcsRex Zhu2-1/+88
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>
2015-12-21drm/amdgpu/powerplay: implement thermal control for tonga.Rex Zhu5-2/+798
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>
2015-12-21drm/amdgpu/powerplay: enable thermal interrupt task in eventmgr.Rex Zhu6-4/+48
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>
2015-12-21drm/amdgpu/powerplay: add thermal control interface in hwmgr.Rex Zhu3-2/+47
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>
2015-12-21drm/amdgpu/powerplay: mv ppinterrupt.h to inc folder to share with other ↵Rex Zhu2-22/+26
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>
2015-12-21drm/amdgpu/powerplay: add new function point in hwmgr_funcs for thermal controlRex Zhu1-0/+22
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>
2015-12-21drm/amd/powerplay: Add CG and PG support for tongaRex Zhu5-15/+440
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>
2015-12-21drm/amd/powerplay: add new function point in hwmgr_func for CG/PG.Rex Zhu1-0/+3
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>
2015-12-21drm/amdgpu/powerplay: add some definition for other ip block to update cg pg.Rex Zhu1-0/+41
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>
2015-12-21drm/amdgpu: enable powerplay module by default for fiji.Rex Zhu1-0/+3
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>
2015-12-21drm/amdgpu: enable powerplay module by default for tonga.Rex Zhu1-0/+8
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>
2015-12-21drm/amdgpu/powerplay: program display gap for tonga.Rex Zhu1-0/+91
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>
2015-12-21drm/amdgpu/powerplay: implement pem_task for display_configuration_changeRex Zhu4-6/+15
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>
2015-12-21drm/amdgpu/poweprlay: export program display gap function to eventmgrRex Zhu2-0/+29
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>
2015-12-21drm/amdgpu/powerplay: add function point in hwmgr_funcs for program display gapRex Zhu1-1/+3
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>
2015-12-21drm/amd/amdgpu: enable powerplay and smc firmware loading for Fiji.Eric Huang3-1/+7
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>
2015-12-21drm/amdgpu: add amdgpu.powerplay module optionJammy Zhou1-0/+5
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>
2015-12-21drm/amd/powerplay: add Fiji DPM support.Eric Huang7-1/+5815
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>
2015-12-21drm/amd/powerplay: add Fiji SMU support.Eric Huang4-1/+1117
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>
2015-12-21drm/amd/powerplay: update atomctrl for fijiEric Huang3-9/+496
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>
2015-12-21drm/amd/powerplay: add/update headers for Fiji SMU and DPMEric Huang7-182/+12926
New headers for Fiji. Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>