Alex Deucher
b913ec628c
drm/amdgpu: fix mode2 reset sequence for vangogh
...
We need to save and restore PCI config space.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Huang Rui <ray.huang@amd.com >
2021-01-13 23:47:58 -05:00
Alex Deucher
1608635534
drm/amdgpu/nv: add mode2 reset handling
...
Vangogh will use mode2 reset, so plumb it through the nv
soc driver.
Acked-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Huang Rui <ray.huang@amd.com >
2021-01-13 23:47:54 -05:00
Likun Gao
bf087285dc
drm/amdgpu: switch hdp callback functions for hdp v5
...
Switch to use the HDP functions which unified on hdp structure instead of
the scattered hdp callback functions.
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 >
2021-01-05 11:33:08 -05:00
Tao Zhou
15ed44c0e7
drm/amdgpu: set mode1 reset as default for dimgrey_cavefish
...
Use mode1 reset for dimgrey_cavefish by default.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-16 13:27:17 -05:00
Jane Jian
acf2740f12
drm/amdgpu/sriov: reopen sienna_child smu ip block under sriov
...
open smu ip block meets with one-vf mode need
Signed-off-by: Jane Jian <Jane.Jian@amd.com >
Reviewed-by: Monk Liu <monk.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-16 12:18:25 -05:00
Tianci.Yin
8301f6b990
drm/amdgpu: enable DCN for navi10 headless SKU
...
There is a NULL pointer crash when DCN disabled on headless SKU.
On normal SKU, the variable adev->ddev.mode_config.funcs is
initialized in dm_hw_init(), and it is fine to access it in
amdgpu_device_resume(). But on headless SKU, DCN is disabled,
the funcs variable is not initialized, then crash arises.
Enable DCN to fix this issue.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Guchun Chen <guchun.chen@amd.com >
Signed-off-by: Tianci.Yin <tianci.yin@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-10 14:24:30 -05:00
Jinzhou.Su
a3964ec40f
drm/amdgpu: Enable FGCG for Vangogh
...
Add flags AMD_CG_SUPPORT_GFX_FGCG for Vangogh
Signed-off-by: Jinzhou.Su <Jinzhou.Su@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-04 17:08:36 -05:00
Jinzhou.Su
0ebce667e8
amdgpu: Add mmhub MGCG and MGLS for vangogh
...
Add AMD_CG_SUPPORT_MC_MGCG and AMD_CG_SUPPORT_MC_LS
Signed-off-by: Jinzhou.Su <Jinzhou.Su@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-02 15:32:58 -05:00
Jinzhou.Su
51a7e93826
amdgpu: Add GFX MGCG and MGLS for vangogh
...
add GFX Medium Grain Light Sleep support for vangogh
add AMD_CG_SUPPORT_GFX_CP_LS and AMD_CG_SUPPORT_GFX_RLC_LS
v2:
add GFX Medium Grain Clock Gating
Signed-off-by: Jinzhou.Su <Jinzhou.Su@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-30 00:58:50 -04:00
Flora Cui
9c94b5ef75
drm/amdgpu: rename nv_is_headless_sku()
...
for headless NAVI ASICs
Signed-off-by: Flora Cui <flora.cui@amd.com >
Reviewed-by: Guchun Chen <guchun.chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-30 00:57:11 -04:00
Flora Cui
dd657888e0
drm/amdgpu: disable DCN and VCN for Navi14 0x7340/C9 SKU
...
Navi14 0x7340/C9 SKU has no display and video support, remove them.
Signed-off-by: Flora Cui <flora.cui@amd.com >
Reviewed-by: Guchun Chen <guchun.chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-30 00:57:03 -04:00
Huang Rui
c345c89b64
drm/amdgpu: add vangogh apu flag
...
This patch is to add vangogh apu flag to support more kickers that
belongs vangogh series.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-27 12:01:29 -04:00
Xiaomeng Hou
0165b85c27
drm/amdgpu: enable IP discovery for vangogh
...
enable IP discovery for vangogh.
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-26 13:26:16 -04:00
Tianci.Yin
aa5375c555
drm/amdgpu: disable DCN and VCN for navi10 blockchain SKU(v3)
...
The blockchain SKU has no display and video support, remove them.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Tianci.Yin <tianci.yin@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-23 15:33:47 -04:00
Boyuan Zhang
07f9c22f67
drm/amdgpu: enable VCN PG and CG for vangogh
...
Enable VCN 3.0 PG and CG for Vangogh by setting up flags.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-21 16:14:15 -04:00
Huang Rui
84b934bc0a
drm/amdgpu/display: enable display ip block for vangogh
...
This patch is to enable display IP block for vangogh platforms.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-16 14:44:19 -04:00
Evan Quan
27747293ce
drm/amdgpu: fulfill Navi gfx and pcie settings on umd pstate switching(V2)
...
Fulfill Navi gfx and pcie settings on umd pstate switching.
V2: temporarily skip the pcie ASPM setting considering the ASPM function
is not fully enabled yet
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-15 12:21:07 -04:00
Tao Zhou
7cc656e2d0
drm/amdgpu: add DM block for dimgrey_cavefish
...
Add DM block support for dimgrey_cavefish.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Jack Gui <Jack.Gui@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:03:10 -04:00
Tao Zhou
8e3bfb992c
drm/amdgpu: enable ih CG for dimgrey_cavefish
...
Set ih CG flag for dimgrey_cavefish.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:02:43 -04:00
Tao Zhou
2c70c332a1
drm/amdgpu: enable hdp CG and LS for dimgrey_cavefish
...
Set hdp CG and LS flag for dimgrey_cavefish.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:02:40 -04:00
Tao Zhou
aff39cdecd
drm/amdgpu: add psp and smu block for dimgrey_cavefish
...
Add psp and smu block for dimgrey_cavefish with psp firmware load type.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by:Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:02:37 -04:00
James Zhu
be6b1cd3b7
drm/amdgpu: enable jpeg3.0 for dimgrey_cavefish
...
Enable jpeg3.0 ip block for dimgrey_cavefish.
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-10-12 14:02:26 -04:00
James Zhu
0afc770ba8
drm/amdgpu: enable vcn3.0 for dimgrey_cavefish
...
Enable vcn3.0 ip block for dimgrey_cavefish.
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-10-12 14:02:12 -04:00
Tao Zhou
73da8e8628
drm/amdgpu: enable athub/mmhub PG for dimgrey_cavefish
...
Set athub/mmhub PG flag for dimgrey_cavefish.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:02:05 -04:00
Tao Zhou
135333a0ce
drm/amdgpu: enable mc CG and LS for dimgrey_cavefish
...
Set mc CG and LS flag for dimgrey_cavefish.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:02:00 -04:00
Tao Zhou
583e5a5e90
drm/amdgpu: enable GFX clock gating for dimgrey_cavefish
...
Enable GFX MGCG, CGCG and 3DCG for dimgrey_cavefish.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:01:55 -04:00
James Zhu
cc6161aa70
drm/amdgpu: enable jpeg3.0 PG and CG for dimgrey_cavefish
...
Enable JPEG3.0 PG and CG for dimgrey_cavefish.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:01:43 -04:00
James Zhu
d5bc1579b0
drm/amdgpu: enable VCN3.0 PG and CG for dimgrey_cavefish
...
Enable VCN3.0 PG and CG for dimgrey_cavefish
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:01:41 -04:00
James Zhu
467db422cb
drm/amdgpu/vcn: enable VCN DPG mode for dimgrey_cavefish
...
Enable VCN DPG mode for dimgrey_cavefish.
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-10-12 14:00:54 -04:00
Tao Zhou
76a2d9ea69
drm/amdgpu: add virtual display support for dimgrey_cavefish
...
Add virtual ip block for dimgrey_cavefish.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:00:45 -04:00
Tao Zhou
0106922600
drm/amdgpu: add sdma ip block for dimgrey_cavefish
...
Enable sdma block for dimgrey_cavefish, same as sienna_cichlid.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:00:37 -04:00
Tao Zhou
feb6329c58
drm/amdgpu: add gfx ip block for dimgrey_cavefish
...
Enable gfx block for dimgrey_cavefish, same as navy_flounder.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:00:35 -04:00
Tao Zhou
771cc67ed0
drm/amdgpu: add ih ip block for dimgrey_cavefish
...
Enable ih block for dimgrey_cavefish, same as navy_flounder.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:00:31 -04:00
Tao Zhou
3e02ad4476
drm/amdgpu: add gmc ip block for dimgrey_cavefish
...
Enable gmc block for dimgrey_cavefish, same as sienna_cichlid.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:00:29 -04:00
Tao Zhou
2aa92b12df
drm/amdgpu: add common ip block for dimgrey_cavefish
...
Same as navy_flounder.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:00:25 -04:00
Tao Zhou
038d757b95
drm/amdgpu: initialize IP offset for dimgrey_cavefish
...
Add ip offset definition for dimgrey_cavefish and initialize it.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:00:20 -04:00
Tao Zhou
550c58e0fa
drm/amdgpu: add common support for dimgrey_cavefish
...
Add external id and set clock gating for dimgrey_cavefish.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:00:18 -04:00
Huang Rui
ac0dc4c5a0
drm/amdgpu: enable gfx clock gating and power gating for vangogh
...
This patch is to enable the gfx cg and pg for vangogh.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-05 15:15:28 -04:00
Alex Deucher
8bb3aa1a83
drm/amdgpu: IP discovery table is not ready yet for VG
...
Fallback to legacy path for now.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-05 15:15:28 -04:00
Huang Rui
ed3b735332
drm/amdgpu: enable psp support for vangogh
...
This patch is to enable psp support for vangogh
Signed-off-by: Huang Rui <ray.huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-05 15:15:28 -04:00
Huang Rui
c821e0fbb2
drm/amdgpu: add smu ip block for vangogh
...
This patch is to add ip block for vangogh.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Aaron Liu <aaron.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-05 15:15:27 -04:00
Huang Rui
a7e91bd718
drm/amdgpu: add nbio v7.2 for vangogh (v2)
...
VanGogh uses nbio v7.2, and a couple of offsets are changed since nbio
v2.3 for navi series, so add new nbio v7.2 block.
v2: squash in fix for sdma and vcn instances
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-05 15:15:27 -04:00
Huang Rui
5de54343d5
drm/amdgpu: add pcie port indirect read and write on nv
...
This patch is to add pcie port indirect read/write callback for nv
series. They will be used for new asic.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-05 15:15:27 -04:00
Thong Thai
b4e532d678
drm/amdgpu: enable vcn3.0 for van gogh
...
Same as other VCN 3.0 asics.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-05 15:15:27 -04:00
Huang Rui
88edbad6ed
drm/amdgpu: set ip blocks for van gogh
...
Enable ip blocks for van gogh.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-05 15:15:27 -04:00
Huang Rui
fced3c3a46
drm/amdgpu: skip sdma1 in nv_allowed_read_registers list for van gogh (v2)
...
Van gogh only has one sdma.
v2: use num_instances rather than APU flag
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-05 15:14:03 -04:00
Huang Rui
026570e633
drm/amdgpu: add nv common ip block support for van gogh
...
This patch adds common ip support for van gogh.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-05 15:14:02 -04:00
Hawking Zhang
705a2b5ba0
drm/amdgpu: switch to indirect reg access helper
...
Switch WREG32/RREG32_PCIE to use indirect reg access
helper for soc15 and onwards
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Guchun Chen <guchun.chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-01 10:42:48 -04:00
Stanley.Yang
78f0aef11f
drm/amdgpu: fix hdp register access error
...
mmHDP_READ_CACHE_INVALIDATE register is in HDP not in NBIO
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 >
2020-09-22 17:37:38 -04:00
Andrey Grodzovsky
c1dd4aa624
drm/amdgpu: Fix consecutive DPC recovery failures.
...
Cache the PCI state on boot and before each case where we might
loose it.
v2: Add pci_restore_state while caching the PCI state to avoid
breaking PCI core logic for stuff like suspend/resume.
v3: Extract pci_restore_state from amdgpu_device_cache_pci_state
to avoid superflous restores during GPU resets and suspend/resumes.
v4: Style fixes.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-09-15 17:25:04 -04:00