[PATCH 1/2] drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition

2017-11-02 Thread Roger He
Change-Id: Iac13b13fa136d0ce4fc2a40d010f07aa5d11e3f4 Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Re: [PATCH v9 4/5] x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 30h-3fh) Processors v5

2017-11-02 Thread Alex Deucher
On Wed, Oct 18, 2017 at 9:58 AM, Christian König wrote: > From: Christian König > > Most BIOS don't enable this because of compatibility reasons. > > Manually enable a 64bit BAR of 64GB size so that we have > enough room for PCI

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

2017-11-02 Thread Alex Deucher
Hi Dave, Misc fixes for radeon, amdgpu, and ttm for 4.15. The following changes since commit 4a0144bfc6df1f7a89a04a3e8662f1f4375eb1fe: drm/amd/amdgpu: Remove workaround for suspend/resume in uvd7 (2017-10-25 23:09:40 -0400) are available in the git repository at:

Re: [PATCH 0/8] KFD SDMA support for GFX7 and GFX8 v2

2017-11-02 Thread Felix Kuehling
Thanks. I've given up on targeting a specific kernel release. This whole upstreaming process is way more work than I expected, and is taking much longer than I thought when I started. If I'm making this harder for myself than necessary, please let me know. But I'm quite sure that this is just the

Re: [PATCH] drm/ttm: Always and only destroy bo->ttm_resv in ttm_bo_release_list

2017-11-02 Thread Michel Dänzer
On 02/11/17 11:49 AM, Christian König wrote: > Am 01.11.2017 um 17:15 schrieb Michel Dänzer: >> From: Michel Dänzer >> >> Fixes a use-after-free due to a race condition in >> ttm_bo_cleanup_refs_and_unlock, which allows one task to reserve a BO >> and destroy its ttm_resv

[PATCH v2] drm/ttm: Always and only destroy bo->ttm_resv in ttm_bo_release_list

2017-11-02 Thread Michel Dänzer
From: Michel Dänzer Fixes a use-after-free due to a race condition in ttm_bo_cleanup_refs_and_unlock, which allows one task to reserve a BO and destroy its ttm_resv while another task is waiting for it to signal in reservation_object_wait_timeout_rcu. v2: * Always

Re: [PATCH v2] drm/ttm: Always and only destroy bo->ttm_resv in ttm_bo_release_list

2017-11-02 Thread Christian König
Am 02.11.2017 um 18:22 schrieb Michel Dänzer: From: Michel Dänzer Fixes a use-after-free due to a race condition in ttm_bo_cleanup_refs_and_unlock, which allows one task to reserve a BO and destroy its ttm_resv while another task is waiting for it to signal in

Re: [PATCH 1/2] drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition

2017-11-02 Thread Christian König
Am 02.11.2017 um 11:25 schrieb Roger He: Change-Id: Iac13b13fa136d0ce4fc2a40d010f07aa5d11e3f4 Signed-off-by: Roger He Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 + 1 file changed, 1 insertion(+), 4

System freeze on display re-activation persists

