James Zhu
23edf7f1a8
drm/amdgpu: fix typo for vcn2/jpeg2 idle check
...
fix typo for vcn2/jpeg2 idle check
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-19 00:03:05 -04:00
Monk Liu
cc9f2fba37
drm/amdgpu: disable clock/power gating for SRIOV
...
and disable MC resum in VCN2.0 as well
those are not concerned by VF driver
Singed-off-by: darlington Opara <darlington.opara@amd.com >
Signed-off-by: Jinage Zhao <jiange.zhao@amd.com >
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-06 14:40:30 -05:00
Monk Liu
68430c6be5
drm/amdgpu: cleanup ring/ib test for SRIOV vcn2.0 (v2)
...
support IB test on dec/enc ring
disable ring test on dec/enc ring (MMSCH limitation)
v2: squash in unused variable warning fix
Singed-off-by: darlington Opara <darlington.opara@amd.com >
Signed-off-by: Jinage Zhao <jiange.zhao@amd.com >
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-06 14:40:30 -05:00
Monk Liu
dd26858a9c
drm/amdgpu: implement initialization part on VCN2.0 for SRIOV
...
something need to do for VCN2.0 enablement on SRIOV:
1)use one dec ring and one enc ring
2)allocate MM table for MMSCH usage
3)implement SRIOV version vcn_start which orgnize vcn programing
with patcket format and implement start mmsch for to run those
packet
4)doorbell is changed for SRIOV
Singed-off-by: darlington Opara <darlington.opara@amd.com >
Signed-off-by: Jinage Zhao <jiange.zhao@amd.com >
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Emily Deng <Emily.Deng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-06 14:34:56 -05:00
James Zhu
f4d0242b7b
drm/amdgpu/vcn2.5: fix DPG mode power off issue on instance 1
...
Support pause_state for multiple instance, and it will fix vcn2.5 DPG mode
power off issue on instance 1.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-02-11 15:10:36 -05:00
James Zhu
b650121726
drm/amdgpu/vcn: Share vcn_v2_0_dec_ring_test_ring to vcn2.5
...
Share vcn_v2_0_dec_ring_test_ring to vcn2.5 to support
vcn software ring.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-01-27 16:46:44 -05:00
Nirmoy Das
a9d4fe2fd6
drm/amdgpu: remove unnecessary conversion to bool
...
Better clean that up before some automation starts to complain about it
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-01-22 16:55:27 -05:00
James Zhu
45cec87cd6
drm/amdgpu/vcn: move macro from vcn2.0 to share amdgpu_vcn (v2)
...
Move macro from vcn2.0 to amdgpu_vcn to share with vcn2.5
v2: squash in macro fix
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-01-16 13:37:34 -05:00
James Zhu
5db86843e8
drm/amdgpu/vcn: support multiple instance direct SRAM read and write (v2)
...
Add multiple instance direct SRAM read and write support for vcn2.5
v2: squash in indexing fix
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-01-16 13:36:47 -05:00
James Zhu
597e6ac3a7
drm/amdgpu/vcn: support multiple-instance dpg pause mode
...
Add multiple-instance dpg pause mode support for VCN2.5
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-01-16 13:35:51 -05:00
Leo Liu
21a174f5ad
drm/amdgpu: fix VCN2.x number of irq types
...
The JPEG irq type has been moved to its own structure
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-12-11 15:22:08 -05:00
Leo Liu
14f43e8f88
drm/amdgpu: move JPEG2.5 out from VCN2.5
...
And clean up the duplicated stuff
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 >
2019-11-19 10:12:50 -05:00
Leo Liu
b0f3cd3191
drm/amdgpu: remove unnecessary JPEG2.0 code from VCN2.0
...
They are no longer needed, using from JPEG2.0 instead.
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 >
2019-11-19 10:12:50 -05:00
Leo Liu
fd287c8cd2
drm/amdgpu/vcn: use amdgpu_ring_test_helper
...
Instead of amdgpu_ring_test_ring, so the helper function determines
whether the ring is ready
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com >
Cc: Gustavo A. R. Silva <gustavo@embeddedor.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-10-04 08:52:53 -05:00
Hawking Zhang
bebc076285
drm/amdgpu: switch to new amdgpu_nbio structure
...
no functional change, just switch to new structures
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-09-13 17:11:03 -05:00
Alex Deucher
9a2ffeb525
drm/amdgpu: drop drmP.h from vcn_v2_0.c
...
And fix the fallout.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:33:36 -05:00
Thong Thai
c74dbe44ea
drm/amd/amdgpu/vcn_v2_0: Move VCN 2.0 specific dec ring test to vcn_v2_0
...
VCN 2.0 firmware now requires a packet start command to be sent before
any other decode ring buffer command.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-30 23:48:33 -05:00
Thong Thai
333fe325fe
drm/amd/amdgpu/vcn_v2_0: Mark RB commands as KMD commands
...
Sets the CMD_SOURCE bit for VCN 2.0 Decoder Ring Buffer commands. This
bit was previously set by the RBC HW on older firmware. Newer firmware
uses a SW RBC and this bit has to be set by the driver.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-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 >
2019-07-30 23:48:32 -05:00
Leo Liu
53ef3969dd
drm/amdgpu: use VCN firmware offset for cache window
...
Since we are using the signed FW now, and also using PSP firmware loading,
but it's still potential to break driver when loading FW directly
instead of PSP, so we should add offset.
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 >
2019-07-18 14:18:07 -05:00
James Zhu
c01b6a1d38
drm/amdgpu: modify amdgpu_vcn to support multiple instances
...
Arcturus has dual-VCN. Need Restruct amdgpu_device::vcn to support
multiple vcns. There are no any logical changes here
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:18:05 -05:00
James Zhu
989b6a0549
drm/amdgpu: add vcn nbio doorbell range setting for 2nd vcn instance
...
add vcn nbio doorbell range setting for 2nd vcn instance
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:18:05 -05:00
Leo Liu
cdbd115eaf
drm/amdgpu/VCN2: expose rings functions
...
They can be reused by VCN2.x family
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 >
2019-07-18 14:18:04 -05:00
Leo Liu
22a8f44286
drm/amdgpu/VCN2: put IB internal registers offset to structure
...
So the ring functions can be shared with different VCN versions
with different internal registers offsets
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 >
2019-07-18 14:18:04 -05:00
Le Ma
a2d15ed733
drm/amdgpu: rename AMDGPU_GFXHUB/MMHUB macro with hub number
...
The number of GFXHUB/MMHUB may be expanded in later ASICs.
Signed-off-by: Le Ma <le.ma@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:18:01 -05:00
Alex Deucher
d8dfc3bd46
drm/amdgpu: fix warning on 32 bit
...
Properly cast pointer to int.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-27 08:56:16 -05:00
Leo Liu
dc8ae677c2
drm/amdgpu/VCN: implement indirect DPG SRAM mode
...
SRAM will be programmed by PSP
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:33 -05:00
Leo Liu
7282da0b3a
drm/amdgpu/VCN2.0: add DPG pause mode
...
Pause the DPG when not doing decode
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 >
2019-06-21 18:59:32 -05:00
Leo Liu
bf4865b587
drm/amdgpu/VCN2.0: add DPG mode start and stop (v2)
...
This is for using SRAM directly
v2: rebase (Alex)
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:32 -05:00
Leo Liu
b3ef5ce037
drm/amdgpu/VCN2.0 remove unused Macro and declaration
...
Just for cleanup
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:32 -05:00
Leo Liu
863dd269fa
drm/amdgpu/VCN2.0: remove powergating for UVDW tile
...
No UVDW tile any more from VCN2.0, so mark out related fields.
It fixes error:
"[drm] Register(0) [mmUVD_PGFSM_STATUS] failed to reach value 0x002aaaaa != 0x00aaaaaa"
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 >
2019-06-21 18:59:28 -05:00
Jack Xiao
0b8794e252
drm/amdgpu/vcn2: don't access register when power gated
...
It will cause bus hang to access register UVD_STATUS
when VCN is in the state of power gated.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:27 -05:00
Jack Xiao
c113ba157f
drm/amdgpu/vcn2: notify SMU power up/down VCN
...
For sw control power gating, it needs notify SMU to power up/down VCN
when enter/exit working state.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:27 -05:00
Leo Liu
1b61de45df
drm/amdgpu: add initial VCN2.0 support (v2)
...
VCN (Video Core Next) is the video encode/decode block.
Porting over the same functions from VCN1.0
v2: squash in updates (Alex)
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:58:22 -05:00