summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/inc
Commit message (Collapse)AuthorAgeFilesLines
* drm/amdgpu: add powercontainment module parameterHuang Rui2016-07-072-0/+2
| | | | | | | | | | This patch makes powercontainment feature configurable. Currently, the powercontainment is not very stable, so add a module parameter to enable/disable it via user mode. 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>
* drm/amdgpu: add powerplay sclk OD support through sysfs (v2)Eric Huang2016-07-072-0/+4
| | | | | | | | | | | | Add a new sysfs entry pp_sclk_od to support sclk overdrive(OD) overclocking, the entry is read/write, the value of input/output is an integer which is the over percentage of the highest sclk. v2: drop extra semicolon Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: enable avfs feature for polarisRex Zhu2016-06-211-0/+1
| | | | | | | | | avfs feature is for voltage control based on gpu system clock on polaris10 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>
* drm/amd/powerplay: add avfs related define for polarisRex Zhu2016-06-212-19/+98
| | | | | | 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>
* drm/amd/powerplay: need to notify system bios pcie device readyRex Zhu2016-06-211-0/+1
| | | | | | | | | | before request performance state. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/amd/powerplay: move asic unrelated function to hwmgr.c.Rex Zhu2016-05-131-1/+1
| | | | | | | | It's generic and used by multiple asics. 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>
* drm/amdgpu: add missing licenses on a couple of filesAlex Deucher2016-05-111-0/+22
| | | | | | Noticed by n1s on IRC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd: cleanup remaining spaces and tabs v2Christian König2016-05-111-1/+1
| | | | | | | | | | | | | | This is the result of running the following commands: find drivers/gpu/drm/amd/ -name "*.h" -exec sed -i 's/[ \t]\+$//' {} \; find drivers/gpu/drm/amd/ -name "*.c" -exec sed -i 's/[ \t]\+$//' {} \; find drivers/gpu/drm/amd/ -name "*.h" -exec sed -i 's/ \+\t/\t/' {} \; find drivers/gpu/drm/amd/ -name "*.c" -exec sed -i 's/ \+\t/\t/' {} \; v2: drop changes to DAL and internal headers Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: Constify some tablesNils Wallménius2016-05-041-1/+1
| | | | | | | | | Some more tables with constant data were added with the polaris support v2: missed a few Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: revise caching the soft pptable and add it's sizeEric Huang2016-05-041-0/+1
| | | | | | | | | This fixes a bug in the pptable access interface that could lead to a crash. Check the pointer before using it. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add dpm force multiple levels on cz/tonga/fiji/polaris (v2)Eric Huang2016-05-042-2/+2
| | | | | | | | | | | | | Allows you to force multiple levels rather than just one via the new sysfs interrface. v2: squash in: drm/amd/powerplay: ensure clock level set by user is valid. From Rex. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: parameter updates according to SMC.Rex Zhu2016-05-041-5/+5
| | | | | | | | Update to latest changes for SMC team. 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>
* drm/amd/powerplay: Disable Spread Spectrum on DPM 0 on baffin as SPLL Shut ↵Rex Zhu2016-05-041-0/+1
| | | | | | | | Down feature is enabled. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Acked-by: Flora Cui <Flora.Cui@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: change ELM/BAF to Polaris10/Polaris11Flora Cui2016-05-043-4/+54
| | | | | | | | Adjust to preferred code names. Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add GFX per cu powergating support through SMU/powerplayEric Huang2016-05-041-0/+1
| | | | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> 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>
* drm/amd/powerplay: add all blocks clockgating support through SMU/powerplayEric Huang2016-05-041-0/+3
| | | | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> 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>
* drm/amd/powerplay: Add smc_sk firmware to baffin & ellesmere.yanyang12016-05-042-2/+9
| | | | | | | | update relational h files. Signed-off-by: yanyang1 <Young.Yang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add header files for ellesmere smu manager.rezhu2016-05-044-0/+12043
| | | | | Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: mark phm_master_table_* structs as constNils Wallménius2016-05-041-2/+2
| | | | | | | | Also adjust phm_construct_table to take a const pointer Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: Mark pem_event_action chains as constNils Wallménius2016-05-041-1/+1
| | | | | | | | | | As these arrays were of pointer to pointer type, they were pointer to pointer to const. Make them pointer to const pointer to const. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd: Mark some tables as constNils Wallménius2016-05-041-1/+1
| | | | | | | | | | | | This patch marks some compile-time constant tables 'const'. The tables marked in this patch are the low hanging fruit where little other changes were necesary to avoid casting away constness etc. Also mark some tables that are private to a file as static. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add a common pp endian headerAlex Deucher2016-03-141-0/+38
| | | | | | | | | To replace the duplicated versions of this in all asic variants. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: mv avfs status to smumgr.hrezhu2016-03-141-0/+21
| | | | | Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: Make declarations of functions exposed to DAL type-safe.David Rokhvarg2016-02-101-5/+10
| | | | | | Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: export interface to DAL.Rex Zhu2016-02-103-19/+81
| | | | | | 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>
* drm/amd/powerplay: change struct name.Rex Zhu2016-02-103-4/+4
| | | | | | | | amd_pp_dal_clock_info to amd_pp_simple_clock_info. 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>
* drm/amd/powerplay: add some sysfs interfaces for powerplay.Eric Huang2016-02-102-0/+21
| | | | | | | | | | | | | | | | | | | | The new sysfs interfaces: pp_num_states: Read-only, return the number of all pp states, 0 if powerplay is not available. pp_cur_state: Read-only, return the index number of current pp state. pp_force_state: Read-write, to write a power state index will switch to selected state forcedly and enable forced state mode, disable forced state mode. such as "echo >...". pp_table: Read-write, binary output, to be used to read or write the dpm table, the maximum file size is 4KB of page size. pp_dpm_sclk: Read-write, reading will return a dpm levels list, to write an index number will force powerplay to set the corresponding dpm level. pp_dpm_mclk: same as sclk. pp_dpm_pcie: same as sclk. And add new setting "manual" to the existing interface power_dpm_force_performance_level. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: enable power down asic task. (v2)Rex Zhu2016-01-082-2/+6
| | | | | | | | v2: AGD: rebase on upstream 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>
* drm/amd/powerplay: add powerplay valid check to avoid null point. (v2)Rex Zhu2016-01-081-0/+3
| | | | | | | | | | | | In case CONFIG_DRM_AMD_POWERPLAY is defined and amdgpu.powerplay=0. some functions in powrplay can also be called by DAL. and the input parameter is *adev. if just check point not NULL was not enough and will lead to NULL point error. V2: AGD: rebase on upstream 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>
* Merge branch 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2015-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next [airlied: fixup build problems on arm - added errno.h include] * 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux: (152 commits) amd/powerplay: fix copy paste typo in hardwaremanager.c amd/powerplay: disable powerplay by default initially amd/powerplay: don't enable ucode fan control if vbios has no fan table drm/amd/powerplay: show gpu load when print gpu performance for Cz. (v2) drm/amd/powerplay: check whether need to enable thermal control. (v2) drm/amd/powerplay: add point check to avoid NULL point hang. drm/amdgpu/powerplay: Program a calculated value as Deep Sleep clock. drm/amd/powerplay: Don't return an error if fan table is missing drm/powerplay/hwmgr: log errors in tonga_hwmgr_backend_init drm/powerplay: add debugging output to processpptables.c drm/powerplay: add debugging output to tonga_processpptables.c amd/powerplay: Add structures required to report configuration change amd/powerplay: Fix get dal power level amd\powerplay Implement get dal power level drm/amd/powerplay: display gpu load when print performance for tonga. drm/amdgpu/powerplay: enable sysfs and debugfs interfaces late drm/amd/powerplay: move shared function of vi to hwmgr. (v2) drm/amd/powerplay: check whether enable dpm in powerplay. drm/amd/powerplay: fix bug that dpm funcs in debugfs/sysfs missing. drm/amd/powerplay: fix boolreturn.cocci warnings ...
* amd/powerplay: Add structures required to report configuration changeEric Yang2015-12-212-0/+74
| | | | | | Add required structures for amd_powerplay_display_configuration_change Signed-off-by: Eric Yang <eric.yang2@amd.com>
* amd/powerplay: Fix get dal power levelVitaly Prosyak2015-12-213-8/+4
| | | | | | Simplify data struct for get dal power level Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
* amd\powerplay Implement get dal power levelVitaly Prosyak2015-12-213-17/+38
| | | | | | Implement get dal power level and simple clock info Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
* drm/amd/powerplay: move shared function of vi to hwmgr. (v2)Rex Zhu2015-12-211-3/+45
| | | | | | | v2: agd: rebase on upstream Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
* drm/amd/powerplay: Add PPLib debug print macro.David Rokhvarg2015-12-211-1/+8
| | | | | | | - The macro is silent by default. - Use the macro to print Display Configuration - related changes. Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com>
* drm/amd/powerplay: enable set_cpu_power_state task. (v2)Rex Zhu2015-12-211-0/+2
| | | | | | | | 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>
* drm/amd/powerplay: export interface to DAL to init/change display configuration.Rex Zhu2015-12-212-0/+12
| | | | | | | 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>
* drm/amd/powerplay: add smc msg for NB P-State switchRex Zhu2015-12-212-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>
* drm/amd/powerplay: add new function point in hwmgr.Rex Zhu2015-12-211-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>
* drm/amd/powerplay: implement smc state upload for CZAlex Deucher2015-12-211-2/+3
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add and export hwmgr interface to eventmgr to check hw ↵Rex Zhu2015-12-212-0/+13
| | | | | | | | | | 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>
* drm/amdgpu/powerplay: implement fan control interface in amd_powerplay_funcsRex Zhu2015-12-211-0/+4
| | | | | | | | | 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>
* drm/amdgpu/powerplay: add thermal control interface in hwmgr.Rex Zhu2015-12-212-2/+18
| | | | | | | | 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>
* drm/amdgpu/powerplay: mv ppinterrupt.h to inc folder to share with other ↵Rex Zhu2015-12-211-0/+46
| | | | | | | | | | 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>
* drm/amdgpu/powerplay: add new function point in hwmgr_funcs for thermal controlRex Zhu2015-12-211-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>
* drm/amd/powerplay: add new function point in hwmgr_func for CG/PG.Rex Zhu2015-12-211-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>
* drm/amdgpu/powerplay: add some definition for other ip block to update cg pg.Rex Zhu2015-12-211-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>
* drm/amdgpu/poweprlay: export program display gap function to eventmgrRex Zhu2015-12-211-0/+2
| | | | | | | | | 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>
* drm/amdgpu/powerplay: add function point in hwmgr_funcs for program display gapRex Zhu2015-12-211-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>
* drm/amd/powerplay: add/update headers for Fiji SMU and DPMEric Huang2015-12-214-0/+12230
| | | | | | | New headers for Fiji. Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
OpenPOWER on IntegriCloud