summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge drm-fixes into drm-next.Dave Airlie2016-03-141-1/+4
|\ | | | | | | Nouveau wanted this to avoid some worse conflicts when I merge that.
| * drm/amd/powerplay: export AMD_PP_EVENT_COMPLETE_INIT task to amdgpu.Rex Zhu2016-03-021-1/+4
| | | | | | | | | | | | | | | | This is needed to init the dynamic states without a display. To be used in the next commit. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/amd/powerplay: fix code style warning.Rex Zhu2016-02-261-2/+2
| | | | | | | | | | Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/amd/powerplay: add powerplay valid check to avoid null point.Rex Zhu2016-02-101-3/+9
| | | | | | | | | | | | | | | | | | | | 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. 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: Make declarations of functions exposed to DAL type-safe.David Rokhvarg2016-02-101-9/+6
| | | | | | | | | | | | 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-101-0/+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-101-1/+1
| | | | | | | | | | | | | | | | 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-101-1/+115
|/ | | | | | | | | | | | | | | | | | | | 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/amdgpu: add a message to indicate when powerplay is enabled (v2)Alex Deucher2016-01-221-0/+5
| | | | | | | | | | | Makes it clear to the user which power management path is in use. v2: make consistent with dpm Reviewed-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: Reload and initialize the smc firmware on powerplay resume.Rex Zhu2016-01-081-0/+17
| | | | | | 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: add powerplay valid check to avoid null point. (v2)Rex Zhu2016-01-081-3/+12
| | | | | | | | | | | | 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>
* amd/powerplay: Fix get dal power levelVitaly Prosyak2015-12-211-3/+3
| | | | | | 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-211-0/+13
| | | | | | Implement get dal power level and simple clock info Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
* drm/amd/powerplay: export interface to DAL to init/change display configuration.Rex Zhu2015-12-211-0/+16
| | | | | | | 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/amdgpu/powerplay: implement fan control interface in amd_powerplay_funcsRex Zhu2015-12-211-1/+84
| | | | | | | | | 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/amd/powerplay: implement functions of amd_powerplay_funcRex Zhu2015-12-211-8/+183
| | | | | | | | | | | 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>
* drm/amd/powerplay: add event manager sub-componentRex Zhu2015-12-211-0/+23
| | | | | | | | 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>
* drm/amd/powerplay: add hardware manager sub-componentJammy Zhou2015-12-211-3/+52
| | | | | | | | | | | | | | 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>
* drm/amd/powerplay: add SMU manager sub-componentJammy Zhou2015-12-211-0/+81
| | | | | | | | | | | | | 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>
* drm/amd/powerplay: add basic powerplay frameworkAlex Deucher2015-12-211-0/+194
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>
OpenPOWER on IntegriCloud