Re: Reverted another change to fix buffer move hangs (was Re: [PATCH] drm/ttm: partial revert "cleanup ttm_tt_(unbind|destroy)" v2)

2016-08-12 Thread Felix Kuehling
[CC Kent FYI] On 16-08-11 04:31 PM, Deucher, Alexander wrote: >> -Original Message- >> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf >> Of Felix Kuehling >> Sent: Thursday, August 11, 2016 3:52 PM >> To: Michel Dänzer;

Re: [PATCH 09/14] drm/amd/amdgpu: Enable carrizo GFX PG

2016-08-08 Thread Felix Kuehling
We're reverting this commit on the KFD branch because it's causing hangs on a bunch of HSA compute tests on CZ. Regards, Felix On 16-07-28 10:19 AM, Tom St Denis wrote: > Signed-off-by: Tom St Denis > --- > drivers/gpu/drm/amd/amdgpu/vi.c | 6 ++ > 1 file changed, 6

Re: Reverted another change to fix buffer move hangs (was Re: [PATCH] drm/ttm: partial revert "cleanup ttm_tt_(unbind|destroy)" v2)

2016-08-16 Thread Felix Kuehling
Thank you. Sorry, I already pushed it with Alex's R-B, without yours. On 16-08-16 03:53 AM, Christian König wrote: > Am 15.08.2016 um 23:03 schrieb Alex Deucher: >> On Mon, Aug 15, 2016 at 3:06 PM, Felix Kuehling >> <felix.kuehl...@amd.com> wrote: >>> Patch a

Re: Reverted another change to fix buffer move hangs (was Re: [PATCH] drm/ttm: partial revert "cleanup ttm_tt_(unbind|destroy)" v2)

2016-08-15 Thread Felix Kuehling
Patch against current amd-staging-4.6 is attached. Regards, Felix On 16-08-13 05:25 AM, Christian König wrote: > Am 13.08.2016 um 01:22 schrieb Felix Kuehling: >> [CC Kent FYI] >> >> On 16-08-11 04:31 PM, Deucher, Alexander wrote: >>>> -Original Message---

Re: [PATCH 3/5] drm/amdgpu: fix lru size grouping

2016-08-17 Thread Felix Kuehling
One suggestion inline [FK]. With that fixed, Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com> Regards, Felix On 16-08-17 08:26 AM, Christian König wrote: > From: Christian König <christian.koe...@amd.com> > > Adding a BO can make it the insertion point for

Re: Change queue/pipe split between amdkfd and amdgpu

2017-02-06 Thread Felix Kuehling
Hi Andres, Thank you for tackling this task. It's more involved than I expected, mostly because I didn't have much awareness of the MQD management in amdgpu. I made one comment in a separate message about the unified MQD commit function, if you want to bring that more in line with our latest

Re: [PATCH 1/2] drm/amdgpu: fix 64bit shift for KV/KB

2017-01-24 Thread Felix Kuehling
Series reviewed by me as well: Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com> On 17-01-24 10:48 AM, Deucher, Alexander wrote: >> -Original Message- >> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf >> Of Christian König >> Sen

Re: [PATCH] drm/amdgpu: Refine the handshake between guest and server by mailbox

2017-01-24 Thread Felix Kuehling
On 17-01-24 10:05 AM, Xue, Ken wrote: >> From: Christian König [mailto:deathsim...@vodafone.de] >> Sent: Tuesday, January 24, 2017 10:09 PM >> To: Xue, Ken; amd-gfx mailing list >> Cc: dl.SRDC_SW_GPUVirtualization >> Subject: Re: [PATCH] drm/amdgpu: Refine the handshake between guest and >> server

Re: [PATCH] drm/amdgpu: Remove bo.priority compiler warning

2017-02-14 Thread Felix Kuehling
I think Nicolai beat you to this with his patch "drm/ttm: make TTM_MAX_BO_PRIORITY unsigned". On 17-02-14 01:03 PM, Kent Russell wrote: > Addresses this compile warning: > > warning: comparison of distinct pointer types lacks a cast [enabled by > default] > bo->tbo.priority =

Re: [PATCH 3/5] drm/amdgpu: fix lru size grouping

2016-08-18 Thread Felix Kuehling
expected value any more. > > I'm going to add a comment explaining that this shouldn't be moved apart. > > Christian. > > Am 17.08.2016 um 23:00 schrieb Felix Kuehling: >> One suggestion inline [FK]. >> >> With that fixed, Reviewed-by: Felix Kuehling <felix.kuehl..

