[PATCH v2 07/25] Update MAINTAINERS and CREDITS files with amdkfd info

2014-07-17 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- CREDITS | 7 +++ MAINTAINERS | 10 ++ 2 files changed, 17 insertions(+) diff --git a/CREDITS b/CREDITS index 03343bf..ae47364 100644 --- a/CREDITS +++ b/CREDITS @@ -1197,6 +1197,13 @@ S: R. Tocantins, 89 - Cristo Rei S: 80050-430 - Curitiba

[PATCH v2 17/25] amdkfd: Add packet manager module

2014-07-17 Thread Oded Gabbay
From: Ben Goz The packet manager module builds PM4 packets for the sole use of the CP scheduler. Those packets are used by the HIQ to submit runlists to the CP. Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile | 2 +- drivers/gpu/drm

[PATCH v2 14/25] amdkfd: Add mqd_manager module

2014-07-17 Thread Oded Gabbay
From: Ben Goz The mqd_manager module handles MQD data structures. MQD stands for Memory Queue Descriptor, which is used by the H/W to keep the usermode queue state in memory. Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile | 2

[PATCH v2 06/25] drm/radeon: Add radeon <--> amdkfd interface

2014-07-17 Thread Oded Gabbay
. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/Makefile | 1 + drivers/gpu/drm/radeon/cik.c| 9 + drivers/gpu/drm/radeon/cik_reg.h| 65 + drivers/gpu/drm/radeon/cikd.h | 51 +++- drivers/gpu/drm/radeon/radeon.h | 3 + drivers/gpu/drm/radeon

[PATCH v2 05/25] drm/radeon: adding synchronization for GRBM GFX

2014-07-17 Thread Oded Gabbay
Implementing a lock for selecting and accessing shader engines and arrays. This lock will make sure that radeon and amdkfd are not colliding when accessing shader engines and arrays with GRBM_GFX_INDEX register. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/cik.c | 26

[PATCH v2 10/25] amdkfd: Add topology module to amdkfd

2014-07-17 Thread Oded Gabbay
From: Evgeny Pinchuk This patch adds the topology module to the driver. The topology is exposed to userspace through the sysfs. The calls to add and remove a device to/from topology are done by the radeon driver. Signed-off-by: Evgeny Pinchuk Signed-off-by: Oded Gabbay --- drivers/gpu/drm

[PATCH v2 19/25] amdkfd: Add device queue manager module

2014-07-17 Thread Oded Gabbay
/resume operation. Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile | 2 +- drivers/gpu/drm/radeon/amdkfd/kfd_device.c | 26 +- .../drm/radeon/amdkfd/kfd_device_queue_manager.c | 985 + drivers/gpu/drm/radeon

[PATCH v2 21/25] amdkfd: Implement the create/destroy/update queue IOCTLs

2014-07-17 Thread Oded Gabbay
From: Ben Goz Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/kfd_chardev.c | 133 +++- drivers/gpu/drm/radeon/amdkfd/kfd_priv.h| 8 ++ 2 files changed, 138 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon

[PATCH v2 18/25] amdkfd: Add process queue manager module

2014-07-17 Thread Oded Gabbay
From: Ben Goz The queue scheduler divides into two sections, one section is process bounded and the other section is device bounded. The process bounded section is handled by this module. The PQM handles usermode queue setup, updates and tear-down. Signed-off-by: Ben Goz Signed-off-by: Oded

[PATCH v2 00/25] AMDKFD kernel driver

2014-07-17 Thread Oded Gabbay
Add device queue manager module amdkfd: Implement the create/destroy/update queue IOCTLs Evgeny Pinchuk (3): amdkfd: Add topology module to amdkfd amdkfd: Implement the Get Clock Counters IOCTL amdkfd: Implement the PMC Acquire/Release IOCTLs Oded Gabbay (10): mm: Add kfd_process pointe

[PATCH v2 01/25] mm: Add kfd_process pointer to mm_struct

2014-07-17 Thread Oded Gabbay
if I can drop the kfd_process in mm_struct and remove the use of the new notification chain in mmput. Instead, I will try to use the mmu release notifier. Signed-off-by: Oded Gabbay --- include/linux/mm_types.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/linux

Re: [PATCH v2 01/25] mm: Add kfd_process pointer to mm_struct

2014-07-17 Thread Oded Gabbay
On 17/07/14 17:12, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:57:58PM +0300, Oded Gabbay wrote: Forgot to add mm mailing list. Sorry. This patch enables the amdkfd driver to retrieve the kfd_process object from the process's mm_struct. This is needed because kfd_process lifespan is bound

Re: [PATCH v2 21/25] amdkfd: Implement the create/destroy/update queue IOCTLs

2014-07-27 Thread Oded Gabbay
On 21/07/14 02:09, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:29:28PM +0300, Oded Gabbay wrote: From: Ben Goz Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/kfd_chardev.c | 133 +++- drivers/gpu/drm/radeon/amdkfd

Re: [PATCH v2 16/25] amdkfd: Add module parameter of scheduling policy

