Re: [PATCH 5/5] drm/amdgpu: replace iova debugfs file with iomem

2018-02-09 Thread Tom St Denis
On 09/02/18 08:56 AM, Christian König wrote: Am 09.02.2018 um 14:32 schrieb Tom St Denis: On 02/02/18 02:09 PM, Christian König wrote: [SNIP] +    if (p->mapping != adev->mman.bdev.dev_mapping) +    return -EPERM; This comparison fails for both IOMMU and non-IOMMU devices

Re: [PATCH 5/5] drm/amdgpu: replace iova debugfs file with iomem

2018-02-09 Thread Tom St Denis
On 02/02/18 02:09 PM, Christian König wrote: This allows access to pages allocated through the driver with optional IOMMU mapping. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 57 - 1 file changed, 35 insertions(+), 22 deletions

[PATCH] drm/amd/powerplay: Zero out power data in AMDGPU_PP_SENSOR_GPU_POWER readout

2018-02-06 Thread Tom St Denis
Since 12 of the 16 bytes are not initialized with anything let's ensure they're sensibly zeroed out otherwise debugfs callers will read back garbage (because they assume debugfs wrote sensible data back...) Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_h

[PATCH umr] use correct MM hub for SDMA IB packets

2018-02-05 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/ring_decode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/ring_decode.c b/src/lib/ring_decode.c index f87d43e077a2..b18948d26b5f 100644 --- a/src/lib/ring_decode.c +++ b/src/lib/ring_decode.c @@ -1331,6 +1331,8 @@ static void

Re: [PATCH 5/5] drm/amdgpu: replace iova debugfs file with iomem

2018-02-05 Thread Tom St Denis
x27;m more concerned about is if setting page->mapping during allocation of the page could have any negative effect? I of hand don't see any since the page isn't reclaimable directly anyway, but I'm not 100% sure of that. Christian. Am 05.02.2018 um 12:49 schrieb Tom St De

Re: [PATCH 5/5] drm/amdgpu: replace iova debugfs file with iomem

2018-02-05 Thread Tom St Denis
Another thing that occurred to me is this will break write access to GPU bound memory. Previously we relied on iova to translate the address and then /dev/mem or /dev/fmem to read/write it. But since this is literally a read only method obviously there's no write support. Tom On 04/02/18 0

Re: [PATCH] drm/amd/pp: fix mclk fixed in high when no display connected

2018-02-03 Thread Tom St Denis
Hi Alex, This also seems to work on my setup. Cheers, Tom On 02/02/18 10:23 AM, Alex Deucher wrote: On Thu, Feb 1, 2018 at 11:52 PM, Rex Zhu wrote: Change-Id: I2d7663e164ff8eeafe0a4fed99e106b1d130a285 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 +++---

Re: MCLK defaults high on second card

2018-02-02 Thread Tom St Denis
h?  If not, does attaching a display help? Stealing the display from my primary (CZ in this case) does help, and then putting it back the MCLK remains low. Tom Alex - --- *From:* amd-gfx on behalf of Tom St Denis *Sent:

Re: MCLK defaults high on second card

2018-02-01 Thread Tom St Denis
help, and then putting it back the MCLK remains low. Tom Alex *From:* amd-gfx on behalf of Tom St Denis *Sent:* Thursday, February 1, 2018 1:14:43 PM *To:* amd-gfx mailing list *Cc:* Zhu, Rex *Subject:* MCLK defaul

Re: MCLK defaults high on second card

2018-02-01 Thread Tom St Denis
Alex *From:* amd-gfx on behalf of Tom St Denis *Sent:* Thursday, February 1, 2018 1:14:43 PM *To:* amd-gfx mailing list *Cc:* Zhu, Rex *Subject:* MCLK defaults high on second card Hi, I have a setup with a CZ + Polaris10

MCLK defaults high on second card

2018-02-01 Thread Tom St Denis
Hi, I have a setup with a CZ + Polaris10 and on the Polaris10 the SCLK idles low and the MCLK stays in the 2nd state (1750MHz) but on my Workstation which has a single 560 in it the card idles at 300MHz (with the stock FC27 kernel). Is there an issue with non-primary cards idling properly?

[PATCH umr] add support for sub-opcode 1 for POLL_REGMEM in the SDMA ring decoder