Re: Random short freezes due to TTM buffer migrations

2016-08-17 Thread Felix Kuehling
lit over the whole address space. > > The problem is the importing device needs to be able to handle that as > well. > > Regards, > Christian. > > Am 16.08.2016 um 20:33 schrieb Felix Kuehling: >> Very nice. I'm looking forward to this for KFD as well. >> >>

Re: [PATCH 3/5] drm/amdgpu: handle multiple MM nodes in the VMs

2016-08-29 Thread Felix Kuehling
I looked really hard and couldn't find anything obviously broken. It makes me a bit nervous that there is no bounds checking on the nodes array, though. Just one minor nit pick. With that fixed, Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com> On 16-08-29 05:20 AM, Christian König

Re: [PATCH 2/2] drm/amdgpu: bind GTT on demand

2016-09-07 Thread Felix Kuehling
didn't review it too thoroughly, and if you forgot to map to GART somewhere important, I would probably have missed it. Acked-by: Felix Kuehling <felix.kuehl...@amd.com> Once we pull this change into the KFD branch, we can probably revert our ridiculous GART size without losing the ability to ma

Re: [PATCH 4/5] drm/amdgpu: enable amdgpu_move_blit to handle multiple MM nodes

2016-08-29 Thread Felix Kuehling
This requires an assumption that there is no partial overlap between the the mm_nodes in the old and new memory. As long as BOs are always split into fixed size portions that should work OK for copying between linear and split BOs. But it can fail if you copy between split BOs that are split in

Re: [PATCH 3/3] drm/amdgpu: add a custom GTT memory manager

2016-09-09 Thread Felix Kuehling
Some comments inline. Would it make sense to free the GTT address space in amdgpu_ttm_unbind? Basically the counterpart of amdgpu_gtt_mgr_alloc, call it amdgpu_gtt_mgr_free, that frees the address space but keeps the node allocated and sets its node->start address back to

Re: [PATCH 1/6] drm/amdgpu: add AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag v3

2016-10-07 Thread Felix Kuehling
On 16-09-27 05:49 AM, Christian König wrote: > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > @@ -1195,6 +1195,15 @@ int amdgpu_cs_sysvm_access_required(struct > amdgpu_cs_parser *parser) > r = amdgpu_ttm_bind(>tbo, >tbo.mem); >

Re: VRAM manager

2016-10-07 Thread Felix Kuehling
Hi Christian, I'm back from vacation and finally caught up with my email and code-review backlog. I added a comment on patch 1. I don't understand patch 2. I couldn't find where a non-0 lpfn would trigger any reallocation. I think this would have to be somewhere in ttm_bo_validate or

Re: [PATCH 1/2] drm/amdgpu: access stolen VRAM directly on KV/KB

2016-11-07 Thread Felix Kuehling
As a next step, you could also remove HDP flushing on APUs. Regards, Felix On 16-11-07 04:21 AM, Christian König wrote: > From: Christian König > > We don't need to use the PCI BAR on APUs. This allows us to access > the full VRAM directly without being limited by

Re: [PATCH v2] High priority usermode contexts

2017-01-04 Thread Felix Kuehling
On 17-01-03 08:47 PM, Andres Rodriguez wrote: > This patch series provides the initial APIs for high priority contexts. > > The current implementation is based on top of the SW scheduler, there > are no HW priorities set yet. > > This doesn't provide the quality of service we need for VR. Further

Re: [PATCH 3/3] drm/amdgpu/soc15: return cached values for some registers

2017-03-27 Thread Felix Kuehling
on't use any information about RBs. Regards, Felix > > I think we should disallow reading CC_RB_BACKEND_DISABLE and > GC_USER_RB_BACKEND_DISABLE through this interface. > > Regards, > Christian. > > Am 24.03.2017 um 21:08 schrieb Felix Kuehling: >> We're repo

Re: [PATCH 3/3] drm/amdgpu/soc15: return cached values for some registers

2017-03-24 Thread Felix Kuehling
We're reporting gb_addr_config to user mode in our KFD tiling info API. If this is no longer needed by user mode for soc15, we could just put in a dummy value. However, I haven't been told that it can be removed for older ASICs. Regards, Felix On 17-03-24 03:48 PM, Alex Deucher wrote: > On

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