2014-07-27 Thread Oded Gabbay
On 21/07/14 05:45, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:29:23PM +0300, Oded Gabbay wrote: From: Ben Goz This patch adds a new parameter to the amdkfd driver. This parameter enables the user to select the scheduling policy of the CP. The choices are: * CP Scheduling with support

Re: [PATCH v2 15/25] amdkfd: Add kernel queue module

2014-07-27 Thread Oded Gabbay
On 21/07/14 05:42, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:29:22PM +0300, Oded Gabbay wrote: From: Ben Goz The kernel queue module enables the amdkfd to establish kernel queues, not exposed to user space. The kernel queues are used for HIQ (HSA Interface Queue) and DIQ (Debug

Re: [PATCH v2 13/25] amdkfd: Add queue module

2014-07-27 Thread Oded Gabbay
On 21/07/14 02:06, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:29:20PM +0300, Oded Gabbay wrote: From: Ben Goz The queue module enables allocating and initializing queues uniformly. Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile| 2

Re: [PATCH v2 12/25] amdkfd: Add binding/unbinding calls to amd_iommu driver

2014-07-27 Thread Oded Gabbay
On 21/07/14 02:04, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:29:19PM +0300, Oded Gabbay wrote: This patch adds the functions to bind and unbind pasid from a device through the amd_iommu driver. The unbind function is called when the mm_struct of the process is released. The bind

Re: [PATCH v2 10/25] amdkfd: Add topology module to amdkfd

2014-07-27 Thread Oded Gabbay
On 21/07/14 01:37, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:29:17PM +0300, Oded Gabbay wrote: From: Evgeny Pinchuk This patch adds the topology module to the driver. The topology is exposed to userspace through the sysfs. The calls to add and remove a device to/from topology are done

Re: [PATCH v2 10/25] amdkfd: Add topology module to amdkfd

2014-07-27 Thread Oded Gabbay
On 21/07/14 01:37, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:29:17PM +0300, Oded Gabbay wrote: From: Evgeny Pinchuk This patch adds the topology module to the driver. The topology is exposed to userspace through the sysfs. The calls to add and remove a device to/from topology are done

Re: [PATCH v2 10/25] amdkfd: Add topology module to amdkfd

2014-07-30 Thread Oded Gabbay
On 27/07/14 14:15, Oded Gabbay wrote: On 21/07/14 01:37, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:29:17PM +0300, Oded Gabbay wrote: From: Evgeny Pinchuk This patch adds the topology module to the driver. The topology is exposed to userspace through the sysfs. The calls to add

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-21 Thread Oded Gabbay
On 20/07/14 20:46, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:57:25PM +0300, Oded Gabbay wrote: Forgot to cc mailing list on cover letter. Sorry. As a continuation to the existing discussion, here is a v2 patch series restructured with a cleaner history and no totally-different-early

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-21 Thread Oded Gabbay
On 21/07/14 16:39, Christian König wrote: Am 21.07.2014 14:36, schrieb Oded Gabbay: On 20/07/14 20:46, Jerome Glisse wrote: On Thu, Jul 17, 2014 at 04:57:25PM +0300, Oded Gabbay wrote: Forgot to cc mailing list on cover letter. Sorry. As a continuation to the existing discussion, here

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-21 Thread Oded Gabbay
On 21/07/14 20:05, Daniel Vetter wrote: > On Mon, Jul 21, 2014 at 11:58:52AM -0400, Jerome Glisse wrote: >> On Mon, Jul 21, 2014 at 05:25:11PM +0200, Daniel Vetter wrote: >>> On Mon, Jul 21, 2014 at 03:39:09PM +0200, Christian König wrote: >>>> Am 21.07.2014 14:36, sc

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-21 Thread Oded Gabbay
On 21/07/14 18:54, Jerome Glisse wrote: > On Mon, Jul 21, 2014 at 05:12:06PM +0300, Oded Gabbay wrote: >> On 21/07/14 16:39, Christian König wrote: >>> Am 21.07.2014 14:36, schrieb Oded Gabbay: >>>> On 20/07/14 20:46, Jerome Glisse wrote: >>>>> On Thu,

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-21 Thread Oded Gabbay
On 21/07/14 21:14, Jerome Glisse wrote: > On Mon, Jul 21, 2014 at 08:42:58PM +0300, Oded Gabbay wrote: >> On 21/07/14 18:54, Jerome Glisse wrote: >>> On Mon, Jul 21, 2014 at 05:12:06PM +0300, Oded Gabbay wrote: >>>> On 21/07/14 16:39, Christian König wrote: >>&

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-21 Thread Oded Gabbay
On 21/07/14 21:22, Daniel Vetter wrote: > On Mon, Jul 21, 2014 at 7:28 PM, Oded Gabbay wrote: >>> I'm not sure whether we can do the same trick with the hw scheduler. But >>> then unpinning hw contexts will drain the pipeline anyway, so I guess we >>> can just stop

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-21 Thread Oded Gabbay
On 21/07/14 21:59, Jerome Glisse wrote: > On Mon, Jul 21, 2014 at 09:36:44PM +0300, Oded Gabbay wrote: >> On 21/07/14 21:14, Jerome Glisse wrote: >>> On Mon, Jul 21, 2014 at 08:42:58PM +0300, Oded Gabbay wrote: >>>> On 21/07/14 18:54, Jerome Glisse wrote: >>&g

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-21 Thread Oded Gabbay
On 21/07/14 22:28, Jerome Glisse wrote: > On Mon, Jul 21, 2014 at 10:23:43PM +0300, Oded Gabbay wrote: >> On 21/07/14 21:59, Jerome Glisse wrote: >>> On Mon, Jul 21, 2014 at 09:36:44PM +0300, Oded Gabbay wrote: >>>> On 21/07/14 21:14, Jerome Glisse wrote: >>&g

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-22 Thread Oded Gabbay
On 22/07/14 02:05, Jerome Glisse wrote: On Tue, Jul 22, 2014 at 12:56:13AM +0300, Oded Gabbay wrote: On 21/07/14 22:28, Jerome Glisse wrote: On Mon, Jul 21, 2014 at 10:23:43PM +0300, Oded Gabbay wrote: On 21/07/14 21:59, Jerome Glisse wrote: On Mon, Jul 21, 2014 at 09:36:44PM +0300, Oded

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-22 Thread Oded Gabbay
On 22/07/14 10:23, Daniel Vetter wrote: On Mon, Jul 21, 2014 at 10:23:43PM +0300, Oded Gabbay wrote: But Jerome, the core problem still remains in effect, even with your suggestion. If an application, either via userspace queue or via ioctl, submits a long-running kernel, than the CPU

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-22 Thread Oded Gabbay
On 22/07/14 10:28, Daniel Vetter wrote: On Mon, Jul 21, 2014 at 03:03:07PM -0400, Jerome Glisse wrote: On Mon, Jul 21, 2014 at 09:41:29PM +0300, Oded Gabbay wrote: On 21/07/14 21:22, Daniel Vetter wrote: On Mon, Jul 21, 2014 at 7:28 PM, Oded Gabbay wrote: I'm not sure whether we can do

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-22 Thread Oded Gabbay
On 22/07/14 10:40, Daniel Vetter wrote: On Tue, Jul 22, 2014 at 09:28:51AM +0200, Daniel Vetter wrote: On Mon, Jul 21, 2014 at 03:03:07PM -0400, Jerome Glisse wrote: On Mon, Jul 21, 2014 at 09:41:29PM +0300, Oded Gabbay wrote: On 21/07/14 21:22, Daniel Vetter wrote: On Mon, Jul 21, 2014 at 7

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-22 Thread Oded Gabbay
On 22/07/14 12:21, Daniel Vetter wrote: On Tue, Jul 22, 2014 at 10:19 AM, Oded Gabbay wrote: Exactly, just prevent userspace from submitting more. And if you have misbehaving userspace that submits too much, reset the gpu and tell it that you're sorry but won't schedule any more work. I'm

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-23 Thread Oded Gabbay
On 22/07/14 14:15, Daniel Vetter wrote: On Tue, Jul 22, 2014 at 12:52:43PM +0300, Oded Gabbay wrote: On 22/07/14 12:21, Daniel Vetter wrote: On Tue, Jul 22, 2014 at 10:19 AM, Oded Gabbay wrote: Exactly, just prevent userspace from submitting more. And if you have misbehaving userspace

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-23 Thread Oded Gabbay
On 23/07/14 10:05, Daniel Vetter wrote: On Wed, Jul 23, 2014 at 8:50 AM, Oded Gabbay wrote: On 22/07/14 14:15, Daniel Vetter wrote: On Tue, Jul 22, 2014 at 12:52:43PM +0300, Oded Gabbay wrote: On 22/07/14 12:21, Daniel Vetter wrote: On Tue, Jul 22, 2014 at 10:19 AM, Oded Gabbay wrote

[PATCH v3 16/23] amdkfd: Add packet manager module

2014-08-05 Thread Oded Gabbay
documentation Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile | 2 +- drivers/gpu/drm/radeon/amdkfd/kfd_packet_manager.c | 495 + drivers/gpu/drm/radeon/amdkfd/kfd_priv.h | 72 +++ 3 files changed, 568

[PATCH v3 18/23] amdkfd: Add device queue manager module

2014-08-05 Thread Oded Gabbay
/resume operation. v3: change device_init v3: use new gart allocation functions v3: Add documentation Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile | 2 +- drivers/gpu/drm/radeon/amdkfd/kfd_device.c | 28 +- .../drm/radeon/amdkfd

[PATCH v3 23/23] amdkfd: Implement the Get Process Aperture IOCTL

2014-08-05 Thread Oded Gabbay
From: Alexey Skidanov v3: fix debug msg Signed-off-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/kfd_chardev.c | 47 - drivers/gpu/drm/radeon/amdkfd/kfd_priv.h| 5 +++ 2 files changed, 51 insertions(+), 1 deletion(-) diff

[PATCH v3 10/23] amdkfd: Add basic modules to amdkfd

2014-08-05 Thread Oded Gabbay
of doorbell pages from userspace v3: Add documentation for apertures Signed-off-by: Andrew Lewycky Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile | 4 +- drivers/gpu/drm/radeon/amdkfd/kfd_aperture.c | 350 +++ drivers/gpu/drm/radeon/amdkfd

[PATCH v3 21/23] amdkfd: Implement the Set Memory Policy IOCTL

2014-08-05 Thread Oded Gabbay
From: Andrew Lewycky Signed-off-by: Andrew Lewycky Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/kfd_chardev.c | 51 - 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/amdkfd/kfd_chardev.c b/drivers/gpu/drm/radeon

[PATCH v3 20/23] amdkfd: Implement the create/destroy/update queue IOCTLs

2014-08-05 Thread Oded Gabbay
From: Ben Goz v3: remove use of internal typedefs v3: fix debug prints v3: add checks for parameters v3: use doorbell address from user Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/kfd_chardev.c| 182 - drivers/gpu/drm/radeon

[PATCH v3 14/23] amdkfd: Add kernel queue module

2014-08-05 Thread Oded Gabbay
-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile | 3 +- .../drm/radeon/amdkfd/kfd_device_queue_manager.h | 101 +++ drivers/gpu/drm/radeon/amdkfd/kfd_kernel_queue.c | 330 ++ drivers/gpu/drm/radeon/amdkfd/kfd_kernel_queue.h | 66

[PATCH v3 17/23] amdkfd: Add process queue manager module

2014-08-05 Thread Oded Gabbay
process instead of define v3: use doorbell address from user Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile | 3 +- drivers/gpu/drm/radeon/amdkfd/kfd_priv.h | 17 + drivers/gpu/drm/radeon/amdkfd/kfd_process.c| 16

[PATCH v3 15/23] amdkfd: Add module parameter of scheduling policy

2014-08-05 Thread Oded Gabbay
-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/kfd_module.c | 12 drivers/gpu/drm/radeon/amdkfd/kfd_priv.h | 29 + 2 files changed, 41 insertions(+) diff --git a/drivers/gpu/drm/radeon/amdkfd/kfd_module.c b/drivers/gpu/drm/radeon/amdkfd

[PATCH v3 13/23] amdkfd: Add mqd_manager module

2014-08-05 Thread Oded Gabbay
macros v3: use new gart allocation functions v3: Add documentation Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile | 2 +- drivers/gpu/drm/radeon/amdkfd/cik_regs.h| 220 + drivers/gpu/drm/radeon/amdkfd

[PATCH v3 09/23] amdkfd: Add topology module to amdkfd

2014-08-05 Thread Oded Gabbay
with the HSA spec). To recap, amdkfd exposes a different kind of topology than the one exposed by /sys/devices/system/cpu/cpu even though it may contain similar information. Signed-off-by: Evgeny Pinchuk Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile |2 +- drivers