2018-01-31 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/ring_decode.c | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/lib/ring_decode.c b/src/lib/ring_decode.c index cc23b6299d33..75247aa198d8 100644 --- a/src/lib/ring_decode.c +++ b/src/lib

Re: [PATCH] drm/amdgpu: fix DW estimation on VI

2018-01-30 Thread Tom St Denis
Tested-by: Tom St Denis Works for my configurations. Thanks! Tom On 30/01/18 10:03 AM, Christian König wrote: Forgot to update that during recent changes. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4

Re: kasan report while running piglit

2018-01-30 Thread Tom St Denis
On 22/01/18 01:19 PM, Tom St Denis wrote: On 22/01/18 09:03 AM, Tom St Denis wrote: I've rolled back quite a ways from the tip of drm-next (to 196f74897ba79f6d586894519f09796447d95be5) which is ~1700 commits back from the tip and still get the attached KASAN report every time. I'

Re: error messages from running uvd on polaris10

2018-01-30 Thread Tom St Denis
On 29/01/18 01:53 PM, Tom St Denis wrote: On 29/01/18 01:50 PM, Christian König wrote: Hi Tom, well that is an interesting one. Looks like we use more dw on the UVD ring when prime is enabled. Going to take a look tomorrow, Christian Hi Christian, In this case prime=1 means polaris10

Re: error messages from running uvd on polaris10

2018-01-29 Thread Tom St Denis
my setup) which is physical I think. Tom Am 29.01.2018 um 19:45 schrieb Tom St Denis: Hi all, Getting these: [  537.515830] [drm:uvd_v6_0_ring_emit_fence [amdgpu]] *ERROR* amdgpu: writing more dwords to the ring than expected! [  537.516057] [drm:uvd_v6_0_ring_emit_fence [amdgpu]] *ERROR

error messages from running uvd on polaris10

2018-01-29 Thread Tom St Denis
Hi all, Getting these: [ 537.515830] [drm:uvd_v6_0_ring_emit_fence [amdgpu]] *ERROR* amdgpu: writing more dwords to the ring than expected! [ 537.516057] [drm:uvd_v6_0_ring_emit_fence [amdgpu]] *ERROR* amdgpu: writing more dwords to the ring than expected! [ 537.516267] [drm:uvd_v6_0_ring_e

[PATCH] drm/ttm: Fix 'buf' pointer update in ttm_bo_vm_access_kmap() (v2)

2018-01-29 Thread Tom St Denis
The buf pointer was not being incremented inside the loop meaning the same block of data would be read or written repeatedly. Fixes: 09ac4fcb3f25 ("drm/ttm: Implement vm_operations_struct.access v2") Signed-off-by: Tom St Denis Reviewed-by: Christian König (v2) Change 'buf'

[PATCH 08/12] drm/ttm: Remove unncessary retval from ttm_bo_vm_fault()

2018-01-29 Thread Tom St Denis
The dual ret/retval was more complex than need be. Now we drop the retval variable and assign the appropriate VM codes to ret instead. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 28 +--- 1 file changed, 13 insertions

[PATCH 06/12] drm/ttm: Simplify ttm_dma_find_pool() (v2)

2018-01-29 Thread Tom St Denis
Flip the logic of the comparison and remove the redudant variable for the pool address. Signed-off-by: Tom St Denis Reviewed-by: Christian König (v2): Remove {} bracing. --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff

[PATCH 09/12] drm/ttm: Simplify ttm_eu_reserve_buffers()

2018-01-29 Thread Tom St Denis
Hoist the comparison of the ret to -EDEADLK above the two code paths to simplify the function. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_execbuf_util.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 11/12] drm/ttm: Fix coding style in ttm_dma_pool_alloc_new_pages()

2018-01-29 Thread Tom St Denis
Add missing {} braces. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index

[PATCH 12/12] drm/ttm: Simplify ttm_dma_page_put()

2018-01-29 Thread Tom St Denis
Remove redundant store of return code. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm

[PATCH 07/12] drm/ttm: Fix coding style in ttm_bo_move_memcpy()

2018-01-29 Thread Tom St Denis
Add missing {} braces. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 153de1bf0232..33ffe286f3a5

[PATCH 10/12] drm/ttm: Fix coding style in ttm_tt_swapout()

2018-01-29 Thread Tom St Denis
Add missing {} braces. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_tt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index e90d3ed6283f..95a77dab8cc9 100644 --- a

[PATCH 02/12] drm/ttm: Fix coding style in ttm_bo.c