2017-11-02 Thread Martin Babutzka
Dear AMD developers, I wanted to mention that the regression in amd-staging-drm-next which I reported on the 29.09. and the 06.10. still exists with the latest tree state of the branch. A crash/freeze occurs after the screen is re-enabled either from suspend or from screen locking (which shuts

Re: [PATCH] drm/amdgpu/virt: don't dereference undefined 'module' struct

2017-11-02 Thread Harry Wentland
On 2017-11-02 07:25 AM, Arnd Bergmann wrote: > Accessing the THIS_MODULE directly is only possible when modules > are enabled, otherwise we get a build failure: > > drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c: In function > 'amdgpu_virt_init_data_exchange': >

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

2017-11-02 Thread Alex Deucher
Hi Dave, A few fixes for DC for 4.15. The following changes since commit af9111336071ee9378e1db70ac8f4c2b7fcd17a1: Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux into drm-next (2017-10-23 11:17:54 +1000) are available in the git repository at:

Re: [PATCH] drm/amdgpu/virt: don't dereference undefined 'module' struct

2017-11-02 Thread Alex Deucher
On Thu, Nov 2, 2017 at 3:22 PM, Harry Wentland wrote: > On 2017-11-02 07:25 AM, Arnd Bergmann wrote: >> Accessing the THIS_MODULE directly is only possible when modules >> are enabled, otherwise we get a build failure: >> >> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c: In

[PATCH 2/2] Revert "drm/amd/scheduler:fix duplicate operation in entity fini"

2017-11-02 Thread Monk Liu
fix memory leak. This reverts commit d6951b49faa8447a6a77cdb1ef3346b1a1786d31. because when entity_fini is interrupted the jobs in queue still not processed with job_begin, so the finish_cb is not hooked on sched fence, we still need manually do cleanups. Change-Id:

[PATCH 1/2] drm/amdgpu:read VRAMLOST from gim

2017-11-02 Thread Monk Liu
Change-Id: I6a268903465004d6e8f65f135734094772b9f614 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 - drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 3 +++ 3 files changed, 8 insertions(+), 5

Re: [PATCH 2/2] Revert "drm/amd/scheduler:fix duplicate operation in entity fini"

2017-11-02 Thread Christian König
Am 02.11.2017 um 10:00 schrieb Chunming Zhou: On 2017年11月02日 15:50, Monk Liu wrote: fix memory leak. This reverts commit d6951b49faa8447a6a77cdb1ef3346b1a1786d31. because when entity_fini is interrupted the jobs in queue still not processed with job_begin, so the finish_cb is not hooked on

Re: [PATCH 2/2] Revert "drm/amd/scheduler:fix duplicate operation in entity fini"

2017-11-02 Thread Chunming Zhou
On 2017年11月02日 15:50, Monk Liu wrote: fix memory leak. This reverts commit d6951b49faa8447a6a77cdb1ef3346b1a1786d31. because when entity_fini is interrupted the jobs in queue still not processed with job_begin, so the finish_cb is not hooked on sched fence, we still need manually do cleanups.

Re: [PATCH 0/8] More KFD fixes and cleanups v3

2017-11-02 Thread Oded Gabbay
Thanks! Applied to -next On Thu, Nov 2, 2017 at 1:21 AM, Felix Kuehling wrote: > Another pass through a diff between our internal branch and upstream > yielded a few more fixes and cleanups that were previously missed. > > v2: Added a fix for a bug found when syncing

Re: [PATCH 2/3] drm/amdgpu: release exclusive mode after hw_init if no kfd

2017-11-02 Thread Ding, Pixel
Hi Felix, KFD will set HQD. These registers must be accessed in exclusive mode, otherwise driver use KIQ to access them which causes world switch failure. — Sincerely Yours, Pixel On 02/11/2017, 9:49 PM, "Kuehling, Felix" wrote: >Hi Pixel, > >I'm curious,

Re: [PATCH 2/8] drm/amdkfd: Correct SDMA ring buffer size

2017-11-02 Thread Christian König
Am 02.11.2017 um 00:21 schrieb Felix Kuehling: From: shaoyunl ffs function return the position of the first bit set on 1 based. (bit zero returns 1). Signed-off-by: shaoyun liu Signed-off-by: Felix Kuehling ---

[PATCH] drm/amdgpu: switch to use new SOC15 reg read/write macros for soc15 ih

2017-11-02 Thread Hawking Zhang
Change-Id: I53b62020a30a827140b03f5986992cbd294d3fa8 Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 46 +- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c

Re: [PATCH 1/2] dma-buf: keep only not signaled fence in reservation_object_add_shared_replace v2

2017-11-02 Thread Sumit Semwal
Hi Christian, On 30 October 2017 at 20:29, Christian König wrote: > From: Christian König > > The amdgpu issue to also need signaled fences in the reservation objects > should be fixed by now. > > Optimize the list by keeping only the

Re: [PATCH 3/5] drm/amdgpu: rename amdgpu_ttm_bind to amdgpu_ttm_alloc_gart

2017-11-02 Thread Zhou, David(ChunMing)
I'm not sue if it's properly, and have no strong opinion, Alex or others can have a look. 发自坚果 Pro Christian K鰊ig 于 2017年11月2日 下午8:19写道: Ping? Any objects or can I push this? Asking because the next patch is desperately needed upstream. Christian. Am

RE: [PATCH] drm/amdgpu: refine SR-IOV firmware VRAM reservation to protect data

2017-11-02 Thread Liu, Monk
Reivewed-by: monk liu -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Horace Chen Sent: 2017年11月1日 20:02 To: amd-gfx@lists.freedesktop.org Cc: Chen, Horace Subject: [PATCH] drm/amdgpu: refine SR-IOV

Re: [PATCH 3/5] drm/amdgpu: rename amdgpu_ttm_bind to amdgpu_ttm_alloc_gart

2017-11-02 Thread Christian König
Ping? Any objects or can I push this? Asking because the next patch is desperately needed upstream. Christian. Am 27.10.2017 um 16:43 schrieb Christian König: From: Christian König We actually don't bind here, but rather allocate GART space if necessary.

Re: [PATCH] drm/amdgpu: switch to use new SOC15 reg read/write macros for soc15 ih

2017-11-02 Thread Christian König
Am 02.11.2017 um 11:40 schrieb Hawking Zhang: Change-Id: I53b62020a30a827140b03f5986992cbd294d3fa8 Signed-off-by: Hawking Zhang Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 46 +-

Re: [PATCH] drm/ttm: Always and only destroy bo->ttm_resv in ttm_bo_release_list

2017-11-02 Thread Christian König
Am 01.11.2017 um 17:15 schrieb Michel Dänzer: From: Michel Dänzer Fixes a use-after-free due to a race condition in ttm_bo_cleanup_refs_and_unlock, which allows one task to reserve a BO and destroy its ttm_resv while another task is waiting for it to signal in

Re: [PATCH 3/3] drm/amdgpu/display: fix integer arithmetic problem

2017-11-02 Thread Harry Wentland
On 2017-11-02 07:26 AM, Arnd Bergmann wrote: > gcc warns about an ambiguous integer calculation: > > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function > 'calculate_bandwidth': > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:534:5: error: this > decimal

Re: [PATCH 1/3] drm/amdgpu/display: provide ASSERT macros unconditionally

2017-11-02 Thread Felix Kuehling
On 2017-11-02 07:26 AM, Arnd Bergmann wrote: > It seems impossible to build this driver without setting either > CONFIG_DEBUG_KERNEL or CONFIG_DEBUG_DRIVER: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h: In function > 'set_reg_field_value_ex': >

[PATCH] drm/amdgpu: add missing return in amdgpu_device_resize_fb_bar

2017-11-02 Thread Christian König
Somehow missed to commit that during rebase. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH 1/3] drm/amdgpu/display: provide ASSERT macros unconditionally

