Re: [PATCH 21/21] drm/amdgpu: print the PASID with VM faults on GMC v8

2018-01-10 Thread Chunming Zhou
Except some small nitpicks in patch #3, #4, #5, the series looks ok to me, Reviewed-by: Chunming Zhou Regards, David Zhou On 2018年01月10日 20:54, Christian König wrote: Print that extra information on GMC v8. Signed-off-by: Christian König ---

Re: [PATCH 04/21] drm/amdgpu: always allocate a pasid for each VM

2018-01-10 Thread Chunming Zhou
On 2018年01月10日 20:54, Christian König wrote: Start to always allocate a pasid for each VM. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 43 ++--- 1 file changed, 29 insertions(+), 14 deletions(-) diff

Re: [PATCH 05/21] drm/amdgpu: trace allocated PASIDs

2018-01-10 Thread Chunming Zhou
On 2018年01月10日 20:54, Christian König wrote: Trace all allocated PASIDs. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 12 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 22 ++ 2 files changed, 32

Re: [PATCH v2] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory (v2)

2018-01-10 Thread Zhang, Jerry (Junwei)
On 01/11/2018 10:50 AM, Chunming Zhou wrote: Could I how to verify this is valid fix? For now, check if there is no vm fault or any other side effect when loading amdgpu with ngg=1. Later development will be implemented with OGL team together. Jerry Regards, David Zhou On 2018年01月11日

Re: [PATCH v2] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory (v2)

2018-01-10 Thread Chunming Zhou
Could I how to verify this is valid fix? Regards, David Zhou On 2018年01月11日 10:30, Junwei Zhang wrote: v2: fix register access Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff

Re: [PATCH v2] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory (v2)

2018-01-10 Thread Zhang, Jerry (Junwei)
Please ignore this one, a minor update is coming. Sorry for annoyance. Jerry On 01/11/2018 09:44 AM, Junwei Zhang wrote: v2: fix register access Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++ 1 file changed, 6 insertions(+), 4

[PATCH v2] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory (v2)

2018-01-10 Thread Junwei Zhang
v2: fix register access Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index ae976e3..6db3645

[PATCH v2] drm/amdkfd: Fix potential NULL pointer dereferences

2018-01-10 Thread Gustavo A. R. Silva
In case kfd_get_process_device_data returns null, there are some null pointer dereferences in functions kfd_bind_processes_to_device and kfd_unbind_processes_from_device. Fix this by printing a WARN_ON for PDDs that aren't found and skip them with continue statements. Addresses-Coverity-ID:

Re: [PATCH] drm/amdkfd: Fix potential NULL pointer dereferences

2018-01-10 Thread Gustavo A. R. Silva
Hi Felix, Quoting Felix Kuehling : Hi Gustavo, Thanks for catching that. When returning a fault, I think you also need to srcu_read_unlock(_processes_srcu, idx). However, instead of returning an error, I think I'd prefer to skip PDDs that can't be found with continue

[PATCH v2] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory (v2)

2018-01-10 Thread Junwei Zhang
v2: fix register access Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index ae976e3..c73a476

Re: [PATCH 1/2] drm/amdgpu: add custom power policy support in sysfs

2018-01-10 Thread Zhu, Rex
Yes, this new interface is more common, I just save the input and send to hw backend. Smu7 and Vega can share this interface. Best Regards Rex From: Alex Deucher Sent: Thursday, January 11, 2018 4:18:11 AM To: Zhu, Rex Cc: amd-gfx list

Re: [PATCH] drm/amdgpu: Update MMHUB power gating register settings

2018-01-10 Thread Alex Deucher
On Wed, Jan 10, 2018 at 3:10 PM, Yong Zhao wrote: > The new register settings are needed to fix a tlb invalidation issue > when MMHUB power gating is turned on for Raven. > > Change-Id: I846befbb2fcbddf40ca4ecbdc06da1cd442e3554 > Signed-off-by: Yong Zhao

[PATCH] drm/amdgpu: Update MMHUB power gating register settings

2018-01-10 Thread Yong Zhao
The new register settings are needed to fix a tlb invalidation issue when MMHUB power gating is turned on for Raven. Change-Id: I846befbb2fcbddf40ca4ecbdc06da1cd442e3554 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 61

Re: BUG: KASAN: use-after-free in amdgpu_job_free_cb

2018-01-10 Thread Andrey Grodzovsky
On 01/09/2018 09:44 AM, Johannes Hirte wrote: On 2018 Jan 03, Johannes Hirte wrote: On 2018 Jan 03, Johannes Hirte wrote: This should be fixed already with https://lists.freedesktop.org/archives/amd-gfx/2017-October/014932.html but's still missing upstream. With this patch, the

