aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/amd/powerplay: add dpm force multiple levels on cz/tonga/fiji/polaris (v2)Eric Huang2016-05-051-15/+36
| | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Mark all instances of struct drm_info_list as constNils Wallménius2016-05-051-1/+1
| | | | | | | | | | All these are compile time constand and the drm_debugfs_create/remove_files functions take a const pointer argument. Reviewed-by: Christian König <[email protected]> Signed-off-by: Nils Wallménius <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* Merge drm-fixes into drm-next.Dave Airlie2016-03-131-8/+27
|\ | | | | | | Nouveau wanted this to avoid some worse conflicts when I merge that.
| * drm/amdgpu/pm: update current crtc info after setting the powerstateAlex Deucher2016-03-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | On CI, we need to see if the number of crtcs changes to determine whether or not we need to upload the mclk table again. In practice we don't currently upload the mclk table again after the initial load. The only reason you would would be to add new states, e.g., for arbitrary mclk setting which is not currently supported. Acked-by: Jordan Lazare <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
| * drm/amdgpu/pm: adjust display configuration after powerstateAlex Deucher2016-02-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | set_power_state defaults to no displays, so we need to update the display configuration after setting up the powerstate on the first call. In most cases this is not an issue since ends up getting called multiple times at any given modeset and the proper order is achieved in the display changed handling at the top of the function. Reviewed-by: Christian König <[email protected]> Acked-by: Jordan Lazare <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
| * drm/amdgpu/pm: add some checks for PXAlex Deucher2016-02-221-1/+20
| | | | | | | | | | | | | | | | | | I.e., doesn't make sense to change power states or check the temperature when the asic is powered off. Reviewed-by: Christian König <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: fix locking in force performance levelAlex Deucher2016-02-221-2/+1
| | | | | | | | | | | | | | | | | | Looks like a copy paste typo when we added powerplay support. Reviewed-by: Christian König <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* | drm/amd/powerplay: add some sysfs interfaces for powerplay.Eric Huang2016-02-101-1/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* | drm/amdgpu: remove the ring lock v2Christian König2016-02-101-13/+6
|/ | | | | | | | | | | It's not needed any more because all access goes through the scheduler now. v2: Update commit message. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: use kobj_to_dev()Geliang Tang2016-01-131-1/+1
| | | | | | | Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/powerplay: fix Smatch static checker warnings with indenting (v2)Rex Zhu2016-01-081-1/+1
| | | | | | | | | v2: AGD: rebase on upstream Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Ken Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: support per device powerplay enablement (v2)Jammy Zhou2015-12-211-15/+15
| | | | | | | | | | | 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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* drm/amdgpu: enable sysfs interface for powerplayRex Zhu2015-12-211-9/+11
| | | | | | | | Same interface exposed in pre-powerplay dpm code. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* drm/amdgpu: export amd_powerplay_func to amdgpu and other ip blockRex Zhu2015-12-211-75/+140
| | | | | | | | | | | 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 <[email protected]> Acked-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* drm/amdgpu: share struct amdgpu_pm_state_type with powerplay moduleRex Zhu2015-12-211-4/+4
| | | | | | | | rename amdgpu_pm_state_type to amd_pm_state_type Signed-off-by: Rex Zhu <[email protected]> Acked-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* drm/amdgpu: don't try to recreate sysfs entries on resumeAlex Deucher2015-10-231-0/+5
| | | | | | | | Fixes an error on resume caused by: fa022a9b65d2886486a022fd66b20c823cd76ad9 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
* drm/amdgpu/dpm: don't add pwm attributes if DPM is disabledAlex Deucher2015-10-191-2/+6
| | | | | | | | | PWM fan control is only available with DPM. There is no non-DPM support on amdgpu, so we should never get a crash here because the sysfs nodes would never be created in the first place. Add the check just in case to be on the safe side. Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: don't grab dev->struct_mutex in pm functionsDaniel Vetter2015-08-171-2/+0
| | | | | | | | | | | | | | Similar to radeon, except that amdgpu doesn't even use struct_mutex to protect anything like the shared z buffer (sane gpu architecture, yay!). And the code already grabs the globa adev->ring_lock, so this code can't race with itself. Which makes struct_mutex completely redundnant. Remove it. Cc: Alex Deucher <[email protected]> Cc: "Christian König" <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: merge amdgpu_family.h into amd_shared.h (v2)Jammy Zhou2015-08-171-2/+2
| | | | | | | | | Make the definitions common for all driver components v2: fix kfd Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* drm/amdgpu: enable vce powergatingSonny Jiang2015-06-101-9/+17
| | | | | | | | | Enable VCE dpm and powergating. VCE dpm dynamically scales the VCE clocks on demand. Signed-off-by: Sonny Jiang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
* drm/amdgpu: remove mclk_lockChristian König2015-06-041-2/+0
| | | | | | | Not needed any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* drm/amdgpu: add core driver (v4)Alex Deucher2015-06-041-0/+801
This adds the non-asic specific core driver code. v2: remove extra kconfig option v3: implement minor fixes from Fengguang Wu v4: fix cast in amdgpu_ucode.c Acked-by: Christian König <[email protected]> Acked-by: Jammy Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>