[PATCH 7/9] drm/amdkfd: Clean up process queue management

2017-09-26 Thread Felix Kuehling
Removed unused num_concurrent_processes. Implemented counting of queues in QPD. This makes counting the queue list repeatedly in several places unnecessary. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 + drivers/gpu/drm/amd/amdkfd/kfd_packet_

[PATCH 3/9] drm/amdkfd: Fix MQD updates

2017-09-26 Thread Felix Kuehling
When a queue is mapped, the MQD is owned by the FW. The FW overwrites the MQD on the next unmap operation. Therefore the queue must be unmapped before updating the MQD. For the non-HWS case, also fix disabling of queues and creation of queues in disabled state. Signed-off-by: Oak Zeng Signed-off

[PATCH 2/9] drm/amdkfd: Simplify execute and unmap queue APIs

2017-09-26 Thread Felix Kuehling
From: Yong Zhao Pass filter parameters directly to unmap_queues_cpsch. Also remove lock parameters and do locking explicitly in the caller. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 75 +- 1 file change

[PATCH 9/9] drm/amdkfd: Improve multiple SDMA queues support per process

2017-09-26 Thread Felix Kuehling
From: shaoyunl HWS does not support over-subscription and the scheduler can not internally modify the engine. Driver needs to program the correct engine ID. Fix the queue and engine selection to create queues on alternating SDMA engines. This allows concurrent bi-directional DMA transfers in a p

[PATCH 6/9] drm/amdkfd: Compress unnecessary function parameters

2017-09-26 Thread Felix Kuehling
From: Yong Zhao Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +-- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c| 5 +++-- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 -- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

[PATCH 4/9] drm/amdkfd: Avoid submitting an unnecessary packet to HWS

2017-09-26 Thread Felix Kuehling
From: Yong Zhao Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 28 -- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/am

[PATCH 1/9] drm/amdkfd: Avoid name confusion involved in queue unmapping

2017-09-26 Thread Felix Kuehling
From: Yong Zhao When unmapping the queues from HW scheduler, there are two actions: reset and preempt. So naming the variables with only preempt is inapproriate. For functions such as destroy_queues_cpsch, what they do actually is to unmap the queues on HW scheduler rather than to destroy them.

[PATCH 5/9] drm/amdkfd: Improve process termination handling in the queue manager

2017-09-26 Thread Felix Kuehling
Separate device queue termination from process queue manager termination. Unmap all queues at once instead of one at a time. Unmap device queues before the PASID is unbound, in the kfd_process_iommu_unbind_callback. When resetting wavefronts in non-HWS mode, do it before the VMID is released. Sig

[PATCH 8/9] drm/amdkfd: Limit queue number per process and device to 127