Re: [pull] amdgpu, radeon, ttm drm-next-4.16

2018-01-10 Thread Felix Kuehling
FWIW, Christian's "simplify huge page handling" broke CPU page table updates for KFD on large-BAR Vega10. It doesn't matter for Dave because KFD support on dGPUs isn't upstream yet. Regards,   Felix On 2018-01-10 04:18 PM, Alex Deucher wrote: > Hi Dave, > > A few fixes for 4.16: > - Cleanup the

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

2018-01-10 Thread Alex Deucher
Hi Dave, A few fixes for 4.16: - Cleanup the the remains of ttm io_mem_pfn - A couple dpm quirks for SI - Add Chunming as another amdgpu maintainer - A few more huge page fixes - A few other misc fixes The following changes since commit fb8baefc7b2d7b93ad96abacbe63fa99e3d213d6: drm/amdgpu:

Re: [PATCH 1/2] drm/amdgpu: add custom power policy support in sysfs

2018-01-10 Thread Alex Deucher
On Wed, Jan 10, 2018 at 6:01 AM, Rex Zhu wrote: > when cat pp_power_profile_mode on Vega10 > NUMMODE_NAME BUSY_SET_POINT FPS USE_RLC_BUSY MIN_ACTIVE_LEVEL > 0 3D_FULL_SCREEN : 70 60 1 3 > 1 POWER_SAVING : 90 60

Re: [PATCH] drm/amdkfd: Fix potential NULL pointer dereferences

2018-01-10 Thread Felix Kuehling
Hi Gustavo, Thanks for catching that. When returning a fault, I think you also need to srcu_read_unlock(_processes_srcu, idx). However, instead of returning an error, I think I'd prefer to skip PDDs that can't be found with continue statements. That way others would still suspend and resume

[PATCH] drm/amdkfd: Fix potential NULL pointer dereferences

2018-01-10 Thread Gustavo A. R. Silva
In case kfd_get_process_device_data returns null, there are some null pointer dereferences in functions kfd_bind_processes_to_device and kfd_unbind_processes_from_device. Fix this by null checking pdd before dereferencing it. Addresses-Coverity-ID: 1463794 ("Dereference null return value")

Re: [PATCH] drm/amdgpu: fix 64bit BAR detection

2018-01-10 Thread Alex Deucher
On Mon, Jan 8, 2018 at 8:51 AM, Christian König wrote: > Windows added by the BIOS are not marked as 64bit because they are > usually not changeable anyway. > > This fixes large BAR support on my new Ryzen build system. > > Signed-off-by: Christian König

Re: [PATCH] drm/amdkfd: use add ull suffix to 64bit defines

2018-01-10 Thread Felix Kuehling
Reviewed-by: Felix Kuehling On 2018-01-10 06:01 AM, Oded Gabbay wrote: > Signed-off-by: Oded Gabbay > --- > drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git

RE: [PATCH 2/3] drm: export gem dmabuf_ops for drivers to reuse

2018-01-10 Thread Li, Samuel
OK. I'll do it. Samuel Li > -Original Message- > From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel > Vetter > Sent: Wednesday, January 10, 2018 3:17 AM > To: Alex Deucher > Cc: Deucher, Alexander ; Li, Samuel >

Re: AMD DC test results

2018-01-10 Thread Carlo Caione
On Thu, Dec 21, 2017 at 1:45 PM, Daniel Drake wrote: > Hi, Hi again, in Endless we are still actively working with DC on several laptops, so I just wanted to give you a quick update regarding the regressions indicated in Daniel's email. > 1. System hangs on S3 resume. > Bug

Re: [PATCH] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory

2018-01-10 Thread Wang, Ken
Reviewed-by: Ken Wang From: Junwei Zhang Sent: Wednesday, January 10, 2018 4:18:30 PM To: amd-gfx@lists.freedesktop.org Cc: Wang, Ken; Zhang, Jerry Subject: [PATCH] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved

[PATCH 13/21] drm/amdgpu: add PASID mapping for GFX v8

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c

[PATCH 09/21] drm/amdgpu: add PASID mapping for SDMA v2.4

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c

[PATCH 12/21] drm/amdgpu: add PASID mapping for GFX v7

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c

[PATCH 08/21] drm/amdgpu: add PASID mapping for CIK SDMA

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c

[PATCH 11/21] drm/amdgpu: add PASID mapping for SDMA v4

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c

[PATCH 15/21] drm/amdgpu: add PASID mapping for UVD v6

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c

[PATCH 18/21] drm/amdgpu: add PASID mapping for VCN v1

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c

[PATCH 07/21] drm/amdgpu: forward pasid to backend flush implementations

