Hawking Zhang
21c8685b06
drm/amdgpu: add updated smu_info structures
...
To match with smu v13_0_0
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 >
2022-05-04 09:57:33 -04:00
Likun Gao
0984d38441
drm/amdgpu/discovery: add GMC 11.0 Support
...
Enable GMC 11.0 on asics where it is present.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:57:29 -04:00
Tianci.Yin
1c2014da77
drm/amdgpu: add gmc v11_0 ip block (v3)
...
Add support for GPU memory controller v11.
v1: Add support for gmc v11.0
Add gmc 11 block (Tianci)
v2: drop unused amdgpu_bo_late_init (Hawking)
v3: squash in various fix
Signed-off-by: Tianci.Yin <tianci.yin@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-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 >
2022-05-04 09:57:26 -04:00
Jack Xiao
d7dab4fc44
drm/amdgpu: save the setting of VM_CONTEXT_CNTL
...
MES firmware needs the setting of VM_CONTEXT_CNTL to perform
vmid switch. Save the initial setting when hub initializing.
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 >
2022-05-04 09:57:22 -04:00
Tianci.Yin
98a0f8687e
drm/amdgpu: add mmhub v3_0 ip block
...
Add support for mmhub v3.0
Signed-off-by: Tianci.Yin <tianci.yin@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:57:18 -04:00
Hawking Zhang
9f99d98305
drm/amdgpu: add mmhub v3_0_0 ip headers v6
...
Add mmhub v3_0_0 register offset and shift masks
header files (Hawking)
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:57:16 -04:00
Tianci.Yin
2279b4e596
drm/amdgpu: add gfxhub v3_0 ip block
...
Add support for gfxhub v3.0
Signed-off-by: Tianci.Yin <tianci.yin@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:57:13 -04:00
Tianci.Yin
ae460cd566
drm/amdgpu: add athub v3_0 ip block
...
Add support for athub v3.0
Signed-off-by: Tianci.Yin <tianci.yin@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:57:10 -04:00
Hawking Zhang
f41c963972
drm/amdgpu: add athub v3_0_0 ip headers v6
...
Add athub v3_0_0 register offset and shift masks
header files (Hawking)
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:57:06 -04:00
Likun Gao
55a800da49
drm/amdgpu/discovery: Enable PSP for PSP 13.0.0
...
Enable PSP on PSP IP version 13.0.0
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:57:00 -04:00
Likun Gao
7f318f4e30
drm/amdgpu: add tracking for the enablement of SCPM
...
Add parmeter to shows whether SCPM feature is enabled or not, and
whether is valid.
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 >
2022-05-04 09:56:51 -04:00
Likun Gao
a6b6d38ed8
drm/amdgpu: rework psp firmware name
...
Use the new helper for deriving the fw name from
the IP version.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:55:30 -04:00
Likun Gao
911a75043f
drm/amdgpu: support psp v13_0_0 microcode init
...
Support psp v13_0_0 microcode init.
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 >
2022-05-04 09:55:27 -04:00
Likun Gao
e995e2ecdf
drm/amdgpu: add support for spl fw load on psp v13
...
Support for spl firmware load on psp v13.
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 >
2022-05-04 09:55:23 -04:00
Likun Gao
47a2038554
drm/amdgpu: extend PSP GFX FW type
...
Extend PSP GFX FW type to support IMU, LSDMA, SDMA v6, RS64 MES related
fw load.
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 >
2022-05-04 09:55:18 -04:00
Hawking Zhang
5fea10d5a9
drm/amdgpu: support print psp v2_0 hdr debug information
...
print out psp firmware v2_0 hdr information for debugging
purpose
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 >
2022-05-04 09:55:13 -04:00
Alice Wong
e2c34219d1
drm/amdgpu/psp: deallocate memory when psp_load_fw failed
...
psp_load_fw failure would cause memory leak for psp tmr and psp ring
because psp_hw_init is not called as psp block is not fully initialized.
Clean up psp tmr and psp ring when psp_load_fw fail by calling
psp_free_shared_bufs and psp_ring_destroy.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alice Wong <shiwei.wong@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:55:07 -04:00
Alex Deucher
da40bf8f93
drm/amdgpu/psp: move shared buffer frees into single function
...
So we can properly clean up if any of the TAs or TMR fails
to properly initialize or terminate. This avoids any
memory leaks in the error case.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:55:05 -04:00
Alex Deucher
fb4f4f4256
drm/amdgpu/psp: fix memory leak in terminate functions
...
Make sure we free the memory even if the unload fails.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:55:02 -04:00
Alex Deucher
f03d97b0bd
drm/amdgpu/psp: drop load/unload/init_shared_buf wrappers
...
Just call the load/unload/init_shared_buf functions
directly. Makes the code easier to follow.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:54:58 -04:00
Elena Sakhnovitch
57301181a5
drm/amd/pm: Disable fan control if not supported
...
On Sienna Cichild, not all platforms use PMFW based fan control
(ex: fanless systems). On such ASICs fan control by PMFW will be
disabled in PPTable. Disable hwmon knobs for fan control also as
it is not possible to report or control fan speed on such platforms
through driver.
v3: FeaturesToRun casted as uint64_t
Signed-off-by: Elena Sakhnovitch <elena.sakhnovitch@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:54:50 -04:00
Hawking Zhang
996ea8591b
drm/amdgpu: init smuio v13_0_6 callbacks
...
initialize smuio callback for soc21
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:54:46 -04:00
Alex Deucher
b95b539168
drm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init
...
Memory allocations should be done in sw_init. hw_init should
just be hardware programming needed to initialize the IP block.
This is how most other IP blocks work. Move the GPU memory
allocations from psp hw_init to psp sw_init and move the memory
free to sw_fini. This also fixes a potential GPU memory leak
if psp hw_init fails.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:54:41 -04:00
Hawking Zhang
e6e405e048
drm/amdgpu: add smuio v13_0_6 support
...
add smuio v13_0_6 callbacks to support read
rom image
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:54:38 -04:00
Hawking Zhang
55437d3bf4
drm/amdgpu: add smuio v13_0_6 ip headers v4
...
Add smuio v13_0_6 register offset and shift masks
header files (Hawking)
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:54:35 -04:00
Elena Sakhnovitch
20f5e6cf3b
drm/amdgpu: Remove trailing space
...
Clean up trailing space in file sienna_cichlid_ppt.c.
Signed-off-by: Elena Sakhnovitch <elena.sakhnovitch@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:54:11 -04:00
Likun Gao
1761e5efab
drm/amdgpu/discovery: add HDP v6
...
Enable HDP v6 on asics where it is present.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:54:01 -04:00
Likun Gao
563fcfbf31
drm/amdgpu: add hdp version 6 functions
...
Unify hdp related function into hdp structure for hdp version 6.
V2: Remove hdp invalidate function as hdp v6 doesn't have read cache.
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 >
2022-05-04 09:53:58 -04:00
Philip Yang
068421b173
drm/amdgpu: Free user pages if kvmalloc_array fails
...
To cleanup the BOs of bo_list which have got user pages.
Signed-off-by: Philip Yang <Philip.Yang@amd.com >
Reviewed-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 >
2022-05-04 09:53:40 -04:00
Hawking Zhang
11c4328a82
drm/amdgpu: add hdp v6_0_0 ip headers v4
...
Add hdp v6_0_0 register offset and shift masks
header files (Hawking)
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:53:34 -04:00
pengfuyuan
4de0f42974
gpu/drm/radeon: Fix spelling typo in comments
...
Fix spelling typo in comments.
Signed-off-by: pengfuyuan <pengfuyuan@kylinos.cn >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:53:30 -04:00
Minghao Chi
364d453f4d
drm/amdgpu: simplify the return expression of navi10_ih_hw_init()
...
Simplify the return expression.
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:53:28 -04:00
Minghao Chi
3453677aea
drm/amdgpu: simplify the return expression of iceland_ih_hw_init
...
Simplify the return expression.
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:53:18 -04:00
Likun Gao
2929a6bfa1
drm/amdgpu/discovery: add IH v6
...
Enable IH v6 on asics where it is present.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:53:15 -04:00
Stanley.Yang
6e02c0ed4b
drm/amdgpu: add ih v6_0 ip block v2
...
This adds ih v6_0 ip block support. IH is the
interrupt handler.
Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:53:12 -04:00
Likun Gao
2913b567ce
drm/amd/smu: Increace dpm level count only for smu v13.0.2
...
Only V13.0.2 on SMU v13 will get 0 based max level from fw and
increment by one, other ASIC will not need for this.
V2: replace the asic_type check with ip versioning check.
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 >
2022-05-04 09:53:02 -04:00
Stanley Yang
db56aebd81
drm/amdgpu: add soc21 ih clientid definition
...
Define soc21 ih clientid
Signed-off-by: Stanley Yang <Stanley.Yang@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:52:59 -04:00
Hawking Zhang
d71093aa15
drm/amdgpu: add osssys v6_0_0 ip headers v4
...
Add osssys v6_0_0 register offset and shift masks
header files (Hawking)
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:52:56 -04:00
Likun Gao
2c0e7ddd1f
drm/amdgpu/discovery: add NBIO 4.3 Support
...
Enable NBIO 4.3 on asics where it is present.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:52:53 -04:00
Stanley.Yang
0d09a60e3e
drm/amdgpu: add nbio v4_3_0 ip block v2
...
This adds nbio v4_3_0 ip block support
Changed from v1:
use WREG32_SOC15/RREG32_SOC15 instead of
WREG32_PCIE/RREG32_PCIE
remove the programming of PCIE_CONFIG_CNTL
Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:52:44 -04:00
Hawking Zhang
e19920c6a0
drm/amdgpu: add nbio v4_3_0 ip headers v6
...
Add nbio v4_3_0 register offset and shift masks
header files (Hawking)
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:52:41 -04:00
Likun Gao
759693aced
drm/amdgpu/discovery: add soc21 common Support
...
Enable soc21 common support on asics where it is present.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:52:35 -04:00
Harry Wentland
0ee42ab701
drm/amd/display: Avoid reading audio pattern past AUDIO_CHANNELS_COUNT
...
A faulty receiver might report an erroneous channel count. We
should guard against reading beyond AUDIO_CHANNELS_COUNT as
that would overflow the dpcd_pattern_period array.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-04 09:51:40 -04:00
Philip Yang
3da2c38231
drm/amdgpu: Free user pages if amdgpu_cs_parser_bos failed
...
Otherwise userspace resubmit the BOs again will trigger kernel WARNING
and fail the command submission.
Signed-off-by: Philip Yang <Philip.Yang@amd.com >
Tested-by: Robert Święcki <robert@swiecki.net >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-28 17:49:04 -04:00
Candice Li
86e18ac3ae
drm/amdgpu: Fix build warning for TA debugfs interface
...
Remove the redundant codes to fix build warning
when CONFIG_DEBUG_FS is disabled.
Reported-by: Randy Dunlap <rdunlap@infradead.org >
Signed-off-by: Candice Li <candice.li@amd.com >
Reviewed-by: Yang Wang <kevinyang.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-28 17:48:44 -04:00
Stanley.Yang
71199aa47b
drm/amdgpu: add soc21 common ip block v2
...
This adds soc21 common ip block support
Changed from v1:
Switch WREG32/RREG32_PCIE to use indirect reg access
helper for sco15 and onwards
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-28 17:48:40 -04:00
Stanley.Yang
ba9e7a4a31
drm/amdgpu: add new write field for soc21
...
add new write field macro to handle soc21
registers with reg prefix
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-28 17:48:35 -04:00
Hawking Zhang
fb1d683513
drm/amdgpu: add nbio callback to query rom offset
...
Add nbio callback func used to query rom offset.
Used to query the rom offset for fetching the vbios.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-28 17:48:32 -04:00
Hawking Zhang
f33ac92f9c
drm/amdgpu: add gc v11_0_0 ip headers v11
...
Add gc v11_0_0 register offset and shift masks
header files (Hawking)
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-28 17:48:28 -04:00
Hawking Zhang
85a41b429d
drm/amdgpu: add mp v13_0_0 ip headers v7
...
Add mp v13_0_0 register offset and shift masks
header files (Hawking)
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-04-28 17:48:25 -04:00