Roman Li
e1c14c4339
drm/amdgpu: Enable DC on Renoir
...
Enable DC support for renoir.
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Roman Li <Roman.Li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-29 15:52:34 -05:00
Monk Liu
e352625796
drm/amdgpu: introduce vram lost for reset (v2)
...
for SOC15/vega10 the BACO reset & mode1 would introduce vram lost
in high end address range, current kmd's vram lost checking cannot
catch it since it only check very ahead visible frame buffer
v2:
cover NV as well
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-29 15:52:32 -05:00
Thong Thai
8540098492
drm/amdgpu: enable VCN DPG for Renoir
...
This will enable indirect SRAM loading for VCN DPG mode initialization.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Prike Liang <Prike.Liang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:48:46 -05:00
Prike Liang
9a868d8bbb
drm/amdgpu: enable SDMA power gating for rn
...
Enable SDMA PG flag during device ip early init.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Prike Liang
8db63b7c38
drm/amdgpu: enable DF clock gating for rn
...
Enable DF clock gating during DF IP early init.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Prike Liang
e2ef3b70e8
drm/amdgpu: enable athub clock gating for rn
...
Enable athub MG and LS clock gating.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Prike Liang
91ec8bbb88
drm/amdgpu: enable IH clock gating for rn
...
Enable IH clock gating during IH block initialized.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Prike Liang
753c929cc7
drm/amdgpu: enable vcn clock gating for rn
...
Enable VCN middle grain clock gating.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Prike Liang
de273070c5
drm/amdgpu: enable rom clock gating for rn
...
Enable rom light sleep clock gating.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Prike Liang
9deac0a415
drm/amdgpu: enable HDP clock gating for rn
...
Enable HDP light sleep clock gating.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Prike Liang
d98930f52e
drm/amdgpu: enable BIF clock gating for rn
...
Enable BIF light sleep clock gating.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Prike Liang
ef0e7d08a5
drm/amdgpu: enable sdma clock gating for rn
...
Enable sdma middle grain and light sleep clock gating.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Prike Liang
a2d15255ea
drm/amdgpu: enable mmhub clock gating for rn
...
Enable mmhub midle grain and light sleep clock gating.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Prike Liang
ec3636a53a
drm/amdgpu: enable gfx clock gating for rn
...
Enable gfx cg/mg/cp etc clock gating.
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:40:58 -05:00
Aaron Liu
9f21e9ee7f
drm/amdgpu: add and enable gfxoff feature
...
This patch updates gfxoff feature.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:37:39 -05:00
Aaron Liu
97222cfac7
drm/amdgpu/powerplay: add power up/down SDMA interfaces for renoir
...
1.Implement PowerUpSDMA/PowerDownSDMA interfaces in the swSMU for renoir
2.adjust smu ip block ahead of gfx&sdma ip block
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:37:05 -05:00
Aaron Liu
5dbbe6a77d
drm/amdgpu/powerplay: add smu ip block for renoir (v2)
...
add swSMU [smu_v12_0] for renoir
v2: whitespace fixes (Alex)
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-22 17:36:58 -05:00
Alex Deucher
b05f65d772
drm/amdgpu/gfx9: update pg_flags after determining if gfx off is possible
...
We need to set certain power gating flags after we determine
if the firmware version is sufficient to support gfxoff.
Previously we set the pg flags in early init, but we later
we might have disabled gfxoff if the firmware versions didn't
support it. Move adding the additional pg flags after we
determine whether or not to support gfxoff.
Fixes: 005440066f
("drm/amdgpu: enable gfxoff again on raven series (v2)")
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com >
Tested-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com >
2019-08-21 22:15:13 -05:00
Andrey Grodzovsky
c43b849f89
drm/amdgpu: Use new mode2 reset interface for RV.
...
Integrate the mode2 reset into rest sequence.
v2:
Check ppfuncs pointer for NULL
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-15 11:00:44 -05:00
Aaron Liu
f78e007f76
drm/amdgpu: enable clock gating for renoir
...
enable gfx&common clock gating for renoir
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:50 -05:00
Leo Liu
279ba48e1f
drm/amdgpu: add VCN2.0 to Renoir IP blocks
...
Thus enable VCN2.0 for Renoir
Acked-by: Huang Rui <ray.huang@amd.com >
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-08-12 12:47:50 -05:00
Aaron Liu
6a7a0bdbfa
drm/amdgpu: add psp_v12_0 for renoir (v2)
...
1. Add psp ip block
2. Use direct loading type by default and it can also config psp
loading type.
3. Bypass sos fw loading and xgmi&ras interface
v2: drop TA loading
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:50 -05:00
Aaron Liu
e09ce48182
drm/amdgpu: add asic funcs for renoir
...
add asic funcs for renoir, init soc15_asic_funcs
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Aaron Liu <aaron.liu@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 >
2019-08-12 12:47:50 -05:00
Aaron Liu
b1326bbc63
drm/amdgpu: enable dce virtual ip module for Renoir
...
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:50 -05:00
Huang Rui
05e1f0e0ab
drm/amdgpu: set ip blocks for renoir
...
Enable ip blocks for renoir.
Acked-by: Huang Rui <ray.huang@amd.com >
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-08-12 12:47:50 -05:00
Huang Rui
080deab66d
drm/amdgpu: add soc15 common ip block support for renoir
...
This patch adds common ip support for renoir.
Acked-by: Huang Rui <ray.huang@amd.com >
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-08-12 12:47:49 -05:00
Le Ma
a840159c82
drm/amdgpu: enable mmhub clock gating for Arcturus
...
Init MC_MGCG/LS flag. Also apply to athub CG.
Signed-off-by: Le Ma <le.ma@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:49 -05:00
Le Ma
f9da7c4384
drm/amdgpu: add GFX_CP_LS flag to Arcturus
...
Missed AMD_CG_SUPPORT_GFX_CP_LS accidently when commit patch before
drm/amdgpu: enable gfx clock gating for Arcturus
Signed-off-by: Le Ma <le.ma@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:48 -05:00
Le Ma
f7ee199528
drm/amdgpu: enable sdma clock gating for Arcturus
...
Init sdma MGCG/LS flag
Signed-off-by: Le Ma <le.ma@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:48 -05:00
Le Ma
5d111f5b3a
drm/amdgpu: enable hdp clock gating for Arcturus
...
Init hdp MGCG/LS flag as Vega20
Signed-off-by: Le Ma <le.ma@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:48 -05:00
Le Ma
6acb87acef
drm/amdgpu: add hdp clock gating for Arcturus
...
Add hdp CGLS for Arcturus in set common clockgating function
Signed-off-by: Le Ma <le.ma@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:48 -05:00
Le Ma
6b76ce62bf
drm/amdgpu: enable gfx clock gating for Arcturus
...
Init gfx MGCG/LS and CGCG/LS flag.
Signed-off-by: Le Ma <le.ma@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:48 -05:00
Kent Russell
612e4ed99b
drm/amdgpu: Fix pcie_bw on Vega20
...
The registers used for VG20 are different in that certain performance
counters were split off to TXCLK3/4. Vega10/12 doesn't have this, so add
a new vg20_get_pcie_usage to reflect this change.
Signed-off-by: Kent Russell <kent.russell@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:18:58 -05:00
Andrey Grodzovsky
19ed70ff5d
drm/amdgpu: Add amdgpu_asic_funcs.reset_method for Vega20
...
Fixes GPU reset crash.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:18:44 -05:00
Monk Liu
4cd4c5c064
drm/amdgpu: cleanup vega10 SRIOV code path
...
we can simplify all those unnecessary function under
SRIOV for vega10 since:
1) PSP L1 policy is by force enabled in SRIOV
2) original logic always set all flags which make itself
a dummy step
besides,
1) the ih_doorbell_range set should also be skipped
for VEGA10 SRIOV.
2) the gfx_common registers should also be skipped
for VEGA10 SRIOV.
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Emily Deng <Emily.Deng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:17:21 -05:00
Tao Zhou
4fa1c6a679
drm/amdgpu: add RREG64/WREG64(_PCIE) operations
...
add 64 bits register access functions
v2: implement 64 bit functions in low level
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Dennis Li <dennis.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-31 14:49:40 -05:00
Evan Quan
fe089e1dd7
drm/amd/powerplay: enable arcturus powerplay
...
Arcturus powerplay is ready to use.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-30 23:48:33 -05:00
Alex Deucher
ee360c0b7c
drm/amdgpu: add reset_method asic callback for soc15
...
APUs only support mode2 reset. dGPUs use either mode1 or
baco depending on various conditions.
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-30 23:24:13 -05:00
Hawking Zhang
d57c3d5634
drm/amdgpu: init arct external rev id
...
Properly set the external silicon revision id.
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-07-18 14:18:06 -05:00
Le Ma
5fb7c66508
drm/amdgpu: correct ip for mmHDP_READ_CACHE_INVALIDATE register access
...
Use the proper IP index for HDP registers.
Signed-off-by: Le Ma <le.ma@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:18:05 -05:00
Leo Liu
08249a3a32
drm/amdgpu: enable VCN2.5 on Arcturus
...
VCN is the video decode and encode engine on Arcturus
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-07-18 14:18:05 -05:00
Oak Zeng
eb39aff7e0
drm/amdgpu: Enable xgmi support for Arcturus
...
xgmi is a high performance cross-GPU communication channel.
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:18:04 -05:00
Oak Zeng
7f40581c2e
drm/amdgpu: Initialize asic functions for Arcturus
...
After cherry-picking doorbell rework changes from drm-next
branch, Arcturus asic functions pointer need to be initialized
to init doorbell index for Arcturus.
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:18:03 -05:00
Le Ma
0e54df0572
drm/amdgpu/soc15: add Arcturus common ip blocks
...
Add common IP blocks for Arcturus.
Signed-off-by: Le Ma <le.ma@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:18:02 -05:00
Le Ma
e78705ec5a
drm/amdgpu: dynamically initialize IP offset for Arcturus
...
Add support for the IP offsets on Arcturus.
Signed-off-by: Le Ma <le.ma@amd.com >
Acked-by: Snow Zhang < Snow.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:18:02 -05:00
Arnd Bergmann
b5203d16ae
drm/amd/amdgpu: hide #warning for missing DC config
...
It is annoying to have #warnings that trigger in randconfig
builds like
drivers/gpu/drm/amd/amdgpu/soc15.c:653:3: error: "Enable CONFIG_DRM_AMD_DC for display support on SOC15."
drivers/gpu/drm/amd/amdgpu/nv.c:400:3: error: "Enable CONFIG_DRM_AMD_DC for display support on navi."
Remove these and rely on the users to turn these on.
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-16 13:08:59 -05:00
Kent Russell
9417f703af
drm/amdgpu: Fix Vega20 Perf counter for pcie_bw
...
The perf counter for Vega20 is 108, instead of 104 which it was on all
previous GPUs, so add a check to use the appropriate value.
Signed-off-by: Kent Russell <kent.russell@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-16 13:08:51 -05:00
Ernst Sjöstrand
0172591e21
drm/amd/amdgpu: Indent AMD_IS_APU properly
...
Reported by smatch:
drivers/gpu/drm/amd/amdgpu/soc15.c:715 soc15_get_pcie_usage() warn: inconsistent indenting
And a similar one in si.c.
Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-25 13:23:24 -05:00
Alex Deucher
d7929c1e13
Merge branch 'drm-next' into drm-next-5.3
...
Backmerge drm-next and fix up conflicts due to drmP.h removal.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-25 08:42:25 -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