2017-11-02 Thread Arnd Bergmann
On Thu, Nov 2, 2017 at 3:09 PM, Felix Kuehling wrote: > On 2017-11-02 07:26 AM, Arnd Bergmann wrote: >> It seems impossible to build this driver without setting either >> CONFIG_DEBUG_KERNEL or CONFIG_DEBUG_DRIVER: >> >>

[PATCH v2] drm/amdgpu/display: provide ASSERT macros unconditionally

2017-11-02 Thread Arnd Bergmann
It seems impossible to build this driver without setting either CONFIG_DEBUG_KERNEL or CONFIG_DEBUG_DRIVER: drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h: In function 'set_reg_field_value_ex': drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:132:2: error: implicit declaration of

Re: [PATCH 1/3] drm/amdgpu/display: provide ASSERT macros unconditionally

2017-11-02 Thread Alex Deucher
On Thu, Nov 2, 2017 at 10:20 AM, Arnd Bergmann wrote: > On Thu, Nov 2, 2017 at 3:09 PM, Felix Kuehling wrote: >> On 2017-11-02 07:26 AM, Arnd Bergmann wrote: >>> It seems impossible to build this driver without setting either >>> CONFIG_DEBUG_KERNEL or

Re: [PATCH] drm/amdgpu: add missing return in amdgpu_device_resize_fb_bar

2017-11-02 Thread Alex Deucher
On Thu, Nov 2, 2017 at 10:16 AM, Christian König wrote: > Somehow missed to commit that during rebase. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ > 1 file changed, 2 insertions(+) > >

