Junwei Zhang
8640faed5a
drm/amdgpu: free the BO in kernel by helper amdgpu_bo_free_kernel()
...
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:27 -04:00
Junwei Zhang
aa1d562e64
drm/amdgpu: add a new helper to free a BO in kernel allocations
...
Free the BO allocated by amdgpu_bo_create_kernel()
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 15:10:26 -04:00
Tom St Denis
ad2473af27
drm/amd/amdgpu: Fix return values in SI DPM code
...
Fix a couple of spots where errors were not returned as
well as add some error messages to
si_patch_dependency_based_on_leakage() which were not being
read.
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-09-14 15:10:26 -04:00
Huang Rui
fd5065584d
drm/amdgpu: move some release handles into fail labels (v2)
...
Clean up the codes to move the release handles into fail labels.
v2: squash in Christian's regression fix
Signed-off-by: Huang Rui <ray.huang@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-09-14 15:10:25 -04:00
Tom St Denis
f166d9f297
drm/amd/amdgpu: Remove double lock from gfx v6
...
The function gfx_v6_0_get_cu_info() was taking the
grbm_idx_mutex which was then taken by a dependent
function gfx_v6_0_get_cu_active_bitmap().
This patch removes the select from the parent function
to avoid the double lock.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-14 09:43:41 -04:00
Tom St Denis
075719c3cb
drm/amd/amdgpu: Convert messages in gmc v6 to dev_*()
...
Make the kernel log messaging more consistent and use the
dev_*() functions instead of a mix of DRM_*() and printk().
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-09-14 09:43:40 -04:00
Tom St Denis
e5c5304f13
drm/amd/amdgpu: Comment out currently unused SI DPM struct
...
The tahiti_le structure is not currently used. Comment it out
to avoid warnings.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-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-09-14 09:43:40 -04:00
Tom St Denis
f80c738c61
drm/amd/amdgpu: Tidy up SI SMC code (v2)
...
As well as merge SMC clock functions into one to reduce LOC.
v2: Fix swapped ck enable bit
bug: https://bugs.freedesktop.org/show_bug.cgi?id=97801
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-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-09-14 09:43:39 -04:00
Tom St Denis
6e9057a8f9
drm/amd/amdgpu: Tidy up SI IH code
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-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-09-12 18:12:22 -04:00
Tom St Denis
77d318a6b9
drm/amd/amdgpu: Correct whitespace in SI DPM code
...
Replace 8 spaces with tabs, correct {} braces, etc.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-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-09-12 18:12:21 -04:00
Tom St Denis
c3d9864585
drm/amd/amdgpu: Clean up SI DPM table assignments
...
Hoist common assignments out of cases.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-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-09-12 18:12:21 -04:00
Tom St Denis
9623e4bfaa
drm/amd/amdgpu: Allow calling si_dpm_fini at any point
...
Allow calling fini even if ps array is not allocated.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-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-09-12 18:12:20 -04:00
Tom St Denis
cb5df31b2d
drm/amd/amdgpu: Tidy up SI DMA code
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-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-09-12 18:12:20 -04:00
Rex Zhu
a3fd80740a
drm/amd/powerplay: fix issue power containment not enabled on Tonga.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-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-09-12 18:12:19 -04:00
Rex Zhu
2377cd945f
drm/amd/powerplay: enable/disable auto thermal throttle for tonga.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-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-09-12 18:12:19 -04:00
jimqu
74b0b15784
drm/amd/amdgpu: S4 issue for amdgpu (v2)
...
reset the asic if adapter is not powerdown when doing freeze()
thaw() and restore(), in order to get a valid state of adapter.
v2: squash in warning fix from Rex
Signed-off-by: JimQu <Jim.Qu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Tested By: Shawn Starr <shawn.starr@rogers.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-12 18:12:18 -04:00
Monk Liu
3aecd24c65
drm/amdgpu: change job->ctx field name
...
job->ctx actually is a fence_context of the entity
it belongs to, naming it as ctx is too vague, and
we'll need add amdgpu_ctx into the job structure
later.
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-12 18:12:17 -04:00
Monk Liu
d4946ccfd0
drm/amdgpu: new method to sync ce&de
...
sync switch buffer scheme with windows kmd for gfx v8,
step2:
Insert 128NOP after&before VM flush to prevent CE vm fault.
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-12 18:12:17 -04:00
Maruthi Srinivas Bayyavarapu
ea4a8c1d94
drm/amdgpu: add VCE VM mode support
...
This adds VCE VM mode support from Stoney onwards. Session tracking
is an open issue, yet to be supported.
v2: Fixed warnings from checkpatch.pl
Signed-off-by: Maruthi Bayyavarapu <maruthi.bayyavarapu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-12 18:12:16 -04:00
Tom St Denis
832c6ef765
drm/amd/amdgpu: Merge get_wptr functions in gfx6
...
Signed-off-by: Tom St Denis <tom.stdenis@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-09-02 11:33:24 -04:00
Tom St Denis
e7706b422c
drm/amd/amdgpu: Merge get_rptr functions in gfx8
...
Signed-off-by: Tom St Denis <tom.stdenis@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-09-02 11:33:15 -04:00
Tom St Denis
f1c0efc537
drm/amd/amdgpu: Merge get_rptr functions in gfx7
...
Signed-off-by: Tom St Denis <tom.stdenis@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-09-02 11:33:05 -04:00
Tom St Denis
6f924e2026
drm/amd/amdgpu: Merge get_rptr functions in gfx6
...
Signed-off-by: Tom St Denis <tom.stdenis@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-09-02 11:32:55 -04:00
Tom St Denis
4aeacf0f9a
drm/amd/amdgpu: Various tidy ups for gfx6
...
Various whitespace and logical simplifications for gfx6.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-02 11:32:45 -04:00
Tom St Denis
142333dbb9
drm/amd/amdgpu: Simplify mask creation in gfx6
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-09-02 11:32:35 -04:00