2017-03-29 Thread Felix Kuehling
(or masking of high bits) could be >>> moved up >>> to the caller. >>> >>> Regards, >>>Felix >>> >>> >>> -- >>> F e l i x K u e h l i n g >>> SMTS Software Development Engineer | Vertical Workstati

Re: [PATCH] drm/amdgpu: use a 64bit interval tree for VM management

2017-03-30 Thread Felix Kuehling
This only makes a difference for 32-bit systems. The idea is to have a fixed virtual address space size with 4-level page tables and to minimize differences between 32 and 64-bit systems. Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com> On 17-03-30 08:23 AM, Christian König wrote:

Re: [PATCH] drm/amdgpu: use a 64bit interval tree for VM management

2017-03-30 Thread Felix Kuehling
Technically interval trees use unsigned long. That's 64-bit on a 64-bit system. Your change is only needed if you want to use 48-bits of virtual address space on a 32-bit system. Even with a 32-bit interval tree you can still cover 44-bit virtual addresses. How important is it to use the full

Re: [PATCH] drm/amdgpu: use a 64bit interval tree for VM management

2017-03-30 Thread Felix Kuehling
On 17-03-30 10:19 AM, Christian König wrote: > Am 30.03.2017 um 16:06 schrieb Felix Kuehling: >> Technically interval trees use unsigned long. That's 64-bit on a 64-bit >> system. Your change is only needed if you want to use 48-bits of virtual >> address space on a 32-bit s

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 foun

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 &g

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

2017-03-29 Thread Felix Kuehling
to caller * Add range-check for "from" and "to" Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_v

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

2017-03-28 Thread Felix Kuehling
on that branch. Felix Kuehling (3): drm/amdgpu: Make max_pfn 64-bit drm/amdgpu: Fix Vega10 VM initialization drm/amdgpu: Fix multi-level page table bugs for large BOs drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 - drivers/gpu

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

2017-03-28 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. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/g

[PATCH 1/3] drm/amdgpu: Make max_pfn 64-bit

2017-03-28 Thread Felix Kuehling
With 4-level page tables the maximum VM size is 256TB. That's 64G pages, which can't be represented in 32-bit. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- drivers/gpu/drm/amd/

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

2017-03-28 Thread Felix Kuehling
m VM-size enforcement ahead of max_pfn initializtion. Cast to 64-bit before the left-shift. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 17 +++-- 2 files changed, 10 in

Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling

2017-03-28 Thread Felix Kuehling
n Behalf >>> Of Felix Kuehling >>> Sent: Tuesday, March 28, 2017 2:10 PM >>> To: Zhang, Jerry; amd-gfx@lists.freedesktop.org >>> Subject: Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling >>> >>> >>> On 17-03-27 09:23 PM, Zhang,

Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling

2017-03-28 Thread Felix Kuehling
On 17-03-27 09:23 PM, Zhang, Jerry (Junwei) wrote: > > > On 03/28/2017 06:25 AM, Felix Kuehling wrote: >> Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean >> up the VM fault message format and use rate-limiting similar to >> other ASICs. >>

Multilevel page tables broken for high addresses

2017-03-28 Thread Felix Kuehling
It looks like the multi-level page table changes have been submitted. They're causing problems when we're trying to integrate them into our KFD branch. We resolved the obvious changes and it's working on older ASICs without problems. But we're getting hangs on Vega10. With my patch to enable

Re: Multilevel page tables broken for high addresses

2017-03-28 Thread Felix Kuehling
On 17-03-28 04:25 PM, Deucher, Alexander wrote: > Simple KFD tests that don't use the non-coherent (high) address range > > seem to be working fine. That tells me that the multi-level page table > > code has a problem with high addresses. > > > > I'll keep digging ... > > Do you have multiple GPUs

[PATCH] drm/amdgpu: Improve Vega10 VM fault handling

2017-03-27 Thread Felix Kuehling
Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean up the VM fault message format and use rate-limiting similar to other ASICs. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 +-- 1 file changed, 13 inse

Re: [PATCH] drm/amdgpu: use a 64bit interval tree for VM management

2017-03-31 Thread Felix Kuehling
On 17-03-31 03:15 AM, Christian König wrote: > Am 30.03.2017 um 16:55 schrieb Felix Kuehling: >> This only makes a difference for 32-bit systems. The idea is to have a >> fixed virtual address space size with 4-level page tables and to >> minimize differences between

Re: [PATCH 1/3] drm/radeon: Make CIK support in Radeon conditional (v2)