2018-01-29 Thread Tom St Denis
Correct indentation and {} brace style. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index d33a6bb742a1

[PATCH 05/12] drm/ttm: Fix coding style in ttm_pool_store()

2018-01-29 Thread Tom St Denis
Correct missing {} style. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index

[PATCH 03/12] drm/ttm: Add a default BO destructor to simplify code (v2)

2018-01-29 Thread Tom St Denis
Signed-off-by: Tom St Denis Reviewed-by: Christian König (v2): Remove stray ; noticed by Felix --- drivers/gpu/drm/ttm/ttm_bo.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 8cf89da7030d

[PATCH 04/12] drm/ttm: Change ttm_tt page allocations to return errors

2018-01-29 Thread Tom St Denis
Explicitly return errors in ttm_tt_alloc_page_directory() and ttm_dma_tt_alloc_page_directory() instead of relying on further logic to detect errors. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_tt.c | 16 ++-- 1 file changed, 10 insertions

Various TTM cleanups (v2)

2018-01-29 Thread Tom St Denis
Various TTM cleanups (mostly no functional changes). Notably patch #1 fixes a bug in the access_kmap() function. The rest are either coding style fixes or simplifications. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedeskto

[PATCH 01/12] drm/ttm: Fix 'buf' pointer update in ttm_bo_vm_access_kmap() (v2)

2018-01-29 Thread Tom St Denis
The buf pointer was not being incremented inside the loop meaning the same block of data would be read or written repeatedly. Signed-off-by: Tom St Denis Reviewed-by: Christian König (v2) Change 'buf' pointer to uint8_t* type --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 3 ++- 1 file

Re: Various TTM cleanups/fixes

2018-01-26 Thread Tom St Denis
anyone else has issues. I agree that #10 is a bit tricky because retval had a default value which hopefully I captured with the assignment towards the end of the function. It just seemed kinda awkward to have ret and retval :-) Thanks, Tom Regards, Christian. Am 26.01.2018 um 19:28

[PATCH 08/12] drm/ttm: Fix indentation in ttm_dma_pool_alloc_new_pages()

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index 579c4aedc17e..aa1ec35dc187 100644 --- a/drivers/gpu/drm/ttm

[PATCH 11/12] drm/ttm: Fix 'buf' pointer update in ttm_bo_vm_access_kmap()

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 07b22f04b969..6311f8a481ea 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm

[PATCH 12/12] drm/ttm: Simplify ttm_eu_reserve_buffers()

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_execbuf_util.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c index 373ced0b2fc2..fa44f7b15285 100644 --- a/drivers/gpu/drm

[PATCH 02/12] drm/ttm: Add a default BO destructor to simplify code

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_bo.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 8cf89da7030d..4e85c32fea26 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu

[PATCH 01/12] drm/ttm: Clean up indentation in ttm_bo.c

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_bo.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index d33a6bb742a1..8cf89da7030d 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm

[PATCH 09/12] drm/ttm: Fix indentation in ttm_bo_move_memcpy()

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_bo_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 153de1bf0232..33ffe286f3a5 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b

[PATCH 03/12] drm/ttm: Change ttm_tt page allocations to return errors

2018-01-26 Thread Tom St Denis
Explicitly return errors in ttm_tt_alloc_page_directory() and ttm_dma_tt_alloc_page_directory() instead of relying on further logic to detect errors. Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_tt.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git

[PATCH 07/12] drm/ttm: Simplify ttm_dma_find_pool()

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index 962838cfb1a3..579c4aedc17e 100644 --- a/drivers/gpu

[PATCH 04/12] drm/ttm: Fix indentation in ttm_tt_swapout()

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_tt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index e90d3ed6283f..95a77dab8cc9 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm

[PATCH 10/12] drm/ttm: Remove unncessary retval from ttm_bo_vm_fault()

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 08a3c324242e..07b22f04b969 100644 --- a/drivers/gpu/drm/ttm

[PATCH 05/12] drm/ttm: Fix indentation in ttm_pool_store()

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index 9e90d0ebc773..647eb5f40ab9 100644 --- a/drivers/gpu/drm

[PATCH 06/12] drm/ttm: Simplify ttm_dma_page_put()

2018-01-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index 647eb5f40ab9..962838cfb1a3 100644 --- a/drivers/gpu/drm/ttm

Various TTM cleanups/fixes