2018-01-10 Thread Christian König
rd the pasid from the VM code to the emit_vm_flush function and update all implementations with the new parameter. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 2 ++

[PATCH 10/21] drm/amdgpu: add PASID mapping for SDMA v3

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c

[PATCH 02/21] drm/amdgpu: fix amdgpu_vm_pasid_fault_credit

2018-01-10 Thread Christian König
As soon as the lock is dropped the VM pointer can be invalid. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

[PATCH 16/21] drm/amdgpu: add PASID mapping for UVD v7

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c

[PATCH 19/21] drm/amdgpu: rename pas_id to pasid

2018-01-10 Thread Christian König
sed -i "s/pas_id/pasid/g" drivers/gpu/drm/amd/amdgpu/*.c sed -i "s/pas_id/pasid/g" drivers/gpu/drm/amd/amdgpu/*.h Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 8

[PATCH 20/21] drm/amdgpu: print the PASID with VM faults on GMC v7

2018-01-10 Thread Christian König
Print that extra information on GMC v7. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c

[PATCH 14/21] drm/amdgpu: add PASID mapping for GFX v9

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

[PATCH 06/21] drm/amdgpu: trace the PASID instead of the VM pointer

2018-01-10 Thread Christian König
Makes more sense than tracing the kernel pointer. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h

[PATCH 01/21] dma-buf: make returning the exclusive fence optional

2018-01-10 Thread Christian König
Change reservation_object_get_fences_rcu to make the exclusive fence pointer optional. If not specified the exclusive fence is put into the fence array as well. This is helpful for a couple of cases where we need all fences in a single array. Signed-off-by: Christian König

[PATCH 17/21] drm/amdgpu: add PASID mapping for VCE v4

2018-01-10 Thread Christian König
This way we can see the PASID in VM faults. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

[PATCH 04/21] drm/amdgpu: always allocate a pasid for each VM

2018-01-10 Thread Christian König
Start to always allocate a pasid for each VM. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 43 ++--- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

[PATCH 05/21] drm/amdgpu: trace allocated PASIDs

2018-01-10 Thread Christian König
Trace all allocated PASIDs. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 12 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 22 ++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 2/2] drm/amd/pp: Add custom power profile mode support on Vega10

2018-01-10 Thread Grazvydas Ignotas
On Wed, Jan 10, 2018 at 1:01 PM, Rex Zhu wrote: > Change-Id: I0a554cb6a7a56db63a8fc5af60d5c63f65e021d1 > Signed-off-by: Rex Zhu > --- > drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 39 +++ > drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c |

[PATCH 1/2] drm/amdgpu: add custom power policy support in sysfs

2018-01-10 Thread Rex Zhu
when cat pp_power_profile_mode on Vega10 NUMMODE_NAME BUSY_SET_POINT FPS USE_RLC_BUSY MIN_ACTIVE_LEVEL 0 3D_FULL_SCREEN : 70 60 1 3 1 POWER_SAVING : 90 60 0 0 2 VIDEO*: 70 60 0

[PATCH 2/2] drm/amd/pp: Add custom power profile mode support on Vega10

2018-01-10 Thread Rex Zhu
Change-Id: I0a554cb6a7a56db63a8fc5af60d5c63f65e021d1 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 39 +++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 78 ++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h

[PATCH] drm/amdkfd: use add ull suffix to 64bit defines

2018-01-10 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index 6a48d29ada47..0bedcf9cc08c 100644 ---

Re: [PATCH 2/2] drm/amdkfd: avoid calling execute_queues_cpsch() when destroying an unactive queue

2018-01-10 Thread Oded Gabbay
On Tue, Jan 2, 2018 at 8:10 PM, Yong Zhao wrote: > Signed-off-by: Yong Zhao > Reviewed-by: Oak Zeng > --- > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff

Re: [PATCH] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory

2018-01-10 Thread Zhang, Jerry (Junwei)
On 01/10/2018 04:57 PM, Christian König wrote: Am 10.01.2018 um 09:18 schrieb Junwei Zhang: Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

Re: [PATCH] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory

2018-01-10 Thread Christian König
Am 10.01.2018 um 09:18 schrieb Junwei Zhang: Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

[PATCH] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory

2018-01-10 Thread Junwei Zhang
Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index ae976e3..5f2ae77 100644 ---

Re: [PATCH 2/3] drm: export gem dmabuf_ops for drivers to reuse

2018-01-10 Thread Daniel Vetter
On Tue, Jan 09, 2018 at 01:13:08PM -0500, Alex Deucher wrote: > On Tue, Jan 9, 2018 at 10:56 AM, Deucher, Alexander > wrote: > > I'll can push this and a few other misc patches today. > > > > Pushed to drm-misc-next. One thing I just noticed: Some kerneldoc for the