Felix Kuehling
7df289865c
drm/amdgpu: Add module param to control CIK support
...
If AMDGPU supports CIK, add a module parameter to control CIK
support. It's on by default in AMDGPU, while it is off by default
in radeon.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Michel Dänzer <michel.daenzer@amd.com >
2017-06-08 10:54:33 -04:00
Alex Deucher
b9683c21f6
drm/amdgpu/gfx: consolidate mqd buffer setup code
...
It was duplicated across multiple generations.
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 18:20:59 -04:00
Alex Deucher
4853bbb6fb
drm/amdgpu/gfx: move mec parameter setup into sw_init
...
This will allow us to share more mec code.
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 18:20:58 -04:00
Alex Deucher
71c37505e7
drm/amdgpu/gfx: move more common KIQ code to amdgpu_gfx.c
...
Lots more common stuff.
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 18:20:41 -04:00
Alex Deucher
2db0cdbe28
drm/amdgpu: move mec queue helpers to amdgpu_gfx.h
...
They are gfx related, not general helpers.
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 18:02:06 -04:00
Alex Deucher
ee04fac3b7
drm/amdgpu/gfx9: remove spurious line in kiq setup
...
This overrode what queue was actually assigned for kiq.
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 18:01:59 -04:00
Alex Deucher
d6b20c8769
drm/amdgpu/gfx8: whitespace change
...
Make it consistent.
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 18:01:49 -04:00
Alex Deucher
5e7c8b0676
drm/amdgpu/gfx9: Raven has two MECs
...
This was missed when Andres' queue patches were rebased.
Fixes: 42794b27
(drm/amdgpu: take ownership of per-pipe configuration v3)
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 15:43:38 -04:00
Alex Deucher
41f6a99abd
drm/amdgpu: move gfx_v*_0_compute_queue_acquire to common code
...
Same function was duplicated in all gfx IP files.
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 15:43:28 -04:00
Alex Deucher
cf8b611f55
drm/amdgpu: fix mec queue policy on single MEC asics
...
Fixes hangs on single MEC asics.
Fixes: 2ed286fb434 (drm/amdgpu: new queue policy, take first 2 queues of each pipe v2)
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 15:43:11 -04:00
Alex Deucher
378506a7e6
drm/amdgpu/gfx: create a common bitmask function (v2)
...
The same function was duplicated in all the gfx IPs. Use
a single implementation for all.
v2: use static inline (Alex Xie)
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Suggested-by: Andres Rodriguez <andresx7@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 00:04:35 -04:00
Alex Deucher
943c05bdb5
drm/amdgpu/gfx8: drop per-APU CU limits
...
Always use the max for the family rather than the per sku limits.
This makes sure the mask is always the max size to avoid reporting
the wrong number of CUs.
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com >
Reviewed-by: Andres Rodriguez <andresx7@gmail.com >
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-07 00:04:21 -04:00
Alex Deucher
6653ebd48f
drm/amdgpu/gfx6: properly cache mc_arb_ramcfg
...
This was missing for gfx6.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2017-06-06 17:01:47 -04:00
Alex Deucher
a7049de1e8
drm/amdgpu/gfx9: new queue policy, take first 2 queues of each pipe
...
Instead of taking the first pipe and giving the rest to kfd, take the
first 2 queues of each pipe.
Effectively, amdgpu and amdkfd own the same number of queues. But
because the queues are spread over multiple pipes the hardware will be
able to better handle concurrent compute workloads.
amdgpu goes from 1 pipe to 4 pipes, i.e. from 1 compute threads to 4
amdkfd goes from 3 pipe to 4 pipes, i.e. from 3 compute threads to 4
gfx9 was missed when this patch set was rebased to include gfx9.
Acked-by: Tom St Denis <tom.stdenis@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Andres Rodriguez <andresx7@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 17:01:43 -04:00
Alex Deucher
1361f45531
drm/amdgpu/gfx9: allocate queues horizontally across pipes
...
Pipes provide better concurrency than queues, therefore we want to make
sure that apps use queues from different pipes whenever possible.
Optimize for the trivial case where an app will consume rings in order,
therefore we don't want adjacent rings to belong to the same pipe.
gfx9 was missed when these patches were rebased.
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Andres Rodriguez <andresx7@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 17:01:37 -04:00
Hawking Zhang
b1e8b9c5b1
drm/amd/powerplay: fix memory leak in cz_hwmgr backend
...
vddc_dep_on_dal_pwrl is allocated and initialized in cz_hwmgr_backend_init
Thus free the memory in cz_hwmgr_backend_fini
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2017-06-06 17:01:13 -04:00
Hawking Zhang
95ef1f53c5
drm/amd/powerplay: fix memory leak in rv_hwmgr backend
...
vddc_dep_on_dal_pwrl and vq_budgeting_table are allocated and initialized
in rv_hwmgr_backend_init. Thus free the memory in rv_hwmgr_backend_fini
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 17:01:05 -04:00
Eric Huang
dd4e2237dc
drm/amd/powerplay: add sclk and mclk overdrive for vega10
...
For overclocking sclk and mclk.
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 17:00:50 -04:00
Rex Zhu
d0856f3ad5
drm/amd/powerplay: fix populate dpm level failed when s3 on vega10.
...
As the min clk may be large than boot level can support.
in this case, just ignore the min clk.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 17:00:42 -04:00
Huang Rui
b9509c80df
drm/amdgpu: update to use RREG32_SOC15/WREG32_SOC15 for gmc9
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 17:00:35 -04:00
Huang Rui
2a4191833e
drm/amdgpu: update to use RREG32_SOC15/WREG32_SOC15 for mmhub
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 17:00:28 -04:00
Huang Rui
89f99cebc4
drm/amdgpu: update to use RREG32_SOC15/WREG32_SOC15 for gfxhub
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 17:00:21 -04:00
Huang Rui
916910ad91
drm/amdgpu: fix the gart table cleared issue for S3
...
Something writes over the first 8 MB so reserve this
on vega10 until we root cause it.
Signed-off-by: Huang Rui <ray.huang@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 >
2017-06-06 16:59:30 -04:00
Huang Rui
a0bae3577f
drm/amdgpu: add ip block number prints
...
User is able to follow the ip block number to write the ip_block_mask for
selecting the one which user would like to enable.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:59:23 -04:00
Huang Rui
ed8cf00ce4
drm/amdgpu: add ip name print for selecting ips with ip_block_mask
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:59:16 -04:00
Huang Rui
1191d110c3
drm/amdgpu: remove mmhub ip
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:59:09 -04:00
Huang Rui
373f592325
drm/amdgpu: remove gfxhub ip
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:59:03 -04:00
Huang Rui
13052be59a
drm/amdgpu: export mmhub get clockgating into gmc
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:58:56 -04:00
Huang Rui
d5583d4f69
drm/amdgpu: export mmhub set clockgating into gmc
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:58:49 -04:00
Huang Rui
77f6c76370
drm/amdgpu: export mmhub sw_init into gmc
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:58:43 -04:00
Huang Rui
0c8c0847cc
drm/amdgpu: export gfxhub sw_init into gmc
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:58:36 -04:00
Huang Rui
1e4eccdaf2
drm/amdgpu: fix to miss program invalidation at resume
...
This patch moves invalidation into gart enable function from hw_init.
Because we would like align the sequence calling between init and resume.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:58:29 -04:00
Huang Rui
3dff4cc4b0
drm/amdgpu: abstract setup vmid config for gfxhub/mmhub
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:58:23 -04:00
Huang Rui
d5c87390f1
drm/amdgpu: abstract disable identity aperture for gfxhub/mmhub
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:58:16 -04:00
Huang Rui
02c4704bd2
drm/amdgpu: abstract system domain enablement for gfxhub/mmhub
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:58:09 -04:00
Huang Rui
41f6f31111
drm/amdgpu: abstract cache initialization for gfxhub/mmhub
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:58:03 -04:00
Huang Rui
3426983939
drm/amdgpu: abstract TLB initialization for gfxhub/mmhub
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:57:56 -04:00
Huang Rui
fc4b884b26
drm/amdgpu: abstract system aperture initialization for gfxhub/mmhub
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:57:49 -04:00
Huang Rui
9bbad6fda0
drm/amdgpu: abstract gart aperture initialization for gfxhub/mmhub
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:57:41 -04:00
Huang Rui
a51dca4f21
drm/amdgpu: abstract gart table initialization for gfxhub/mmhub
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 16:57:09 -04:00
Linus Torvalds
2f48641cfc
Merge tag 'gcc-plugins-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
...
Pull gcc-plugin prepwork from Kees Cook:
"Use designated initializers for mtk-vcodec, powerplay, amdgpu, and
sgi-xp. Use ERR_CAST() to avoid cross-structure cast in ocf2, ntfs,
and NFS.
Christoph Hellwig recommended that I send these fixes now, rather than
waiting for the v4.13 merge window. These are all initializer and cast
fixes needed for the future randstruct plugin that haven't been picked
up by the respective maintainers"
* tag 'gcc-plugins-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
mtk-vcodec: Use designated initializers
drm/amd/powerplay: Use designated initializers
drm/amdgpu: Use designated initializers
sgi-xp: Use designated initializers
ocfs2: Use ERR_CAST() to avoid cross-structure cast
ntfs: Use ERR_CAST() to avoid cross-structure cast
NFS: Use ERR_CAST() to avoid cross-structure cast
2017-06-01 16:17:42 -07:00
Leo Liu
a107ebf61e
drm/amdgpu: add saved_bo to save vce 4.0 context when suspend
...
We are using PSP to resume firmware after suspend, and it is
resumed at where it got suspended, so we'd better save the
the context.
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 >
2017-06-01 16:00:22 -04:00
Leo Liu
78b3c83983
drm/amdgpu: use existing function amdgpu_bo_create_kernel
...
To simplify vce bo create
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 >
2017-06-01 16:00:21 -04:00
Leo Liu
91415a09ab
drm/amdgpu: add vcpu_bo cpu address for vce
...
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 >
2017-06-01 16:00:21 -04:00
Alex Xie
e59c020598
drm/amdgpu: Move compute vm bug logic to amdgpu_vm.c
...
In review, Christian would like to keep the logic
inside amdgpu_vm.c with a cost of slightly slower.
The loop is still optimized out with this patch.
v2: remove the if statement. Now it is not slower.
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com >
Reviewed-by: Christian König <christian.koeng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-01 16:00:20 -04:00
Rex Zhu
117a48a7ad
drm/amd/powerplay: enable CKS by default on vega10.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-01 16:00:20 -04:00
Rex Zhu
040cd2d1f5
drm/amd/powerplay: Align with VBIOS to support AVFS parameters.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-01 16:00:19 -04:00
Rex Zhu
c5b053d2a0
drm/amd/powerplay: Add floor DCEF for DS on boot.
...
Use the vbios to look up the default frequencies
for socclk and dcefclk.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-01 16:00:18 -04:00
Geert Uytterhoeven
7a10d63f02
drm/amdkfd: Spelling s/apreture/aperture/
...
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com >
2017-06-01 12:28:38 +02:00
Dan Carpenter
b312b2b25b
drm/amdkfd: NULL dereference involving create_process()
...
We accidentally return ERR_PTR(0) which is NULL. The caller is not
expecting that and it leads to an Oops.
Fixes: dd59239a98
("amdkfd: init aperture once per process")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com >
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com >
2017-06-14 13:58:53 +03:00