2018-01-26 Thread Tom St Denis
This series includes mostly no-functional-changes to simplify or cleanup various routines. Patch #11 includes an fix to functional behaviour. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: 'buf' pointer in ttm_bo_vm_access_kmap()

2018-01-26 Thread Tom St Denis
On 26/01/18 09:38 AM, Christian König wrote: Am 26.01.2018 um 15:31 schrieb Tom St Denis: Hi all, In the function ttm_bo_vm_access_kmap() it doesn't seem to me like the 'buf' pointer is incremented.  That seems like a bug no? Yeah, looks suspicious to me as well. But TTM ques

'buf' pointer in ttm_bo_vm_access_kmap()

2018-01-26 Thread Tom St Denis
Hi all, In the function ttm_bo_vm_access_kmap() it doesn't seem to me like the 'buf' pointer is incremented. That seems like a bug no? Cheers, Tom ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/

Re: lock/unlock mismatch in ttm_bo.c

2018-01-24 Thread Tom St Denis
ail lists. In addition, when I review your patches, I found a bug as the attached, you can send it together with yours if you think that's a right fix. Regards, David Zhou On 2018年01月24日 03:25, Tom St Denis wrote: On 22/01/18 01:42 AM, Chunming Zhou wrote: On 2018年01月20日 02:23, Tom St

Re: lock/unlock mismatch in ttm_bo.c

2018-01-23 Thread Tom St Denis
On 22/01/18 01:42 AM, Chunming Zhou wrote: On 2018年01月20日 02:23, Tom St Denis wrote: On 19/01/18 01:14 PM, Tom St Denis wrote: Hi all, In the function ttm_bo_cleanup_refs() it seems possible to get to line 551 without entering the block on 516 which means you'll be unlocking a mutex

Re: [PATCH] Fix pde_copy/pde_array initialisation

2018-01-23 Thread Tom St Denis
Thanks, I RB'ed and pushed it out. On 23/01/18 08:55 AM, Christian König wrote: All zero is a perfectly valid value for a PDE. Signed-off-by: Christian König --- src/lib/read_vram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/read_vram.c b/src/lib/read_vr

Re: kasan report while running piglit

2018-01-22 Thread Tom St Denis
On 22/01/18 09:03 AM, Tom St Denis wrote: I've rolled back quite a ways from the tip of drm-next (to 196f74897ba79f6d586894519f09796447d95be5) which is ~1700 commits back from the tip and still get the attached KASAN report every time. I'm running piglit with DRI_PRIME=1 with th

kasan report while running piglit

2018-01-22 Thread Tom St Denis
I've rolled back quite a ways from the tip of drm-next (to 196f74897ba79f6d586894519f09796447d95be5) which is ~1700 commits back from the tip and still get the attached KASAN report every time. I'm running piglit with DRI_PRIME=1 with the max size memory tests disabled. Tom [0.00] Linu

[PATCH umr] Continue reading PDB if V=0 if in vm-decode mode

2018-01-22 Thread Tom St Denis
This will skip to the next page boundary (assumes page=4K right now) if in --vm-decode mode. Signed-off-by: Tom St Denis Reported-by: Christian König --- src/lib/read_vram.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/lib/read_vram.c b/src

[PATCH umr] Continue decoding a PDB when using --vm-decode

2018-01-22 Thread Tom St Denis
Previously if a PTE was hit with V=0 the decoder would stop. Now it continues but only if you're doing a --vm-decode. Signed-off-by: Tom St Denis Reported-by: Christian König --- src/lib/read_vram.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/read_v

Re: lock/unlock mismatch in ttm_bo.c

2018-01-22 Thread Tom St Denis
On 22/01/18 01:42 AM, Chunming Zhou wrote: On 2018年01月20日 02:23, Tom St Denis wrote: On 19/01/18 01:14 PM, Tom St Denis wrote: Hi all, In the function ttm_bo_cleanup_refs() it seems possible to get to line 551 without entering the block on 516 which means you'll be unlocking a mutex

Re: lock/unlock mismatch in ttm_bo.c

2018-01-19 Thread Tom St Denis
On 19/01/18 01:14 PM, Tom St Denis wrote: Hi all, In the function ttm_bo_cleanup_refs() it seems possible to get to line 551 without entering the block on 516 which means you'll be unlocking a mutex that wasn't locked. Now it might be that in the course of the API this pattern

lock/unlock mismatch in ttm_bo.c

