Leo Liu
f6e8b15af7
drm/amdgpu: remove the clearance of vce 4.0 interrupt mask
...
Requested by SRIOV, the clearance of the bit moved into firmware
Signed-off-by: Leo Liu <leo.liu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 15:14:03 -04:00
Frank Min
a1aacc9759
drm/amdgpu/vce4: optimize vce 4.0 init table sequence for SRIOV
...
Optimize init table sequence for sriov.
Signed-off-by: Frank Min <Frank.Min@amd.com >
Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-15 14:45:48 -04:00
Frank Min
4ed11d793c
drm/amdgpu: According hardware design revert vce and uvd doorbell assignment
...
Now uvd doorbell is from 0xf8-0xfb and vce doorbell is from 0xfc-0xff
Signed-off-by: Frank Min <Frank.Min@amd.com >
Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-15 14:45:47 -04:00
Frank Min
088c69aad4
drm/amdgpu/vce4: Remove vce interrupt enable related code for sriov
...
Interrupt enable is contained in vce init table and this register could
not be accessed in secure ASICs, so just remove it.
Signed-off-by: Frank Min <Frank.Min@amd.com >
Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-15 14:45:46 -04:00
Frank Min
257deb8cc6
drm/amdgpu: Enable uvd and vce gpu re-init for SRIOV gpu reset
...
Add uvd and vce re-init after gpu reset.
Signed-off-by: Frank Min <Frank.Min@amd.com >
Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-15 14:45:45 -04:00
Frank Min
ab2b2e4f8b
drm/amdgpu: Clear vce&uvd ring wptr for SRIOV
...
MMSCH FW need to get the wptr from 0 after it get the mailbox request
from driver, since every time kick the mailbox, mmsch thinks that it
is the first time engine start to initialize.
Signed-off-by: Frank Min <Frank.Min@amd.com >
Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-15 14:45:45 -04:00
Leo Liu
a107ebf61e
drm/amdgpu: add saved_bo to save vce 4.0 context when suspend
...
We are using PSP to resume firmware after suspend, and it is
resumed at where it got suspended, so we'd better save the
the context.
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-06-01 16:00:22 -04:00
Christian König
b116632557
drm/amdgpu: cleanup adjust_mc_addr handling v4
...
Rename adjust_mc_addr to get_vm_pde and check the address bits in one place.
v2: handle vcn as well, keep setting the valid bit manually,
add a BUG_ON() for GMC v6, v7 and v8 as well.
v3: handle vcn_v1_0_enc_ring_emit_vm_flush as well.
v4: fix the BUG_ON mask for GFX6-8
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-31 14:16:35 -04:00
Christian König
9a94f5a593
drm/amdgpu: move adjust adjust_mc_addr into the GFX9 vm_flush functions
...
That GFX9 needs a PDE in the registers is entirely GFX9 specific.
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 >
2017-05-24 18:19:49 -04:00
Frank Min
b48622b088
drm/amdgpu: clean doorbell after sending init table to mmsch
...
According to HW design, need to clean doorbell after setup MMSCH
table.
Signed-off-by: Frank Min <Frank.Min@amd.com >
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Reviewed-by: Monk Liu <Monk.Liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:40:22 -04:00
Trigger Huang
5dd696ae5d
drm/amdgpu: Bypass GMC/UVD/VCE hw_fini in SR-IOV
...
On vega10, some hw finish operations should not be applied in SR-IOV
case. This works as workaround to fix multi-VFs reboot/shutdown
issues.
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 >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:40:20 -04:00
Xiangliang Yu
7006dde2ef
drm/amdgpu/vce4: replaced with virt_alloc_mm_table
...
Used virt_alloc_mm_table function to allocate MM table memory.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:32:59 -04:00
Frank Min
a92f5ec0c1
drm/amdgpu/vce4: move mm table constructions functions into mmsch header file
...
Move mm table construction functions into mmsch header file so that
UVD can reuse it.
Signed-off-by: Frank Min <Frank.Min@amd.com >
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:32:57 -04:00
Daniel Wang
b53b8cdac6
drm/amdgpu/vce4: fix a PSP loading VCE issue
...
Fixed PSP loading issue for sriov.
Signed-off-by: Daniel Wang <Daniel.Wang2@amd.com >
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:32:57 -04:00
Christian König
4789c463cb
drm/amdgpu: assign VM invalidation engine manually v2
...
For Vega10 we have 18 VM invalidation engines for each VMHUB.
Start to assign them manually to the rings.
v2: add a BUG_ON if we use to many engines
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Andres Rodriguez <andresx7@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:32:19 -04:00
Christian König
2e81984988
drm/amdgpu: invalidate only the currently needed VMHUB v2
...
Drop invalidating both hubs from each engine.
v2: don't use hardcoded values
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Andres Rodriguez <andresx7@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:32:18 -04:00
Christian König
0eeb68b390
drm/amdgpu: add VMHUB to ring association
...
Add the info which ring belonging to which VMHUB.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Andres Rodriguez <andresx7@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:32:16 -04:00
Frank Min
71f2af890a
drm/amdgpu/vce4: update VCE initialization sequence for SRIOV
...
Update the initialization sequence of VCE to make VCE work.
Signed-off-by: Frank Min <Frank.Min@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-04-28 17:32:15 -04:00
Christian König
03f89feb57
drm/amdgpu: cleanup get_invalidate_req v2
...
The two hubs are just instances of the same hardware,
so the register bits are identical.
v2: keep the function pointer
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-04-06 13:27:18 -04:00
Rex Zhu
502372878a
drm/amdgpu: various cleanups for uvd/vce.
...
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 >
2017-04-04 13:40:33 -04:00
Harry Wentland
9e8e453a70
drm/amd/amdgpu: Fix some warnings in vce4
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:55:13 -04:00
Xiangliang Yu
bf4305fe72
drm/amdgpu/vce4: impl vce & mmsch sriov start
...
For MM sriov, need use MMSCH to init engine and the init procedures
are all saved in mm table.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:55:13 -04:00
Xiangliang Yu
f5dee22824
drm/amdgpu/vce4: alloc mm table for MM sriov
...
Allocate MM table for sriov device.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-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 >
2017-03-29 23:55:11 -04:00
Xiangliang Yu
bae5b5191d
drm/amdgpu/vce4: enable doorbell for SRIOV
...
VCE SRIOV need use doorbell and only works on VCN0 ring now
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-03-29 23:55:09 -04:00
Leo Liu
c1dc356a11
drm/amdgpu: add initial vce 4.0 support for vega10
...
Signed-off-by: Leo Liu <leo.liu@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:54:47 -04:00