[PATCH libdrm] amdgpu: Fix wrappers for AMDGPU_VM IOCTL.

2017-11-02 Thread Andrey Grodzovsky
Rmove amdgpu_context_handle from the interface and use amdgpu_device_handle instead. Uupdate VMID reservation test accordingly. Signed-off-by: Andrey Grodzovsky --- amdgpu/amdgpu.h | 4 ++-- amdgpu/amdgpu_vm.c | 8 tests/amdgpu/vm_tests.c | 4

[PATCH] drm/amdgpu/virt: don't dereference undefined 'module' struct

2017-11-02 Thread Arnd Bergmann
Accessing the THIS_MODULE directly is only possible when modules are enabled, otherwise we get a build failure: drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c: In function 'amdgpu_virt_init_data_exchange': drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:331:20: error: dereferencing pointer to incomplete

[PATCH 3/3] drm/amdgpu/display: fix integer arithmetic problem

2017-11-02 Thread Arnd Bergmann
gcc warns about an ambiguous integer calculation: drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function 'calculate_bandwidth': drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:534:5: error: this decimal constant is unsigned only in ISO C90 [-Werror]

Re: [PATCH] drm/amdgpu: resize VRAM BAR for CPU access v5

2017-11-02 Thread Alex Deucher
On Thu, Nov 2, 2017 at 9:02 AM, Christian König wrote: > From: Christian König > > Try to resize BAR0 to let CPU access all of VRAM. > > v2: rebased, style cleanups, disable mem decode before resize, > handle gmc_v9 as well, round size up to

Re: System freeze on display re-activation persists

2017-11-02 Thread Alex Deucher
On Thu, Nov 2, 2017 at 2:36 AM, Martin Babutzka wrote: > Dear AMD developers, > > I wanted to mention that the regression in amd-staging-drm-next which I > reported on the 29.09. and the 06.10. still exists with the latest tree > state of the branch. > > A crash/freeze

Re: [PATCH 2/3] drm/amdgpu: release exclusive mode after hw_init if no kfd

2017-11-02 Thread Felix Kuehling
Hi Pixel, I'm curious, which part of the KFD initialization requires exclusive access? KFD doesn't access MMIO directly, only through callbacks to amdgpu. Which of those callbacks are only used during initialization, and require exclusive access? Maybe that's something that can be fixed.

drm/amdgpu: resize VRAM BAR for CPU access v5

2017-11-02 Thread Christian König
Hey Alex, any more comments on this or can I have your rb and push it to our internal branch? Thanks, Christian. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH] drm/amdgpu: resize VRAM BAR for CPU access v5

2017-11-02 Thread Christian König
From: Christian König Try to resize BAR0 to let CPU access all of VRAM. v2: rebased, style cleanups, disable mem decode before resize, handle gmc_v9 as well, round size up to power of two. v3: handle gmc_v6 as well, release and reassign all BARs in the driver. v4:

Re: [PATCH 3/5] drm/amdgpu: rename amdgpu_ttm_bind to amdgpu_ttm_alloc_gart

2017-11-02 Thread Alex Deucher
On Fri, Oct 27, 2017 at 10:43 AM, Christian König wrote: > From: Christian König > > We actually don't bind here, but rather allocate GART space if necessary. > > Signed-off-by: Christian König Definitely makes things

Re: [PATCH v2] drm/amdgpu/display: provide ASSERT macros unconditionally

2017-11-02 Thread Harry Wentland
On 2017-11-02 10:24 AM, Arnd Bergmann wrote: > It seems impossible to build this driver without setting either > CONFIG_DEBUG_KERNEL or CONFIG_DEBUG_DRIVER: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h: In function > 'set_reg_field_value_ex': >

Re: [PATCH 1/8] drm/amdgpu: Correct SDMA load/unload sequence on HWS disabled mode

2017-11-02 Thread Oded Gabbay
On Thu, Nov 2, 2017 at 1:21 AM, Felix Kuehling wrote: > Fix the SDMA load and unload sequence as suggested by HW document. > > Signed-off-by: shaoyun liu > Signed-off-by: Felix Kuehling > --- >

