Kenneth Feng
3474e02ed5
drm/amd/pm: support mode1 reset on smu_v14_0_3
...
support mode1 reset on smu_v14_0_3
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
Alex Deucher
ade887c633
drm/amdgpu/mes12: Use a separate fence per transaction
...
We can't use a shared fence location because each transaction
should be considered independently.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
Alex Deucher
94b51a3d01
drm/amdgpu/mes12: increase mes submission timeout
...
MES internally has a timeout allowance of 2 seconds.
Increase driver timeout to 3 seconds to be safe.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
Alex Deucher
b1d852920b
drm/amdgpu/mes12: print MES opcodes rather than numbers
...
Makes it easier to review the logs when there are MES
errors.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
Kenneth Feng
174fdc07c0
drm/amd/amdgpu: enable mmhub and athub cg on gc 12.0.1
...
enable mmhub and athub cg on gc 12.0.1
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
Kenneth Feng
dd8707295d
drm/amd/amdgpu: enable gfxoff on gc 12.0.1
...
Enable gfxoff on gc 12.0.1
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Jack Gui <Jack.Gui@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
Likun Gao
b9f5d0f978
drm/amdgpu: support cg state get for gfx v12
...
Support to get clockgating state for gfx v12.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
Kenneth Feng
598a3b753a
drm/amd/amdgpu: enable sram fgcg on gc 12.0.1
...
enable sram fgcg on gc 12.0.1
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
Kenneth Feng
6f6bb3909c
drm/amd/amdgpu: enable perfcounter mgcg and repeater fgcg
...
enable perfcounter mgcg and repeater fgcg on gc 12.0.1
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
Kenneth Feng
0b6662eb2a
drm/amd/amdgpu: enable 3D cgcg and 3D cgls
...
enable 3D cgcg and 3D cgls on gc 12.0.1
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
Kenneth Feng
af472f68c7
drm/amd/amdgpu: enable mgcg on gfx 12.0.1
...
enable mgcg on gfx 12.0.1
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 >
2024-05-02 16:18:15 -04:00
Kenneth Feng
81b09cedb3
drm/amd/amdgpu: enable cgcg and cgls
...
enable cgcg and cgls on gc 12.0.1
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:15 -04:00
David (Ming Qiang) Wu
856d1ed4b2
drm/amdgpu/vcn5: Add VCN5 capabilities
...
Add VCN5 encode and decode capabilities support
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:14 -04:00
Sonny Jiang
117f851393
drm/amdgpu/vcn5: enable DPG mode support
...
Enable DPG mode
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:14 -04:00
Sonny Jiang
f19cfce87d
drm/amdgpu/jpeg5: enable power gating
...
Enable PG on JPEG5
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:14 -04:00
David (Ming Qiang) Wu
f8f8e95c5f
amdgpu/vcn: enable AMD_PG_SUPPORT_VCN
...
turn on AMD_PG_SUPPORT_VCN flag for power saving
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com >
Reviewed-by: Sonny Jiang <sonny.jiang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:14 -04:00
David Belanger
da43e93d1b
drm/amdgpu: Fix physical address mask
...
Mask should be 44-bit.
Signed-off-by: David Belanger <david.belanger@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:14 -04:00
Likun Gao
0a75dc9831
drm/amdgpu/discovery: add mes v12_0 ip block
...
Add mes v12_0 ip block.
v2: squash in update (Alex)
v3: rebase on unified mes changes (Alex)
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:14 -04:00
Likun Gao
5e676d7180
drm/amdgpu/discovery: add gfx v12_0 ip block
...
Add gfx v12_0 ip block.
v2: Squash in update (Alex)
v3: add exp flag (Alex)
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:14 -04:00
Jack Xiao
03f4b8c3ca
drm/amdgpu/mes12: disable logging output
...
Random page fault was oberserved, temporarily disable
mes log buffer output.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:14 -04:00
Jack Xiao
3dc434ad26
drm/amdgpu: add module parameter 'amdgpu_uni_mes'
...
Add module parameter 'amdgpu_uni_mes' to enable/disable unified
mes fw support.
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 >
2024-05-02 16:18:14 -04:00
Jack Xiao
ad5c0a79df
drm/amdgpu/mes12: add legacy setting hw resource interface
...
For unified mes fw, add the legacy interface to set hardware
resources.
v2: remove warning (Alex)
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 >
2024-05-02 16:18:14 -04:00
shaoyunl
fcc5df722d
drm/amdgpu: Disable unmapped doorbell handling basic mode on mes 12
...
The new mechanism for unmapped doorbell handling requires both driver side and
MES fw side change. The FW side changes are still not released.
Signed-off-by: shaoyunl <shaoyun.liu@amd.com >
Reviewed-by: Harish Kasiviswanthan <Harish.Kasiviswanthan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:14 -04:00
Jack Xiao
663bbfaf68
drm/amdgpu/gfx: enable mes to map legacy queue support
...
Enable mes to map legacy queue support.
v2: drop unused gfx_v12_0_kiq_enable_kgq() (Alex)
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 >
2024-05-02 16:18:14 -04:00
Jack Xiao
4c2439f908
drm/amdgpu/mes12: add mes mapping legacy queue support
...
Add mes12 map legacy queue packet submission.
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 >
2024-05-02 16:18:13 -04:00
Jack Xiao
6ce03bd3a4
drm/amdgpu/mes12: enable uni_mes fw on mes pipe0
...
Enable the unified mes firmware on mes pipe0.
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 >
2024-05-02 16:18:13 -04:00
Jack Xiao
d2e2c9be78
drm/amdgpu/mes12: add uni_mes fw loading support
...
Add the unified mes firmware loading support.
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 >
2024-05-02 16:18:13 -04:00
Jack Xiao
15ddc4e693
drm/amdgpu/mes: add uni_mes fw loading support
...
Add the unified mes firmware loading support.
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 >
2024-05-02 16:18:13 -04:00
Sreekant Somasekharan
628e1ace23
drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC
...
Due to a HW bug, the system memory mappings and peer GPU mappings
on GFX12 need to be marked as MTYPE_NC.
Cc: Joe Greathouse <joseph.greathouse@amd.com >
Cc: David Belanger <david.belanger@amd.com >
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com >
Signed-off-by: Sreekant Somasekharan <sreekant.somasekharan@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:13 -04:00
Sreekant Somasekharan
a8a4615ba0
drm/amd/amdkfd: Add GFX12 PTE flag to SVM get PTE function
...
Add new GFX12 PTE flag AMDGPU_PTE_IS_PTE to svm_range_get_pte_flags
function. This resolves the issues related to SVM enablement in GFX12.
Signed-off-by: Sreekant Somasekharan <sreekant.somasekharan@amd.com >
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:13 -04:00
David Belanger
c5faf18bbe
drm/amdkfd: Enable atomic support for GFX12
...
Enable flag in KFD and set the atomic support bit in MQD.
Signed-off-by: David Belanger <david.belanger@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:13 -04:00
Eric Huang
a921c35ae5
drm/amdkfd: fix NULL ptr for debugfs mqds on GFX v12
...
mqd_stride function in gfx v12 is not implemented, that
causes NULL ptr error. Add the generic func to fix it.
Signed-off-by: Eric Huang <jinhuieric.huang@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:13 -04:00
Jonathan Kim
9243240bed
drm/amdkfd: enable single alu ops for gfx12
...
GFX12 debugging requires setting up precise ALU operation for catching
ALU exceptions.
Signed-off-by: Jonathan Kim <jonathan.kim@amd.com >
Tested-by: Lancelot Six <lancelot.six@amd.com >
Reviewed-by: Eric Huang <jinhuieric.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:13 -04:00
Jonathan Kim
984b265ff6
drm/amdkfd: fix support for trap on wave start and end for gfx12
...
Similar to GFX11, GFX12 supports trapping on wave start and end.
Signed-off-by: Jonathan Kim <jonathan.kim@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:13 -04:00
Jonathan Kim
fda3f378c4
drm/amdkfd: always enable ttmp setup for gfx12
...
Similar to GFX11, always enable the setup of trap temporaries on GFX12.
Signed-off-by: Jonathan Kim <jonathan.kim@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:13 -04:00
David Belanger
782b93436a
drm/amdkfd: Enable GFX12 trap handler
...
Updated switch statement to use GFX12 trap handler.
Signed-off-by: David Belanger <david.belanger@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:13 -04:00
Laurent Morichetti
cf338b5dfe
drm/amdkfd: enable missed single-step workaround for gfx12
...
When trap_ctrl.trap_after_inst is set, it is possible for a wave to
enter the trap handler, after single-stepping an instruction and a
save_context is raised, with only save_context set in excp_flag_priv.
Because excp_flag_priv.trap_after_inst is not reliably set, we need to
use the missed single-step workaround for gfx12 as well.
Also add wave_start and wave_end as exceptions that should be handled
by the 2nd level trap handler.
Signed-off-by: Laurent Morichetti <laurent.morichetti@amd.com >
Tested-by: Lancelot Six <lancelot.six@amd.com >
Reviewed-by: Jonathan Kim <jonathan.kim@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:13 -04:00
Lancelot SIX
450abfe433
drm/amdkfd: save and restore barrier state for gfx12
...
Add support to save and restore the work group barrier state in gfx12
CWSR trap handler.
There is no support to directly restore the signal count of a barrier
state, so instead this patch repeatedly calls s_barrier_signal to
increment the signal count to the desired value.
In this patch, I have implemented the logic to restore the barrier at
the end of the block restoring the HWREGs. This process needs to be
done by exactly 1 wave per work group. To achieve this, the initial
value of s_restore_spi_init_hi (containing a FIRST_WAVE bit) needs to be
saved up until that point. An alternative could be restore the barrier
earlier in the process (around when LDS is restored, as the same wave
does both). Doing this would break the pattern that the restore
procedure follows the CWSR area layout.
Before restoring the barrier, this patch checks if the barrier was whose
state was saved has the "valid" bit set, even if I don't think this
barrier can be in an invalid state during context save. I expect this
test to always be true.
Signed-off-by: Lancelot SIX <lancelot.six@amd.com >
Reviewed-by: Jay Cornwall <jay.cornwall@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
Jay Cornwall
f281003336
drm/amdkfd: Add gfx12 trap handler support
...
- HWREG changes since gfx11
- Save/restore barrier state
- get_wave_size is now reserved by assembler
v2: rebase (Alex)
Signed-off-by: Jay Cornwall <jay.cornwall@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
Jay Cornwall
385093fde8
drm/amdkfd: Move trap handler coherence flags to preprocessor
...
No functional change. Preparation for gfx12 support.
v2: drop unrelated change (Alex)
Signed-off-by: Jay Cornwall <jay.cornwall@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
David Belanger
90e4fc8369
drm/amdkfd: Added gfx_v12_kfd2kgd interface for GFX12.
...
Initial implementation, based on GFX11.
v2: Removed functions not needed by cp scheduler.
v3: Fixed typos.
v4: squash in warning fix (Alex)
Signed-off-by: David Belanger <david.belanger@amd.com >
Acked-by: Jonathan Kim <jonathan.kim@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
David Belanger
47fa09b788
drm/amdkfd: Added device queue manager files for GFX12.
...
Initial implementation, based on GFX11.
v2: squash in include fix from David (Alex)
Signed-off-by: David Belanger <david.belanger@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
David Belanger
48f0bdf4e3
drm/amdkfd: Added MQD manager files for GFX12.
...
Initial implementation, based on GFX11.
v2: Removed dbg_wa code as not needed on GFX12.
v3: squash in SDMA queue fixes (Alex)
v4: rebase (Alex)
Signed-off-by: David Belanger <david.belanger@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
David Belanger
8aa89b69d6
drm/amdkfd: Added temporary changes for GFX12.
...
Added cases for GFX12 in switch statement, code relying on GFX11
implementation until GFX12 implementation is complete.
Signed-off-by: David Belanger <david.belanger@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
David Belanger
592a5d7de4
drm/amdkfd: Basic SDMA and cache info changes for GFX12.
...
Added GFX12 support to a few switch statements.
Signed-off-by: David Belanger <david.belanger@amd.com >
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
shaoyunl
2f983d3ca5
drm/amdgpu: Enable event log on MES 12
...
Enable event log through the HW specific FW API
Signed-off-by: shaoyunl <shaoyun.liu@amd.com >
Reviewed-by: Harish Kasiviswanthan <Harish.Kasiviswanthan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
shaoyunl
19e69a5d28
drm/amdgpu: Enable unmapped doorbell handling basic mode on mes 12
...
Enable basic mode handling for doorbell ring on unmapped CP queue.
In this mode, MES can start schedule the queue mapping based on HW
interrupt instead of timer.
Signed-off-by: shaoyunl <shaoyun.liu@amd.com >
Reviewed-by: Harish Kasiviswanthan <Harish.Kasiviswanthan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
Hawking Zhang
a2211e475c
drm/amdgpu: Switch to smuio func to get gpu clk counter
...
Switch to smuio callback to query gpu clock counter
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
Likun Gao
e781af6663
drm/amdgpu: init gfxhub setting to align with mmhub
...
Align gfxhub settings with mmhub when program rlc ram.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:12 -04:00
Likun Gao
b32edc2340
drm/amdgpu: skip dpm check to init imu fw
...
Skip dpm check to init imu firmware for imu v12.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-05-02 16:18:11 -04:00