2017-09-26 Thread Felix Kuehling
HWS uses bit 7 in the queue number of the map process packet for an undocumented feature. Therefore the queue number per process and device must be 127 or less. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 10 ++ 1 file changed, 6 insertions(

[PATCH 0/9] KFD queue management improvements and fixes

2017-09-26 Thread Felix Kuehling
These patches cherry-pick most fixes, improvements and refactoring in the device queue manager from our internal branch. I squashed some patches that applied incremental fixes to the same code. Patch 5 is the extreme case that comes with a bunch of refactoring too. I think I squashed about a dozen

Problem with latest amdkfd-next

2017-09-26 Thread Felix Kuehling
Hi Oded, I rebased my next set of changes on your latest amdkfd-next (4.14-rc1 based) and ran into a problem when running SHOC on Kaveri. The system randomly reboots just when the test starts to run. The first run is usually fine, but the second or third fails. If the test starts successfully, it

[pull] amdgpu dc drm-next-4.15-dc

2017-09-26 Thread Alex Deucher
Hi Dave, Initial pull request for DC support. We've completed a substantial amount of the cleanup and restructuring in our TODO. There are a few additional cleanups that we are continuing to work on, but I don't think there are any showstoppers remaining. We've tried to maintain most of the hist

[PATCH] drm/amdgpu: Set the correct value for PDEs/PTEs of ATC memory

2017-09-26 Thread Yong Zhao
From: Yong Zhao Without the additional bits set in PDEs/PTEs, the ATC memory access would have failed. Change-Id: I28429ef6d39cdb01dc6f17fea4264ee22d7121d4 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions

Determine if ECC is enabled on Vega10.

2017-09-26 Thread David Panariti
VBIOS decides whether or not to enabled ECC. During init, we check and report the state. [PATCH 1/2] drm/amdgpu: New header for fields needed to determine [PATCH 2/2] drm/amdgpu: Add ability to determine and report if board ___ amd-gfx mailing list amd-

[PATCH 2/2] drm/amdgpu: Add ability to determine and report if board supports ECC.

2017-09-26 Thread David Panariti
Make initialization code check the ECC related registers, which are initialized by the VBIOS, to see if ECC is present and initialized and DRM_INFO() the result. Change-Id: I8617269809cf3641c5151291ad5d964f55f7f835 Signed-off-by: David Panariti Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/

[PATCH 1/2] drm/amdgpu: New header for fields needed to determine state of ECC.

2017-09-26 Thread David Panariti
Add header files with ECC related definitions (MASKs, SHIFTs, DEFAULTs and OFFSETS). Change-Id: I6e420f11db8e701402088a5bc47f641d5ac41c47 Signed-off-by: David Panariti Reviewed-by: Alex Deucher --- .../include/asic_reg/vega10/UMC/umc_6_0_default.h | 31 + .../include/asic_reg/vega1

[PATCH] drm/amdgpu: map compute rings by least recently used pipe

2017-09-26 Thread Andres Rodriguez
This patch provides a guarantee that the first n queues allocated by an application will be on different pipes. Where n is the number of pipes available from the hardware. This helps avoid ring aliasing which can result in work executing in time-sliced mode instead of truly parallel mode. Signed-

[pull] radeon, amdgpu, ttm drm-next-4.15

2017-09-26 Thread Alex Deucher
Hi Dave, First feature pull for 4.15. Highlights: - Per VM BO support - Lots of powerplay cleanups - Powerplay support for CI - pasid mgr for kfd - interrupt infrastructure for recoverable page faults - SR-IOV fixes - initial GPU reset for vega10 - prime mmap support - ttm page table debugging im

Re: [PATCH] radeon and amdgpu drm-fixes-4.14

2017-09-26 Thread Alex Deucher
Whoops. subject should say [pull]. Alex On Tue, Sep 26, 2017 at 3:33 PM, Alex Deucher wrote: > Hi Dave, > > A few fixes for 4.14. Nothing too major. > > The following changes since commit 47e0cd6b1dbbbff7591fe7eecc20bac5ca674351: > > Merge branch 'drm-next-4.14' of git://people.freedesktop.or

[PATCH] radeon and amdgpu drm-fixes-4.14

2017-09-26 Thread Alex Deucher
Hi Dave, A few fixes for 4.14. Nothing too major. The following changes since commit 47e0cd6b1dbbbff7591fe7eecc20bac5ca674351: Merge branch 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-next (2017-09-13 14:34:11 +1000) are available in the git repository at: git:/

RE: [PATCH] drm/amdgpu: Handle GPUVM fault storms

2017-09-26 Thread Deucher, Alexander
> -Original Message- > From: Kuehling, Felix > Sent: Tuesday, September 26, 2017 2:38 PM > To: amd-gfx@lists.freedesktop.org; Koenig, Christian; Deucher, Alexander > Subject: Re: [PATCH] drm/amdgpu: Handle GPUVM fault storms > > [ping] > > Hi Christian or Alex, > > Do you mind reviewing

Re: [PATCH] drm/amdgpu: Handle GPUVM fault storms

2017-09-26 Thread Felix Kuehling
[ping] Hi Christian or Alex, Do you mind reviewing this change? Thanks,   Felix On 2017-09-21 08:09 PM, Felix Kuehling wrote: > When many wavefronts cause VM faults at the same time, it can > overwhelm the interrupt handler and cause IH ring overflows before > the driver can notify or kill the

Re: [PATCH 0/2] Selectively spread compute rings across pipes

2017-09-26 Thread Felix Kuehling
The series is Acked-by: Felix Kuehling Regards,   Felix On 2017-09-26 12:22 PM, Andres Rodriguez wrote: > This was disabled due to an OCL perf regression as discussed on amd-gfx. > > This series re-enables the feature for ASICs that are not affected, and also > introduces a boot parameter to fo

Re: [PATCH 10/10] drm/amd/powerplay: export new interfaces in amd_pm_funcs

2017-09-26 Thread Alex Deucher
On Mon, Sep 25, 2017 at 9:49 AM, Rex Zhu wrote: > Change-Id: If13500f76da6e42f50d40fc794fc5e1e5dc143bf > Signed-off-by: Rex Zhu Series is: Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/include/amd_shared.h | 38 > +++- > 1 file changed, 33 insertions(+), 5

[PATCH 1/2] drm/amdgpu: use multipipe compute policy on non PL11 asics

2017-09-26 Thread Andres Rodriguez
A performance regression for OpenCL tests on Polaris11 had this feature disabled for all asics. Instead, disable it selectively on the affected asics. Signed-off-by: Andres Rodriguez --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-

[PATCH 2/2] drm/amdgpu: add option for force enable multipipe policy for compute

2017-09-26 Thread Andres Rodriguez
Useful for testing the effects of multipipe compute without recompiling. Signed-off-by: Andres Rodriguez --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6 ++ 3 files changed, 11 insertions(+) dif

[PATCH 0/2] Selectively spread compute rings across pipes

2017-09-26 Thread Andres Rodriguez
This was disabled due to an OCL perf regression as discussed on amd-gfx. This series re-enables the feature for ASICs that are not affected, and also introduces a boot parameter to force the policy on or off. This should help future effort of comparing performance with the feature enabled/disabled

Re: [PATCH 2/2] drm/amdgpu/sriov:fix memory leak in psp_load_fw

2017-09-26 Thread Alex Deucher
On Fri, Sep 22, 2017 at 4:32 AM, Monk Liu wrote: > when doing gpu reset this routine shouldn't do anything > resource allocating otherwise SRIOV gpu reset will cause > memory leak > > Change-Id: I25da3a5b475196c75c7e639adc40751754625968 > Signed-off-by: Monk Liu A couple of comments below. With

Re: [PATCH 1/4] drm/amd/powerplay: Cocci spatch "alloc_cast"

2017-09-26 Thread Alex Deucher
On Thu, Sep 21, 2017 at 2:33 AM, Thomas Meyer wrote: > Remove casting the values returned by memory allocation functions like > kmalloc, kzalloc, kmem_cache_alloc, kmem_cache_zalloc etc." > Found by coccinelle spatch "api/alloc/alloc_cast.cocci" > > Signed-off-by: Thomas Meyer > --- > > diff -u -

Re: [PATCH] dmr/amd/powerplay: Fix typo in ci_populate_fuzzy_fan()

2017-09-26 Thread Alex Deucher
On Tue, Sep 26, 2017 at 11:38 AM, Tom St Denis wrote: > Ping :-) > > Tom > > > On 25/09/17 01:33 PM, Tom St Denis wrote: >> >> Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher >> --- >> drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletio

