Dave Airlie
95d2c3e15d
Merge branch 'drm-next-4.18' of git://people.freedesktop.org/~agd5f/linux into drm-next
...
Main changes for 4.18. I'd like to do a separate pull for vega20 later
this week or next. Highlights:
- Reserve pre-OS scanout buffer during init for seemless transition from
console to driver
- VEGAM support
- Improved GPU scheduler documentation
- Initial gfxoff support for raven
- SR-IOV fixes
- Default to non-AGP on PowerPC for radeon
- Fine grained clock voltage control for vega10
- Power profiles for vega10
- Further clean up of powerplay/driver interface
- Underlay fixes
- Display link bw updates
- Gamma fixes
- Scatter/Gather display support on CZ/ST
- Misc bug fixes and clean ups
[airlied: fixup v3d vs scheduler API change]
Link: https://patchwork.freedesktop.org/patch/msgid/20180515185450.1113-1-alexander.deucher@amd.com
Signed-off-by: Dave Airlie <airlied@redhat.com >
2018-05-16 08:31:29 +10:00
Alex Deucher
3fa0b1cbc0
drm/amdgpu/vce4: add emit_reg_write_reg_wait ring callback
...
This adds support for writing and reading back using the
helper since the engines doesn't have a oneshot packet.
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-05-15 13:43:15 -05:00
Linus Torvalds
90fda63fa1
treewide: fix up files incorrectly marked executable
...
Joe Perches noted that we have a few source files that for some
inexplicable reason (read: I'm too lazy to even go look at the history)
are marked executable:
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
drivers/net/ethernet/cadence/macb_ptp.c
A simple git command line to show executable C/asm/header files is this:
git ls-files -s '*.[chsS]' | grep '^100755'
and then you can fix them up with scripting by just feeding that output
into:
| cut -f2 | xargs chmod -x
and commit it.
Which is exactly what this commit does.
Reported-by: Joe Perches <joe@perches.com >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2018-04-07 13:31:23 -07:00
Oak Zeng
3760f76cbe
drm/amdgpu: Move IH clientid defs to separate file
...
This is preparation for sharing client ID definitions
between amdgpu and amdkfd
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-14 15:16:35 -05:00
Christian König
c633c00bf0
drm/amdgpu: separate PASID mapping from VM flush v2
...
Stuffing the PASID mapping into the VM flush isn't flexible enough since
the PASID mapping changes not as often as we need a VM flush.
v2: add missing use of gmc_v7_0_emit_pasid_mapping
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 >
2018-02-19 14:20:18 -05:00
Christian König
f732b6b3c0
drm/amdgpu: move waiting for VM flush into gmc_v9_0_emit_flush_gpu_tlb
...
Keep that at a common place instead of spread over all engines.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:19:12 -05:00
Christian König
d949315a66
drm/amdgpu: implement vce_v4_0_emit_reg_wait v2
...
Add emit_reg_wait implementation for VCE v4.
v2: call new function directly from existing code
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:19:10 -05:00
Christian König
9096d6e51a
drm/amdgpu: implement gmc_v9_0_emit_flush_gpu_tlb
...
Unify tlb flushing for gmc v9.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:09 -05:00
Christian König
cf912c8fd8
drm/amdgpu: wire up emit_wreg for VCE v4
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:06 -05:00
Christian König
5a4633c4b8
drm/amdgpu: forward pasid to backend flush implementations
...
rd the pasid from the VM code to the emit_vm_flush function and update
all implementations with the new parameter.
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 >
2018-02-19 14:17:47 -05:00
Christian König
132f34e4b5
drm/amdgpu: move struct gart_funcs into amdgpu_gmc.h
...
And rename it to struct gmc_funcs.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Samuel Li <Samuel.Li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:44 -05:00
Christian König
c4f46f22c4
drm/amdgpu: rename vm_id to vmid
...
sed -i "s/vm_id/vmid/g" drivers/gpu/drm/amd/amdgpu/*.c
sed -i "s/vm_id/vmid/g" drivers/gpu/drm/amd/amdgpu/*.h
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-12-27 11:34:02 -05:00
Frank Min
1cb4ca5968
drm/amdgpu: correct vce fw data and stack size
...
this fix the VCE world switch hang issue
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-12-12 14:50:12 -05:00
Christian König
3de676d8e7
drm/amdgpu: allow get_vm_pde to change flags as well
...
And also provide the level for which we need a PDE.
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-12-12 14:46:19 -05:00
Shaoyun Liu
4fd09a19a6
drm/admgpu: Reduce the usage of soc15ip.h
...
Remove the header where it's not used.
Acked-by: Christian Konig <christian.koenig@amd.com >
Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-08 11:35:19 -05:00
Frank Min
722570435b
drm/amdgpu: correct vce4.0 fw config for SRIOV (V2)
...
1. program vce 4.0 fw with 48 bit address
2. correct vce 4.0 fw stack and date offset
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Frank Min <Frank.Min@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:48:28 -05:00
Feifei Xu
fb960bd283
drm/amd/include:cleanup vega10 header files.
...
Remove asic_reg/vega10 folder.
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:48:22 -05:00
Feifei Xu
65417d9f55
drm/amd/include:cleanup vega10 mmhub header files.
...
Cleanup asic_reg/vega10/MMHUB folder.
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:48:20 -05:00
Feifei Xu
18297a215b
drm/amd/include:cleanup vega10 vce header files.
...
Cleanup asic_reg/vega10/VCE folder.
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:48:19 -05:00
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