Re: [PATCH] drm/amdgpu: Fix 32bit x86 compilation warning

2017-03-29 Thread Christian König
Am 29.03.2017 um 03:50 schrieb Zhang, Jerry (Junwei): On 03/29/2017 02:37 AM, Alex Xie wrote: drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c:187:2: warning: right shift count >= width of type [enabled by default] drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c:173:2: warning: right shift count >= width of t

Re: [PATCH 2/3] drm/amdgpu: Fix Vega10 VM initialization

2017-03-29 Thread Zhang, Jerry (Junwei)
On 03/29/2017 02:47 PM, Christian König wrote: Am 29.03.2017 um 03:48 schrieb Felix Kuehling: On 17-03-28 09:39 PM, Zhang, Jerry (Junwei) wrote: On 03/29/2017 09:00 AM, Felix Kuehling wrote: adev->family is not initialized yet when amdgpu_get_block_size is called. Use adev->asic_type instead.

Re: [PATCH 0/3] Fixes for multi-level page tables

2017-03-29 Thread Zhang, Jerry (Junwei)
On 03/29/2017 02:00 PM, Zhang, Jerry (Junwei) wrote: On 03/29/2017 09:00 AM, Felix Kuehling wrote: I worked on these fixes on amd-kfd-staging with a merge of the recent multi- level page table changes. With these changes KFDTest passes on Vega10, including some tests that tend to stress VM memo

Re: [PATCH 4/6] drm/amd/amdgpu: Pin bos from imported dma-bufs to GTT.

2017-03-29 Thread Christian König
Am 29.03.2017 um 02:27 schrieb r...@ubuntu.com: From: Christopher James Halse Rogers Attempting to migrate the bo will break the sharing of the buffer. Signed-off-by: Christopher James Halse Rogers CC: amd-gfx@lists.freedesktop.org NAK on this one and the radeon version. We can't migrate

Re: [PATCH 3/3] drm/amdgpu: Fix multi-level page table bugs for large BOs

2017-03-29 Thread Zhang, Jerry (Junwei)
On 03/29/2017 02:52 PM, Christian König wrote: Am 29.03.2017 um 07:58 schrieb Zhang, Jerry (Junwei): Hi Felix, Thanks for your illustration with patience. I got your meaning then, and thanks to fix that. > I think you're right, there are some extra high bits in saddr and eaddr, but > they get

Re: [PATCH v2] drm/radeon: Fail fb creation from imported dma-bufs.

2017-03-29 Thread Christian König
Am 29.03.2017 um 06:00 schrieb r...@ubuntu.com: From: Christopher James Halse Rogers Any use of the framebuffer will migrate it to VRAM, which is not sensible for an imported dma-buf. v2: Use DRM_DEBUG_KMS to prevent userspace accidentally spamming dmesg. Signed-off-by: Christopher James Hals

[PATCH v2] drm/amdgpu: fix vm pte pde flags to 64-bit for sdma (v2)

2017-03-29 Thread Junwei Zhang
v2: fix for all sdma engines Change-Id: I15f8f429009058ba36c7340031c9fa178d716aef Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++-- 3 files changed, 6 insertions(+), 6

Re: [PATCH v2] drm/amdgpu: fix vm pte pde flags to 64-bit for sdma (v2)

2017-03-29 Thread Christian König
Am 29.03.2017 um 09:19 schrieb Junwei Zhang: v2: fix for all sdma engines Change-Id: I15f8f429009058ba36c7340031c9fa178d716aef Signed-off-by: Junwei Zhang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 ++--

Re: [PATCH] drm/amdgpu: fix vm pte pde flags to 64-bit for sdma v4

2017-03-29 Thread Zhang, Jerry (Junwei)
On 03/28/2017 06:06 PM, Christian König wrote: Am 28.03.2017 um 10:55 schrieb Junwei Zhang: Signed-off-by: Junwei Zhang Good catch, patch is Reviewed-by: Christian König . It doesn't matter for older versions because they don't have flags in the high bits, but just for completeness could you

[PATCH 1/2] drm/amdgpu: create a func to check vm size

2017-03-29 Thread Junwei Zhang
Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 51 ++ 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 3500da3..1ad1113 100644 --

[PATCH 2/2] drm/amdgpu: set vm size as 256TB for Vega10

2017-03-29 Thread Junwei Zhang
Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 1ad1113..4af4ea0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device

Re: [PATCH 1/2] drm/amdgpu: create a func to check vm size

2017-03-29 Thread zhoucm1
Reviewed-by: Chunming Zhou for both. On 2017年03月29日 16:08, Junwei Zhang wrote: Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 51 ++ 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_de

Re: [PATCH 2/2] drm/amdgpu: set vm size as 256TB for Vega10

2017-03-29 Thread Christian König
Am 29.03.2017 um 10:08 schrieb Junwei Zhang: Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 1ad1113..4af4ea0 1006