[PATCH v3 07/23] amdkfd: Add IOCTL set definitions of amdkfd

2014-08-05 Thread Oded Gabbay
of the amdkfd device - KFD_IOC_UPDATE_QUEUE: Updates configuration of an existing usermode queue (v3) remove pragma pack (v3) remove pmc ioctls (v3) add parameter for doorbell offset (v3) add comment on counters Signed-off-by: Oded Gabbay --- include/uapi/linux/kfd_ioctl.h | 123

[PATCH v3 04/23] drm/radeon: adding synchronization for GRBM GFX

2014-08-05 Thread Oded Gabbay
Implementing a lock for selecting and accessing shader engines and arrays. This lock will make sure that radeon and amdkfd are not colliding when accessing shader engines and arrays with GRBM_GFX_INDEX register. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/cik.c | 26

[PATCH v3 06/23] Update MAINTAINERS and CREDITS files with amdkfd info

2014-08-05 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- CREDITS | 7 +++ MAINTAINERS | 10 ++ 2 files changed, 17 insertions(+) diff --git a/CREDITS b/CREDITS index 28ee151..e9628d5 100644 --- a/CREDITS +++ b/CREDITS @@ -1197,6 +1197,13 @@ S: R. Tocantins, 89 - Cristo Rei S: 80050-430 - Curitiba

