aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
AgeCommit message (Collapse)AuthorFilesLines
2017-06-09drm/amdgpu: fix a typo in commentAlex Xie1-1/+1
Signed-off-by: Alex Xie <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-09drm/amdgpu: remove duplicate function prototypesAlex Xie1-1/+0
There are two identical function prototypes in same header file Signed-off-by: Alex Xie <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-09drm/amdgpu: Support page table update via CPUHarish Kasiviswanathan1-1/+87
v2: Fix logical mistake. If CPU update failed amdgpu_vm_bo_update_mapping() would not return and instead fall through to SDMA update. Minor change due to amdgpu_vm_bo_wait() prototype change Signed-off-by: Harish Kasiviswanathan <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-09drm/amdgpu: Support page directory update via CPUHarish Kasiviswanathan1-42/+119
If amdgpu.vm_update_context param is set to use CPU, then Page Directories will be updated by CPU instead of SDMA v2: Call amdgpu_vm_bo_wait before updating the page tables to ensure the PD/PT BOs are free v3: Minor changes - due to amdgpu_vm_bo_wait() prototype change, local variable declaration order and function comments. Signed-off-by: Harish Kasiviswanathan <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-09drm/amdgpu: Add amdgpu_sync_waitHarish Kasiviswanathan2-0/+20
v2: Add intr option Helper function useful for CPU update of VM page tables. Also useful if kernel have to synchronously wait till VM page tables are updated. Signed-off-by: Harish Kasiviswanathan <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-09drm/amdgpu: Add vm context module paramHarish Kasiviswanathan5-3/+61
Add VM update mode module param (amdgpu.vm_update_mode) that can used to control how VM pde/pte are updated for Graphics and Compute. BIT0 controls Graphics and BIT1 Compute. BIT0 [= 0] Graphics updated by SDMA [= 1] by CPU BIT1 [= 0] Compute updated by SDMA [= 1] by CPU By default, only for large BAR system vm_update_mode = 2, indicating that Graphics VMs will be updated via SDMA and Compute VMs will be updated via CPU. And for all all other systems (by default) vm_update_mode = 0 Signed-off-by: Harish Kasiviswanathan <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-08drm/amdgpu: drop deprecated drm_get_pci_dev and drm_put_devAlex Deucher1-2/+26
Open code them so we can adjust the order in the driver more easily. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-08drm/amdgpu: call pci_[un]register_driver() directlyAlex Deucher1-2/+2
Rather than calling the deprecated drm_pci_init() and drm_pci_exit() which just wrapped the pci functions anyway. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-08drm/amdgpu/radeon: Use radeon by default for CIK GPUsMichel Dänzer3-8/+11
Even if CONFIG_DRM_AMDGPU_CIK is enabled. There is no feature parity yet for CIK, in particular amdgpu doesn't support HDMI/DisplayPort audio without DC. v2: * Clarify the lack of feature parity being related to HDMI/DP audio. * Fix "SI" typo in DRM_AMDGPU_CIK help entry. Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
2017-06-08drm/amdgpu: Update Kconfig help for SI and CIK supportFelix Kuehling1-4/+12
Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Christian König <[email protected]> Acked-by: Michel Dänzer <[email protected]>
2017-06-08drm/amdgpu: Add module param to control SI supportFelix Kuehling3-0/+26
If AMDGPU supports SI, add a module parameter to control SI support. It's off by default in AMDGPU as long as SI suppost is experimental, while it is on by default in radeon. Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Christian König <[email protected]> Acked-by: Michel Dänzer <[email protected]> [ Michel Dänzer: Squash in amdgpu_si_support initialization fix ] Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2017-06-08drm/amdgpu: Add module param to control CIK supportFelix Kuehling3-0/+26
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 <[email protected]> Reviewed-by: Christian König <[email protected]> Acked-by: Michel Dänzer <[email protected]>
2017-06-07drm/amdgpu/gfx: consolidate mqd buffer setup codeAlex Deucher4-132/+74
It was duplicated across multiple generations. Reviewed-by: Alex Xie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-07drm/amdgpu/gfx: move mec parameter setup into sw_initAlex Deucher3-47/+47
This will allow us to share more mec code. Reviewed-by: Alex Xie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-07drm/amdgpu/gfx: move more common KIQ code to amdgpu_gfx.cAlex Deucher4-211/+122
Lots more common stuff. Reviewed-by: Alex Xie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-07drm/amdgpu: move mec queue helpers to amdgpu_gfx.hAlex Deucher6-39/+40
They are gfx related, not general helpers. Reviewed-by: Alex Xie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-07drm/amdgpu/gfx9: remove spurious line in kiq setupAlex Deucher1-1/+0
This overrode what queue was actually assigned for kiq. Reviewed-by: Alex Xie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-07drm/amdgpu/gfx8: whitespace changeAlex Deucher1-1/+2
Make it consistent. Reviewed-by: Alex Xie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-07drm/amdgpu/gfx9: Raven has two MECsAlex Deucher1-0/+1
This was missed when Andres' queue patches were rebased. Fixes: 42794b27 (drm/amdgpu: take ownership of per-pipe configuration v3) Reviewed-by: Alex Xie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-07drm/amdgpu: move gfx_v*_0_compute_queue_acquire to common codeAlex Deucher5-114/+42
Same function was duplicated in all gfx IP files. Reviewed-by: Alex Xie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-07drm/amdgpu: fix mec queue policy on single MEC asicsAlex Deucher3-9/+27
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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-07drm/amdgpu/gfx: create a common bitmask function (v2)Alex Deucher5-40/+25
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 <[email protected]> Suggested-by: Andres Rodriguez <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-07drm/amdgpu/gfx8: drop per-APU CU limitsAlex Deucher1-69/+2
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 <[email protected]> Reviewed-by: Andres Rodriguez <[email protected]> Cc: [email protected] Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu/gfx6: properly cache mc_arb_ramcfgAlex Deucher1-1/+2
This was missing for gfx6. Acked-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2017-06-06drm/amdgpu/gfx9: new queue policy, take first 2 queues of each pipeAlex Deucher1-2/+2
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 <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Andres Rodriguez <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu/gfx9: allocate queues horizontally across pipesAlex Deucher1-63/+52
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 <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Andres Rodriguez <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: update to use RREG32_SOC15/WREG32_SOC15 for gmc9Huang Rui1-5/+5
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: update to use RREG32_SOC15/WREG32_SOC15 for mmhubHuang Rui1-94/+83
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: update to use RREG32_SOC15/WREG32_SOC15 for gfxhubHuang Rui1-77/+64
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: fix the gart table cleared issue for S3Huang Rui6-1/+14
Something writes over the first 8 MB so reserve this on vega10 until we root cause it. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: add ip block number printsHuang Rui1-0/+3
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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: add ip name print for selecting ips with ip_block_maskHuang Rui1-1/+2
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: remove mmhub ipHuang Rui3-96/+0
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: remove gfxhub ipHuang Rui3-96/+0
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: export mmhub get clockgating into gmcHuang Rui3-3/+10
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: export mmhub set clockgating into gmcHuang Rui3-5/+13
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: export mmhub sw_init into gmcHuang Rui3-12/+17
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: export gfxhub sw_init into gmcHuang Rui3-12/+17
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: fix to miss program invalidation at resumeHuang Rui2-24/+30
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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: abstract setup vmid config for gfxhub/mmhubHuang Rui2-48/+55
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: abstract disable identity aperture for gfxhub/mmhubHuang Rui2-32/+41
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: abstract system domain enablement for gfxhub/mmhubHuang Rui2-17/+32
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: abstract cache initialization for gfxhub/mmhubHuang Rui2-98/+62
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: abstract TLB initialization for gfxhub/mmhubHuang Rui2-29/+44
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: abstract system aperture initialization for gfxhub/mmhubHuang Rui2-79/+77
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: abstract gart aperture initialization for gfxhub/mmhubHuang Rui2-32/+40
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-06drm/amdgpu: abstract gart table initialization for gfxhub/mmhubHuang Rui2-26/+42
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-01Merge tag 'gcc-plugins-v4.12-rc4' of ↵Linus Torvalds1-5/+5
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-01drm/amdgpu: add saved_bo to save vce 4.0 context when suspendLeo Liu2-8/+38
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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-06-01drm/amdgpu: use existing function amdgpu_bo_create_kernelLeo Liu1-25/+5
To simplify vce bo create Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>