2018-01-19 Thread Tom St Denis
Hi all, In the function ttm_bo_cleanup_refs() it seems possible to get to line 551 without entering the block on 516 which means you'll be unlocking a mutex that wasn't locked. Now it might be that in the course of the API this pattern cannot be expressed but it's not clear from the function

[PATCH umr] Fix --force command for named and DID specified commands

2018-01-16 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/app/main.c | 2 +- src/lib/discover.c | 2 +- src/lib/discover_by_did.c | 37 - src/lib/discover_by_name.c | 8 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/src/app/main.c

[PATCH umr] change printout of PDE/BASE names for AI platforms to match hardware documentation

2018-01-05 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/read_vram.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c index 80f8e056258f..51ca02ef289a 100644 --- a/src/lib/read_vram.c +++ b/src/lib/read_vram.c @@ -472,8 +472,7 @@ static int

suspend regression on carrizo

2018-01-04 Thread Tom St Denis
Hi all, This commit: [root@carrizo linux]# git bisect good a08268f89a805b1aaccaeb899673dbe975c10d95 is the first bad commit commit a08268f89a805b1aaccaeb899673dbe975c10d95 Author: Alex Deucher Date: Tue Dec 12 15:20:22 2017 -0500 drm/amdgpu: drop scratch regs save and restore from S3

Re: [PATCH 02/30] drm/amd/display: Remove dead enable_plane function definition and call

2017-12-13 Thread Tom St Denis
Would this fix the regression I found on Carrizo after the drm-next rebase? Tom On December 13, 2017 5:34:34 PM EST, Harry Wentland wrote: >Signed-off-by: Harry Wentland >Reviewed-by: Jordan Lazare >Reviewed-by: Tony Cheng >Acked-by: Harry Wentland >--- > drivers/gpu/drm/amd/display/dc/dc

Re: [PATCH 02/30] drm/amd/display: Remove dead enable_plane function definition and call

2017-12-13 Thread Tom St Denis
Would this fix the regression I found on Carrizo after the drm-next rebase? Tom On December 13, 2017 5:34:34 PM EST, Harry Wentland wrote: >Signed-off-by: Harry Wentland >Reviewed-by: Jordan Lazare >Reviewed-by: Tony Cheng >Acked-by: Harry Wentland >--- > drivers/gpu/drm/amd/display/dc/dc

[PATCH umr] fix specifying device by ASIC name

2017-12-08 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/discover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/discover.c b/src/lib/discover.c index e1ccea1d20e4..94d1c676718a 100644 --- a/src/lib/discover.c +++ b/src/lib/discover.c @@ -152,7 +152,7 @@ struct umr_asic

[PATCH umr] Add initial SDMA ring decoding support

2017-12-05 Thread Tom St Denis
Tested on a Polaris10 running testdma with mesa. Based on packet descriptions found in tonga_sdma_pkt_open.h found in the kernel tree. Like the other ring decoder also supports: follow_ib, bits, and use_colour. Signed-off-by: Tom St Denis --- src/app/ring_read.c | 5 + src/lib/dump_ib.c

[PATCH umr] Allow specifying virtual devices now

2017-12-04 Thread Tom St Denis
mbined with NPI scripts as well, e.g. umr -f .@/home/user/device.npi -lb Signed-off-by: Tom St Denis --- doc/umr.1 | 5 - src/lib/discover.c | 8 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/umr.1 b/doc/umr.1 index eb1b88bea8d0..eac77798d758 100644 --- a/

[PATCH umr] fix typo in print_bits() for ring/ib decoding

2017-11-30 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/ring_decode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/ring_decode.c b/src/lib/ring_decode.c index dee1502cc788..c904df0e281c 100644 --- a/src/lib/ring_decode.c +++ b/src/lib/ring_decode.c @@ -395,7 +395,7 @@ static

[PATCH] drm/amd/amdgpu: Fix amdgpu_debugfs_gpr_read()

2017-11-29 Thread Tom St Denis
The callback functions always write to the start of the array. The 'offset' parameter instructs the callbacks the offset into the registers to start reading from. So we always copy from the temporary buffer starting at offset 0. Signed-off-by: Tom St Denis --- drivers/gpu/drm/

[PATCH umr] Add more detail and colour to the ring decoder

