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
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
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
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
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
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
Eric Yang
0f18563aaa
drm/amd/powerplay: Enable low mem pstate when cancel_high
...
Signed-off-by: Eric Yang <eric.yang2@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 16:19:29 -05:00
Eric Yang
5952c75b41
drm/amd/powerplay: Use correct clock in cz_apply_state_adjust_rules
...
Signed-off-by: Eric Yang <eric.yang2@amd.com >
Reviewed-by: Eagle Yeh <eagle.yeh@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 16:17:01 -05:00
Rex Zhu
ff5e20c2a0
drm/amd/powerplay: get real display device num by cgs 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 >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 16:16:23 -05:00
Vitaly Prosyak
58c3ce23c9
drm/amd/powerplay: Use engine clock limit calculated by dal
...
Use min required system clock calculated by dal
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 16:14:57 -05:00
Rex Zhu
f1232c6136
drm/amd/powerplay: implement functions in carrizo for DAL.
...
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-02-10 16:13:25 -05:00
Rex Zhu
e273b04117
drm/amd/powerplay: export interface to DAL.
...
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-02-10 16:12:23 -05:00
Rex Zhu
47329134ae
drm/amd/powerplay: change struct name.
...
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 >
2016-02-10 16:11:04 -05:00
Eric Huang
5d37a63d26
drm/amd/powerplay: add some hwmgr functions for sysfs interface on Tonga
...
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 >
2016-02-10 14:17:01 -05:00
Eric Huang
d7341ef668
drm/amd/powerplay: add some hwmgr functions for sysfs interface on Carrizo
...
These add the interfaces for manual clock control.
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 >
2016-02-10 14:17:01 -05:00
Eric Huang
b9c1a77e8c
drm/amd/powerplay: add hwmgr's functions for Fiji sysfs interfaces.
...
These add the interfaces for manual clock control.
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 >
2016-02-10 14:17:00 -05:00
Dan Carpenter
9e51021cfd
drm/amd/powerplay: indent a couple if statements
...
We recently redid the indenting, but missed these two if statements.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-10 14:16:43 -05:00
Alex Deucher
db5cffcd2b
drm/amdgpu/cz: plumb pg flags through to powerplay
...
Enable vce and uvd pg based on single set of pg flags.
Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-08 10:37:48 -05:00
Alex Deucher
52b52a8781
drm/amdgpu/tonga: plumb pg flags through to powerplay
...
Enable vce and uvd pg based on single set of pg flags.
Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-08 10:37:48 -05:00
Alex Deucher
f997e6f213
drm/amd/powerplay/tonga: disable vce pg
...
Not working reliably yet.
Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-08 10:37:46 -05:00
Alex Deucher
3d5afb41f8
drm/amd/powerplay/tonga: disable uvd pg
...
Not working reliably yet.
Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-08 10:37:45 -05:00
Alex Deucher
67a0a0fd11
drm/amd/powerplay/cz: disable vce pg
...
Not working reliably yet.
Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-08 10:37:45 -05:00
Alex Deucher
d4fdc08e25
drm/amd/powerplay/cz: disable uvd pg
...
Not working reliably yet.
Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-02-08 10:37:44 -05:00
Stephen Rothwell
8a0d560f3e
drm/amdgpu/powerplay: include asm/div64.h for do_div()
...
Fixes: 1e4854e96c ("drm/amdgpu/powerplay: implement thermal control for tonga.")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2016-01-12 09:29:25 +10:00
Rex Zhu
4d42fa492e
drm/amd/powerplay: implement power down asic task for CZ
...
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-01-08 15:39:27 -05:00
Rex Zhu
e1d32e607b
drm/amd/powerplay: enable power down asic task. (v2)
...
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 >
2016-01-08 15:39:27 -05:00
Rex Zhu
ab4f4b14c3
drm/amdgpu: fix hex/decimal bug when show gpu load.
...
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-01-08 15:39:25 -05:00
Rex Zhu
0cfd9f2697
drm/amdgpu: Show gpu load when display gpu performance for Fiji of VI.
...
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-01-08 15:39:25 -05:00
Rex Zhu
c15c8d7020
drm/amd/powerplay: fix Smatch static checker warnings
...
1. return -1 instead of -ENOMEM
2. The struct type mismatch warnings.
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 >
2016-01-08 15:39:23 -05:00