Chunming Zhou
e72cfd5899
drm/amdgpu: irq resume should be immediately after gpu resume
...
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:21 -04:00
Tom St Denis
568ba157cd
drm/amd/amdgpu: Partially revert change to UVD v3 CG
...
Partially undo changes made by commit:
drm/amd/amdgpu: don't track state in UVD clockgating
To keep bypass even if CG flags are not set.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:19 -04:00
Tom St Denis
8ef583e9f9
drm/amd/amdgpu: Enable VCE MGCG for Stoney
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:18 -04:00
Tom St Denis
1af69a2c35
drm/amd/amdgpu: Enable VCE MGCG for Carrizo
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:17 -04:00
Tom St Denis
13d58d2a49
drm/amd/amdgpu: Don't set VCE CG in startup
...
It's handled by DPM/PP properly.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:16 -04:00
Tom St Denis
6f906814a5
drm/amd/amdgpu: Fix VCE CG order and resume defaults
...
CG was being enabled in reverse sense from dpm/powerplay.
Also fix the default CLK_EN signal to enable all of the blocks.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:14 -04:00
Tom St Denis
f16fe6d303
drm/amd/amdgpu: fix indentation in vce3 CG
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:13 -04:00
Leo Liu
713c002197
drm/amdgpu: remove the check for sessions being closed
...
This will make clock and power gated when no block decoded, for example
when paused during the playback.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:12 -04:00
Marek Olšák
f10379503e
drm/amdgpu: print more accurate error messages on IB submission failure
...
It's useful for debugging.
Signed-off-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:11 -04:00
Ken Wang
a693e050ed
drm/amdgpu: use the kernel zone memory size as the max remote memory in amdgpu
...
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:09 -04:00
Rex Zhu
8e9fc800ec
drm/amd/powrplay: delete code no longer in use on Polaris.
...
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-08-08 11:33:07 -04:00
Rex Zhu
6391b6ab32
drm/amd/powrplay: workaround Memory EDC Error for certain partner boards.
...
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-08-08 11:33:06 -04:00
Rex Zhu
5765a36d4c
drm/amdgpu: AMD SW workaround for certain partner boards
...
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-08-08 11:33:04 -04:00
Rex Zhu
93bdacd1bd
drm/amd/powerplay: pass sub_device_id and sub_vendor_id to powerplay.
...
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-08-08 11:33:03 -04:00
Rex Zhu
08bd8b9f6f
drm/amd/powerplay: delete useless code in hwmgr.
...
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-08-08 11:33:02 -04:00
Flora Cui
4fea83ff0f
drm/amdgpu: expose AMDGPU_GEM_CREATE_VRAM_CLEARED to user space
...
V2: fix the return value for fill failure and validate bo before
filling data
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Flora Cui <Flora.Cui@amd.com >
Reviewed-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:01 -04:00
Flora Cui
59b4a97742
drm/amdgpu: implement amdgpu_fill_buffer()
...
so that bo could be set to some pattern
Signed-off-by: Flora Cui <Flora.Cui@amd.com >
Reviewed-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:00 -04:00
Alex Deucher
309889098c
drm/amdgpu/gfx8: remove stale function declaration
...
This got leftover somehow when I cleaned this up.
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:58 -04:00
Eric Huang
1684d3ba48
drm/amd/amdgpu: change pptable output format from ASCII to binary
...
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
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-08-08 11:32:57 -04:00
Alex Deucher
b9a8be95b1
drm/amdgpu/ci: add mullins to default case for smc ucode
...
It's already covered by the default case, but add it for
consistency.
Reviewed-by: Alexandre Demers <alexandre.f.demers@gmail.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:56 -04:00
Alex Deucher
b62774fc2f
drm/amdgpu/gmc7: add missing mullins case
...
Looks like this got missed when we ported the code from radeon.
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2016-08-08 11:32:55 -04:00
Rex Zhu
66bc3f7f03
drm/amdgpu: use modules parameter to ctrl deep sleep feature in dpm
...
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-08-08 11:32:53 -04:00
Rex Zhu
af223dfaf0
drm/amdgpu: add module parameters to ctrl powerplay feature
...
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-08-08 11:32:52 -04:00
Rex Zhu
a94cbfc377
drm/amd/powerplay: fix typos of volt/millivolt symbols in comment.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alexandre Demers <alexandre.f.demers@gmail.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:51 -04:00
Tom St Denis
75419c4378
drm/amd/amdgpu: Enable stoney VCE PG
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:50 -04:00
Tom St Denis
c2cdb04280
drm/amd/amdgpu: Enable stoney UVD PG
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:48 -04:00
Tom St Denis
4e86be75c6
drm/amd/amdgpu: Enable stoney GFX PG
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:47 -04:00
Tom St Denis
2ed0936de5
drm/amd/amdgpu: Enable carrizo VCE PG
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:46 -04:00
Tom St Denis
65b426225b
drm/amd/amdgpu: Enable carrizo UVD PG
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:45 -04:00
Tom St Denis
f6ade30418
drm/amd/amdgpu: Enable carrizo GFX PG
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:43 -04:00
Tom St Denis
0da31ffce9
drm/amd/amdgpu: Add error messages to UVD PG in DPM
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:42 -04:00
Tom St Denis
fa5d2e0c10
drm/amd/amdgpu: enable PG_EN bit in powergating UVD
...
Enable the PG_EN bit just before the SMU would be tasked
with the PG transition.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:41 -04:00
Tom St Denis
2875125c31
drm/amd/amdgpu: don't track state in UVD clockgating
...
There's no need to track CG state anymore.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:40 -04:00
Tom St Denis
7acc83d4df
drm/amd/amdgpu: don't set clockgating in uvd_v6_0_start()
...
This is handled properly by both DPM and PP externally.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:38 -04:00
Tom St Denis
bd12267dd8
drm/amd/amdgpu: add pm lock to debugfs mmio entry
...
Adds support for PM locks around access to registers that might
have race conditions on PG transistions.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:37 -04:00
Tom St Denis
e95a14a909
drm/amd/amdgpu: add mutex locking for both DPM and PP based powergating for UVD/VCE
...
This adds a mutex lock for both DPM/PP around the changes in
power gating state so that userspace can poll registers without
a race condition on power state.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:36 -04:00
Alex Deucher
70bb246154
drm/amdgpu/powerplay: enable powerplay by default on TOPAZ
...
Now that the implementation is complete.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:35 -04:00
Huang Rui
3c18266cff
drm/amd/powerplay: add DPM running checking back
...
This patch adds DPM running checking back, because the DPM issue is
fixed.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:34 -04:00
Huang Rui
db7992d820
drm/amd/powerplay: add enabling voltage controller back
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:32 -04:00
Huang Rui
f6bf6dcaab
drm/amd/powerplay: set the platform capability flags for iceland
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:31 -04:00
Huang Rui
e4e2c8f29a
drm/amd/powerplay: add deep sleep initialization
...
This patch adds the deep sleep initialization at DPM, it needs send a
message to SMC to enable this feature before enable voltage controller.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:30 -04:00
Huang Rui
9f7aab6fd3
drm/amd/powerplay: fix the incorrect checking condition
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:28 -04:00
Huang Rui
54c825a916
drm/amdgpu: enable iceland powerplay manually
...
It's able to enable iceland powerplay manually via the module
parameter. The default state is disabled.
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 >
2016-08-08 11:32:27 -04:00
Huang Rui
025f8bfb84
drm/amd/powerplay: add iceland HW manager
...
This patch introduces the iceland HW manager of powerplay which
includes HW manager, clockpowergating, thermal, and powertune.
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 >
2016-08-08 11:32:26 -04:00
Huang Rui
d550df0b60
drm/amd/powerplay: add iceland_dyn_defaults header
...
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 >
2016-08-08 11:32:25 -04:00
Huang Rui
2435b0547c
drm/amd/powerplay: add iceland SMU mananger
...
The system management unit (SMU) is a subcomponent of the northbridge
that is responsible for a variety of system and power management tasks
during boot and runtime for GPU. In powerplay, it will be used on
firmware loading and power task management. This patch adds SMU
mananger for iceland.
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 >
2016-08-08 11:32:24 -04:00
Huang Rui
d31d3c28c7
drm/amd/powerplay: add SMU71 header files for iceland (v2)
...
v2: cleanup headers, add copyright
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:22 -04:00
Christian König
37ac235bf8
drm/amdgpu: use amdgpu_bo_create_kernel in amdgpu_ring.c
...
Saves us quite a bunch of code.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:21 -04:00
Christian König
c6f4439ce6
drm/amdgpu: use amdgpu_bo_create_kernel in amdgpu_ih.c
...
Saves us quite a bunch of code.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:20 -04:00
Christian König
4b62e69777
drm/amdgpu: user amdgpu_bo_create_kernel for the UVD BO
...
Saves us some code.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:19 -04:00