[PATCH v3 19/23] amdkfd: Add interrupt handling module

2014-08-05 Thread Oded Gabbay
interrupts because we have no back-pressure to the hardware. v3: change device init v3: make sure spin lock is taken only if init is complete v3: move bool to end of struct Signed-off-by: Andrew Lewycky Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile| 3 +- drivers/gpu

[PATCH v3 08/23] amdkfd: Add amdkfd skeleton driver

2014-08-05 Thread Oded Gabbay
This patch adds the amdkfd skeleton driver. The driver does nothing except define a /dev/kfd device. It returns -ENODEV on all amdkfd IOCTLs. (v3) move bool to end of struct (v3) remove pmc ioctls (v3) add meaningful error message for ioctl error Signed-off-by: Oded Gabbay --- drivers/gpu

[PATCH v3 03/23] drm/radeon: Report doorbell configuration to amdkfd

2014-08-05 Thread Oded Gabbay
radeon and amdkfd share the doorbell aperture. radeon sets it up, takes the doorbells required for its own rings and reports the setup to amdkfd. radeon reserved doorbells are at the start of the doorbell aperture. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/radeon.h| 4

[PATCH v3 05/23] drm/radeon: Add radeon <--> amdkfd interface

2014-08-05 Thread Oded Gabbay
to use linux macros (v3) Add documentation for the interface Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/Makefile | 1 + drivers/gpu/drm/radeon/cik.c| 9 + drivers/gpu/drm/radeon/cik_reg.h| 65 + drivers/gpu/drm/radeon/cikd.h | 51 +++- drivers/gpu/drm

