Emily Deng
16925c92db
drm/amdgpu: Add virtual connector and encoder macros.
...
For virtual display feature, add virtual connector and encoder macros.
Signed-off-by: Emily Deng <Emily.Deng@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 13:44:11 -04:00
Lyude
14a2fb487b
drm/amdgpu: Don't retry 7 times in amdgpu_atombios_dp_get_dpcd()
...
When this code was written, we didn't retry DP aux transactions on any
error, which required retrying important transactions like this in
individual drivers. Since that's no longer the case, retrying here is
not necessary. As well, we retry any aux transaction on any error 32
times. 7 * 32 = 224, which means this loop causes us to retry grabbing
the dpcd 224 times. This is definitely far more then we actually need to
do.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Lyude <cpaul@redhat.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 13:28:39 -04:00
Lyude
aff802954e
drm/amdgpu: Don't print error on aux transaction timeouts
...
Since it's normal for DRM to retry our aux transaction helpers multiple
times in a row, up to 32 times for each attempted transaction, we're
making a lot of noise that is no longer necessary now that DRM will just
print the return code we give it.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Lyude <cpaul@redhat.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 13:28:33 -04:00
Michel Dänzer
4499f2acd5
drm/ttm: Remove unused parameter evict from ttm_bo_move_memcpy
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:33 -04:00
Michel Dänzer
4e2f0caa39
drm/ttm: Remove unused parameter evict from ttm_bo_move_ttm
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:32 -04:00
Michel Dänzer
7b8082bc07
drm/ttm: Wait for a BO to become idle before unbinding it from GTT
...
Fixes hangs under memory pressure, e.g. running the piglit test
tex3d-maxsize concurrently with other tests.
Fixes: 17d33bc9d6
("drm/ttm: drop waiting for idle in ttm_bo_evict.")
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:31 -04:00
Alex Deucher
fdba11f407
drm/amdgpu: move all Kconfig options to amdgpu/Kconfig
...
For consistency.
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:29 -04:00
Huang Rui
fad2af195f
drm/amd/powerplay: enable powerplay as default on CZ/ST
...
Enable powerplay as default on Carrizo and Stoney. And it can be
disabled with amdgpu.powerplay=0.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Cc: Rex Zhu <Rex.Zhu@amd.com >
Cc: Flora Cui <Flora.Cui@amd.com >
Cc: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:28 -04:00
Rex Zhu
173247569a
drm/amd/powerplay: change structure variable name.
...
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:27 -04:00
Rex Zhu
29425288ba
drm/amd/powerplay: delete code set/unset deep_sleep/power_containment.
...
they were controled by module parameter.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:26 -04:00
Chunming Zhou
bde1d8b228
drm/amdgpu: enable VCE soft reset
...
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:24 -04:00
Rex Zhu
ac8e3f3040
drm/amdgpu: remove RB1_BUSY bit checking
...
This is a workaround to let VCE soft reset work.
RB1_BUSY bit is always set, so remove its checking now, and we
will depend on RB0_BUSY currently.
After we find the root cause of RB1_BUSY, we can add it back.
Signed-off-by: Rex Zhu <Rex.Zhu@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:23 -04:00
Chunming Zhou
9c0171b412
drm/amdgpu: fix harvest config checking in vce3 check_soft_reset
...
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:22 -04:00
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