Rex Zhu
f0911de82c
drm/amd/powerplay: enable some feature for baffin/ellesmere. (v2)
...
Sync up with internal updates.
v2: squash in:
drm/amd/powerplay: set revert flag for enable thermal protect.
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 >
2016-05-04 20:28:53 -04:00
Alex Deucher
5f88567c62
drm/amd/powerplay: fix copy paste error in error message
...
Noticed-by: Vasily Anonimov <vasily.anonimov@googlemail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:28:44 -04:00
Slava Grigorev
ae17c999f0
drm/amd/amdgpu: fix 64-bit division
...
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:28:37 -04:00
Rex Zhu
5de95e55de
drm/amd/powerplay: Disable Spread Spectrum on DPM 0 on baffin as SPLL Shut 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 >
2016-05-04 20:28:24 -04:00
Rex Zhu
2043f43e4b
drm/amd/powerplay: enable set lowest mclk clock on baffin.
...
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 >
2016-05-04 20:28:19 -04:00
Rex Zhu
971f8daafa
drm/amd/powrplay: fix issue that get wrong enable flag.
...
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 >
2016-05-04 20:28:13 -04:00
Rex Zhu
b4c6f99ee7
drm/amd/powerplay: fix mclk in high clock for baffin
...
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 >
2016-05-04 20:28:08 -04:00
Rex Zhu
b2d9614318
drm/amd/powerplay: print gpu loading and uvd/vce power gate enablement for polaris10/11.
...
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 >
2016-05-04 20:28:02 -04:00
Flora Cui
2cc0c0b5cd
drm/amdgpu: change ELM/BAF to Polaris10/Polaris11
...
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 >
2016-05-04 20:27:57 -04:00
Flora Cui
538333f0dc
drm/amd/powerplay: add default clockgating handling
...
This is to workaround regression introduced in
46c34bcb6a15dd85329a39a5e72c62108626acdc. It should be reverted with a
final fix.
Signed-off-by: Flora Cui <Flora.Cui@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:27:22 -04:00
Eric Huang
7df48927b2
drm/amd/powerplay: add GFX per cu powergating for Baffin
...
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 >
2016-05-04 20:27:09 -04:00
Eric Huang
65f85e7d82
drm/amd/powerplay: add GFX per cu powergating support through SMU/powerplay
...
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 >
2016-05-04 20:27:02 -04:00
Eric Huang
8fe3d33307
drm/amd/powerplay: add GFX/SYS clockgating support for ELM/BAF
...
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 >
2016-05-04 20:26:48 -04:00
Eric Huang
03e3905f21
drm/amd/powerplay: add all blocks clockgating support through SMU/powerplay
...
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 >
2016-05-04 20:26:42 -04:00
yanyang1
e85c7d664d
drm/amd/powerplay: update baffin & ellesmere smc_sk firmware.
...
sync the code form catalyst CL:#1230866.
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 >
2016-05-04 20:26:33 -04:00
yanyang1
a6ece7ffd9
drm/amd/powerplay: Add smc_sk firmware to baffin & ellesmere.
...
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 >
2016-05-04 20:26:26 -04:00
Eric Huang
92c6d645ee
drm/amd/powerplay: add UVD&VCE DPM and powergating support for elm/baf
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:26:13 -04:00
Eric Huang
eede52627b
drm/amd/powerplay: add thermal control for elm/baf
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:26:07 -04:00
Rex Zhu
b83c4ab9ca
drm/amd/powerplay: init hwmgr for ELM/BAF
...
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 >
2016-05-04 20:25:56 -04:00
Rex Zhu
a23eefa2f4
drm/amd/powerplay: enable dpm for baffin.
...
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 >
2016-05-04 20:25:50 -04:00
rezhu
c81726252e
drm/amd/powerplay: add smu support for ellesmere/baffin
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:25:43 -04:00
rezhu
b304ac83ee
drm/amd/powerplay: add header files for ellesmere smu manager.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:25:38 -04:00
Eric Huang
9331b9ca81
drm/amd/powerplay: fix fan speed percent setting error on Fiji
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:20:46 -04:00
Eric Huang
d9624f8c68
drm/amd/powerplay: fix fan speed percent setting error on Tonga
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:20:42 -04:00
Nils Wallménius
aeba709a15
drm/amd: make some function-local tables static const
...
These tables were initialized on stack on each call, avoid that
and save a little bit of text size.
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 >
2016-05-04 20:20:20 -04:00
Nils Wallménius
e90b62277b
drm/amd/powerplay: mark phm_master_table_* structs as const
...
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 >
2016-05-04 20:20:17 -04:00
Nils Wallménius
d3a84aa074
drm/amd/powerplay: Mark pem_event_action chains as const
...
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 >
2016-05-04 20:20:13 -04:00
Nils Wallménius
f498d9ed26
drm/amd: Mark some tables as const
...
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 >
2016-05-04 20:20:00 -04:00
Alex Deucher
7e8d1fbdc0
drm/amd/powerplay: fix stutter setup in mclk level init
...
Stale ifdef.
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:19:53 -04:00
Eric Huang
a4333b4c99
drm/amd/powerplay: add deep sleep divider id into DPM table on Tonga
...
Add a proper implementation for setting the deep sleep divider.
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-05-04 20:18:40 -04:00
Rex Zhu
0eadeab4af
drm/amd/powerplay: use min_clock_in_sr for deep sleep feature.
...
This comes from the display handling code.
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 >
2016-05-02 15:25:42 -04:00
Rex Zhu
9162823145
drm/amd/powerplay: add uvd/vce dpm enabling flag default.
...
These should be set by default otherwise the UVD/VCE performance
won't be optimal.
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 >
2016-04-04 17:05:54 -04:00
Rex Zhu
0168f78fe1
drm/amd/powerplay: fix issue that resume back, dpm can't work on FIJI.
...
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 >
2016-04-04 17:05:29 -04:00
Rex Zhu
e0c771637f
drm/amd/powerplay: Need to change boot to performance state in resume.
...
Fixes slow performance on resume.
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 >
2016-04-01 10:08:32 -04:00
Rex Zhu
bbe6aa9953
drm/amd/powerplay: add new Fiji function for not setting same ps.
...
Add comparison function used by powerplay to determine which
power state to select.
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 >
2016-04-01 10:08:31 -04:00
Rex Zhu
4cd05a74cc
drm/amd/powerplay: notify amdgpu whether dpm is enabled or not.
...
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 >
2016-04-01 10:08:29 -04:00
Alex Deucher
0ccbf11988
drm/amdgpu: clean up path handling for powerplay
...
Use $(FULL_AMD_PATH) like everything else.
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-03-21 11:52:13 -04:00
Colin Ian King
a82d397bff
drm/amd/powerplay: fix memory leak of tdp_table
...
tdp_table is being leaked on failed allocations of
hwmgr->dyn_state.cac_dtp_table. kfree tdp_table on the error
return path to fix the leak.
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-03-21 11:52:13 -04:00
Dave Airlie
902d02db1f
Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-next
...
A few other misc cleanups and bug fixes for 4.6. Highlights:
- unify endian handling in powerplay
- powerplay fixes
- fix a regression in 4.5 on boards with no display connectors
- fence cleanups and locking fixes
- whitespace cleanups and code refactoring in radeon
* 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux: (35 commits)
drm/amdgpu/gfx7: add MTYPE definition
drm/amdgpu: removing BO_VAs shouldn't be interruptible
drm/amd/powerplay: show uvd/vce power gate enablement for tonga.
drm/amd/powerplay: show uvd/vce power gate info for fiji
drm/amdgpu: use sched fence if possible
drm/amdgpu: move ib.fence to job.fence
drm/amdgpu: give a fence param to ib_free
drm/amdgpu: include the right version of gmc header files for iceland
drm/radeon: fix indentation.
drm/amd/powerplay: add uvd/vce dpm enabling flag to fix the performance issue for CZ
drm/amdgpu: switch back to 32bit hw fences v2
drm/amdgpu: remove amdgpu_fence_is_signaled
drm/amdgpu: drop the extra fence range check v2
drm/amdgpu: signal fences directly in amdgpu_fence_process
drm/amdgpu: cleanup amdgpu_fence_wait_empty v2
drm/amdgpu: keep all fences in an RCU protected array v2
drm/amdgpu: add number of hardware submissions to amdgpu_fence_driver_init_ring
drm/amdgpu: RCU protected amd_sched_fence_release
drm/amdgpu: RCU protected amdgpu_fence_release
drm/amdgpu: merge amdgpu_fence_process and _activity
...
2016-03-18 07:16:25 +10:00
Rex Zhu
d27d49410e
drm/amd/powerplay: show uvd/vce power gate enablement for tonga.
...
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 >
2016-03-17 12:02:12 -04:00
Rex Zhu
66f4854c34
drm/amd/powerplay: show uvd/vce power gate info for fiji
...
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 >
2016-03-17 12:01:52 -04:00
Dave Airlie
9f443bf53b
Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-next
...
A few more fixes and cleanups for 4.6:
- DCE code cleanups
- HDP flush/invalidation fixes
- GPUVM fixes
- switch to drm_vblank_[on|off]
- PX fixes
- misc bug fixes
* 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux: (50 commits)
drm/amdgpu: split pipeline sync out of SDMA vm_flush() as well
drm/amdgpu: Revert "add mutex for ba_va->valids/invalids"
drm/amdgpu: Revert "add lock for interval tree in vm"
drm/amdgpu: Revert "add spin lock to protect freed list in vm (v3)"
drm/amdgpu: reserve the PD during unmap and remove
drm/amdgpu: Fix two bugs in amdgpu_vm_bo_split_mapping
drm/radeon: Don't drop DP 2.7 Ghz link setup on some cards.
MAINTAINERS: update radeon entry to include amdgpu as well
drm/amdgpu: disable runtime pm on PX laptops without dGPU power control
drm/radeon: disable runtime pm on PX laptops without dGPU power control
drm/amd/amdgpu: Fix indentation in do_set_base() (DCEv8)
drm/amd/amdgpu: make afmt_init cleanup if alloc fails (DCEv8)
drm/amd/amdgpu: Move config init flag to bottom of sw_init (DCEv8)
drm/amd/amdgpu: Don't proceed into audio_fini if audio is disabled (DCEv8)
drm/amd/amdgpu: Fix identation in do_set_base() (DCEv10)
drm/amd/amdgpu: Make afmt_init cleanup if alloc fails (DCEv10)
drm/amd/amdgpu: Move initialized flag to bottom of sw_init (DCEv10)
drm/amd/amdgpu: Don't proceed in audio_fini if disabled (DCEv10)
drm/amd/amdgpu: Fix indentation in dce_v11_0_crtc_do_set_base()
drm/amd/amdgpu: Make afmt_init() cleanup if alloc fails (DCEv11)
...
2016-03-17 08:25:04 +10:00
Eric Huang
60123300db
drm/amd/powerplay: add uvd/vce dpm enabling flag to fix the performance issue for CZ
...
Set the UVD and VCE DPM flags otherwise UVD and VCE DPM won't get enabled.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Cc: stable@vger.kernel.org
2016-03-16 18:02:21 -04:00
Alex Deucher
00dfedc1e4
drm/amd/powerplay: use pp_endian.h for Tonga
...
Drop local versions of these macros.
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 >
2016-03-14 13:35:04 -04:00
Alex Deucher
1445abf0cc
drm/amd/powerplay: use pp_endian.h for Fiji
...
Drop local versions of these macros.
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 >
2016-03-14 13:35:03 -04:00
Alex Deucher
2119364de5
drm/amd/powerplay: add a common pp endian header
...
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 >
2016-03-14 13:35:03 -04:00
rezhu
b5be3a6bef
drm/amd/powerplay: mv avfs status to smumgr.h
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-03-14 13:35:02 -04:00
Dave Airlie
9b61c0fcdf
Merge drm-fixes into drm-next.
...
Nouveau wanted this to avoid some worse conflicts when I merge that.
2016-03-14 09:46:02 +10:00
Rex Zhu
da26bae051
drm/amd/powerplay: refine the dmesg info.
...
this do not mean driver error.
Change-Id: If2080eb4b79fc6389280b7c75cb7998d77090739
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2016-03-05 12:33:40 -05:00
Alex Deucher
370afa7ac5
drm/amdgpu/powerplay/cz: enable/disable vce dpm independent of vce pg
...
If we don't disable it when vce is not in use, we use extra power
if vce pg is disabled.
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-03-02 11:01:24 -05:00