[PATCH v3 11/23] amdkfd: Add binding/unbinding calls to amd_iommu driver

2014-08-05 Thread Oded Gabbay
of the patchset. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/kfd_device.c | 86 - drivers/gpu/drm/radeon/amdkfd/kfd_priv.h| 1 + drivers/gpu/drm/radeon/amdkfd/kfd_process.c | 12 3 files changed, 98 insertions(+), 1 deletion(-) diff --git

[PATCH v3 22/23] amdkfd: Implement the Get Clock Counters IOCTL

2014-08-05 Thread Oded Gabbay
From: Evgeny Pinchuk Signed-off-by: Evgeny Pinchuk Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/kfd_chardev.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/amdkfd/kfd_chardev.c b/drivers/gpu/drm/radeon

[PATCH v3 02/23] drm/radeon/cik: Don't touch int of pipes 1-7

2014-08-05 Thread Oded Gabbay
amdkfd should set interrupts for pipes 1-7. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/cik.c | 71 +--- 1 file changed, 1 insertion(+), 70 deletions(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index 9571be8

[PATCH v3 00/23] AMDKFD Kernel Driver

2014-08-05 Thread Oded Gabbay
y amdkfd: Add packet manager module amdkfd: Add process queue manager module amdkfd: Add device queue manager module amdkfd: Implement the create/destroy/update queue IOCTLs Evgeny Pinchuk (2): amdkfd: Add topology module to amdkfd amdkfd: Implement the Get Clock Counters IOCTL Oded

[PATCH v3 12/23] amdkfd: Add queue module

2014-08-05 Thread Oded Gabbay
From: Ben Goz The queue module enables allocating and initializing queues uniformly. v3: remove typedef v3: break pr_debug to one line v3: remove memset v3: add documentation Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/amdkfd/Makefile| 2 +- drivers

[PATCH v3 01/23] drm/radeon: reduce number of free VMIDs and pipes in KV

2014-08-05 Thread Oded Gabbay
for static vmid allocation in radeon Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/cik.c | 48 +-- drivers/gpu/drm/radeon/cikd.h | 2 ++ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm

Re: [PATCH v3 00/23] AMDKFD Kernel Driver

2014-08-05 Thread Oded Gabbay
On 05/08/14 20:11, David Herrmann wrote: > Hi > > On Tue, Aug 5, 2014 at 5:30 PM, Oded Gabbay wrote: >> Hi, >> Here is the v3 patch set of amdkfd. >> >> This version contains changes and fixes to code, as agreed on during the >> review >>

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-23 Thread Oded Gabbay
Vetter wrote: >>>>> On Mon, Jul 21, 2014 at 03:39:09PM +0200, Christian K?nig >>>>> wrote: >>>>>> Am 21.07.2014 14:36, schrieb Oded Gabbay: >>>>>>> On 20/07/14 20:46, Jerome Glisse wrote: >> >> [snip!!] > My BlackBerry t

Re: [PATCH v2 00/25] AMDKFD kernel driver

2014-07-24 Thread Oded Gabbay
On 24/07/14 21:47, Jerome Glisse wrote: > On Thu, Jul 24, 2014 at 01:35:53PM -0400, Alex Deucher wrote: >> On Thu, Jul 24, 2014 at 11:44 AM, Jerome Glisse wrote: >>> On Thu, Jul 24, 2014 at 01:01:41AM +0300, Oded Gabbay wrote: >>>> On 24/07/

[PATCH] mmu_notifier: add call_srcu and sync function for listener to delay call and sync

2014-08-02 Thread Oded Gabbay
-by: Peter Zijlstra Signed-off-by: Jérôme Glisse Signed-off-by: Oded Gabbay --- include/linux/mmu_notifier.h | 6 ++ mm/mmu_notifier.c| 40 +++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/include/linux/mmu_notifier.h b/include

Re: [PATCH v2 14/25] amdkfd: Add mqd_manager module

2014-08-02 Thread Oded Gabbay
On 21/07/14 05:33, Jerome Glisse wrote: > On Thu, Jul 17, 2014 at 04:29:21PM +0300, Oded Gabbay wrote: >> From: Ben Goz >> >> The mqd_manager module handles MQD data structures. MQD stands for Memory >> Queue Descriptor, which is used by the H/W to keep the usermod

Re: [PATCH v2 11/25] amdkfd: Add basic modules to amdkfd

2014-08-02 Thread Oded Gabbay
On 21/07/14 02:02, Jerome Glisse wrote: > On Thu, Jul 17, 2014 at 04:29:18PM +0300, Oded Gabbay wrote: >> From: Andrew Lewycky >> >> This patch adds the process module and 4 helper modules: >> >> - kfd_process, which handles process which open /dev/kfd >>

Re: [PATCH v2 09/25] amdkfd: Add amdkfd skeleton driver

2014-08-02 Thread Oded Gabbay
On 20/07/14 20:09, Jerome Glisse wrote: > On Thu, Jul 17, 2014 at 04:29:16PM +0300, Oded Gabbay wrote: >> This patch adds the amdkfd skeleton driver. The driver does nothing except >> define a /dev/kfd device. >> >> It returns -ENODEV on all amdkfd IOCTLs. >&

Re: [PATCH v2 08/25] amdkfd: Add IOCTL set definitions of amdkfd

2014-08-02 Thread Oded Gabbay
On 20/07/14 19:54, Jerome Glisse wrote: > On Thu, Jul 17, 2014 at 04:29:15PM +0300, Oded Gabbay wrote: >> - KFD_IOC_GET_VERSION: >> Retrieves the interface version of amdkfd >> >> - KFD_IOC_CREATE_QUEUE: >> Creates a usermode queue t

Re: [PATCH v2 06/25] drm/radeon: Add radeon <--> amdkfd interface

2014-08-02 Thread Oded Gabbay
On 20/07/14 20:35, Jerome Glisse wrote: > On Thu, Jul 17, 2014 at 04:29:13PM +0300, Oded Gabbay wrote: >> This patch adds the interface between the radeon driver and the amdkfd >> driver. >> The interface implementation is contained in radeon_kfd.c and radeon_kfd.h. >&

Re: [PATCH 2/3] mmu_notifier: Call mmu_notifier_invalidate_range() from VMM

2014-08-16 Thread Oded Gabbay
On 29/07/14 19:18, Joerg Roedel wrote: > From: Joerg Roedel > > Add calls to the new mmu_notifier_invalidate_range() > function to all places if the VMM that need it. > > Signed-off-by: Joerg Roedel > --- > include/linux/mmu_notifier.h | 28 >

Re: [PATCH] drm/amdkfd: Use ARRAY_SIZE macro in kfd_build_sysfs_node_entry

2018-02-15 Thread Oded Gabbay
Hi Gustavo, The patch is queued for the merge window of kernel 4.17 (opens in about 7 weeks from now). Oded On Wed, Feb 14, 2018 at 11:30 PM, Gustavo A. R. Silva wrote: > Hi all, > > I was just wondering about the status of this patch. > > Thanks > -- > Gustavo > > > On 01/19/2018 04:18 PM,

Re: linux-next: build failure after merge of the drm tree

2018-05-16 Thread Oded Gabbay
e_pages() > > Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD" > Cc: Felix Kuehling > Cc: Oded Gabbay > Signed-off-by: Stephen Rothwell > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --g

Re: [PATCHv3] drm/amdkfd: Remove vla

2018-05-12 Thread Oded Gabbay
On Thu, May 3, 2018 at 12:49 AM, Kees Cook wrote: > On Fri, Apr 13, 2018 at 2:24 PM, Laura Abbott wrote: >> >> There's an ongoing effort to remove VLAs[1] from the kernel to eventually >> turn on -Wvla. Switch to a constant value that covers all hardware. >> >> [1]

Re: [PATCH v2] drm/amdkfd: Fix potential NULL pointer dereferences

2018-01-11 Thread Oded Gabbay
gt; pdd = kfd_get_process_device_data(dev, p); > > + if (WARN_ON(!pdd)) { > + mutex_unlock(>mutex); > + continue; > + } > + > if (pdd->bound == PDD_BOUND) > pdd->bound = PDD_BOUND_SUSPENDED; > mutex_unlock(>mutex); > -- > 2.7.4 > This patch is: Reviewed-by: Oded Gabbay

Re: [PATCH] drm: fix amdkfd use-after-free GP fault

2017-11-28 Thread Oded Gabbay
It was sent to Dave Airle (drm maintainer) to be included in 4.15-rc2 or 4.15-rc3 (depends when Dave will send his drm fixes). Oded On Wed, Nov 29, 2017 at 12:41 AM, Randy Dunlap wrote: > On 11/13/2017 08:09 AM, Oded Gabbay wrote: >> On Sat, Nov 11, 2017 at 8:16 AM, Randy Dunl

[PATCH] microblaze: add missing include to mmu_context_mm.h

2017-10-26 Thread Oded Gabbay
of linux/sched.h to mmu_context_mm.h to avoid such errors. Signed-off-by: Oded Gabbay --- arch/microblaze/include/asm/mmu_context_mm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/microblaze/include/asm/mmu_context_mm.h b/arch/microblaze/include/asm/mmu_context_mm.h index

Re: [PATCH] drm: fix amdkfd use-after-free GP fault

2017-11-13 Thread Oded Gabbay
000202 R12: > 7fff8740efc0 > [ 947.650314] R13: R14: 006231c0 R15: > 00623010 > [ 947.650316] Code: 00 00 55 49 89 d1 48 89 e5 53 48 89 fb 48 83 ec 18 48 85 > f6 74 5f 4c 8b 46 50 4d 85 c0 74 2b 48 8b 86 88 00 00 00 48 85 c0 74 25 <48

Re: [PATCH] uapi: fix linux/kfd_ioctl.h userspace compilation errors

2017-11-13 Thread Oded Gabbay
On Mon, Nov 13, 2017 at 2:35 AM, Dmitry V. Levin wrote: > Consistently use types provided by via > to fix the following linux/kfd_ioctl.h userspace compilation errors: > > /usr/include/linux/kfd_ioctl.h:236:2: error: unknown type name 'uint64_t' > uint64_t va_addr; /* to KFD */ >

Re: [PATCH] sparc64: mmu_context: Add missing include files

2017-09-24 Thread Oded Gabbay
ontext_64.h > +++ b/arch/sparc/include/asm/mmu_context_64.h > @@ -7,9 +7,11 @@ > > #include > #include > +#include > > #include > #include > +#include > > static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct > *tsk) > {

Re: [PATCH v06 36/36] uapi linux/kfd_ioctl.h: use __u32 and __u64 instead of uint32_t and uint64_t

2017-09-02 Thread Oded Gabbay
>> linux/kfd_ioctl.h:33:2: error: unknown type name ‘uint32_t’ >> uint32_t major_version; /* from KFD */ >> ^~~~ >> >> Signed-off-by: Mikko Rapeli >> Cc: Yair Shachar >> Cc: Oded Gabbay >> Cc: Andrew Lewycky > > Looks good to me, > > Acked-by: Arnd Bergmann Thanks! Applied to amdkfd -next tree Oded

Re: [PATCH] drm/amdkfd: remove memset before memcpy

2017-09-02 Thread Oded Gabbay
On Tue, Aug 29, 2017 at 10:03 PM, Himanshu Jha wrote: > calling memcpy immediately after memset with the same region of memory > makes memset redundant. > > Signed-off-by: Himanshu Jha > --- > drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 - > 1 file changed, 1 deletion(-) > > diff

Re: [PATCH] drm/amdkfd: check for null dev to avoid a null pointer dereference

2017-09-17 Thread Oded Gabbay
On Fri, Sep 8, 2017 at 5:13 PM, Colin King wrote: > From: Colin Ian King > > The call to kfd_device_by_id can potentially return null, so check that > dev is null and return with -EINVAL to avoid a null pointer dereference. > > Detected by CoverityScan CID#1454629 ("Dereference null return

Re: [PATCH -next] drm/amdgpu: fix error return code in amdgpu_amdkfd_gpuvm_create_process_vm()

2018-04-24 Thread Oded Gabbay
On Wed, Mar 28, 2018 at 4:20 PM, Wei Yongjun wrote: > Fix to return error code -ENOMEM from the eviction fence create fail > error handling case instead of 0, as done elsewhere in this function. > > Fixes: a46a2cd103a8 ("drm/amdgpu: Add GPUVM memory management functions for > KFD") >

Re: [PATCH -next] drm/amdkfd: Make function kfd_dev_is_large_bar() static

2018-04-24 Thread Oded Gabbay
On Mon, Apr 2, 2018 at 9:03 PM, Felix Kuehling wrote: > This patch is Reviewed-by: Felix Kuehling > > > On 2018-03-29 10:25 PM, Wei Yongjun wrote: >> Fixes the following sparse warning: >> >> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:1150:6: warning: >> symbol 'kfd_dev_is_large_bar' was not

Re: [PATCH -next] drm/amdkfd: Fix the error return code in kfd_ioctl_unmap_memory_from_gpu()

2018-04-24 Thread Oded Gabbay
On Mon, Apr 2, 2018 at 9:02 PM, Felix Kuehling wrote: > Thanks for catching that. I'd use -ENODEV to match what is done a few > lines below for peer_pdd. With that fixed, this patch is Reviewed-by: > Felix Kuehling > > Regards, > Felix > > > On 2018-03-29 10:25 PM, Wei Yongjun wrote: >>

Re: [PATCH] uapi: fix linux/kfd_ioctl.h userspace compilation errors

2018-04-24 Thread Oded Gabbay
Thanks, but already fixed in latest upstream tree Oded On Thu, Apr 5, 2018 at 7:26 AM, Dmitry V. Levin wrote: > Consistently use types provided by via > to fix the following linux/kfd_ioctl.h userspace compilation errors: > > /usr/include/linux/kfd_ioctl.h:266:2: error: unknown type name

Re: [PATCH] gpu/drm/amd/amdkfd: fix build, select MMU_NOTIFIER

2018-04-24 Thread Oded Gabbay
r >> initialization for 'kfd_process_mmu_notifier_ops') [enabled by default] >> ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:534:2: error: implicit >> declaration of function 'mmu_notifier_register' >> [-Werror=implicit-function-declaration] >> >> Signed-off-by: Randy Dun