[PATCH] amdgpu: Add R600_DEBUG flag to reserve VMID per ctx.

2017-11-02 Thread Andrey Grodzovsky
Fixes reverted patch f03b7c9 by doing VMID reservation per process and not per context. Also updates required amdgpu libdrm version since the change involved interface updates in amdgpu libdrm. Signed-off-by: Andrey Grodzovsky --- configure.ac

Re: [PATCH 3/8] drm/amdkfd: Fix SDMA oversubsription handling

2017-11-02 Thread Oded Gabbay
On Thu, Nov 2, 2017 at 1:21 AM, Felix Kuehling wrote: > SDMA only supports a fixed number of queues. HWS cannot handle > oversubscription. > > Signed-off-by: shaoyun liu > Signed-off-by: Felix Kuehling > --- >

Re: [PATCH] drm/amdgpu: add missing return in amdgpu_device_resize_fb_bar

2017-11-02 Thread Harry Wentland
On 2017-11-02 10:16 AM, Christian König wrote: > Somehow missed to commit that during rebase. > > Signed-off-by: Christian König Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ > 1 file changed, 2

Re: [PATCH 4/8] drm/amd: Update kgd_kfd interface for resuming SDMA queues

2017-11-02 Thread Oded Gabbay
On Thu, Nov 2, 2017 at 1:21 AM, Felix Kuehling wrote: > Add wptr and mm parameters to hqd_sdma_load and pass these parameters > from device_queue_manager through the mqd_manager. > > SDMA doesn't support polling while the engine believes it's idle. The > driver must update

Re: [PATCH 2/8] drm/amdkfd: Correct SDMA ring buffer size

2017-11-02 Thread Felix Kuehling
On 2017-11-02 08:03 AM, Christian König wrote: > Am 02.11.2017 um 00:21 schrieb Felix Kuehling: >> From: shaoyunl >> >> ffs function return the position of the first bit set on 1 based. >> (bit zero returns 1). >> >> Signed-off-by: shaoyun liu >>

Re: [PATCH 5/8] drm/amdgpu: Add support for resuming SDMA queues w/o HWS

2017-11-02 Thread Oded Gabbay
On Thu, Nov 2, 2017 at 1:21 AM, Felix Kuehling wrote: > Save wptr in hqd_sdma_destroy, restore it in hqd_sdma_load. Also > read updated wptr from user mode when resuming an SDMA queue. > > Signed-off-by: Jay Cornwall > Signed-off-by: Yong Zhao

Re: [PATCH 6/8] drm/amdgpu: Implement amdgpu SDMA functions for VI

2017-11-02 Thread Oded Gabbay
On Thu, Nov 2, 2017 at 1:22 AM, Felix Kuehling wrote: > From: Philip Cox > > Signed-off-by: Philip Cox > Signed-off-by: shaoyun liu > Signed-off-by: Yong Zhao > Signed-off-by: Jay Cornwall

Re: [PATCH 7/8] drm/amdkfd: Use ASIC-specific SDMA MQD type

2017-11-02 Thread Oded Gabbay
On Thu, Nov 2, 2017 at 1:22 AM, Felix Kuehling wrote: > Signed-off-by: shaoyun liu > Signed-off-by: Felix Kuehling > --- > drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 13 + >

Re: [PATCH 0/8] KFD SDMA support for GFX7 and GFX8 v2

2017-11-02 Thread Oded Gabbay
Thanks! Taken to -next, but it will only be for 4.16 I'm afraid On Thu, Nov 2, 2017 at 1:21 AM, Felix Kuehling wrote: > This patch series fixes SDMA user mode queue support for GFX7 and adds > support for GFX8. > > v2: Rebased. radeon_kfd.c doesn't exist any more. > >

Re: [PATCH 2/8] drm/amdkfd: Correct SDMA ring buffer size

2017-11-02 Thread Oded Gabbay
On Thu, Nov 2, 2017 at 1:21 AM, Felix Kuehling wrote: > From: shaoyunl > > ffs function return the position of the first bit set on 1 based. > (bit zero returns 1). > > Signed-off-by: shaoyun liu > Signed-off-by: Felix Kuehling