Rex Zhu
2667989927
drm/amdgpu: refine vce_3.0 code.
...
fix logic error in hw_fini and
set_clockgating_state functions.
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 >
2017-03-29 23:53:51 -04:00
Rex Zhu
03a5f1df5b
drm/amdgpu: refine vce2.0 dpm sequence
...
start vce first then enable vce 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 >
2017-03-29 23:53:50 -04:00
Alex Deucher
8285052ef1
drm/amdgpu: add new ATIF ACPI method
...
Used for fetching external GPU information.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:49 -04:00
Leo Liu
166c8178fb
drm/amdgpu: get cs support of AMDGPU_HW_IP_UVD_ENC
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:48 -04:00
Leo Liu
63defd3f67
drm/amdgpu: add AMDGPU_HW_IP_UVD_ENC to info query
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:47 -04:00
Leo Liu
50c3e23299
drm/amdgpu: add uvd enc ring type and functions
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:46 -04:00
Leo Liu
a28f0a164c
drm/amdgpu: add uvd enc run queue
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:46 -04:00
Leo Liu
f7243053c2
drm/amdgpu: add uvd enc rings
...
And initialize them
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:45 -04:00
Leo Liu
5e5681788b
drm/amdgpu: move amdgpu_vce structure to vce header
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:44 -04:00
Leo Liu
4df654d293
drm/amdgpu: move amdgpu_uvd structure to uvd header
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:44 -04:00
Leo Liu
135d4735d8
drm/amdgpu: add a ring func for end command
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:43 -04:00
Huang Rui
c773a632a9
drm/amdgpu: add DF MGCG flag
...
Acked-by: Christian König <christian.koenig@amd.com >
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 >
2017-03-29 23:53:42 -04:00
Huang Rui
e929c98d2e
drm/amdgpu: add DRM MGCG header
...
Acked-by: Christian König <christian.koenig@amd.com >
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 >
2017-03-29 23:53:42 -04:00
Alex Deucher
bbf282d884
drm/amdgpu: add asic callback to get memsize register
...
Newer asics use different registers so abstract it.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:41 -04:00
Rex Zhu
c722865a19
drm/amdgpu: check function points valid before use. (v3)
...
v2: agd: integrate Christian's comments.
v3: print error message if call fails
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:41 -04:00
Alex Xie
5463545b92
drm/amdgpu: add a callback to set vm mapping flags
...
This lets each asic set whichever flags it supports.
Signed-off-by: Alex Xie <AlexBin.Xie@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 >
2017-03-29 23:53:40 -04:00
Alex Xie
4b98e0c4ae
drm/amdgpu: set GART PTE asic specific flags
...
Set asic specific gart pte flags in the gmc IP module for
each asic.
Signed-off-by: Alex Xie <AlexBin.Xie@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 >
2017-03-29 23:53:39 -04:00
Huang Rui
daf42c314d
drm/amdgpu: add a ucode size member into firmware info
...
This will be used for newer asics.
Acked-by: Christian König <christian.koenig@amd.com >
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 >
2017-03-29 23:53:39 -04:00
Chunming Zhou
6b777607c1
drm/amdgpu: expand pte flags to uint64_t
...
Necessary for new asics.
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 >
2017-03-29 23:53:38 -04:00
Alex Deucher
7ccf5aa8ba
drm/amdgpu/ih: store the full context id
...
The contextID field (formerly known as src_data) of the IH
vector stores client specific information about an interrupt.
It was expanded from 32 bits to 128 on newer asics. Expand the
src_id field to handle this.
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:37 -04:00
Alex Deucher
d766e6a393
drm/amdgpu: switch ih handling to two levels (v3)
...
Newer asics have a two levels of irq ids now:
client id - the IP
src id - the interrupt src within the IP
v2: integrated Christian's comments.
v3: fix rebase fail in SI and CIK
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:37 -04:00
Ken Wang
832be4041d
drm/amdgpu: add 64bit doorbell functions (v2)
...
Newer asics need 64 bit doorbells.
v2: fix comment (Nils)
Reviewed-by: Christian König <christian.koenig@amd.com >
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 >
2017-03-29 23:53:36 -04:00
Ken Wang
7014285ade
drm/amdgpu: add 64bit wb functions
...
Newer asics need 64 bit writeback slots.
Reviewed-by: Christian König <christian.koenig@amd.com >
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 >
2017-03-29 23:53:35 -04:00
Ken Wang
536fbf946c
drm/amdgpu: change wptr to 64 bits (v2)
...
Newer asics need 64 bit wptrs. If the wptr is now
smaller than the rptr that doesn't indicate a wrap-around
anymore.
v2: integrate Christian's comments.
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 >
2017-03-29 23:53:35 -04:00
Junwei Zhang
8fe733289b
drm/amdgpu: init aperture definitions (v2)
...
v2: agd: move apertures to mc structure
Signed-off-by: Flora Cui <Flora.Cui@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 >
2017-03-29 23:53:34 -04:00
Daniel Vetter
04e30c9c86
drm/amdgpu: Merge pre/postclose hooks
...
Again no apparent explanation for the split except hysterical raisins.
Merging them also makes it a bit more obviuos what's going on wrt the
runtime pm refdancing.
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Christian König <christian.koenig@amd.com >
Cc: amd-gfx@lists.freedesktop.org
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:33 -04:00
Andres Rodriguez
82c6bd46bf
drm/amdgpu: trace fence details in amdgpu_sched_run_job
...
This information is intended to provide the required data to associate
amdgpu tracepoints with their corresponding dma_fence_* events.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Andres Rodriguez <andresx7@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:32 -04:00
Andres Rodriguez
f8d569011c
drm/amdgpu: make trace format uniform csv name=value
...
Most of the traces have uniform format except for two of them. Having
all the traces match makes it simple to run awk on the ftrace output.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Andres Rodriguez <andresx7@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:31 -04:00
Xiangliang Yu
49abb980c5
drm/amdgpu/gfx8: move CE&DE meta data structure to vi_structs.h
...
Because different HWs have different definition for CE & DE meta
data, follow mqd design to move the structures to vi_structs.h.
And change the prefix from amdgpu to vi as the structures is only
for VI family.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:31 -04:00
Junshan Fang
7dae618174
drm/amd/amdgpu: add DID for Polaris10
...
Signed-off-by: Junshan Fang <Junshan.Fang@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:30 -04:00
Alex Deucher
2fc5338494
drm/amdgpu: add polaris12 to virtual dce handling
...
Was missed when polaris12 support was added.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:30 -04:00
Christian König
81522f71b1
drm/amdgpu: remove unused sync testing
...
Not used in a while.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:29 -04:00
Eric Huang
35011d398e
drm/amd/powerplay: simplify avfs control code in smu7
...
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 >
2017-03-29 23:53:28 -04:00
Eric Huang
f9c993ceb1
drm/amd/powerplay: add function avfs control in smu7
...
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 >
2017-03-29 23:53:28 -04:00
Eric Huang
dd4bdf3b35
drm/amd/powerplay: add voltage change support through pp_table
...
Disable avfs to make voltage change take effect.
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 >
2017-03-29 23:53:27 -04:00
Rex Zhu
cf4270ec68
drm/amdgpu: print full bios version in dmesg.
...
v2: fix merge error.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:26 -04:00
Christian König
c5cb934ebd
drm/amdgpu: disable HDP flushes on APUs
...
We completely bypass the HDP now.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:25 -04:00
Joe Perches
7ca85295d8
gpu: drm: amd/radeon: Convert printk(KERN_<LEVEL> to pr_<level>
...
Use a more common logging style.
Miscellanea:
o Coalesce formats and realign arguments
o Neaten a few macros now using pr_<level>
Signed-off-by: Joe Perches <joe@perches.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:24 -04:00
Joe Perches
eeca232490
drm: Use pr_cont where appropriate
...
Using 'printk("\n")' is not preferred anymore and
using printk to continue logging messages now produces
multiple line logging output unless the continuations
use KERN_CONT.
Convert these uses to appropriately use pr_cont or a
single printk where possible.
Miscellanea:
o Use a temporary const char * instead of multiple printks
o Remove trailing space from logging by using a leading space instead
Signed-off-by: Joe Perches <joe@perches.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:24 -04:00
Alex Deucher
9dc5a91e4d
drm/amdgpu: put gtt at 0 in the internal address space
...
There still seem to be some blocks that make accesses
in the lower part of the address space. This works around
this.
Reviewed-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 >
2017-03-29 23:53:23 -04:00
Alex Deucher
dc3abc16a7
drm/amdgpu/vce2: fix vce bar programming
...
Program the VCE BAR and offsets properly. The current code
was carried over from a limitation from older VCE versions.
Reviewed-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 >
2017-03-29 23:53:22 -04:00
Joe Perches
98a36749eb
drivers/gpu: Convert remaining uses of pr_warning to pr_warn
...
To enable eventual removal of pr_warning
This makes pr_warn use consistent for drivers/gpu
Prior to this patch, there were 15 uses of pr_warning and
20 uses of pr_warn in drivers/gpu
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Joe Perches <joe@perches.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:22 -04:00
Geert Uytterhoeven
6137a0fec2
drm/amd: Spelling s/SDMA_WRTIE_SUB_OPCODE_TILED/SDMA_WRITE_SUB_OPCODE_TILED/
...
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Christian König <christian.koenig@amd.com >
Cc: dri-devel@lists.freedesktop.orgamd-gfx @lists.freedesktop.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:21 -04:00
Alex Deucher
7bb0613ebb
drm/amdgpu/powerplay: enable LEDs on Fiji boards
...
This enables the LEDs that light up based on DPM states
on some Fiji boards.
bug:
https://bugs.freedesktop.org/show_bug.cgi?id=97590
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:20 -04:00
Junwei Zhang
ea323f88a2
drm/amdgpu: rename amdgpu_gca_config to amdgpu_gfx_config
...
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 >
2017-03-29 23:53:19 -04:00
Trigger Huang
07c397f934
drm/amdgpu: Fix module unload hang by KIQ IRQ set
...
In some cases, manually insmod/rmmod amdgpu is necessary. When
unloading amdgpu, the KIQ IRQ enable/disable function will case
system hang. The root cause is, in the sequence of function
amdgpu_fini, the sw_fini of IP block AMD_IP_BLOCK_TYPE_GFX will be
invoked earlier than that of AMD_IP_BLOCK_TYPE_IH. So continue to use
the variable freed by AMD_IP_BLOCK_TYPE_GFX will cause system hang.
Signed-off-by: Trigger Huang <trigger.huang@amd.com >
Reviewed-by: Xiangliang Yu < Xiangliang.Yu@amd.com >
Reviewed-by: Monk Liu <monk.liu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:19 -04:00
Alex Deucher
dfe38bd834
drm/amdgpu: bump driver version for new lds buffer query
...
v2: agd: bump version
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:18 -04:00
Junwei Zhang
df6e2c4aeb
drm/amdgpu: export gfx config double offchip LDS buffers (v3)
...
v2: move the config struct to drm_amdgpu_info_device
v3: move the config feature to amdgpu_gca_config
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 >
2017-03-29 23:53:17 -04:00
Xiangliang Yu
24de75151b
drm/amdgpu/gfx: free memory of mqd backup
...
Need to free mqd backup when destroying ring.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Monk Liu <Monk.Liu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:17 -04:00
Xiangliang Yu
d1aad4d8a4
drm/amdgpu/virt: fix typo
...
When send messages to hypervior, the messages format should be is
idh_request, not idh_event.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Monk Liu <Monk.Liu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:53:16 -04:00