6ce2ea07c5
drm/amdgpu/soc21: Add video cap query support for VCN_4_0_4
...
Added the video capability query support for VCN version 4_0_4
Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org # 6.1.x
2023-03-09 22:06:19 -05:00
2915e43a03
drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc21
...
Properly skip non-existent registers as well.
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2442
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2023-03-09 22:06:19 -05:00
ad1cebb6f0
drm/amd/amdgpu: enable athub cg 11.0.3
...
enable athub cg on gc 11.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 >
2023-02-08 17:14:58 -05:00
20e6220b41
drm/amdgpu: enable HDP SD for gfx 11.0.3
...
Enable HDP clock gating control for gfx 11.0.3.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-31 14:04:12 -05:00
f732e2b3c6
drm/amdgpu/vcn4: add missing encoder cap
...
VCN4.x supports AV1 encode.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-24 13:26:26 -05:00
a6de636eb0
drm/amdgpu/soc21: don't expose AV1 if VCN0 is harvested
...
Only VCN0 supports AV1.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-19 17:24:25 -05:00
9c705b96d2
drm/amdgpu: enable VCN DPG for GC IP v11.0.4
...
Enable VCN Dynamic Power Gating control for GC IP v11.0.4.
Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com >
Reviewed-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-03 16:49:43 -05:00
f2b91e5a7c
drm/amdgpu: enable GFX IP v11.0.4 CG support
...
Add CG support for GFX/MC/HDP/ATHUB/IH/BIF.
Signed-off-by: Tim Huang <tim.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-12-06 10:17:57 -05:00
39dd895d05
drm/amdgpu: Add nv mailbox irq in soc21
...
Under virtualization guest needs to receive notification from host to
perform reset in some cases. Add nv mailbox irq in soc21.
Signed-off-by: YuBiao Wang <YuBiao.Wang@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-12-01 15:21:34 -05:00
65009bf2b4
amdgpu/nv.c: Corrected typo in the video capabilities resolution
...
Corrected the typo in the 4K resolution parameters.
Fixes: b3a24461f9
("amdgpu/nv.c - Added codec query for Beige Goby")
Fixes: 9075096b09
("amdgpu/nv.c - Optimize code for video codec support structure")
Fixes: 9ac0edaa0f
("drm/amdgpu: add vcn_4_0_0 video codec query")
Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com >
Acked-by: Luben Tuikov <luben.tuikov@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-11-29 11:03:37 -05:00
2a0fe2ca6e
drm/amdgpu: Enable pg/cg flags on GC11_0_4 for VCN
...
This enable VCN PG, CG and JPEG PG, CG
Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Aaron Liu <aaron.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-11-29 11:03:37 -05:00
18ad18853c
drm/amdgpu/soc21: add mode2 asic reset for SMU IP v13.0.11
...
Set the default reset method to mode2 for SMU IP v13.0.11
Signed-off-by: Tim Huang <tim.huang@amd.com >
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Aaron Liu <aaron.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-11-29 11:03:37 -05:00
311d52367d
drm/amdgpu: add soc21 common ip block support for GC 11.0.4
...
Add common soc21 ip block support for GC 11.0.4.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Aaron Liu <aaron.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-11-29 11:03:36 -05:00
60cfad329a
drm/amd/pm: enable mode1 reset on smu_v13_0_10
...
enable mode1 reset and prioritize debug port on smu_v13_0_10
as a more reliable message processing
v2 - move mode1 reset callback to smu_v13_0_0_ppt.c
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Yang Wang <kevinyang.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-11-09 17:41:42 -05:00
0cfce2401e
drm/amdgpu: Clean up soc21 early init for SRIOV
...
Use virt_init_setting instead of per ip version setting.
Signed-off-by: Yiqing Yao <yiqing.yao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-11-04 16:05:53 -04:00
2e26bf1e46
drm/amdgpu: Enable gmc soft reset on gmc_v11_0_3
...
Enable gmc soft reset on gmc_v11_0_3.
Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-10-17 17:41:20 -04:00
4ecdb30ec4
drm/amd/amdgpu: enable gfx clock gating features on smu_v13_0_10
...
enable gfx clock gating features on smu_v13_0_10
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 >
2022-10-17 17:41:20 -04:00
e626d9b9c6
drm/amdgpu: Enable VCN PG on GC11_0_1
...
Enable VCN PG on GC11_0_1
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org # 6.0.x
2022-10-06 12:02:49 -04:00
0b37f47494
drm/amdgpu: Enable VCN DPG for GC11_0_1
...
Enable VCN DPG on GC11_0_1
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-09-30 11:20:43 -04:00
34dfca8908
drm/amdgpu: Enable full reset when RAS is supported on gc v11_0_0
...
Enable full reset for RAS supported configuration on gc v11_0_0.
v2: simplify the code.
Signed-off-by: Candice Li <candice.li@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-09-13 12:56:16 -04:00
c322b422ab
drm/amdgpu/vcn: Disable CG/PG for SRIOV
...
For sriov, CG and MG are controlled from hypervisor side,
no need to manage them again in ip init
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Jane Jian <Jane.Jian@amd.com >
Reviewed-by: Sonny Jiang <sonny.jiang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-09-01 15:12:00 -04:00
8284182592
drm/admgpu: Skip CG/PG on SOC21 under SRIOV VF
...
[Why]
There is no CG(Clock Gating)/PG(Power Gating) requirement on SRIOV VF.
For multi VF, VF should not enable any CG/PG features.
For one VF, PF will program CG/PG related registers.
[How]
Do not set any cg/pg flag bit at early init under sriov.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Yifan Zha <Yifan.Zha@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-09-01 15:11:54 -04:00
bbb860d46f
drm/amdgpu: Use RLCG to program GRBM_GFX_CNTL during full access time
...
[Why]
KIQ register init requires GRBM_GFX_CNTL to select KIQ.
[How]
As RLCG accessing registers will save the data of GRBM_GFX_CNTL and restore it.
Use RLCG indirect accessing register method to select grbm instead of mmio directly access.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Yifan Zha <Yifan.Zha@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-09-01 15:11:50 -04:00
0f05a2e528
drm/amdgpu: Enable pg/cg flags on GC11_0_3 for VCN
...
This enable VCN PG, CG, DPG and JPEG PG, CG
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: John Clements <john.clements@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-08-29 17:59:30 -04:00
6b46251c50
drm/amdgpu: initialize common sw config for v11_0_3
...
init cp/pg_flags and extenal_rev_id
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Frank Min <Frank.Min@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-08-29 17:59:30 -04:00
7201023910
drm/amdgpu: add MGCG perfmon setting for gfx11
...
Enable GFX11 MGCG perfmon setting.
V2: set rlc to saft mode before setting.
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-08-25 13:35:18 -04:00
9407feacd2
drm/amdgpu: enable NBIO IP v7.7.0 Clock Gating
...
Enable AMD_CG_SUPPORT_BIF_MGCG and AMD_CG_SUPPORT_BIF_LS support.
Signed-off-by: Tim Huang <tim.huang@amd.com >
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-08-22 16:47:28 -04:00
fa0bbd3be9
drm/amdgpu: enable IH Clock Gating for OSS IP v6.0.1
...
Enable AMD_CG_SUPPORT_IH_CG support.
Signed-off-by: Tim Huang <tim.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-08-16 18:06:54 -04:00
8e78c7c4fe
drm/amdgpu: enable ATHUB IP v3.0.1 Clock Gating
...
Enable AMD_CG_SUPPORT_ATHUB_MGCG and AMD_CG_SUPPORT_ATHUB_LS support.
Signed-off-by: Tim Huang <tim.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-08-16 18:06:18 -04:00
7e4a77de08
drm/amdgpu: enable HDP IP v5.2.1 Clock Gating
...
Enable AMD_CG_SUPPORT_HDP_MGCG and AMD_CG_SUPPORT_HDP_LS support.
Signed-off-by: Tim Huang <tim.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-08-16 18:06:11 -04:00
adcd15dc47
drm/amdgpu: enable MMHUB IP v3.0.1 Clock Gating
...
Enable AMD_CG_SUPPORT_MC_MGCG and AMD_CG_SUPPORT_MC_LS support.
Signed-off-by: Tim Huang <tim.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-08-16 18:06:06 -04:00
b4ddb27d1d
drm/amd/amdgpu: add ih cg and hdp sd on smu_v13_0_7
...
add ih cg and hdp sd on smu_v13_0_7
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 >
2022-08-16 18:03:10 -04:00
1b586595df
drm/amdgpu: disable 3DCGCG/CGLS temporarily due to stability issue
...
Some stability issues were reported with these features.
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 >
2022-08-16 18:02:42 -04:00
dc0a096bcc
drm/amdgpu: add GFX Power Gating support for GC IP v11.0.1
...
Add AMD_PG_SUPPORT_GFX_PG support.
Signed-off-by: Tim Huang <tim.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-08-10 15:41:23 -04:00
8df436d5cc
drm/amdgpu: add GFX Clock Gating support for GC IP v11.0.1
...
Add below GFX Clock Gating supports:
1. GFX Coarse Grain Clock Gating(CGCG)
2. GFX Coarse grain light sleep/deep sleep(CGLS)
3. GFX Medium Grain Clock Gating(MGCG)
4. GFX Fine Grain Clock Gating(FGCG)
5. Repeater Fine Grain Clock Gating
6. Perfmon Clock Gating
Signed-off-by: Tim Huang <tim.huang@amd.com >
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-08-10 15:10:19 -04:00
47231d5e39
drm/amdgpu: enable VCN cg and JPEG cg/pg
...
Not enable VCN pg because encode issue
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:28:54 -04:00
1c0a903648
drm/amdgpu: vcn_4_0_2 video codec query
...
Enable support for vcn_4_0_2 video codec
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:28:54 -04:00
a53bc32182
drm/amd/pm: enable mode1 reset for smu_v13_0_7
...
enable mode1 reset for smu_v13_0_7 since it's missing.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Yang Wang <kevinyang.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-18 16:42:39 -04:00
c0ff84cb58
drm/amdgpu: enable soft reset for gfx 11
...
Enable soft reset for gfx 11.
V2: enable both gfx v11.0.0 and gfx v11.0.2.
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-07-13 11:25:16 -04:00
62f8f5c3bf
drm/amdgpu: enable ASPM support for PCIE 7.4.0/7.6.0
...
Enable ASPM support for PCIE 7.4.0 and 7.6.0.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-06-08 11:43:00 -04:00
ea64228d26
drm/amdgpu/soc21: add mode2 asic reset for SMU IP v13.0.4
...
Set the default reset method to mode2 for SMU IP v13.0.4
Acked-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Tim Huang <Tim.Huang@amd.com >
Signed-off-by: Tim Huang <tim.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-06-06 14:43:47 -04:00
49401d3a5c
drm/amd/amdgpu: align the cg and pg settings
...
align the cg and pg settings between gc_v11_0 and gc_v11_2
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-06-03 16:43:38 -04:00
caa5eadc14
drm/amdgpu: suppress some compile warnings
...
Suppress two compile warnings about "no previous prototype".
Reported-by: kernel test robot <lkp@intel.com >
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 >
2022-05-26 14:56:33 -04:00
362c3c7014
drm/amdgpu: support memory power gating for lsdma 6.0.2
...
Support memory power gating control for lsdma 6.0.2.
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-10 17:53:12 -04:00
41967850e4
drm/amdgpu: support memory power gating for lsdma
...
Support memory power gating control for LSDMA.
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-10 17:53:12 -04:00
bf1781e17f
drm/amdgpu: simplify nv and soc21 read_register functions
...
Check of the base offset for the IP exists rather than
explicitly checking for how many instances of a particular
IP there are. This is what soc15.c already does. Expand
this to nv.c and soc21.c.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-06 16:56:57 -04:00
11417a927b
drm/amdgpu: add soc21 common ip block support for GC 11.0.1
...
Add common soc21 ip block support for GC 11.0.1.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Aaron Liu <aaron.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-06 10:36:14 -04:00
bafd6cbe4a
drm/amdgpu: add pcie port function helpers for SOC21
...
These helpers will be used on NBIO v7.7.0.
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-06 10:36:13 -04:00
06aeb75332
drm/amdgpu: handle asics with 1 SDMA instance
...
This patch will handle asics with 1 SDMA instance.
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-05-06 10:36:13 -04:00
27e3911c40
drm/amd/soc21: enable mmhub and athub power gating
...
add the pg_flag for athub and mmhub pg.
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 >
2022-05-05 16:53:44 -04:00