Re: [PATCH] amdkfd: always select MMU_NOTIFIER

2018-04-24 Thread Oded Gabbay
Thanks, but I took Randy's patch as it was earlier in my email queue. Oded On Thu, Apr 19, 2018 at 8:47 PM, Felix Kuehling wrote: > On 2018-04-19 06:56 AM, Anders Roxell wrote: >> On 28 March 2018 at 18:04, Christian König wrote: >>> Am 28.03.2018 um 17:53 schrieb Arnd Bergmann: Building

Re: [PATCH] drm/amdkfd: fix uninitialized variable use

2018-03-18 Thread Oded Gabbay
On Thu, Mar 15, 2018 at 6:49 PM, Arnd Bergmann wrote: > When CONFIG_ACPI is disabled, we never initialize the acpi_table > structure in kfd_create_crat_image_virtual: > > drivers/gpu/drm/amd/amdkfd/kfd_crat.c: In function > 'kfd_create_crat_image_virtual': >

Re: [PATCH] drm/amdkfd: Delete an error message for a failed memory allocation in kfd_topology_init()

2018-02-25 Thread Oded Gabbay
On Thu, Feb 8, 2018 at 11:33 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 8 Feb 2018 22:23:57 +0100 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring >

[PATCH] pci: add class codes for processing accelerators