2017-11-28 Thread Tom St Denis
Now you can use '-O use_colour' to spruce up the ring/ib decoder. You can previously use '-O bits' to decode register writes which has also been cleaned up. Assumes a wide display which for a graphics company is probably safe to assume you're not on an 80x25 MDA displa

Re: [bug report] drm/amd/amdgpu: Add debugfs support for reading GPRs (v2)

2017-11-28 Thread Tom St Denis
On 28/11/17 09:29 AM, Dan Carpenter wrote: Hello Tom St Denis, The patch c5a60ce81b49: "drm/amd/amdgpu: Add debugfs support for reading GPRs (v2)" from Dec 5, 2016, leads to the following static checker warning: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3774 amdgpu_debugf

Re: [PATCH 1/3] drm/amdgpu: Add SOC15 IP offset define file

2017-11-27 Thread Tom St Denis
On 27/11/17 04:28 PM, Christian König wrote: Am 27.11.2017 um 21:56 schrieb Alex Deucher: On Mon, Nov 27, 2017 at 3:44 PM, Christian König wrote: Am 27.11.2017 um 21:01 schrieb Felix Kuehling: On 2017-11-27 02:37 PM, Koenig, Christian wrote: And that is a clear NAK to this approach. Hi Chri

Re: [PATCH 1/3] drm/amdgpu: Add SOC15 IP offset define file

2017-11-27 Thread Tom St Denis
On 27/11/17 01:30 PM, Shaoyun Liu wrote: Change-Id: I654d02891b80f3457ddcd80d6a8ea5ace295a89c Signed-off-by: Shaoyun Liu --- .../drm/amd/include/asic_reg/vega10/ip_offset_1.h | 1248 1 file changed, 1248 insertions(+) create mode 100644 drivers/gpu/drm/amd/include/asic

[PATCH umr] add bits option for ring decoder to bitfield decode register writes

2017-11-23 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/find_reg.c| 14 ++ src/lib/ring_decode.c | 39 ++- src/umr.h | 1 + 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/src/lib/find_reg.c b/src/lib/find_reg.c index ecd7f132c9c9

Re: regression in suspend/resume on Polaris

2017-11-20 Thread Tom St Denis
That patch seems to work for me. On 20/11/17 08:21 AM, Christian König wrote: Yeah, known issue. See the proposed patch from Monk about partially reverting this commit. Regards, Christian. Am 20.11.2017 um 14:18 schrieb Tom St Denis: Hi, This commit causes a failure (attached) on resume

regression in suspend/resume on Polaris

2017-11-20 Thread Tom St Denis
Hi, This commit causes a failure (attached) on resume with a Polaris10 device installed (during uvd video playback). commit 1cfd8e237f0318e330190ac21d63c58ae6a1f66c (HEAD, refs/bisect/bad) Author: Monk Liu Date: Tue Nov 14 11:52:35 2017 +0800 drm/amdgpu:cleanup GMC & gart garbage funct

dirty suspend after piglit run

2017-11-16 Thread Tom St Denis
On my Carrizo with the tip of drm-next as of today I get VM faults near the end of the piglit tests (with "-x max.*size") which then manifest UVD problems when decoding with a system suspend in the middle. Attached is the dmesg log. Suspend works fine if I don't trigger the VM faults first. I

[PATCH umr] Add UMC60 block for vega10

2017-11-15 Thread Tom St Denis
Signed-off-by: Tom St Denis --- scripts/soc15_parse.sh| 1 + src/lib/asic/vega10.c | 1 + src/lib/ip/CMakeLists.txt | 1 + src/lib/ip/umc60.c| 55 +++ src/lib/ip/umc60_bits.i | 10 + src/lib/ip/umc60_regs.i | 12

Re: regression on Carrizo display bringup

2017-11-14 Thread Tom St Denis
On 14/11/17 09:36 AM, Harry Wentland wrote: On 2017-11-14 08:30 AM, Tom St Denis wrote: Hi all, Found when testing the tip of drm-next on my A12-9800 Carrizo. [root@carrizo linux]# git bisect good 138a3358c17918bb5cd5aa1ea9e8760ac69c515d is the first bad commit commit

regression on Carrizo display bringup

2017-11-14 Thread Tom St Denis
Hi all, Found when testing the tip of drm-next on my A12-9800 Carrizo. [root@carrizo linux]# git bisect good 138a3358c17918bb5cd5aa1ea9e8760ac69c515d is the first bad commit commit 138a3358c17918bb5cd5aa1ea9e8760ac69c515d Author: Yongqiang Sun Date: Tue Nov 7 11:01:34 2017 -0500 drm/amd/