RE: [PATCH] drm/amd/powerplay: refine code in amd_powerplay.c

2017-09-26 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Rex Zhu > Sent: Tuesday, September 26, 2017 1:24 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH] drm/amd/powerplay: refine code in amd_powerplay.c > > delete flag of

Re: [PATCH] dmr/amd/powerplay: Fix typo in ci_populate_fuzzy_fan()

2017-09-26 Thread Tom St Denis
Ping :-) Tom On 25/09/17 01:33 PM, Tom St Denis wrote: Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/gpu/drm/amd/powerplay/smumgr/c

RE: [PATCH] drm/amdgpu: Add firmware VRAM reservation from vbios

2017-09-26 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Horace Chen > Sent: Tuesday, September 26, 2017 6:12 AM > To: amd-gfx@lists.freedesktop.org > Cc: Chen, Horace > Subject: [PATCH] drm/amdgpu: Add firmware VRAM reservation from vbios > > VBI

RE: [PATCH] drm/amd/powerplay: move set_clockgating_by_smu to pp func table

2017-09-26 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Rex Zhu > Sent: Tuesday, September 26, 2017 1:49 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH] drm/amd/powerplay: move set_clockgating_by_smu to pp > func table > >

RE: [PATCH] drm/amd/powerplay: fix copy error in powerplay

2017-09-26 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Rex Zhu > Sent: Monday, September 25, 2017 10:36 PM > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH] drm/amd/powerplay: fix copy error in powerplay > > cause amdgpu fail

[PATCH] drm/amdgpu: Add firmware VRAM reservation from vbios

2017-09-26 Thread Horace Chen
VBIOS has a structure VRAM_UsageByFirmware to tell the driver that VBIOS need reserve some memory at the specified place on the VRAM. SR-IOV need to enable this feature to exchange data between PF and VF. So add two new method to create and free bo at the exact place. And add a new AMDGPU_GEM_C

[PATCH] drm/amd/powerplay: fixed wrong return vaule on error

2017-09-26 Thread Evan Quan
Change-Id: Ib7d42e49e4b1d1743125fd7f443cf60e486c3af3 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c b/drivers/gpu/drm/amd/powerp