2017-11-23 Thread Oded Gabbay
Add PCI codes to include/linux/pci_ids.h for Processing Accelerators. There are new ASICs (now in development) for Deep Learning that will utilize this base class. Signed-off-by: Oded Gabbay --- include/linux/pci_ids.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux

Re: [PATCH] pci: add class codes for processing accelerators

2017-11-23 Thread Oded Gabbay
On Thu, Nov 23, 2017 at 4:11 PM, Greg KH wrote: > On Thu, Nov 23, 2017 at 04:04:22PM +0200, Oded Gabbay wrote: >> Add PCI codes to include/linux/pci_ids.h for Processing Accelerators. There >> are new ASICs (now in development) for Deep Learning that will utilize this >> bas

[git pull] habanalabs fixes for 5.11-rc5

2021-01-21 Thread Oded Gabbay
. If that happens, the server might crash. Oded Gabbay (2): habanalabs: fix backward compatibility of idle check habanalabs: disable FW events on device removal Ofir Bitton (1): habanalabs: zero pci counters packet

[PATCH 1/3] habanalabs: always try to use the hint address

2021-01-18 Thread Oded Gabbay
From: farah kassabri Currently hint address is ignored in case va block page size is not power of 2. We need to support th user hint address also in this case, but only if the hint address is aligned to page size. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded

