90489ce18c
drm/amdgpu: handle PCIe root ports with addressing limitations
...
amdgpu uses a need_dma32 flag to indicate to the drm core that some
allocations need to be done using GFP_DMA32, but it only checks the
device addressing capabilities to make that decision. Unfortunately
PCIe root ports that have limited addressing exist as well. Use the
dma_addressing_limited instead to also take those into account.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-15 10:51:00 -05:00
52791eeec1
dma-buf: rename reservation_object to dma_resv
...
Be more consistent with the naming of the other DMA-buf objects.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/323401/
2019-08-13 09:09:30 +02:00
17b6d2d528
drm/amdgpu: fix gfx9 soft recovery
...
The SOC15_REG_OFFSET() macro wasn't used, making the soft recovery fail.
v2: use WREG32_SOC15 instead of WREG32 + SOC15_REG_OFFSET
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2019-08-12 22:01:17 -05:00
b8cf3219cc
drm/amdgpu: flag renoir as experimental for now
...
The current code won't likely work on production hw when
it ships so leave it as experimental until it's ready.
Acked-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:51 -05:00
c9d0ca8528
drm/amdgpu: skip mec2 jump table loading for renoir
...
Renoir need not load mec2 jump table with psp.
Acked-by: Huang Rui <ray.huang@amd.com >
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 >
2019-08-12 12:47:51 -05:00
444a0fea51
drm/amdgpu: use direct loading on renoir vcn for the moment
...
PSP has issue for renoir, that will cause VCN fw failed to be loaded. So use
direct loading for the moment till the issue is addressed.
Acked-by: Huang Rui <ray.huang@amd.com >
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 >
2019-08-12 12:47:50 -05:00
8deac23636
drm/amdgpu: set fw default loading by psp for renoir
...
By default, set amdgpu ucode type to AMDGPU_FW_LOAD_PSP.
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
40c8a3293b
drm/amdgpu: update lbpw for renoir
...
enable gfx_v9_0_init_lbpw 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
95f9e74c3a
drm/amdgpu: enable power gating for renoir
...
enable gfx power 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
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
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
0c6b391d68
drm/amdgpu: enable Doorbell support for Renoir (v2)
...
Add VCN range aperture to NBIO 7.0
v2: rebase (Alex)
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
dc9b6e934b
drm/amdgpu: enable Renoir VCN firmware loading
...
By adding new Renoir VCN firmware
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
a46e1716f3
drm/amdgpu: add sdma golden settings for renoir
...
This patch adds sdma golden settings for renoir asic.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:50 -05:00
33294eb8cb
drm/amdgpu: add gfx golden settings for renoir (v2)
...
This patch adds gfx golden settings for renoir real asic.
v2: update settings (Alex)
Acked-by: Huang Rui <ray.huang@amd.com >
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 >
2019-08-12 12:47:50 -05:00
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
6b3ad3b2da
drm/amdgpu: set rlc funcs for renoir
...
add gfx_v9_0_rlc_funcs 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: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:50 -05:00
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
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
0126abd4d1
drm/amdgpu: fix no interrupt issue for renoir emu
...
In renoir's ih model, there's a change in mmIH_CHICKEN
register, that limits IH to use physical address directly.
Those chicken bits need to be programmed first.
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: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:50 -05:00
61bdb39c91
drm/amdgpu: add renoir pci id
...
Add Renoir PCI id support.
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
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
2d49738ae1
drm/amdgpu: add sdma support for renoir
...
Add renoir checks to appropriate places.
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
1aafd447bc
drm/amdgpu: add gfx support for renoir
...
Add Renoir checks to gfx9 code.
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
378d53898a
drm/amdgpu: set fw load type for renoir
...
This patch sets fw load type as direct for renoir for the moment.
Will switch to psp when psp is ready.
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
8787ee0145
drm/amdgpu: add gmc v9 supports for renoir
...
Add gfx memory controller 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
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
b51a26a02a
drm/amdgpu: add renoir support for gpu_info and ip block setting
...
This patch adds renoir support for gpu_info firmware and ip block setting.
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
1eee4228a5
drm/amdgpu: add renoir asic_type enum
...
This patch adds renoir to amd_asic_type enum and amdgpu_asic_name[].
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
62cfcb9e23
drm/amdgpu: fix gfx9 soft recovery
...
The SOC15_REG_OFFSET() macro wasn't used, making the soft recovery fail.
v2: use WREG32_SOC15 instead of WREG32 + SOC15_REG_OFFSET
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:49 -05:00
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
cb15e8046d
drm/amdgpu: add mmhub clock gating for Arcturus
...
Add 2 mmhub instances 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
15e2f43a72
drm/amdgpu: increase CGCG gfx idle threshold for Arcturus
...
Follow the hw spec, and no need to consider gfxoff on 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:49 -05:00
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
5212a3bdf0
drm/amdgpu: remove ras block's feature status info in sysfs
...
feature mask info is enough for rocm tool,
"cat /sys/class/drm/card0/device/ras/features" will get the
info like this:
feature mask: 0x3ffb
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 >
2019-08-12 12:47:48 -05:00
bee7b51ac9
drm/amdgpu: split athub clock gating from mmhub
...
Untie the bind of get/set athub CG state from mmhub, for cosmetic fix and Asic
not using mmhub 1.0. Besides, also fix wrong athub CG state in amdgpu_pm_info.
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-08-12 12:47:48 -05:00
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
8dc7e07cff
drm/amdgpu: add sdma clock gating for Arcturus
...
Add ARCTURUS case in sdma set clockgating function
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
78864760c2
drm/amdgpu: support sdma clock gating for more instances
...
Shorten the code with RREG32_SDMA/WREG32_SDMA macro in CG part.
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
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
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
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
f60481a945
drm/amdgpu: add gfx clock gating for Arcturus
...
Add ARCTURUS case in gfx set clockgating function. No 3d clock on Arcturus.
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
145b03eb73
drm/amdgpu: create mmhub ras framework
...
enable mmhub ras feature and create sysfs/debugfs node for mmhub
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 >
2019-08-12 12:47:48 -05:00
9fb2d8de4a
drm/amdgpu: support mmhub ras in amdgpu ras
...
call mmhub ras query/inject in amdgpu ras
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 >
2019-08-12 12:47:48 -05:00
3d093da098
drm/amdgpu: add amdgpu_mmhub_funcs definition
...
add amdgpu_mmhub_funcs definition and initialize it,
prepare for mmhub ras enablement
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 >
2019-08-12 12:47:48 -05:00
44494f96ba
drm/amdgpu: add sub block parameter in ras inject command
...
ras sub block index could be passed from shell command
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Guchun Chen <guchun.chen@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:48 -05:00
a2b459947b
drm/amdgpu: add check to avoid array bound issue
...
Sub_block_index can be passed from user level, so
add one check before accessing the array first to
prevent array index out of bound problem.
Signed-off-by: Guchun Chen <guchun.chen@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:48 -05:00
2605172032
drm/amdgpu: add navi14 PCI ID
...
Add the navi14 PCI device id.
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:47 -05:00
965ebe3d5d
drm/amdgpu: Update pitch on page flips without DC as well
...
DC already handles this correctly since amdgpu minor version 31. Bump
the minor version again so that xf86-video-amdgpu can take advantage of
this working without DC as well now.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-12 12:47:47 -05:00