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
Xiaojie Yuan
c39f3da4e2
drm/amdgpu/gfx10: fix unbalanced MAP/UNMAP_QUEUES when async_gfx_ring is disabled
...
gfx_v10_0_kiq_enable_kgq() is called only when async_gfx_ring is
enabled, so should gfx_v10_0_kiq_disable_kgq().
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Xiaojie Yuan
ec171a9302
drm/amdgpu/gfx10: drop redundant se/sh selection
...
we already selected se/sh at the beginning of the for loop
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
77657ad1ec
drm/amdgpu/mes10.1: enable mes FW backdoor loading
...
It enables MES FW backdoor loading in ip block functions.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
5c264af735
drm/amdgpu/mes10.1: implement mes enablement function
...
After MES firmware gets loaded, it enables MES engine starting execution.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
fb19a68df2
drm/amdgpu/mes10.1: implement MES firmware backdoor loading
...
It implements MES firmware backdoor loading.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
71c5794188
drm/amdgpu/mes10.1: implement ucode buffers destruction
...
Free ucode GPU buffers.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
85c90e9b54
drm/amdgpu/mes10.1: upload mes data ucode to gpu buffer
...
Allocate GPU buffer and upload mes data ucode to the buffer.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
02b6114948
drm/amdgpu/mes10.1: upload mes ucode to gpu buffer
...
Allocate GPU buffer and upload ucode firmware to the buffer.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
086981052b
drm/amdgpu/mes10.1: implement ucode CPU buffer destruction
...
It implements the CPU buffer destruction of ucode.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
298d05460c
drm/amdgpu/mes10.1: load mes firmware file to CPU buffer
...
It requests MES firmware binary and uploads to CPU buffer.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
5aa91248c0
drm/amdgpu/mes10.1: add mes firmware info fields
...
The newly added fields is to store mes firmware related information.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:28 -05:00
Jack Xiao
7f785e7843
drm/amdgpu/ucode: add mes firmware file support
...
The newly added firmware struct is for mes firmware file.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:27 -05:00
Jack Xiao
186b0ca282
drm/amdgpu/ucode: add the definitions of MES ucode and ucode data
...
MES requires two seperate firmwares: ucode and ucode data.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:27 -05:00
Jack Xiao
37809f5529
drm/amdgpu/sdma5: incorrect variable type for gpu address
...
Incorrect programming with 64bit gpu address assignment for
32bit variable.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:27 -05:00
tiancyin
278b6fba22
drm/amdgpu/sdma5: fix a sdma potential hang in VK_Examples test
...
[why]
When page fault happens, it could lead to sdma hang is RESP_MODE =
0 for non-PRT case.
[how]
Setting SDMAx_UTCL1_CNTL.RESP_MODE to 0b011 to avoid SDMA halt.
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: tiancyin <tianci.yin@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:27 -05:00
Jack Xiao
6ff687319f
drm/amdgpu/nv: set vcn pg flag
...
Enable VCN power gating by default.
Signed-off-by: Jack Xiao <Jack.Xiao@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
6e4cb4e8b3
drm/amdgpu: enable vcn dpm scheme for navi
...
On navi1x, vcn dpm scheme was merged into powergating scheme.
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
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
Jack Xiao
8a33c4f194
drm/amdgpu/gfx10: fix issues for suspend/resume
...
1). use PREEMPT_QUEUE instead of RESET_QUEUE for gfx ring disablement.
2). Need wait for unmapping queue done before continue execution.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Tianci Yin <tianci.yin@amd.com >
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:27 -05:00
Huang Rui
948f540cd0
drm/amd/powerplay: set dpm_enabled flag but don't enable vcn dpm
...
This patch sets dpm_enabled flag but don't enable vcn dpm, because vcn dpm
doesn't work so far and we needs to enable the sysfs interfaces.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:27 -05:00
Xiaojie Yuan
4b6349d4d8
drm/amdgpu/gfx10: fix resume failure when enabling async gfx ring
...
'adev->in_suspend' code path is missing in gfx_v10_0_gfx_init_queue()
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:27 -05:00
Tianci Yin
36f87f0acd
drm/amdgpu: disable some gfx light sleep
...
temporarily disable to avoid s3 test failure.
s3 test failure log:
"[drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring sdma0 timeout,
signaled seq=8278, emitted seq=8281"
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Tianci Yin <tianci.yin@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:27 -05:00
Tianci Yin
8ea763e230
drm/amdgpu/gfx10: update gfx golden settings
...
add new registers: mmCGTT_SPI_CLK_CTRL, mmDB_DEBUG3 and
mmGL2C_CGTT_SCLK_CTRL.
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Tianci Yin <tianci.yin@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:26 -05:00
Hawking Zhang
54b998ca8d
drm/amdgpu: enable sw smu driver for navi10 by default
...
Navi10 will use sw smu driver for dynamic power managment,
while vega20 could also use sw smu driver when amdgpu_dpm is
set to 2
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:25 -05:00
Kenneth Feng
bca325280d
drm/amd: add gfxoff support on navi10
...
add the gfxoff interface to navi10,it's disabled by default.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:25 -05:00
Kevin Wang
b55c83a743
drm/amd/powerplay: implement smc firmware v2.1 for smu11
...
1.add smc_firmware_header_v2_1 hfirmware support, support more pptable in smc firmware.
2.optimization current pptable load framework.
3.rename read_pptable_from_vbios with setup_pptable.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:25 -05:00
Huang Rui
336a1c825e
drm/amdgpu: bump smc firmware header version to v2 (v2)
...
This patch bumps smc firmware header version to v2 for storing soft pptable.
v2: fix the typo, and add prints for v2 header
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:24 -05:00
Huang Rui
0a5b8c7b94
drm/amdgpu: add to set navi ip blocks
...
Set the IPs for navi10 in early_init like other asics.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:24 -05:00
Alex Deucher
bd1c0fdfc1
drm/amdgpu: add Navi10 pci ids
...
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:24 -05:00
Philip Cox
14328aa58c
drm/amdkfd: Add navi10 support to amdkfd. (v3)
...
KFD (kernel fusion driver) is the kernel driver
for the compute backend for usermode compute
stack.
v2: squash in updates (Alex)
v3: squash in rebase fixes (Alex)
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com >
Signed-off-by: Philip Cox <Philip.Cox@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:24 -05:00
Hawking Zhang
e0d076574e
drm/amdgpu: update golden setting programming logic
...
Since from soc15, make sure only AndMasked bit get changed
when applied or_mask
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Le Ma <Le.Ma@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:24 -05:00
Hawking Zhang
6bdadb2072
drm/amdgpu: Add navi10 kfd support for amdgpu (v3)
...
KFD (Kernel Fusion Driver) is the compute backend driver
for AMD GPUs.
v2: squash in updates (Alex)
v3: fix warnings (Alex)
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com >
Signed-off-by: Philip Cox <Philip.Cox@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:23 -05:00
Hawking Zhang
c6b6a42175
drm/amdgpu: add navi10 common ip block (v3)
...
This adds the core SOC code for navi asics.
v1: add place holder and initial basic function (Ray)
v2: add new introduced functions to avoid reference
NULL pointer (Hawking)
v3L squash in updates (Alex)
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:23 -05:00
Hawking Zhang
44f1bb1fed
drm/amdgpu: avoid to use SOC15_REG_OFFSET in static array for navi10
...
Move to the header file.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:23 -05:00
Hawking Zhang
a644d85a5c
drm/amdgpu: add gfx v10 implementation (v10)
...
GFX is the graphics and compute block on the GPU.
v1: add initial gfx v10 implementation (Ray)
v2: convert to new get_vm_pde function in emit_vm_flush (Hawking)
v3: switch to new emit ib interfaces (Hawking)
v4: squash in updates (Alex)
v5: remove unused variables (Alex)
v6: v6: some golden regs moved to vbios (Alex)
v7: squash in some cleanups (Alex)
v8: squash in golden settings update (Alex)
v9: squash in whitespace fixes (Ernst Sjöstrand, Alex)
v10: squash in GDS backup size fix and GDS/GWS/OA removal rebase fixes (Hawking)
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:59:23 -05:00
Jack Xiao
886f82aa7a
drm/amdgpu/mes10.1: add ip block mes10.1 (v2)
...
MES takes over the scheduling capability of GFX and SDMA,
add MES as a standalone ip.
v2: squash in updates (Alex)
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:58:22 -05:00
Jack Xiao
5f84cc635b
drm/amdgpu/mes: enable mes on navi10 and later asic
...
When amdgpu_mes is enabled and asic family is navi10 and
later asic, enable mes per device.
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:58:22 -05:00
Jack Xiao
7bbc36765c
drm/amdgpu/mes: add definitions of ip callback function
...
Abstract mes ip independent function layer.
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:58:22 -05:00
Jack Xiao
a538bbe7a8
drm/amdgpu/mes: add mes header file and definition
...
Add dummy header file and definitions of mes.
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:58:22 -05:00
Jack Xiao
384872846f
drm/amdgpu/mes: add amdgpu_mes driver parameter
...
amdgpu_mes, which is a driver scope parameter, is used
to whether enable mes or not.
MES (Micro Engine Scheduler) is the new on chip hw scheduling
microcontroller. It can be used to handle queue scheduling and
preemption and priorities.
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-21 18:58:22 -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
Leo Liu
54bb93c225
drm/amdgpu: add JPEG2.0 decode ring ib test
...
Add internal register offset for registers involving in ib tests
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:58:22 -05:00
Leo Liu
9085914a5a
drm/amdgpu: add JPEG2.0 decode ring test
...
Use register from JPEG tile, the UVD tile reg won't work for JPEG
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:58:22 -05:00
Leo Liu
60a2309ec4
drm/amdgpu: add VCN2.0 decode ib test
...
Add internal register offset for registers involving in ib tests
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:58:22 -05:00
Leo Liu
45a1a48b5c
drm/amdgpu: add VCN2.0 decode ring test
...
Add internal register offset for registers involving in ring tests
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:58:22 -05:00
Leo Liu
a8790e2475
drm/amdgpu: add Navi10 VCN firmware support
...
Add Navi10 to VCN 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-06-21 18:58:22 -05:00
Hawking Zhang
fef6e24c8b
drm/amdgpu: add initial support for sdma v5.0 (v6)
...
SDMA (System DMA) is a general purpose DMA engine usable
by UMDs for transfers or the kernel for paging or GPUVM
updates.
v1: support basic funcitonalites includes rb, ib, vm,
copy buffer and trap irq
v2: convert to use new get_vm_pde in emit_vm_flush
v3: retire amdgpu_ttm_set_active_vram_size from sdma v5
v4: retire the redundant hdp_invalidate implementation
v5: squash in updates
v6: some golden regs moved to vbios
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-06-21 18:58:21 -05:00
Hawking Zhang
be9250fb96
drm/amdgpu: set the default value of pa_sc_tile_steering_override
...
So userspace can access it.
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-06-21 18:58:21 -05:00