Re: [PATCH] Revert "drm/radeon: Try evicting from CPU accessible to inaccessible VRAM first"

2017-03-29 Thread Michel Dänzer
On 28/03/17 08:00 PM, Julien Isorce wrote: > > On 28 March 2017 at 10:36, Michel Dänzer > wrote: > > On 28/03/17 05:24 PM, Julien Isorce wrote: > > Hi Michel, > > > > About the hard lockup, I noticed that I cannot have it with the > > following cond

Re: [PATCH 1/2] drm/amdgpu: create a func to check vm size

2017-03-29 Thread Christian König
Am 29.03.2017 um 10:08 schrieb Junwei Zhang: Signed-off-by: Junwei Zhang Reviewed-by: Christian König for only this patch. --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 51 ++ 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/a

Re: [PATCH 4/6] drm/amd/amdgpu: Pin bos from imported dma-bufs to GTT.

2017-03-29 Thread Michel Dänzer
On 29/03/17 04:14 PM, Christian König wrote: > Am 29.03.2017 um 02:27 schrieb r...@ubuntu.com: >> From: Christopher James Halse Rogers >> >> >> Attempting to migrate the bo will break the sharing of the buffer. >> >> Signed-off-by: Christopher James Halse Rogers >> >> CC: amd-gfx@lists.freedeskto

Re: [PATCH] Revert "drm/radeon: Try evicting from CPU accessible to inaccessible VRAM first"

2017-03-29 Thread Christian König
Am 29.03.2017 um 10:59 schrieb Michel Dänzer: On 28/03/17 08:00 PM, Julien Isorce wrote: On 28 March 2017 at 10:36, Michel Dänzer mailto:mic...@daenzer.net>> wrote: On 28/03/17 05:24 PM, Julien Isorce wrote: > Hi Michel, > > About the hard lockup, I noticed that I cannot hav

Re: [PATCH 4/6] drm/amd/amdgpu: Pin bos from imported dma-bufs to GTT.

2017-03-29 Thread Christian König
Am 29.03.2017 um 11:07 schrieb Michel Dänzer: On 29/03/17 04:14 PM, Christian König wrote: Am 29.03.2017 um 02:27 schrieb r...@ubuntu.com: From: Christopher James Halse Rogers Attempting to migrate the bo will break the sharing of the buffer. Signed-off-by: Christopher James Halse Rogers CC

[PATCH 1/2] drm/amdgpu/psp: add check sOS sign

2017-03-29 Thread Xiangliang Yu
Confirm if sys driver and sOS are already been loaded through sOS sign register, skip loading sys driver and sOS if finding the sign. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dri

Re: [PATCH] Revert "drm/radeon: Try evicting from CPU accessible to inaccessible VRAM first"

2017-03-29 Thread Michel Dänzer
On 29/03/17 06:07 PM, Christian König wrote: > Am 29.03.2017 um 10:59 schrieb Michel Dänzer: >> On 28/03/17 08:00 PM, Julien Isorce wrote: >>> On 28 March 2017 at 10:36, Michel Dänzer >> > wrote: >>> >>> On 28/03/17 05:24 PM, Julien Isorce wrote: >>> > Hi Michel

[PATCH 2/2] drm/amdgpu/soc15: enable psp block for SRIOV

2017-03-29 Thread Xiangliang Yu
SRIOV can support for loading ucode with PSP block, enable it. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/soc15.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index 660b13b..9a73

Re: [PATCH 2/2] drm/amdgpu/soc15: enable psp block for SRIOV

2017-03-29 Thread Huang Rui
On Wed, Mar 29, 2017 at 05:26:58PM +0800, Xiangliang Yu wrote: > SRIOV can support for loading ucode with PSP block, enable it. > > Signed-off-by: Xiangliang Yu > --- I am glad to see that sriov will also use psp now. Cheers, :-) Both two patches are Acked-by: Huang Rui > drivers/gpu/drm/am

[PATCH] drm/amdgpu: remove duplicate allowed reg CP_CPF_BUSY_STAT

2017-03-29 Thread Christian König
From: Christian König Remove duplicate mmCP_CPF_BUSY_STAT from the allowed registers. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/soc15.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index 4408d3a.

Re: [PATCH] drm/amdgpu: just disallow reading untouched registers

2017-03-29 Thread Christian König
Ping! Does anybody of you guys know what the background of those "untouched" registers is? That we leak uninitialized memory to userspace is a bit bad. Thanks, Christian. Am 28.03.2017 um 13:24 schrieb Christian König: From: Christian König Not sure what the original intention was here, b

Re: [PATCH] drm/amdgpu: just disallow reading untouched registers

