Re: [PATCH 3/9] drm/amdkfd: Make IOMMUv2 code conditional

2018-02-06 Thread Oded Gabbay
On Wed, Feb 7, 2018 at 2:30 AM, Felix Kuehling wrote: > On 2018-02-06 03:53 AM, Oded Gabbay wrote: >> On Mon, Feb 5, 2018 at 9:00 PM, Christian König >> wrote: >>> Looks good to me on first glance. >>> >>> You probably don't mind that I'm going to pull a good part of that into >>> amdgpu as next

Re: [PATCH 3/9] drm/amdkfd: Make IOMMUv2 code conditional

2018-02-06 Thread Felix Kuehling
On 2018-02-06 03:53 AM, Oded Gabbay wrote: > On Mon, Feb 5, 2018 at 9:00 PM, Christian König > wrote: >> Looks good to me on first glance. >> >> You probably don't mind that I'm going to pull a good part of that into >> amdgpu as next step? >> > That indeed looks better then the first approach. >

Re: [PATCH 3/9] drm/amdkfd: Make IOMMUv2 code conditional

2018-02-06 Thread Oded Gabbay
On Mon, Feb 5, 2018 at 9:00 PM, Christian König wrote: > Looks good to me on first glance. > > You probably don't mind that I'm going to pull a good part of that into > amdgpu as next step? > That indeed looks better then the first approach. Felix, I've applied all other patches from the dGPU top

Re: [PATCH 3/9] drm/amdkfd: Make IOMMUv2 code conditional

2018-02-05 Thread Christian König
Looks good to me on first glance. You probably don't mind that I'm going to pull a good part of that into amdgpu as next step? Regards, Christian. Am 03.02.2018 um 03:29 schrieb Felix Kuehling: The attached patch is my attempt to keep most of the IOMMU code in one place (new kfd_iommu.c) to

Re: [PATCH 3/9] drm/amdkfd: Make IOMMUv2 code conditional

2018-02-02 Thread Felix Kuehling
The attached patch is my attempt to keep most of the IOMMU code in one place (new kfd_iommu.c) to avoid #ifdefs all over the place. This way I can still conditionally compile a bunch of KFD code that is only needed for IOMMU handling, with stub functions for kernel configs without IOMMU support. Ab

Re: [PATCH 3/9] drm/amdkfd: Make IOMMUv2 code conditional

2018-01-31 Thread Felix Kuehling
On 2018-01-31 10:00 AM, Oded Gabbay wrote: > On Wed, Jan 31, 2018 at 4:56 PM, Oded Gabbay wrote: >> Hi Felix, >> Please don't spread 19 #ifdefs throughout the code. >> I suggest to put one #ifdef in linux/amd-iommu.h itself around all the >> functions declarations and in the #else section put macr

Re: [PATCH 3/9] drm/amdkfd: Make IOMMUv2 code conditional

2018-01-31 Thread Christian König
Am 31.01.2018 um 16:00 schrieb Oded Gabbay: On Wed, Jan 31, 2018 at 4:56 PM, Oded Gabbay wrote: Hi Felix, Please don't spread 19 #ifdefs throughout the code. I suggest to put one #ifdef in linux/amd-iommu.h itself around all the functions declarations and in the #else section put macros with em

Re: [PATCH 3/9] drm/amdkfd: Make IOMMUv2 code conditional

2018-01-31 Thread Oded Gabbay
On Wed, Jan 31, 2018 at 4:56 PM, Oded Gabbay wrote: > Hi Felix, > Please don't spread 19 #ifdefs throughout the code. > I suggest to put one #ifdef in linux/amd-iommu.h itself around all the > functions declarations and in the #else section put macros with empty > implementations. This is much mor

Re: [PATCH 3/9] drm/amdkfd: Make IOMMUv2 code conditional

2018-01-31 Thread Oded Gabbay
Hi Felix, Please don't spread 19 #ifdefs throughout the code. I suggest to put one #ifdef in linux/amd-iommu.h itself around all the functions declarations and in the #else section put macros with empty implementations. This is much more readable and maintainable. Oded On Fri, Jan 5, 2018 at 12:

[PATCH 3/9] drm/amdkfd: Make IOMMUv2 code conditional

2018-01-04 Thread Felix Kuehling
dGPUs work without IOMMUv2. Make IOMMUv2 initialization dependent on ASIC information. Also allow building KFD without IOMMUv2 support. This is still useful for dGPUs and prepares for enabling KFD on architectures that don't support AMD IOMMUv2. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/