[PATCH 2/3] habanalabs: add user available interrupt to hw_ip

2021-01-18 Thread Oded Gabbay
From: Ofir Bitton In order to support completions that arrive directly to the user, the driver needs to supply the user with the first available msix interrupt available. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common

[PATCH 3/3] habanalabs: fix MMU debugfs related nodes

2021-01-18 Thread Oded Gabbay
From: farah kassabri In mmu debugfs node show un-scrambled physical addresses. before read/write through data nodes, need to unscramble the physical address before using it for pci transaction. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers

[PATCH 3/3] habanalabs: disable FW events on device removal

2021-01-18 Thread Oded Gabbay
When device is removed, we need to make sure the F/W won't send us any more events because during the remove process we disable the interrupts. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/device.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/misc

[PATCH 2/3] habanalabs: fix backward compatibility of idle check

2021-01-18 Thread Oded Gabbay
Need to take the lower 32 bits of the driver's 64-bit idle mask and put it in the legacy 32-bit variable that the userspace reads to know the idle mask. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/habanalabs_ioctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

[PATCH 1/3] habanalabs: zero pci counters packet before submit to FW

2021-01-18 Thread Oded Gabbay
From: Ofir Bitton Driver does not zero some pci counters packets before sending to FW. This causes an out of sync PI/CI between driver and FW. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/firmware_if.c | 5 + 1 file

[PATCH] habanalabs: add new mem ioctl op for mapping hw blocks

2021-01-24 Thread Oded Gabbay
From: Ofir Bitton For future ASIC support the driver allows user to map certain regions in the device's configuration space for direct access from userspace. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/device.c | 3

[PATCH 2/2] CREDITS: update email address and home address

2021-01-12 Thread Oded Gabbay
Update my email address to kernel.org account and my home address to my new house. Signed-off-by: Oded Gabbay --- CREDITS | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CREDITS b/CREDITS index 090ed4b004a5..ebd00ca9515b 100644 --- a/CREDITS +++ b/CREDITS @@ -1240,10

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