2017-03-29 Thread Tom St Denis
On 29/03/17 08:18 AM, Christian König wrote: Ping! Does anybody of you guys know what the background of those "untouched" registers is? That we leak uninitialized memory to userspace is a bit bad. I don't know the history but wouldn't reading these just read the MMIO registers? Or these are

Re: [PATCH] drm/amdgpu: just disallow reading untouched registers

2017-03-29 Thread Christian König
Am 29.03.2017 um 14:28 schrieb Tom St Denis: On 29/03/17 08:18 AM, Christian König wrote: Ping! Does anybody of you guys know what the background of those "untouched" registers is? That we leak uninitialized memory to userspace is a bit bad. I don't know the history but wouldn't reading thes

[PATCH 5/6] drm/amdgpu: use TTM_PL_FLAG_CONTIGUOUS

2017-03-29 Thread Christian König
From: Christian König Implement AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS using TTM_PL_FLAG_CONTIGUOUS instead of a placement limit. That allows us to better handle CPU accessible placements. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 +-- drivers/gpu/

[PATCH 1/6] drm/ttm: cleanup and optimize ttm_bo_mem_compat

2017-03-29 Thread Christian König
From: Christian König No need to implement the same logic twice. Also check if the busy placements are identical to the already scanned placements before checking them. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 45 1 file cha

[PATCH 3/6] drm/ttm: add TTM_PL_FLAG_CONTIGUOUS

2017-03-29 Thread Christian König
From: Christian König This allows drivers to specify if they need a contiguous allocation or not. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c| 4 +++- include/drm/ttm/ttm_placement.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tt

[PATCH 4/6] drm/amdgpu: drop alpha support

2017-03-29 Thread Christian König
From: Christian König We will probably never see this combination. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 25 - 1 file changed, 25 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdg

CPU mapping of split VRAM buffers

2017-03-29 Thread Christian König
Hi guys, this set implements CPU mapping of split VRAM buffers and could help with some performance issues regarding this. Please review and/or comment, Christian. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mai

[PATCH 2/6] drm/ttm: add io_mem_pfn callback

2017-03-29 Thread Christian König
From: Christian König This allows the driver to handle io_mem mappings on their own. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + drivers/gpu/drm/ast/ast_ttm.c | 1 + drivers/gpu/drm/bochs/bochs_mm.c| 1 + drivers/gpu/drm/cirrus/cirrus_

[PATCH 6/6] drm/amdgpu: handle CPU access for split VRAM buffers

2017-03-29 Thread Christian König
From: Christian König This avoids merging them together on page fault. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 16 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/driv

[PATCH] Fix IB va_start+ib_bytes range check on 32Bit systems

2017-03-29 Thread Jan Burgmeier
Signed-off-by: Jan Burgmeier --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 99424cb8020b..583d22974e14 100644 --- a/drivers/gpu/drm/amd/amdgpu/

Fix hardware accelerated video playback with amdgpu on 32Bit system

2017-03-29 Thread Jan Burgmeier
Hi, on 32Bit systems hardware accelerated video playback with amdgpu always errors out with the following message: "[drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* IB va_start+ib_bytes is invalid." Attached you find a patch witch fixes the problem. The patch was made against the staging-next bra

drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition

2017-03-29 Thread David Binderman
Hello there, linux-4.11-rc4/drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition: If 'EXPR == 11', the comparison 'EXPR <= 12' is always true. Source code is } else if (rdev->family == CHIP_RV350 || rdev->family <= CHIP_RV380) { Also in the same file: [drivers/gpu/

Re: [PATCH] drm/amdgpu: remove duplicate allowed reg CP_CPF_BUSY_STAT

2017-03-29 Thread Alex Deucher
On Wed, Mar 29, 2017 at 8:07 AM, Christian König wrote: > From: Christian König > > Remove duplicate mmCP_CPF_BUSY_STAT from the allowed registers. > > Signed-off-by: Christian König Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/soc15.c | 1 - > 1 file changed, 1 deletion(-) >

Re: [PATCH] Fix IB va_start+ib_bytes range check on 32Bit systems

2017-03-29 Thread Christian König
Am 29.03.2017 um 11:18 schrieb Jan Burgmeier: Signed-off-by: Jan Burgmeier --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 99424cb8020b..583

Re: [PATCH] drm/amdgpu: just disallow reading untouched registers

2017-03-29 Thread Alex Deucher
On Wed, Mar 29, 2017 at 8:36 AM, Christian König wrote: > Am 29.03.2017 um 14:28 schrieb Tom St Denis: >> >> On 29/03/17 08:18 AM, Christian König wrote: >>> >>> Ping! >>> >>> Does anybody of you guys know what the background of those "untouched" >>> registers is? >>> >>> That we leak uninitialize

Re: [PATCH] drm/amdgpu: Fix 32bit x86 compilation warning

2017-03-29 Thread Alex Deucher
On Wed, Mar 29, 2017 at 3:07 AM, Christian König wrote: > Am 29.03.2017 um 03:50 schrieb Zhang, Jerry (Junwei): >> >> >> On 03/29/2017 02:37 AM, Alex Xie wrote: >>> >>> drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c:187:2: warning: right shift count >>> >= width of type [enabled by default] >>> drivers/g

Re: [PATCH] drm/amdgpu: just disallow reading untouched registers

2017-03-29 Thread Christian König
Am 29.03.2017 um 15:29 schrieb Alex Deucher: On Wed, Mar 29, 2017 at 8:36 AM, Christian König wrote: Am 29.03.2017 um 14:28 schrieb Tom St Denis: On 29/03/17 08:18 AM, Christian König wrote: Ping! Does anybody of you guys know what the background of those "untouched" registers is? That we l

Re: [PATCH] drm/amdgpu: just disallow reading untouched registers

2017-03-29 Thread Alex Deucher
On Wed, Mar 29, 2017 at 9:46 AM, Christian König wrote: > Am 29.03.2017 um 15:29 schrieb Alex Deucher: >> >> On Wed, Mar 29, 2017 at 8:36 AM, Christian König >> wrote: >>> >>> Am 29.03.2017 um 14:28 schrieb Tom St Denis: On 29/03/17 08:18 AM, Christian König wrote: > > Ping! >>>

Re: [PATCH 2/2] drm/amdgpu: set vm size as 256TB for Vega10

2017-03-29 Thread Alex Deucher
On Wed, Mar 29, 2017 at 4:47 AM, Christian König wrote: > Am 29.03.2017 um 10:08 schrieb Junwei Zhang: >> >> Signed-off-by: Junwei Zhang >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_devic

Re: [PATCH 2/2] drm/amdgpu: set vm size as 256TB for Vega10

2017-03-29 Thread Christian König
Am 29.03.2017 um 16:17 schrieb Alex Deucher: On Wed, Mar 29, 2017 at 4:47 AM, Christian König wrote: Am 29.03.2017 um 10:08 schrieb Junwei Zhang: Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gp

Re: [PATCH 3/3] drm/amdgpu: Fix multi-level page table bugs for large BOs

2017-03-29 Thread Felix Kuehling
On 17-03-29 02:52 AM, Christian König wrote: > Am 29.03.2017 um 07:58 schrieb Zhang, Jerry (Junwei): >> Hi Felix, >> >> Thanks for your illustration with patience. >> I got your meaning then, and thanks to fix that. >> >> > I think you're right, there are some extra high bits in saddr and >> eaddr,

Re: [PATCH 3/3] drm/amdgpu: Fix multi-level page table bugs for large BOs

2017-03-29 Thread Michel Dänzer
On 29/03/17 11:32 PM, Felix Kuehling wrote: > On 17-03-29 02:52 AM, Christian König wrote: >> >> Please clean that up and also remove all those WARN_ON(), we don't >> want to spam the system log with backtraces like this. > > I disagree. When you see the backtraces from WARN_ONs in > amdgpu_vm_get

Re: [PATCH] Fix IB va_start+ib_bytes range check on 32Bit systems

2017-03-29 Thread Michel Dänzer
On 29/03/17 10:22 PM, Christian König wrote: > Am 29.03.2017 um 11:18 schrieb Jan Burgmeier: >> Signed-off-by: Jan Burgmeier >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c >>

Re: [PATCH] Fix IB va_start+ib_bytes range check on 32Bit systems

2017-03-29 Thread Christian König
Am 29.03.2017 um 16:54 schrieb Michel Dänzer: On 29/03/17 10:22 PM, Christian König wrote: Am 29.03.2017 um 11:18 schrieb Jan Burgmeier: Signed-off-by: Jan Burgmeier --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/g

RE: [PATCH v2] drm/amdgpu: fix vm pte pde flags to 64-bit for sdma (v2)

2017-03-29 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Junwei Zhang > Sent: Wednesday, March 29, 2017 3:19 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhang, Jerry > Subject: [PATCH v2] drm/amdgpu: fix vm pte pde flags to 64-bit for sdma (v2) >

RE: CPU mapping of split VRAM buffers

2017-03-29 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Christian König > Sent: Wednesday, March 29, 2017 8:56 AM > To: amd-gfx@lists.freedesktop.org > Cc: mar...@gmail.com > Subject: CPU mapping of split VRAM buffers > > Hi guys, > > this set im

Re: [PATCH 3/3] drm/amdgpu: Fix multi-level page table bugs for large BOs

2017-03-29 Thread Christian König
Am 29.03.2017 um 16:46 schrieb Michel Dänzer: On 29/03/17 11:32 PM, Felix Kuehling wrote: On 17-03-29 02:52 AM, Christian König wrote: Please clean that up and also remove all those WARN_ON(), we don't want to spam the system log with backtraces like this. I disagree. When you see the backtrac

Re: [PATCH 3/3] drm/amdgpu: Fix multi-level page table bugs for large BOs

2017-03-29 Thread Felix Kuehling
On 17-03-29 11:22 AM, Christian König wrote: > Am 29.03.2017 um 16:46 schrieb Michel Dänzer: >> On 29/03/17 11:32 PM, Felix Kuehling wrote: >>> On 17-03-29 02:52 AM, Christian König wrote: Please clean that up and also remove all those WARN_ON(), we don't want to spam the system log with

[PATCH] drm/amdgpu: Fix multi-level page table bugs for large BOs v2

2017-03-29 Thread Felix Kuehling
Fix the start/end address calculation for address ranges that span multiple page directories in amdgpu_vm_alloc_levels. Add WARN_ONs if page tables aren't found. Otherwise the page table update would just fail silently. v2: * Change WARN_ON to WARN_ON_ONCE * Move masking of high address bits to

Re: [PATCH] drm/amdgpu: Fix multi-level page table bugs for large BOs v2

2017-03-29 Thread Christian König
Am 29.03.2017 um 17:48 schrieb Felix Kuehling: Fix the start/end address calculation for address ranges that span multiple page directories in amdgpu_vm_alloc_levels. Add WARN_ONs if page tables aren't found. Otherwise the page table update would just fail silently. v2: * Change WARN_ON to WA

Re: [PATCH] drm/amdgpu: Fix multi-level page table bugs for large BOs v2

2017-03-29 Thread Felix Kuehling
On 17-03-29 12:34 PM, Christian König wrote: > Am 29.03.2017 um 17:48 schrieb Felix Kuehling: >> Fix the start/end address calculation for address ranges that span >> multiple page directories in amdgpu_vm_alloc_levels. >> >> Add WARN_ONs if page tables aren't found. Otherwise the page table >> upd

[pull] radeon drm-fixes-4.11

2017-03-29 Thread Alex Deucher
Hi Dave, One small fix for radeon. The following changes since commit d64a04720b0e64c1cd0726a3a27b360822fbee22: Merge branch 'drm-fixes-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-fixes (2017-03-24 11:05:06 +1000) are available in the git repository at: git://people.freede

[PATCH] drm/amd/amdgpu: Correct ring wptr address in debugfs

2017-03-29 Thread Tom St Denis
On gfx9 hardware the value is not wrapped and is a 64-bit value. So we reduce it modulo the ring size. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/dri

Re: [PATCH] drm/amd/amdgpu: Correct ring wptr address in debugfs

2017-03-29 Thread Tom St Denis
On 29/03/17 01:07 PM, Tom St Denis wrote: On gfx9 hardware the value is not wrapped and is a 64-bit value. So we reduce it modulo the ring size. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dri

[PATCH] drm/amdgpu: Fix multi-level page table bugs for large BOs v3

2017-03-29 Thread Felix Kuehling
Fix the start/end address calculation for address ranges that span multiple page directories in amdgpu_vm_alloc_levels. Add error messages if page tables aren't found. Otherwise the page table update would just fail silently. v2: * Change WARN_ON to WARN_ON_ONCE * Move masking of high address b

Re: [PATCH] Revert "drm/radeon: Try evicting from CPU accessible to inaccessible VRAM first"

2017-03-29 Thread Nicolai Hähnle
On 29.03.2017 11:36, Michel Dänzer wrote: On 29/03/17 06:07 PM, Christian König wrote: Am 29.03.2017 um 10:59 schrieb Michel Dänzer: On 28/03/17 08:00 PM, Julien Isorce wrote: On 28 March 2017 at 10:36, Michel Dänzer mailto:mic...@daenzer.net>> wrote: On 28/03/17 05:24 PM, Julien Isorce

Re: [PATCH] drm/amdgpu: Fix multi-level page table bugs for large BOs v3

2017-03-29 Thread Christian König
Am 29.03.2017 um 19:22 schrieb Felix Kuehling: Fix the start/end address calculation for address ranges that span multiple page directories in amdgpu_vm_alloc_levels. Add error messages if page tables aren't found. Otherwise the page table update would just fail silently. v2: * Change WARN_ON

Re: [PATCH] drm/amd/amdgpu: Correct ring wptr address in debugfs

2017-03-29 Thread Christian König
Am 29.03.2017 um 19:07 schrieb Tom St Denis: On 29/03/17 01:07 PM, Tom St Denis wrote: On gfx9 hardware the value is not wrapped and is a 64-bit value. So we reduce it modulo the ring size. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- 1 file changed, 2 i

Re: CPU mapping of split VRAM buffers

2017-03-29 Thread Christian König
Am 29.03.2017 um 17:36 schrieb Deucher, Alexander: -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian König Sent: Wednesday, March 29, 2017 8:56 AM To: amd-gfx@lists.freedesktop.org Cc: mar...@gmail.com Subject: CPU mapping of split VRAM

Re: [PATCH] drm/amd/amdgpu: Correct ring wptr address in debugfs

2017-03-29 Thread Tom St Denis
On 29/03/17 01:41 PM, Christian König wrote: Am 29.03.2017 um 19:07 schrieb Tom St Denis: On 29/03/17 01:07 PM, Tom St Denis wrote: On gfx9 hardware the value is not wrapped and is a 64-bit value. So we reduce it modulo the ring size. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdg

Re: [PATCH] drm/amd/amdgpu: Correct ring wptr address in debugfs

2017-03-29 Thread Christian König
Am 29.03.2017 um 19:44 schrieb Tom St Denis: On 29/03/17 01:41 PM, Christian König wrote: Am 29.03.2017 um 19:07 schrieb Tom St Denis: On 29/03/17 01:07 PM, Tom St Denis wrote: On gfx9 hardware the value is not wrapped and is a 64-bit value. So we reduce it modulo the ring size. Signed-off-b

[PATCH] drm/amd/amdgpu: Correct ring wptr address in debugfs (v2)

2017-03-29 Thread Tom St Denis
On gfx9 hardware the value is not wrapped and is a 64-bit value. So we reduce it modulo the ring size. Signed-off-by: Tom St Denis (v2) use buf_mask instead of computing on the fly --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

Re: [PATCH] drm/amd/amdgpu: Correct ring wptr address in debugfs (v2)

2017-03-29 Thread Christian König
Am 29.03.2017 um 19:48 schrieb Tom St Denis: On gfx9 hardware the value is not wrapped and is a 64-bit value. So we reduce it modulo the ring size. Signed-off-by: Tom St Denis Reviewed-by: Christian König (v2) use buf_mask instead of computing on the fly --- drivers/gpu/drm/amd/amdgpu/

Re: [pull] radeon drm-fixes-4.11

2017-03-29 Thread Alex Deucher
On Wed, Mar 29, 2017 at 1:53 PM, Panariti, David wrote: > Hi, > > I'm still new to this stuff. > Is this informational or some action items? It's a request to Dave (drm maintainer), to pull fixes into the next 4.11 rc kernel. Unless you are Dave, it's largely informational. Alex > > thanks, >

Re: [PATCH] drm/amd/amdgpu: Correct ring wptr address in debugfs

2017-03-29 Thread Tom St Denis
On 29/03/17 01:46 PM, Christian König wrote: Am 29.03.2017 um 19:44 schrieb Tom St Denis: On 29/03/17 01:41 PM, Christian König wrote: Am 29.03.2017 um 19:07 schrieb Tom St Denis: On 29/03/17 01:07 PM, Tom St Denis wrote: On gfx9 hardware the value is not wrapped and is a 64-bit value. So we

Re: [PATCH] drm/amdgpu: Fix multi-level page table bugs for large BOs v3

2017-03-29 Thread Felix Kuehling
On 17-03-29 01:40 PM, Christian König wrote: > Am 29.03.2017 um 19:22 schrieb Felix Kuehling: >> Fix the start/end address calculation for address ranges that span >> multiple page directories in amdgpu_vm_alloc_levels. >> >> Add error messages if page tables aren't found. Otherwise the page >> tab

[PATCH 4/4] drm/amdgpu/gfx8: move SET_RESOURCES into the same command stream

2017-03-29 Thread Alex Deucher
As the KCQ setup. This way we only have to wait once for the entire MEC. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 87 +-- 1 file changed, 23 insertions(+), 64 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drive

[PATCH 3/4] drm/amdgpu/gfx8: wait once for all KCQs to be created

2017-03-29 Thread Alex Deucher
Rather than waiting for each queue. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 57 +++ 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index

[PATCH 1/4] drm/amdgpu/gfx8: wait for completion in KIQ init

2017-03-29 Thread Alex Deucher
We need to make sure the various init sequences submitted to KIQ complete before testing the rings. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 88 +++ 1 file changed, 78 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/

[PATCH 2/4] drm/amdgpu: split gfx_v8_0_kiq_init_queue into two

2017-03-29 Thread Alex Deucher
One for KIQ and one for the KCQ. This simplifies the logic and allows for future optimizations. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 62 +++ 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/amd/amdg

[PATCH 1/2] drm/amdgpu: Make display watermark calculations more accurate

2017-03-29 Thread Mario Kleiner
Avoid big roundoff errors in scanline/hactive durations for high pixel clocks, especially for >= 500 Mhz, and thereby program more accurate display fifo watermarks. Implemented here for DCE 6,8,10,11. Successfully tested on DCE 10 with AMD R9 380 Tonga. Signed-off-by: Mario Kleiner --- drivers/

[PATCH 2/2] drm/amdgpu: Avoid overflows/divide-by-zero in latency_watermark calculations.

2017-03-29 Thread Mario Kleiner
At dot clocks > approx. 250 Mhz, some of these calcs will overflow and cause miscalculation of latency watermarks, and for some overflows also divide-by-zero driver crash ("divide error: [#1] PREEMPT SMP" in "dce_v10_0_latency_watermark+0x12d/0x190"). This zero-divide happened, e.g., on AMD T

amdgpu fixes for display watermark calculations.

2017-03-29 Thread Mario Kleiner
Hi, attached two patches for amdgpu to improve the accuracy of display wm calculations, and to avoid some overflow and divide-by-zero errors which can cause the driver to die. Both are tested for the DCE-10 code path with a AMD R9 380 Tonga Pro on two different panels and their various modes. The

RE: [PATCH 1/2] drm/amdgpu/psp: add check sOS sign

2017-03-29 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Xiangliang Yu > Sent: Wednesday, March 29, 2017 5:27 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang > Subject: [PATCH 1/2] drm/amdgpu/psp: add check sOS sign > > Confirm if sys d

Re: [PATCH v2] drm/amdgpu: Fail fb creation from imported dma-bufs. (v2)

2017-03-29 Thread Alex Deucher
On Wed, Mar 29, 2017 at 2:07 AM, Michel Dänzer wrote: > On 29/03/17 01:02 PM, r...@ubuntu.com wrote: >> From: Christopher James Halse Rogers >> >> Any use of the framebuffer will migrate it to VRAM, which is not sensible for >> an imported dma-buf. >> >> v2: Use DRM_DEBUG_KMS to prevent userspace

Re: drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition

2017-03-29 Thread Alex Deucher
On Mon, Mar 27, 2017 at 6:07 AM, David Binderman wrote: > > Hello there, > > linux-4.11-rc4/drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant > condition: If 'EXPR == 11', the comparison 'EXPR <= 12' is always true. > > Source code is > > } else if (rdev->family == CHIP_RV350 || >

RE: [pull] radeon drm-fixes-4.11

2017-03-29 Thread Panariti, David
Hi, I'm still new to this stuff. Is this informational or some action items? thanks, davep > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Alex Deucher > Sent: Wednesday, March 29, 2017 12:55 PM > To: amd-gfx@lists.freedesktop.org; dri-d

Re: [pull] radeon drm-fixes-4.11

2017-03-29 Thread Bridgman, John
This is a request for Dave to pull changes from Alex's tree into Dave's "drm-fixes" tree, which is the last step before it gets sent to Linus. Dave is the drm subsystem maintainer, and drm-next / drm-fixes branches are where code from multiple GPU driver maintainers comes together. Dave would g

Re: [PATCH] Fix IB va_start+ib_bytes range check on 32Bit systems

2017-03-29 Thread Michel Dänzer
On 30/03/17 12:18 AM, Christian König wrote: > Am 29.03.2017 um 16:54 schrieb Michel Dänzer: >> On 29/03/17 10:22 PM, Christian König wrote: >>> Am 29.03.2017 um 11:18 schrieb Jan Burgmeier: Signed-off-by: Jan Burgmeier --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +++-

Re: [PATCH] drm/amdgpu: Fix multi-level page table bugs for large BOs v3

2017-03-29 Thread Zhang, Jerry (Junwei)
On 03/30/2017 02:07 AM, Felix Kuehling wrote: On 17-03-29 01:40 PM, Christian König wrote: Am 29.03.2017 um 19:22 schrieb Felix Kuehling: Fix the start/end address calculation for address ranges that span multiple page directories in amdgpu_vm_alloc_levels. Add error messages if page tables ar

[PATCH] drm/amdgpu: fix vm pte pde flags to 640bit for sdma of CI/SI

2017-03-29 Thread Junwei Zhang
Missing the flags fixing for CI/SI Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/si_dma.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/ci

Re: [PATCH v2] drm/amdgpu: fix vm pte pde flags to 64-bit for sdma (v2)

2017-03-29 Thread Zhang, Jerry (Junwei)
On 03/29/2017 11:24 PM, Deucher, Alexander wrote: -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Junwei Zhang Sent: Wednesday, March 29, 2017 3:19 AM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Jerry Subject: [PATCH v2] drm/amdgpu: fix vm pte

RE: [PATCH] drm/amdgpu: fix vm pte pde flags to 640bit for sdma of CI/SI

2017-03-29 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Junwei Zhang > Sent: Wednesday, March 29, 2017 10:11 PM > To: amd-gfx@lists.freedesktop.org; Deucher, Alexander > Cc: Zhang, Jerry > Subject: [PATCH] drm/amdgpu: fix vm pte pde flags to 640bit

Regression caused by "drm/amdgpu: get display info from DC when DC enabled."

2017-03-29 Thread Michel Dänzer
Hi Rex, Andy bisected a regression to your commit 91561a39fa74e79b88e0e9d70f3072501c8df2ce, see https://bugs.freedesktop.org/100395 . Any ideas? -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer

RE: Regression caused by "drm/amdgpu: get display info from DC when DC enabled."

2017-03-29 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Wednesday, March 29, 2017 11:11 PM > To: Zhu, Rex > Cc: Andy Furniss; amd-gfx@lists.freedesktop.org > Subject: Regression caused by "drm/amdgpu: get display info from DC

Re: Regression caused by "drm/amdgpu: get display info from DC when DC enabled."

2017-03-29 Thread Alex Deucher
On Wed, Mar 29, 2017 at 11:19 PM, Deucher, Alexander wrote: >> -Original Message- >> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf >> Of Michel Dänzer >> Sent: Wednesday, March 29, 2017 11:11 PM >> To: Zhu, Rex >> Cc: Andy Furniss; amd-gfx@lists.freedesktop.org >>

[PATCH 2/3] drm/amdgpu: when resume failed, return error to avoid system hang.

2017-03-29 Thread Rex Zhu
Change-Id: I9e908edbb3f0c767b084ffaac7de5f97047eaa16 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index eaf44f

[PATCH 3/3] drm/amdgpu: do not block gpu resume when cp ring test failed.

2017-03-29 Thread Rex Zhu
As kiq enabled, ring test may randomly failed because of timing. it was not critial error, gpu can continue to resume. Change-Id: I5d85c7d5b5989dd6892a13b47a5322b33e8a48ac Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) di

Re: [PATCH 3/3] drm/amdgpu: do not block gpu resume when cp ring test failed.

2017-03-29 Thread Michel Dänzer
On 30/03/17 02:42 PM, Rex Zhu wrote: > As kiq enabled, ring test may randomly failed because of timing. > it was not critial error, gpu can continue to resume. > > Change-Id: I5d85c7d5b5989dd6892a13b47a5322b33e8a48ac > Signed-off-by: Rex Zhu > --- > drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 +--

[PATCH 1/3] drm/amdgpu: delete duplicated printk info.

2017-03-29 Thread Rex Zhu
Change-Id: I5f336cc41b1868b98f263874fe5c6ea20e430744 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 57ccac4..eaf44fb 100644 -

RE: [PATCH] iommu/amd: flush IOTLB for specific domains only

2017-03-29 Thread Nath, Arindam
>-Original Message- >From: Nath, Arindam >Sent: Monday, March 27, 2017 5:57 PM >To: 'Daniel Drake' >Cc: j...@8bytes.org; Deucher, Alexander; Bridgman, John; amd- >g...@lists.freedesktop.org; io...@lists.linux-foundation.org; Suthikulpanit, >Suravee; Linux Upstreaming Team >Subject: RE: [PAT

Re: [PATCH 1/6] drm/ttm: cleanup and optimize ttm_bo_mem_compat

2017-03-29 Thread Michel Dänzer
On 29/03/17 09:55 PM, Christian König wrote: > From: Christian König > > No need to implement the same logic twice. Also check if the busy placements > are identical to the already scanned placements before checking them. > > Signed-off-by: Christian König [...] > @@ -1077,6 +1065,23 @@ bool

Re: [PATCH 4/6] drm/amdgpu: drop alpha support

2017-03-29 Thread Michel Dänzer
On 29/03/17 09:55 PM, Christian König wrote: > From: Christian König > > We will probably never see this combination. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 25 - > 1 file changed, 25 deletions(-) > > diff --git a/drivers/g

Re: [PATCH 3/6] drm/ttm: add TTM_PL_FLAG_CONTIGUOUS

2017-03-29 Thread Michel Dänzer
On 29/03/17 09:55 PM, Christian König wrote: > From: Christian König > > This allows drivers to specify if they need a contiguous allocation or not. > > Signed-off-by: Christian König [...] > diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h > index 932be0c..40f94

Re: [PATCH 2/6] drm/ttm: add io_mem_pfn callback

2017-03-29 Thread Michel Dänzer
On 29/03/17 09:55 PM, Christian König wrote: > From: Christian König > > This allows the driver to handle io_mem mappings on their own. > > Signed-off-by: Christian König Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer | http://www.amd.com Libre software e

Re: CPU mapping of split VRAM buffers

2017-03-29 Thread Michel Dänzer
On 29/03/17 09:55 PM, Christian König wrote: > Hi guys, > > this set implements CPU mapping of split VRAM buffers and could > help with some performance issues regarding this. > > Please review and/or comment, Patches 5 & 6 look mostly good to me, but I don't fully understand all changes in ther

  1   2   >