uninitialized variable in dcn10 code

2017-11-14 Thread Tom St Denis
Hi Harry, At display/dc/dcn10/dcn10_hw_sequencer.c:2140 if (num_planes > 0) { struct dc_stream_state *stream_for_cursor; program_all_pipe_in_tree(dc, top_pipe_to_program, context); for (i = 0; i < dc->res_pool->pipe_count; i++) {

Re: [PATCH] drm/amd/amdgpu: Fix wave mask in amdgpu_debugfs_wave_read()

2017-11-13 Thread Tom St Denis
On 12/11/17 03:57 AM, Christian König wrote: Am 10.11.2017 um 19:29 schrieb Tom St Denis: On 10/11/17 01:20 PM, Christian König wrote: Am 10.11.2017 um 19:03 schrieb Tom St Denis: The bottom two bits of the simd value were being put into the upper bits of the wave value which was likely

[PATCH] drm/amd/amdgpu: Fix wave mask in amdgpu_debugfs_wave_read() (v2)

2017-11-10 Thread Tom St Denis
The bottom two bits of the simd value were being put into the upper bits of the wave value which was likely working due to the bits being ignored (or aliased). Eitherway, now we mask it correctly. Signed-off-by: Tom St Denis (v2) Touch up using GENMASK_ULL to a couple of other functions too

Re: [PATCH] drm/amd/amdgpu: Fix wave mask in amdgpu_debugfs_wave_read()

2017-11-10 Thread Tom St Denis
On 10/11/17 01:20 PM, Christian König wrote: Am 10.11.2017 um 19:03 schrieb Tom St Denis: The bottom two bits of the simd value were being put into the upper bits of the wave value which was likely working due to the bits being ignored (or aliased). Eitherway, now we mask it correctly. Signed

[PATCH] drm/amd/amdgpu: Fix wave mask in amdgpu_debugfs_wave_read()

2017-11-10 Thread Tom St Denis
The bottom two bits of the simd value were being put into the upper bits of the wave value which was likely working due to the bits being ignored (or aliased). Eitherway, now we mask it correctly. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed

[PATCH umr] Fix access_vram bug introduced by f105ce1f5c54f3e371f1572292f87cfa9b116b33

2017-11-09 Thread Tom St Denis
The logic was reversed when PRT support was added. Signed-off-by: Tom St Denis --- src/lib/read_vram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c index b78d06194add..80f8e056258f 100644 --- a/src/lib/read_vram.c +++ b/src/lib

[PATCH umr] Switch GRBM index when reading wave data directly.

2017-11-08 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/wave_status.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lib/wave_status.c b/src/lib/wave_status.c index fe2add779fdd..7f0130bb9347 100644 --- a/src/lib/wave_status.c +++ b/src/lib/wave_status.c @@ -116,7 +116,9 @@ static int

[PATCH umr] Add support for PRT bit in access_vram() for GFX9+ platforms.

2017-11-07 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/read_vram.c | 44 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c index 89d55ff1bef6..b78d06194add 100644 --- a/src/lib/read_vram.c +++ b/src/lib

Re: [PATCH umr] Skip ahead if PDE entry is actually a PTE entry. (v2)

2017-11-06 Thread Tom St Denis
On 06/11/17 01:34 PM, Christian König wrote: Am 06.11.2017 um 19:28 schrieb Tom St Denis: On 06/11/17 05:01 AM, Christian König wrote: Am 04.11.2017 um 18:15 schrieb Tom St Denis: Signed-off-by: Tom St Denis Still not perfect, but good enough for now. Patch is Tested-by: Christian König

Re: [PATCH umr] Skip ahead if PDE entry is actually a PTE entry. (v2)

2017-11-06 Thread Tom St Denis
On 06/11/17 05:01 AM, Christian König wrote: Am 04.11.2017 um 18:15 schrieb Tom St Denis: Signed-off-by: Tom St Denis Still not perfect, but good enough for now. Patch is Tested-by: Christian König . I think you need to rework the VM walking a bit, cause we need to support the T bit as

[PATCH umr] Tidy up skipping PDE=>PTE mappings

2017-11-06 Thread Tom St Denis
Should fix the indentation now when a PDE entry is actually a PTE. Signed-off-by: Tom St Denis --- src/lib/read_vram.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c index 51823d71021e..89d55ff1bef6

[PATCH umr] Skip ahead if PDE entry is actually a PTE entry. (v2)

2017-11-04 Thread Tom St Denis
Signed-off-by: Tom St Denis (v2) Don't print out PDE entries with PTE bit set --- src/lib/read_vram.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c index 0df48dadec12..51823d71021e 100644 --- a/src/lib/read_vram.c +++

[PATCH umr] Skip ahead if PDE entry is actually a PTE entry.

2017-11-03 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/read_vram.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c index 0df48dadec12..5d9523476e25 100644 --- a/src/lib/read_vram.c +++ b/src/lib/read_vram.c @@ -522,6 +522,11 @@ static int umr_access_vram_ai

Re: [PATCH] drm/ttm: once more fix ttm_buffer_object_transfer

2017-10-30 Thread Tom St Denis
Hi Dieter, This is due to: commit aa7187c5c640559ebc02caa0191c0db46b55b4a6 Author: Christian König Date: Thu Oct 26 12:00:36 2017 +0200 drm/amd/display: enable GPU VM support Just set the bit so that DC does the hardware programming. Signed-off-by: Christian König Reviewed

Re: [PATCH 6/8] drm/amd/display: enable GPU VM support

2017-10-27 Thread Tom St Denis
On 27/10/17 10:48 AM, Christian König wrote: Am 27.10.2017 um 16:37 schrieb Harry Wentland: On 2017-10-26 12:06 PM, Christian König wrote: From: Christian König Just set the bit so that DC does the hardware programming. Signed-off-by: Christian König ---   drivers/gpu/drm/amd/display/amdgpu

display warnings due to recent commit

2017-10-27 Thread Tom St Denis
The following commit: [root@fx6 linux]# git bisect good aa7187c5c640559ebc02caa0191c0db46b55b4a6 is the first bad commit commit aa7187c5c640559ebc02caa0191c0db46b55b4a6 Author: Christian König Date: Thu Oct 26 12:00:36 2017 +0200 drm/amd/display: enable GPU VM support Just set the bi

[PATCH] drm/amd/amdgpu: Remove workaround for suspend/resume in uvd7

2017-10-24 Thread Tom St Denis
The workaround is not required anymor and would result in hangs during suspend/resume cycles if the uvd block were busy. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm

Re: [PATCH] drm/amd/amdgpu: Remove workaround check for UVD6 on APUs

2017-10-24 Thread Tom St Denis
Thanks Leo, I don't have any uvd7 gear but that code has the same "workaround." Should that be removed as well? Cheers, Tom On 23/10/17 02:40 PM, Leo Liu wrote: Reviewed-by: Leo Liu On 10/23/2017 01:34 PM, Alex Deucher wrote: On Mon, Oct 23, 2017 at 1:03 PM, Tom St Denis

[PATCH] drm/amd/amdgpu: Remove workaround check for UVD6 on APUs

2017-10-23 Thread Tom St Denis
On APUs the uvd6 driver was skipping proper suspend/resume routines resulting in a broken state upon resume. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

Re: uvd failed to resume during suspend

2017-10-23 Thread Tom St Denis
return r; - } +// } return uvd_v6_0_hw_init(adev); } Seems to fix it on my Carrizo. I'm hesitant to propose this as a patch because I don't know why it was skipped in the first place. Tom On 23/10/17 09:54 AM, Tom St Denis wrote: On 23/10/17 09:27 AM, Tom St Denis

Re: uvd failed to resume during suspend

2017-10-23 Thread Tom St Denis
On 23/10/17 09:27 AM, Tom St Denis wrote: Doing a suspend during playback results in the uvd not resuming when waking up with drm-next as the kernel. Trying with cg_mask=pg_mask=0 It hangs on decode start. I've attached the readout of the ring which looks normal. Initially I thought

uvd failed to resume during suspend

2017-10-23 Thread Tom St Denis
Doing a suspend during playback results in the uvd not resuming when waking up with drm-next as the kernel. Tom [0.00] Linux version 4.13.0-rc5+ (root@carrizo) (gcc version 6.3.1 20161221 (Red Hat 6.3.1-1) (GCC)) #37 SMP Thu Oct 12 07:12:29 EDT 2017 [0.00] Command line: BOOT_IMA

<    1   2   3   4   5   6   7   8   9   10   >