2017-04-10 Thread Felix Kuehling
On 17-04-09 09:28 PM, Michel Dänzer wrote: > On 10/04/17 09:56 AM, Michel Dänzer wrote: >> On 08/04/17 05:15 AM, Felix Kuehling wrote: >>> Advertise CIK PCI IDs only when they are not supported by amdgpu. >>> Use the CONFIG_DRM_AMDGPU_CIK to check so that a single opti

Re: [PATCH 1/3] drm/radeon: Make CIK support in Radeon conditional (v2)

2017-04-10 Thread Felix Kuehling
On 17-04-10 02:50 PM, Alex Deucher wrote: > On Mon, Apr 10, 2017 at 2:13 PM, Felix Kuehling <felix.kuehl...@amd.com> > wrote: >> >> Are there any other ideas or requests, before I go spend more time on this? > > In the short term, it would probably be good to jus

[PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu

2017-04-10 Thread Felix Kuehling
Provide convenient compile time and boot time options for selecting CIK ASIC support in either or both drivers. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/Kconfig | 10 ++- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/d

Re: [PATCH 3/3] drm/amdgpu: CIK support is no longer experimental

2017-04-10 Thread Felix Kuehling
On 17-04-08 04:50 AM, Nicolai Hähnle wrote: > On 07.04.2017 22:15, Felix Kuehling wrote: >> Change the wording of the CONFIG_DRM_AMDGPU_CIK option to indicate >> that it's no longer experimental. >> >> Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> >

[PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

2017-04-10 Thread Felix Kuehling
Provide convenient compile time and boot time options for selecting CIK ASIC support in either or both drivers. v2: git add missing files Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/Kconfig | 51 ++ drivers/gpu/drm/amd/amdgpu/K

Re: [PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

2017-04-11 Thread Felix Kuehling
On 17-04-10 09:42 PM, Michel Dänzer wrote: > On 11/04/17 08:29 AM, Felix Kuehling wrote: >> I tested this with Hawaii on the KFD branch and >> DRM_CIK_BOTH_DEFAULT_AMDGPU. Both modules get loaded, but radeon doesn't >> initialize the device. Amdgpu works with kfdtest. > D

Re: [PATCH 1/3] drm/radeon: Make CIK support in Radeon conditional (v2)

2017-04-11 Thread Felix Kuehling
On 17-04-10 09:39 PM, Michel Dänzer wrote: > On 11/04/17 03:13 AM, Felix Kuehling wrote: >> On 17-04-09 09:28 PM, Michel Dänzer wrote: >>> On 10/04/17 09:56 AM, Michel Dänzer wrote: >>>> On 08/04/17 05:15 AM, Felix Kuehling wrote: >>>>> Advertise

Re: [PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

2017-04-11 Thread Felix Kuehling
On 17-04-11 12:01 AM, Michel Dänzer wrote: > One issue with this per-driver enable_cik option is that if the user > only enables it in the driver where it's disabled by default, without > also disabling it in the driver where it's enabled by default, it's back > to the current situation where both

Re: [PATCH 05/26] drm/amdgpu: unify MQD programming sequence for kfd and amdgpu

2017-04-11 Thread Felix Kuehling
The amdgpu_amdkfd code you're modifying has changed a lot on the KFD branch. I'm not sure it's worth fixing on the amdgpu branch. We'll largely replace it when we upstream KFD changes. I spotted an obvious bug in your patch, but it was also broken before. See inline [FK]. On 17-04-06 02:21 AM,

Re: [PATCH 15/26] drm/amdgpu: avoid KIQ clashing with compute or KFD queues

2017-04-11 Thread Felix Kuehling
See comment inline [FK]. On 17-04-06 02:21 AM, Andres Rodriguez wrote: > Instead of picking an arbitrary queue for KIQ, search for one according > to policy. The queue must be unused. > > Also report the KIQ as an unavailable resource to KFD. > > In testing I ran into KCQ initialization issues

Re: [PATCH 16/26] drm/amdgpu: new queue policy, take first 2 queues of each pipe

2017-04-11 Thread Felix Kuehling
What about GFX9? See one more comment inline [FK]. On 17-04-06 02:21 AM, Andres Rodriguez wrote: > Instead of taking the first pipe and giving the rest to kfd, take the > first 2 queues of each pipe. > > Effectively, amdgpu and amdkfd own the same number of queues. But > because the queues are

Re: [PATCH] Add support for high priority scheduling in amdgpu v8

2017-04-11 Thread Felix Kuehling
are Acked-by: Felix Kuehling <felix.kuehl...@amd.com> 5-9, 11-12, 15-16 are Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com> Regards, Felix On 17-04-06 02:21 AM, Andres Rodriguez wrote: > Includes fixes for Alex's comments on v7. > > Also includes a new patch to

Re: [PATCH 25/26] drm/amdgpu: guarantee bijective mapping of ring ids for LRU v3

2017-04-12 Thread Felix Kuehling
I haven't reviewed this in detail. But would it make sense to squash that into the commit that introduced the LRU policy for the queue manager (patch 18 in this series)? Regards, Felix On 17-04-06 02:21 AM, Andres Rodriguez wrote: > Depending on usage patterns, the current LRU policy may

Re: [PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

2017-04-10 Thread Felix Kuehling
:21 PM, Felix Kuehling wrote: > Provide convenient compile time and boot time options for selecting > CIK ASIC support in either or both drivers. > > v2: git add missing files > > Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> > --- > drivers/gpu/drm

Re: [PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

2017-04-21 Thread Felix Kuehling
cik_support_param, 1, + -32768, 32767, NULL, NULL); + if (r) + return r; + + amdgpu_cik_support = !radeon_cik_support; +#endif + r = amdgpu_sync_init(); if (r) goto error_sync; Regards, Felix On 17-04-20 05:25 AM, Michel Dänzer wrote: > On 2

Re: [PATCH] dmr/amdgpu: Fix wrongly unref of BO

2017-04-21 Thread Felix Kuehling
On 17-04-21 03:11 AM, Christian König wrote: > Hi Alex, > >> No. For the current source code, I think the premap and no-op is not >> working. >> > Indeed, we don't set bo->mem.bus.addr in amdgpu_ttm_io_mem_reserve() > any more. Felix will probably want to fix that for the KFD branch. I vaguely

Re: [PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

2017-04-19 Thread Felix Kuehling
On 17-04-11 10:23 PM, Michel Dänzer wrote: > One possibility would be making each driver also parse the other > driver's module parameter on the kernel command line. I.e. radeon would > parse > > amdgpu.enable_cik=0 I looked for a way to do this. I think I figured out the parsing part. But I

Re: [PATCH split 2/3] LRU map compute/SDMA user ring ids to kernel ring ids

2017-04-21 Thread Felix Kuehling
Patches 1 and 2 are Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com> Note that we're making another change to this programming sequence in the upcoming release. Conceptually the MQD represents the state of an inactive queue. So the CP_HQD_ACTIVE and DOORBELL_EN bits should be 0 in t

Re: [PATCH 05/17] drm/amdgpu: unify MQD programming sequence for kfd and amdgpu v2

2017-04-21 Thread Felix Kuehling
önig <christian.koe...@amd.com> > Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com> > Signed-off-by: Andres Rodriguez <andre...@gmail.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 51 > ++- > drivers/gpu/drm/amd/amdgpu/amdgpu_

Re: [PATCH] dmr/amdgpu: Fix wrongly unref of BO

2017-04-21 Thread Felix Kuehling
On 17-04-21 01:01 PM, Christian König wrote: > Am 21.04.2017 um 17:43 schrieb Felix Kuehling: >> On 17-04-21 03:11 AM, Christian König wrote: >>> Hi Alex, >>> >>>> No. For the current source code, I think the premap and no-op is not >>>> work

Re: [PATCH] drm/radeon: Make CIK support in Radeon conditional

2017-04-07 Thread Felix Kuehling
On 17-04-07 12:10 PM, Christian König wrote: > Am 07.04.2017 um 18:01 schrieb Felix Kuehling: >> Advertise CIK PCI IDs only when they are not supported by amdgpu. >> Use the CONFIG_DRM_AMDGPU_CIK to check so that a single option in >> the kernel config keeps

[PATCH] drm/radeon: Make CIK support in Radeon conditional

2017-04-07 Thread Felix Kuehling
in the Radeon driver. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/radeon/radeon_drv.c | 3 + include/drm/drm_pciids.h| 114 ++-- 2 files changed, 61 insertions(+), 56 deletions(-) diff --git a/drivers/gpu/drm/

Re: [PATCH] drm/radeon: Make CIK support in Radeon conditional

2017-04-07 Thread Felix Kuehling
Kconfig still calls CIK and SI support in amdgpu "experimental". Is that still true? Should we stop calling it experimental if we actually want distributions to start using it? Regards, Felix On 17-04-07 03:17 PM, Alex Deucher wrote: > On Fri, Apr 7, 2017 at 2:00 PM, F

[PATCH 3/3] drm/amdgpu: CIK support is no longer experimental

2017-04-07 Thread Felix Kuehling
Change the wording of the CONFIG_DRM_AMDGPU_CIK option to indicate that it's no longer experimental. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/Kconfig | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/d

[PATCH 2/3] drm/radeon: Make SI support in Radeon conditional

2017-04-07 Thread Felix Kuehling
in the Radeon driver. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/radeon/Kconfig | 12 +++ drivers/gpu/drm/radeon/radeon_drv.c | 3 + include/drm/drm_pciids.h| 146 ++-- 3 files changed, 89 insertions(+), 72 del

[PATCH 1/3] drm/radeon: Make CIK support in Radeon conditional (v2)

2017-04-07 Thread Felix Kuehling
in the Radeon driver. v2: Add CONFIG_DRM_RADEON_FORCE_CIK option Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/radeon/Kconfig | 12 drivers/gpu/drm/radeon/radeon_drv.c | 3 + include/drm/drm_pciids.h

Re: [PATCH 1/3] drm/amdgpu: only move VM BOs in the LRU during validation v2

2017-07-31 Thread Felix Kuehling
Patches 1 and 3 are Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com> I'm not sure about Patch 2. See my comment in reply to that patch. Regards, Felix On 17-07-29 07:32 AM, Christian König wrote: > From: Christian König <christian.koe...@amd.com> > > This s

Re: [PATCH 2/3] drm/amdgpu: only bind VM shadows after validation v2

2017-07-31 Thread Felix Kuehling
Hi Christian, If I'm reading this correctly, now you're only binding page directories, but not the leaf page tables. Is that intentional? Regards, Felix On 17-07-29 07:32 AM, Christian König wrote: > From: Christian König > > No need to do this on every CS. > > v2:

Re: [PATCH 2/3] drm/amdgpu: only bind VM shadows after validation v2

2017-07-31 Thread Felix Kuehling
On 17-07-31 11:30 AM, Christian König wrote: > Am 31.07.2017 um 17:24 schrieb Felix Kuehling: >> Hi Christian, >> >> If I'm reading this correctly, now you're only binding page directories, >> but not the leaf page tables. Is that intentional? > > You are n

[PATCH 1/1] drm/amdgpu: Use list_del_init in amdgpu_mn_unregister

2017-08-01 Thread Felix Kuehling
Otherwise bo->shadow_list (which is aliased by bo->mn_list) will not appear empty in amdgpu_ttm_bo_destroy and cause an oops when freeing former userptr BOs. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +- 1 file changed,

Re: [PATCH 1/1] drm/amdgpu: Use list_del_init in amdgpu_mn_unregister

2017-08-01 Thread Felix Kuehling
On 17-08-01 10:34 PM, Felix Kuehling wrote: > Otherwise bo->shadow_list (which is aliased by bo->mn_list) will not > appear empty in amdgpu_ttm_bo_destroy and cause an oops when freeing > former userptr BOs. > > Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> &

Re: [PATCH 0/6] Experimental P2P buffer sharing v3

2017-08-03 Thread Felix Kuehling
tch series rebased on current amd-kfd-staging-4.11? Thanks, Felix On 17-07-18 10:22 PM, Felix Kuehling wrote: > This patch series adds experimental P2P buffer sharing in amdgpu. It's > disabled by default and can be enabled with amdgpu.p2p_sharing=1. > > v2: > * Changed drm helper funct

Re: [PATCH 1/2] drm/amdgpu: increase fragmentation size for Vega10 v2

2017-08-03 Thread Felix Kuehling
On 17-07-19 11:26 AM, Christian König wrote: > From: Christian König > > The fragment bits work differently for Vega10 compared to previous > generations. > > Increase the fragment size to 2MB for now to better handle that. > > v2: handle the hardware setup as well > >

Re: [PATCH 14/19] drm/amdkfd: Add more error printing to help bringup

2017-08-15 Thread Felix Kuehling
directly? > > > Yong > > > *From:* Oded Gabbay <oded.gab...@gmail.com> > *Sent:* Saturday, August 12, 2017 10:54:41 AM > *To:* Kuehling, Felix > *Cc:* amd-gfx list; Zhao, Yong > *Subject:* Re: [PATCH 14/19] drm/amdkfd: Add more error printing to > help br

[PATCH 14/24] drm/amdkfd: Handle remaining BUG_ONs more gracefully v2

2017-08-15 Thread Felix Kuehling
In most cases, BUG_ONs can be replaced with WARN_ON with an error return. In some void functions just turn them into a WARN_ON and possibly an early exit. v2: * Cleaned up error handling in pm_send_unmap_queue * Removed redundant WARN_ON in kfd_process_destroy_delayed Signed-off-by: Felix

[PATCH 13/24] drm/amdkfd: Allocate gtt_sa_bitmap in long units

2017-08-15 Thread Felix Kuehling
gtt_sa_bitmap is accessed by bitmap functions, which operate on longs. Therefore the array should be allocated in long units. Also round up in case the number of bits is not a multiple of BITS_PER_LONG. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> Reviewed-by: Oded Gabbay <

[PATCH 20/24] drm/amdgpu: Program SH_STATIC_MEM_CONFIG globally, not per-VMID

2017-08-15 Thread Felix Kuehling
This register only has a single instance in the hardware. Its value applies to all VMIDS. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)

[PATCH 18/24] drm/amdgpu: Disable GFX PG on CZ

2017-08-15 Thread Felix Kuehling
It's causing problems with user mode queues and the HIQ, and can lead to hard hangs during boot after programming RLC_CP_SCHEDULERS. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> Reviewed-by: Alex Deucher <alexander.deuc...@amd.com> --- drivers/gpu/drm/amd/amdgpu/vi.c | 3

[PATCH 07/24] drm/amdkfd: Consolidate and clean up log commands

2017-08-15 Thread Felix Kuehling
nd %d, %i and 0x%llX. According to kernel.org: "Printing numbers in parentheses (%d) adds no value and should be avoided." Signed-off-by: Kent Russell <kent.russ...@amd.com> Signed-off-by: Yong Zhao <yong.z...@amd.com> Signed-off-by: Felix Kuehling <felix.kuehl...@am

[PATCH 22/24] drm/amdkfd: Adding new IOCTL for scratch memory v2

2017-08-15 Thread Felix Kuehling
ed-off-by: Moses Reuben <moses.reu...@amd.com> Signed-off-by: Ben Goz <ben@amd.com> Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 37 ++ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c |

[PATCH 21/24] drm/amdgpu: Add kgd/kfd interface to support scratch memory v2

2017-08-15 Thread Felix Kuehling
acking in kgd_kfd_interface.h Signed-off-by: Moses Reuben <moses.reu...@amd.com> Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 15 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 16 +++- drivers/g

[PATCH 23/24] drm/amdgpu: Add kgd kfd interface get_tile_config() v2

2017-08-15 Thread Felix Kuehling
From: Yong Zhao <yong.z...@amd.com> v2: * Removed amdgpu_amdkfd prefix from static functions * Documented get_tile_config in kgd_kfd_interface.h Signed-off-by: Yong Zhao <yong.z...@amd.com> Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> Acked-by: Oded Gabbay <

[PATCH 01/24] drm/amdkfd: Fix typo in dbgdev_wave_reset_wavefronts

2017-08-15 Thread Felix Kuehling
Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c b/drivers/gpu/dr

[PATCH 08/24] drm/amdkfd: Change x==NULL/false references to !x

2017-08-15 Thread Felix Kuehling
m> Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 22 +- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c| 20 - drivers/gpu/drm/amd/amdkfd/kfd_

[PATCH 12/24] drm/amdkfd: Fix doorbell initialization and finalization

2017-08-15 Thread Felix Kuehling
Handle errors in doorbell aperture initialization instead of BUG_ON. iounmap doorbell aperture during finalization. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 9 -

[PATCH 04/24] drm/amdkfd: Fix allocated_queues bitmap initialization

2017-08-15 Thread Felix Kuehling
Use shared_resources.queue_bitmap to determine the queues available for KFD in each pipe. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 12 +--- 1 fil

[PATCH 19/24] drm/amd: Update MEC HQD loading code for KFD

2017-08-15 Thread Felix Kuehling
Various bug fixes and improvements that accumulated over the last two years. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> Acked-by: Oded Gabbay <oded.gab...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 16 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amd

[PATCH 16/24] drm/amdkfd: Clamp EOP queue size correctly on Gfx8

2017-08-15 Thread Felix Kuehling
y: Jay Cornwall <jay.cornw...@amd.com> Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com> Acked-by: Oded Gabbay <oded.gab...@gmail.com> --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dr

[PATCH 05/24] drm/amdgpu: Remove hard-coded assumptions about compute pipes

2017-08-15 Thread Felix Kuehling
Remove hard-coded assumption that the first compute pipe is reserved for amdgpu. Pipe 0 actually means pipe 0 now. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 +- dri

Re: [PATCH 00/19] KFD fixes and cleanups

2017-08-14 Thread Felix Kuehling
4 or Dave Airlie's drm-next >> (which amdkfd-next currently points to) branches ? >> I tried to apply this patch-set on amdkfd-next, but it fails on patch >> 5. I can't upstream them to Dave when they don't apply to his upstream >> branch. >> >>

Re: [PATCH 4/4] drm/amdkfd: Implement image tiling mode support

2017-08-14 Thread Felix Kuehling
? If it's the latter, we could reshuffle the ioctls later to better match the current release ABI before going upstream. Regards, Felix On 2017-08-14 11:18 AM, Felix Kuehling wrote: > On 2017-08-13 05:08 AM, Oded Gabbay wrote: >> As in the previous patch, there is a hole here in the IOCTLs >

Re: [PATCH 1/4] drm/amdgpu: Adding new kgd/kfd interface functions to support scratch memory

2017-08-14 Thread Felix Kuehling
[+Marek, Alex for comment, see below] On 2017-08-13 04:56 AM, Oded Gabbay wrote: > On Sat, Aug 12, 2017 at 7:47 AM, Felix Kuehling <felix.kuehl...@amd.com> > wrote: >> From: Moses Reuben <moses.reu...@amd.com> >> >> Signed-off-by: Moses Reuben <moses.

[PATCH 05/19] drm/amdkfd: Clean up KFD style errors and warnings

2017-08-11 Thread Felix Kuehling
.@amd.com> Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 24 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 16 ++--- drivers/

[PATCH 10/19] drm/amdkfd: Remove BUG_ONs for NULL pointer arguments

2017-08-11 Thread Felix Kuehling
Remove BUG_ONs that check for NULL pointer arguments that are dereferenced in the same function. Dereferencing the NULL pointer will generate a BUG anyway, so the explicit check is redundant and unnecessary overhead. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/d

[PATCH 19/19] drm/amd: Update MEC HQD loading code for KFD

2017-08-11 Thread Felix Kuehling
Various bug fixes and improvements that accumulated over the last two years. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 16 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 130 +--- drivers/gpu/d

[PATCH 02/19] drm/amdkfd: Fix typo in dbgdev_wave_reset_wavefronts

2017-08-11 Thread Felix Kuehling
Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c b/drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c index d5e19b5..8b14a4e 100644 --- a/drive

[PATCH 08/19] drm/amdkfd: Fix goto usage

2017-08-11 Thread Felix Kuehling
cleanup has to be done. If there is no cleanup needed then just return directly." Signed-off-by: Kent Russell <kent.russ...@amd.com> Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 15 +-- .../gpu/drm/amd/amdkfd/kfd_d

[PATCH 07/19] drm/amdkfd: Change x==NULL/false references to !x

2017-08-11 Thread Felix Kuehling
m> Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 22 +- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c| 20 - drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c| 4 +- drivers/gpu/drm/amd/a

[PATCH 16/19] drm/amdkfd: Update PM4 packet headers

2017-08-11 Thread Felix Kuehling
To match current firmware. The map process packet has been extended to support scratch. This is a non-backwards compatible change and it's about two years old. So no point keeping the old version around conditionally. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/d

[PATCH 04/19] drm/amdkfd: Fix allocated_queues bitmap initialization

2017-08-11 Thread Felix Kuehling
Use shared_resources.queue_bitmap to determine the queues available for KFD in each pipe. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH 14/19] drm/amdkfd: Add more error printing to help bringup

2017-08-11 Thread Felix Kuehling
From: Yong Zhao <yong.z...@amd.com> Signed-off-by: Yong Zhao <yong.z...@amd.com> Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH 13/19] drm/amdkfd: Handle remaining BUG_ONs more gracefully

2017-08-11 Thread Felix Kuehling
In most cases, BUG_ONs can be replaced with WARN_ON with an error return. In some void functions just turn them into a WARN_ON and possibly an early exit. Signed-off-by: Felix Kuehling <felix.kuehl...@amd.com> --- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c| 3 +- drivers/gpu/d

  1   2   3   4   5   6   7   8   9   10   >