[PATCH 1/1] drm/amdgpu: only set dma_buf ops when it is valid

2018-01-12 Thread Samuel Li
Change-Id: I37daecbf695da13eaeea1d362c270b92a894393a --- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c index a14234b..8afec21 100644 ---

[PATCH 1/2] drm/ttm: Allow page allocations w/o triggering OOM..

2018-01-12 Thread Andrey Grodzovsky
This to allow drivers to choose to avoid OOM invocation and handle page allocation failures instead. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/ttm/ttm_bo.c | 3 +++ drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 ++

[PATCH] drm/amdgpu: Use seq_putc() in two functions

2018-01-12 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 12 Jan 2018 22:08:50 +0100 A few single characters should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

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

2018-01-12 Thread Andrey Grodzovsky
Yea, I know , just dumped diff of one file into it, please search in code for "ret = do_aquire_global_lock(dev, state);" it appears only in one place in entire code base, and manually apply the one line change. Thanks, Andrey On 01/12/2018 04:47 PM, Johannes Hirte wrote: On 2018 Jan 12,

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

2018-01-12 Thread Johannes Hirte
On 2018 Jan 12, Andrey Grodzovsky wrote: > Hi, looks to me  like a different issue (not related) then the one  > Johannes, reports, your issue was already reported by some one (can't > remember the thread of hand) and looks like in shader hang or GPU > scheduler synchronization issue while 

Re: [PATCH] drm/amdgpu: only allow scatter/gather display with DC

2018-01-12 Thread Deucher, Alexander
I think you are getting lucky with the pageflip buffers always ending up in vram. Also, the legacy dce code (e.g., dce_v11_0.c) always pins in vram for modesets. Alex From: Li, Samuel Sent: Friday, January 12, 2018 4:35 PM To: Koenig, Christian; Alex

RE: [PATCH] drm/amdgpu: only allow scatter/gather display with DC

2018-01-12 Thread Li, Samuel
Somehow my test case seems working although DC not enabled? Regards, Samuel Li > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Christian König > Sent: Friday, January 12, 2018 4:03 PM > To: Alex Deucher ; amd- >

Re: [PATCH] drm/amdgpu: only allow scatter/gather display with DC

2018-01-12 Thread Christian König
Am 12.01.2018 um 20:58 schrieb Alex Deucher: Check if DC is enabled before allowing scanout buffers to be pinned in system memory. Signed-off-by: Alex Deucher Reviewed-by: Christian König ---

[PATCH] drm/amdgpu: only allow scatter/gather display with DC

2018-01-12 Thread Alex Deucher
Check if DC is enabled before allowing scanout buffers to be pinned in system memory. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

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

2018-01-12 Thread Andrey Grodzovsky
Hi, looks to me  like a different issue (not related) then the one  Johannes, reports, your issue was already reported by some one (can't remember the thread of hand) and looks like in shader hang or GPU scheduler synchronization issue while  Johannes's use after free is pure software logic

[PATCH 11/20] drm/amdgpu: add PASID mapping for GFX v7

2018-01-12 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/20] drm/amdgpu: add PASID mapping for SDMA v2.4

2018-01-12 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 09/20] drm/amdgpu: add PASID mapping for SDMA v3

2018-01-12 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 01/20] dma-buf: make returning the exclusive fence optional

2018-01-12 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 06/20] drm/amdgpu: forward pasid to backend flush implementations

2018-01-12 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 ++

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

2018-01-12 Thread Johannes Hirte
On 2018 Jan 11, Andrey Grodzovsky wrote: > Thanks for the dmesg, unfortunately nothing suspicious from there. > > Looking again at KASAN it hints at a race between cursor update and non > blocking part of flip with regard to accessing CRTC states, maybe cursor > update is not properly

[PATCH 16/20] drm/amdgpu: add PASID mapping for VCE v4

2018-01-12 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 15/20] drm/amdgpu: add PASID mapping for UVD v7

2018-01-12 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 13/20] drm/amdgpu: add PASID mapping for GFX v9

2018-01-12 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 20/20] drm/amdgpu: print the PASID with VM faults on GMC v8

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

[PATCH 02/20] drm/amdgpu: add amdgpu_pasid_free_delayed v2

2018-01-12 Thread Christian König
Free up a pasid after all fences signaled. v2: also handle the case when we can't allocate a fence array. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 82 + drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h | 2 +

[PATCH 03/20] drm/amdgpu: always allocate a PASIDs for each VM v2

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

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

2018-01-12 Thread Christian König
I fixed the fence issue in patch #3. Raised the dev_info to a dev_warn in patch #4 and moved the trace into the functions in #5. Any objects or can I get your rb for the whole series? Thanks, Christian. Am 11.01.2018 um 06:50 schrieb Chunming Zhou: Except some small nitpicks in patch #3, #4,

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

2018-01-12 Thread Luís Mendes
Hi Andrey, Johannes, Sorry for getting into this conversation, but I think I might have something related to this. I am getting GPU hangs playing some videos, both on ARMv7 and on x86, although with slightly different blocking paths. On ARMv7 it always blocks with amdgpu_dm_do_flip. I suspect the

[PATCH 07/20] drm/amdgpu: add PASID mapping for CIK SDMA

2018-01-12 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 04/20] drm/amdgpu: trace allocated PASIDs

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

[PATCH 17/20] drm/amdgpu: add PASID mapping for VCN v1

2018-01-12 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

Re: [PATCH libdrm 2/2] libdrm: clean up non list code path for vamgr

2018-01-12 Thread Christian König
Am 12.01.2018 um 06:45 schrieb Chunming Zhou: Change-Id: I7ca19a1f6404356a6c69ab4af27c8e13454f0279 Signed-off-by: Chunming Zhou --- amdgpu/amdgpu_internal.h | 2 - amdgpu/amdgpu_vamgr.c| 152 ++- 2 files changed, 46

[PATCH 12/20] drm/amdgpu: add PASID mapping for GFX v8

2018-01-12 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 10/20] drm/amdgpu: add PASID mapping for SDMA v4

2018-01-12 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

Re: [PATCH libdrm 2/2] libdrm: clean up non list code path for vamgr

2018-01-12 Thread Chunming Zhou
On 2018年01月12日 16:04, Christian König wrote: Am 12.01.2018 um 06:45 schrieb Chunming Zhou: Change-Id: I7ca19a1f6404356a6c69ab4af27c8e13454f0279 Signed-off-by: Chunming Zhou ---   amdgpu/amdgpu_internal.h |   2 -   amdgpu/amdgpu_vamgr.c    | 152

[PATCH 14/20] drm/amdgpu: add PASID mapping for UVD v6

2018-01-12 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 05/20] drm/amdgpu: trace the PASID instead of the VM pointer

2018-01-12 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 19/20] drm/amdgpu: print the PASID with VM faults on GMC v7

2018-01-12 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