[PATCH 1/3] drm/amdkfd: Do copy_to/from_user in general kfd_ioctl()

2014-12-29 Thread Oded Gabbay
On 12/29/2014 03:05 PM, Christian König wrote: > Am 29.12.2014 um 13:42 schrieb Oded Gabbay: >> This patch moves the copy_to_user() and copy_from_user() calls from the >> different ioctl functions in amdkfd to the general kfd_ioctl() function, as >> this is a commo

[PATCH 2/3] drm/amdkfd: reformat IOCTL definitions to drm-style

2014-12-29 Thread Oded Gabbay
On 12/29/2014 03:06 PM, Christian König wrote: > Am 29.12.2014 um 13:42 schrieb Oded Gabbay: >> This patch reformats the ioctl definitions in kfd_ioctl.h to be similar to >> the >> drm ioctls definition style. >> >> Signed-off-by: Oded Gabbay > >

[PATCH v2] drm/radeon: Init amdkfd only if it was compiled

2014-12-29 Thread Oded Gabbay
On 12/29/2014 02:41 PM, Christian König wrote: > Am 29.12.2014 um 09:59 schrieb Oded Gabbay: >> This patch changes the radeon_kfd_init(), which is used to initialize the >> interface between radeon and amdkfd, so the interface will be initialized >> only >>

[PATCH 1/4] amdkfd: fix error printing in kfd_ioctl()

2014-12-29 Thread Oded Gabbay
On 12/15/2014 10:32 AM, Dave Airlie wrote: > On 15 December 2014 at 17:59, Daniel Vetter wrote: >> On Sun, Dec 14, 2014 at 03:10:17PM +0100, Christian König wrote: >>> Am 14.12.2014 um 14:35 schrieb Oded Gabbay: >>>> When an ioctl function returns -EAGAIN,

[PATCH 3/3] drm/amdkfd: rewrite kfd_ioctl() according to drm_ioctl()

2014-12-29 Thread Oded Gabbay
typedef for the ioctl function pointer. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 116 ++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 18 + 2 files changed, 86 insertions(+), 48 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd

[PATCH 2/3] drm/amdkfd: reformat IOCTL definitions to drm-style

2014-12-29 Thread Oded Gabbay
This patch reformats the ioctl definitions in kfd_ioctl.h to be similar to the drm ioctls definition style. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 15 +++-- include/uapi/linux/kfd_ioctl.h | 37 +++- 2 files changed

[PATCH 1/3] drm/amdkfd: Do copy_to/from_user in general kfd_ioctl()

2014-12-29 Thread Oded Gabbay
This patch moves the copy_to_user() and copy_from_user() calls from the different ioctl functions in amdkfd to the general kfd_ioctl() function, as this is a common code for all ioctls. This was done according to example taken from drm_ioctl.c Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd

[PATCH v2] drm/radeon: Init amdkfd only if it was compiled

2014-12-29 Thread Oded Gabbay
, the symbol_request() doesn't work as expected - it doesn't return NULL if the symbol doesn't exists - which makes the kernel panic. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/radeon_kfd.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b

[PATCH] amdkfd: actually allocate longs for the pasid bitmask

2014-12-29 Thread Oded Gabbay
On 12/28/2014 06:44 PM, Sasha Levin wrote: > Commit "amdkfd: use sizeof(long) granularity for the pasid bitmask" calculated > the number of longs it will need, but ended up allocating that number of > bytes rather than longs. > > Fix that silly error and allocate the amount of data really

[PATCH 0/2] Change order of linkage in kernel makefiles for amdkfd

2014-12-28 Thread Oded Gabbay
On 12/26/2014 11:19 AM, Laurent Pinchart wrote: > Hi Thierry, > > On Thursday 25 December 2014 14:20:59 Thierry Reding wrote: >> On Mon, Dec 22, 2014 at 01:07:13PM +0200, Oded Gabbay wrote: >>> This small patch-set, was created to solve the bug described at >>

[LKP] [PATCH] drm/radeon: Try to init amdkfd only if 64 bit kernel

2014-12-28 Thread Oded Gabbay
On 12/25/2014 02:31 PM, Christian König wrote: > Am 22.12.2014 um 20:18 schrieb Oded Gabbay: >> >> On 12/22/2014 09:00 PM, Andi Kleen wrote: >>> On Mon, Dec 22, 2014 at 10:49:40AM -0800, Andi Kleen wrote: >>>> On Mon, Dec 22, 2014 at 11:58:43AM -0500, Alex

[LKP] [PATCH] drm/radeon: Try to init amdkfd only if 64 bit kernel

2014-12-24 Thread Oded Gabbay
On 12/24/2014 01:01 AM, Rusty Russell wrote: > Oded Gabbay writes: >> I didn't say it doesn't always work. >> The actual thing that doesn't work is the define symbol_get and only in a >> specific case of 32bit kernel AND CONFIG_MODULES is unset AND >> CONFIG_RANDOMIZE

[PULL] amdkfd-fixes

2014-12-23 Thread Oded Gabbay
) Alexey Skidanov (1): amdkfd: init aperture once per process Oded Gabbay (3): drm/amd: Add get_fw_version to kfd-->kgd interface drm/radeon: Add implementation of get_fw_version amdkfd: Display MEC fw version in topology node drivers/gpu/drm/

[PATCH 1/2] drivers: Move iommu/ before gpu/ in Makefile

2014-12-23 Thread Oded Gabbay
Hello Linus, Dave Airlie asked me to send this patch to you for review. See link below for cover-letter for this patch that explains the background a bit more: http://lists.freedesktop.org/archives/dri-devel/2014-December/074452.html Thanks, Oded On 12/22/2014 01:07 PM, Oded Gabbay

[LKP] [PATCH] drm/radeon: Try to init amdkfd only if 64 bit kernel

2014-12-22 Thread Oded Gabbay
On 12/22/2014 09:00 PM, Andi Kleen wrote: > On Mon, Dec 22, 2014 at 10:49:40AM -0800, Andi Kleen wrote: >> On Mon, Dec 22, 2014 at 11:58:43AM -0500, Alex Deucher wrote: >>> On Mon, Dec 22, 2014 at 6:11 AM, Oded Gabbay wrote: >>>> amdkfd driver can be compiled on

[PATCH] drm/radeon: Try to init amdkfd only if 64 bit kernel

2014-12-22 Thread Oded Gabbay
return NULL if the symbol doesn't exists. That makes the kernel panic. Therefore, the as amdkfd doesn't compile in 32-bit kernel, the best way is just to return false immediately. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/radeon_kfd.c | 4 1 file changed, 4 insertions(+) diff

[PATCH 2/2] drm: Put amdkfd before radeon in drm Makefile

2014-12-22 Thread Oded Gabbay
. This is done because radeon loads the amdkfd module through symbol_request function. This patch makes amdkfd load before radeon when they are both compiled inside the kernel image, which makes the behavior similar to the case when they are modules, and prevents the kernel bug. Signed-off-by: Oded

[PATCH 1/2] drivers: Move iommu/ before gpu/ in Makefile

2014-12-22 Thread Oded Gabbay
, if the gpu and iommu drivers are compiled inside the kernel image (not as modules), the correct order of device loading is still maintained (iommu module is loaded before gpu module). Signed-off-by: Oded Gabbay --- drivers/Makefile | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[PATCH 0/2] Change order of linkage in kernel makefiles for amdkfd

2014-12-22 Thread Oded Gabbay
GPU devices are dependent on AMD IOMMU controller functionality to allow the GPU to access a process's virtual memory address space, without the need for pinning the memory. That's why it makes sense to initialize the iommu/ subsystem ahead of the gpu/ subsystem. Oded Oded Gabbay (2

[PATCH 1/3] amdkfd: Don't clear *kfd2kgd on kfd_module_init

2014-12-22 Thread Oded Gabbay
On 12/22/2014 11:26 AM, Oded Gabbay wrote: > > > On 12/22/2014 10:57 AM, Christian König wrote: >> Am 22.12.2014 um 08:43 schrieb Oded Gabbay: >>> >>> >>> On 12/22/2014 09:40 AM, Dave Airlie wrote: >>>>>>>>> There should be,

[PATCH 1/3] amdkfd: Don't clear *kfd2kgd on kfd_module_init

2014-12-22 Thread Oded Gabbay
On 12/22/2014 10:57 AM, Christian König wrote: > Am 22.12.2014 um 08:43 schrieb Oded Gabbay: >> >> >> On 12/22/2014 09:40 AM, Dave Airlie wrote: >>>>>>>> There should be, but when the modules are compiled in, they are loaded >>>>>&g

[PATCH 1/3] amdkfd: Don't clear *kfd2kgd on kfd_module_init

2014-12-22 Thread Oded Gabbay
On 12/22/2014 09:40 AM, Dave Airlie wrote: >> There should be, but when the modules are compiled in, they are loaded >> based on >> link order only, if they are in the same group, and the groups are >> loaded by a >> pre-defined order. > > Is that really still up to

[PATCH 1/3] amdkfd: Don't clear *kfd2kgd on kfd_module_init

2014-12-22 Thread Oded Gabbay
On 12/21/2014 06:10 PM, Christian König wrote: > Am 21.12.2014 um 17:03 schrieb Oded Gabbay: >> >> >> On 12/21/2014 05:57 PM, Christian König wrote: >>>> There should be, but when the modules are compiled in, they are loaded >>>> based on >&g

[PATCH 1/3] amdkfd: Don't clear *kfd2kgd on kfd_module_init

2014-12-21 Thread Oded Gabbay
maybe this is something to consider for 3.20 merge window, but I would still like to provide a solution for 3.19. Oded > > Christian. > > Am 21.12.2014 um 14:24 schrieb Oded Gabbay: >> >> >> On 12/21/2014 03:06 PM, Oded Gabbay wrote: >&

[PATCH 1/3] amdkfd: Don't clear *kfd2kgd on kfd_module_init

2014-12-21 Thread Oded Gabbay
On 12/21/2014 03:06 PM, Oded Gabbay wrote: > > > On 12/21/2014 02:19 PM, Christian König wrote: >> Am 21.12.2014 um 12:34 schrieb Oded Gabbay: >>> >>> >>> On 12/21/2014 01:27 PM, Christian König wrote: >>>> Am 20.12.2014 um 21:46 schrieb

[PATCH 1/3] amdkfd: Don't clear *kfd2kgd on kfd_module_init

2014-12-21 Thread Oded Gabbay
On 12/21/2014 02:19 PM, Christian König wrote: > Am 21.12.2014 um 12:34 schrieb Oded Gabbay: >> >> >> On 12/21/2014 01:27 PM, Christian König wrote: >>> Am 20.12.2014 um 21:46 schrieb Oded Gabbay: >>>> When amdkfd and radeon are compiled ins

[PATCH 1/3] amdkfd: Don't clear *kfd2kgd on kfd_module_init

2014-12-21 Thread Oded Gabbay
On 12/21/2014 01:27 PM, Christian König wrote: > Am 20.12.2014 um 21:46 schrieb Oded Gabbay: >> When amdkfd and radeon are compiled inside the kernel image (not as modules), >> radeon will load before amdkfd and will set *kfd2kgd to its interface >> structure. There

[PATCH 1/3] amdkfd: Don't clear *kfd2kgd on kfd_module_init

2014-12-21 Thread Oded Gabbay
On 12/20/2014 11:25 PM, Greg KH wrote: > On Sat, Dec 20, 2014 at 10:46:12PM +0200, Oded Gabbay wrote: >> When amdkfd and radeon are compiled inside the kernel image (not as modules), >> radeon will load before amdkfd and will set *kfd2kgd to its interface >> structure. There

[PATCH 3/3] amdkfd: Use workqueue for GPU init

2014-12-20 Thread Oded Gabbay
been loaded. Then, it will call the relevant amdkfd function. The workqueue is defined per kfd_dev structure (per GPU). Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 72 +++-- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 + 2 files changed

[PATCH 2/3] amdkfd: Track when amdkfd init is complete

2014-12-20 Thread Oded Gabbay
whether amdkfd has already been initialized. Note that when the two modules are compiled as modules, this situation can't occur as the kernel enforces the order of loading. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_module.c | 9 + drivers/gpu/drm/amd/amdkfd/kfd_priv.h

[PATCH 1/3] amdkfd: Don't clear *kfd2kgd on kfd_module_init

2014-12-20 Thread Oded Gabbay
. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_module.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c b/drivers/gpu/drm/amd/amdkfd/kfd_module.c index 95d5af1..236562f 100644 --- a/drivers/gpu/drm/amd/amdkfd

[PATCH 0/3] Use workqueue for device init in amdkfd

2014-12-20 Thread Oded Gabbay
successfully. Other methods for detection were checked, e.g. module_is_live() and MODULE_SOFTDEP(), but they were proved not to work when all modules are compiled in the kernel image (which is the problematic scenario to begin with). Oded Oded Gabbay (3): amdkfd: Don't clear *kfd2kgd

[PATCH 1/4] amdkfd: fix error printing in kfd_ioctl()

2014-12-15 Thread Oded Gabbay
On 12/15/2014 10:32 AM, Dave Airlie wrote: > On 15 December 2014 at 17:59, Daniel Vetter wrote: >> On Sun, Dec 14, 2014 at 03:10:17PM +0100, Christian König wrote: >>> Am 14.12.2014 um 14:35 schrieb Oded Gabbay: >>>> When an ioctl function returns -EAGAIN,

[PATCH 1/1] amdkfd: Fixing topology bug in building sysfs nodes

2014-12-14 Thread Oded Gabbay
From: Ben Goz <ben@amd.com> Original code sent always 0 as the index number of the node. This patch fixes this bug by sending a variable which is incremented per node. Signed-off-by: Ben Goz Reviewed-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file chan

[PATCH v2 1/1] amdkfd: fix error printing in kfd_ioctl()

2014-12-14 Thread Oded Gabbay
When an ioctl function returns -EAGAIN, don't print error in kfd_ioctl() v2: Also don't print an error if the ioctl function returns -ERESTARTSYS Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 6/6] amdkfd: Pass queue type to pqm_create_queue()

2014-12-14 Thread Oded Gabbay
From: Ben Goz <ben@amd.com> This patch passes the correct queue type to pqm_create_queue() instead of a fixed KFD_QUEUE_TYPE_COMPUTE type. Signed-off-by: Ben Goz Reviewed-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[PATCH 5/6] amdkfd: Identify SDMA queue in create queue ioctl

2014-12-14 Thread Oded Gabbay
From: Ben Goz <ben@amd.com> This patch adds a check to the create queue ioctl path, which identifies SDMA queue type that is sent by userspace. Signed-off-by: Ben Goz Reviewed-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH 4/6] amdkfd: Add SDMA user-mode queues support to QCM

2014-12-14 Thread Oded Gabbay
From: Ben Goz This patch adds support for SDMA user-mode queues to the QCM - the Queue management system that manages queues-per-device and queues-per-process. Signed-off-by: Ben Goz --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 167 +++--

[PATCH 3/6] amdkfd: Add SDMA mqd support

2014-12-14 Thread Oded Gabbay
From: Ben Goz This patch adds support for SDMA mqd operations: - init_mqd_sdma - uninit_mqd_sdma - load_mqd_sdma - update_mqd_sdma - destroy_mqd_sdma - is_occupied_sdma It also adds SDMA queue information to some private structures of amdkfd. Signed-off-by: Ben Goz ---

[PATCH 2/6] drm/radeon: Implement SDMA interface functions

2014-12-14 Thread Oded Gabbay
From: Ben Goz This patch implements the new SDMA interface functions. It also adds defines and structures related to SDMA registers. Signed-off-by: Ben Goz --- drivers/gpu/drm/radeon/cik_reg.h| 200 +++- drivers/gpu/drm/radeon/radeon_kfd.c

[PATCH 1/6] drm/amd: Add SDMA functions to kfd-->kgd interface

2014-12-14 Thread Oded Gabbay
queues scheduling. Signed-off-by: Ben Goz Reviewed-by: Oded Gabbay --- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/i

[PATCH 0/6] Add SDMA user-mode queues support to amdkfd

2014-12-14 Thread Oded Gabbay
functions are used only in no-HWS mode, which is used when during debug and bring-up. The main abstraction is done at the MQD level, which has a different layout than a compute MQD. Oded Gabbay Ben Goz (6): drm/amd: Add SDMA functions to kfd-->kgd interface drm/radeon: Implement S

[PATCH 1/4] amdkfd: fix error printing in kfd_ioctl()

2014-12-14 Thread Oded Gabbay
On 12/14/2014 04:10 PM, Christian König wrote: > Am 14.12.2014 um 14:35 schrieb Oded Gabbay: >> When an ioctl function returns -EAGAIN, don't print error in kfd_ioctl() > > You most likely want to handle -ERESTARTSYS the same way. > > Christian. Thanks, will fix and

[PATCH 4/4] amdkfd: Process-device data creation and lookup split

2014-12-14 Thread Oded Gabbay
Alexey Skidanov Reviewed-by: Oded Gabbay --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 1 - drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 4 --- drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 13 --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 5 +-- drive

[PATCH 3/4] amdkfd: Remove duplicate include

2014-12-14 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 69c5fe7..4083dbc 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b

[PATCH 2/4] amdkfd: Add number of watch points to topology

2014-12-14 Thread Oded Gabbay
From: Alexey Skidanov <alexey.skida...@amd.com> This patch adds the number of watch points to the node capabilities in the topology module Reviewed-by: Oded Gabbay Signed-off-by: Alexey Skidanov --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_

[PATCH 1/4] amdkfd: fix error printing in kfd_ioctl()

2014-12-14 Thread Oded Gabbay
When an ioctl function returns -EAGAIN, don't print error in kfd_ioctl() Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd

[PATCH 1/3] drm/amd: Add get_fw_version to kfd-->kgd interface

2014-12-14 Thread Oded Gabbay
This should be [PATCH v2 x/3] for all three patches. Sorry. Oded On 12/14/2014 02:29 PM, Oded Gabbay wrote: > This patch adds a new interface to the kfd-->kgd interface. > The new interface function retrieves the firmware version that is currently in > use by the MEC engine.

[PATCH 3/3] amdkfd: Display MEC fw version in topology node

2014-12-14 Thread Oded Gabbay
-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c index 5733e28..b11792d 100644 --- a/drivers/gpu/drm/amd/amdkfd

[PATCH 2/3] drm/radeon: Add implementation of get_fw_version

2014-12-14 Thread Oded Gabbay
ine, as passed into the function by a new parameter Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/radeon_kfd.c | 53 + 1 file changed, 53 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c index 065d

[PATCH 1/3] drm/amd: Add get_fw_version to kfd-->kgd interface

2014-12-14 Thread Oded Gabbay
off-by: Oded Gabbay --- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h index 9c729dd..47b5519 100644 --- a/drivers/gpu/drm/amd/incl

[PATCH 2/3] drm/radeon: Add implementation of get_fw_version

2014-12-14 Thread Oded Gabbay
On 12/10/2014 11:57 PM, Alex Deucher wrote: > On Wed, Dec 10, 2014 at 8:13 AM, Oded Gabbay wrote: >> From: Alexey Skidanov >> >> This patch implements a new interface that was added to the kfd-->kgd >> interface. >> The new interface function retrieves th

[PATCH 3/3] amdkfd: Display MEC fw version in topology node

2014-12-10 Thread Oded Gabbay
Alexey Skidanov Reviewed-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c index 5733e28..8dd0e1b 100644 --- a/drivers/gpu/drm/amd/

[PATCH 2/3] drm/radeon: Add implementation of get_fw_version

2014-12-10 Thread Oded Gabbay
on driver. Signed-off-by: Alexey Skidanov Reviewed-by: Oded Gabbay --- drivers/gpu/drm/radeon/radeon_kfd.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c index 065d020..223c831 100644 --- a/dr

[PATCH 1/3] drm/amd: Add get_fw_version to kfd-->kgd interface

2014-12-10 Thread Oded Gabbay
y: Alexey Skidanov Reviewed-by: Oded Gabbay --- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h index 9c729dd..07f694b 100644 --- a/drivers/gp

[PATCH] amdkfd: Fix accounting of device queues

2014-12-10 Thread Oded Gabbay
This patch fixes a device QCM bug, where the number of queues were not counted correctly for the operation of update queue. The count was incorrect as there was no regard to the previous state of the queue. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

[PATCH] amdkfd/process: init aperture once per process

2014-12-10 Thread Oded Gabbay
From: Alexey Skidanov <alexey.skida...@amd.com> Since the user space may call open() more that once from the same process, the aperture initialization should be moved from kfd_open() Signed-off-by: Alexey Skidanov Reviewed-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c

[PULL] amdkfd-next-3.19

2014-12-05 Thread Oded Gabbay
up to a18069c132cb0d065ff23c05977d06ea0c78404f: amdkfd: Disable support for 32-bit user processes (2014-12-05 22:01:35 +0200) Oded Gabbay (1): amdkfd: Disable support for 32-bit user processes drivers/gpu/drm/amd/amdkfd

[PATCH] amdkfd: Disable support for 32-bit user processes

2014-12-05 Thread Oded Gabbay
processes on Linux. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 102cd36..4f7b275 100644

[PULL] amdkfd-next-3.19-fixes

2014-12-04 Thread Oded Gabbay
: Set *buffer_ptr to NULL in case of error (2014-12-04 14:09:02 +0200) Oded Gabbay (1): amdkfd: Set *buffer_ptr to NULL in case of error Sasha Levin (2): amdkfd: use sizeof(long) granularity for the pasid bitmask

[PATCH] amdkfd: use atomic allocations within srcu callbacks

2014-12-04 Thread Oded Gabbay
On 12/03/2014 05:19 PM, Sasha Levin wrote: > srcu callbacks are running in atomic context, we can't allocate using > __GFP_WAIT. > > Signed-off-by: Sasha Levin > --- > drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

[PATCH] amdkfd: Set *buffer_ptr to NULL in case of error

2014-12-04 Thread Oded Gabbay
In function acquire_packet_buffer() we may return -ENOMEM. In that case, we should set the *buffer_ptr to NULL, so that calling functions which check the *buffer_ptr value as a criteria for success, will know that acquire_packet_buffer() failed. Signed-off-by: Oded Gabbay --- drivers/gpu/drm

[PATCH] amdkfd: use sizeof(long) granularity for the pasid bitmask

2014-12-04 Thread Oded Gabbay
On 12/03/2014 04:26 PM, Sasha Levin wrote: > All the bit operations (such as find_first_zero_bit()) read sizeof(long) bytes > at a time. If we allocated less than sizeof(long) bytes for the bitmask we > would be accessing invalid memory when working with the bitmask. > > Change the allocator to

amdkfd: Add packet manager module

2014-12-04 Thread Oded Gabbay
Thanks. Prepared a patch to fix it and will send it shortly. Oded On 12/02/2014 01:28 PM, Dan Carpenter wrote: > Hello Ben Goz, > > The patch 241f24f82363: "amdkfd: Add packet manager module" from Jul > 17, 2014, leads to the following static checker warning: > >

[PULL] amdkfd-next-3.19

2014-11-26 Thread Oded Gabbay
: delete some dead code Jay Cornwall (1): amdkfd: Fix memory leak on process deregistration Oded Gabbay (11): amdkfd: Fix sparse warnings in kfd_chardev.c amdkfd: Fix sparse warnings in kfd_topology.c amdkfd: Fix sparse warnings in kfd_flat_memory.c amdkfd: is_occupied

[patch] amdkfd: delete some dead code

2014-11-26 Thread Oded Gabbay
On 11/25/2014 06:43 PM, Dan Carpenter wrote: > This is dead code. We don't need to unbind here, we can just return > directly. > > Signed-off-by: Dan Carpenter > Patch is: Reviewed-by: Oded Gabbay And applied to my 3.19-next-wip tree. Thanks! Oded > diff --git a/d

[PATCH] amdkfd: Fix memory leak of mqds on dqm fini

2014-11-25 Thread Oded Gabbay
The mqds array members are not freed when dqm is uninitialized. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd

[patch] amdkfd: fix an error handling bug in pqm_create_queue()

2014-11-25 Thread Oded Gabbay
On 11/25/2014 12:24 PM, Dan Carpenter wrote: > The call to kernel_queue_uninit(NULL) will trigger a BUG(), and also the > error code is incorrect. > > Fixes: 45102048f77e ('amdkfd: Add process queue manager module') > Signed-off-by: Dan Carpenter > Patch is: Review

[patch] amdkfd: fix some error handling in ioctl

2014-11-25 Thread Oded Gabbay
On 11/25/2014 12:21 PM, Dan Carpenter wrote: > There is a typo here so the errors from kfd_bind_process_to_device() > are not detected. > > Signed-off-by: Dan Carpenter > Patch is: Reviewed-by: Oded Gabbay And applied to my 3.19-next-wip tree Oded > diff --git a/d

[PULL] amdkfd-next-3.19

2014-11-21 Thread Oded Gabbay
(2014-11-21 22:55:31 +0200) Alexey Skidanov (1): amdkfd: Instead of using get function, use container_of Jay Cornwall (1): amdkfd: Fix memory leak on process deregistration Oded Gabbay (10): amdkfd: Fix sparse warnings

[PATCH resend] amdkfd: Remove DRM_AMDGPU dependency from Kconfig

2014-11-21 Thread Oded Gabbay
This patch removes the dependency of amdkfd upon DRM_AMDGPU symbol in amdkfd's Kconfig file. This is done because amdgpu driver is not yet upstreamed and therefore, DRM_AMDGPU symbol is not present in any Kconfig file. Reviewed-by: Alex Deucher Signed-off-by: Oded Gabbay --- drivers/gpu/drm

[PATCH] amdkfd: Remove DRM_AMDGPU dependency from Kconfig

2014-11-21 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig index e13c67c..8dfac37 100644 --- a/drivers/gpu/drm/amd/amdkfd/Kconfig +++ b/drivers/gpu

[PATCH] amdkfd: explicitely include io.h in kfd_doorbell.c

2014-11-21 Thread Oded Gabbay
This patch fixes a compilation error when using certain configuration by including the file io.h in kfd_doorbell.c Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c b/drivers

randconfig build error with next-20141121, in drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c

2014-11-21 Thread Oded Gabbay
On 11/21/2014 07:04 PM, Jim Davis wrote: > Building with the attached random configuration file, > > drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c: In function > ‘kfd_doorbell_init’: > drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c:97:2: error: implicit > declaration of function ‘ioremap’ >

[PATCH v5 08/24] amdkfd: Add amdkfd skeleton driver

2014-11-21 Thread Oded Gabbay
On 11/21/2014 12:24 PM, Paul Bolle wrote: > On Sat, 2014-11-08 at 20:37 +0200, 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. >>

[PATCH 12/12] amdkfd: Clear ctx cb before suspend

2014-11-21 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 9beb6f7..43884eb 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers

[PATCH 11/12] amdkfd: Instead of using get function, use container_of

2014-11-21 Thread Oded Gabbay
From: Alexey Skidanov <alexey.skida...@amd.com> Signed-off-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 21 + drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 ++ 2 files changed, 11 insertions(

[PATCH 10/12] amdkfd: use schedule() in sync_with_hw

2014-11-21 Thread Oded Gabbay
to use schedule() instead of cpu_relax() as it is the minimum requirement to allow other threads to execute. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd

[PATCH 09/12] amdkfd: Fix memory leak on process deregistration

2014-11-21 Thread Oded Gabbay
From: Jay Cornwall <jay.cornw...@amd.com> struct device_process_node was allocated during process registration but not released at process deregistration. Signed-off-by: Jay Cornwall Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 1 + 1 file chan

[PATCH 08/12] amdkfd: add __iomem attribute to doorbell_ptr

2014-11-21 Thread Oded Gabbay
This patch was done due to sparse warning. It changes the definition of doorbell_ptr in queue_properties to be with __iomem attribute, so it would match the type which the doorbell module functions are returning. Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 9

[PATCH 07/12] amdkfd: fence_wait_timeout() can be static

2014-11-21 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index 8c40d04..718f50e

[PATCH 06/12] amdkfd: is_occupied() can be static

2014-11-21 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c index 59d2407..adc3147 100644 --- a/drivers/gpu/drm

[PATCH 05/12] amdkfd: Fix sparse warnings in kfd_flat_memory.c

2014-11-21 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c b/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c index 2dfc4c0..66df4da 100644 --- a/drivers/gpu

[PATCH 04/12] amdkfd: pqm_get_kernel_queue() can be static

2014-11-21 Thread Oded Gabbay
From: kbuild test robot <fengguang...@intel.com> Signed-off-by: Fengguang Wu Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manage

[PATCH 03/12] amdkfd: test_kq() can be static

2014-11-21 Thread Oded Gabbay
From: kbuild test robot <fengguang...@intel.com> Signed-off-by: Fengguang Wu Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/d

[PATCH 02/12] amdkfd: Fix sparse warnings in kfd_topology.c

2014-11-21 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 40 +++ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c index 77cd7d5..5733e28 100644

[PATCH 01/12] amdkfd: Fix sparse warnings in kfd_chardev.c

2014-11-21 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 64c73ba..3b3fce7 100644 --- a/drivers/gpu/drm

[PATCH 00/12] amdkfd fixes (sparse and some more)

2014-11-21 Thread Oded Gabbay
container_of Jay Cornwall (1): amdkfd: Fix memory leak on process deregistration Oded Gabbay (8): amdkfd: Fix sparse warnings in kfd_chardev.c amdkfd: Fix sparse warnings in kfd_topology.c amdkfd: Fix sparse warnings in kfd_flat_memory.c amdkfd: is_occupied() can be static amdkfd

[PULL resend] amdkfd-v6

2014-11-18 Thread Oded Gabbay
ger module amdkfd: Add process queue manager module amdkfd: Add device queue manager module Evgeny Pinchuk (2): amdkfd: Add topology module to amdkfd amdkfd: Implement the Get Clock Counters IOCTL Oded Gabbay (12): drm/radeon: reduce number of free VMIDs and pipes in KV

[PULL] amdkfd-v6

2014-11-14 Thread Oded Gabbay
: Add packet manager module amdkfd: Add process queue manager module amdkfd: Add device queue manager module Evgeny Pinchuk (2): amdkfd: Add topology module to amdkfd amdkfd: Implement the Get Clock Counters IOCTL Oded Gabbay (12): drm/radeon: reduce number of free VMIDs

HSA RT is now Open Source

2014-11-13 Thread Oded Gabbay
Hi, I'm pleased to announce that AMD has published the full code of the HSA Runtime library. The code can be found at: https://github.com/HSAFoundation/HSA-Runtime-Reference-Source As I stated in the amdkfd v5 cover letter, this release, coupled with the r600 LLVM back-end, provides a complete

[PATCH v6 06/24] Update MAINTAINERS and CREDITS files with amdkfd info

2014-11-13 Thread Oded Gabbay
v6: Update entries to reflect new name & location of driver Signed-off-by: Oded Gabbay --- CREDITS | 7 +++ MAINTAINERS | 10 ++ 2 files changed, 17 insertions(+) diff --git a/CREDITS b/CREDITS index bb62788..c56d8aa 100644 --- a/CREDITS +++ b/CREDITS @@ -1197,6 +1197,13

[PATCH v5 00/24] AMDKFD Kernel Driver

2014-11-10 Thread Oded Gabbay
On 11/10/2014 04:34 AM, Dave Airlie wrote: > On 9 November 2014 04:37, Oded Gabbay wrote: >> Hi, >> Here is the v5 patch set of amdkfd. >> >> This version is released several days ahead of the release of AMD's HSA >> Runtime >> library as Open Source. Co

[PATCH v5 06/24] Update MAINTAINERS and CREDITS files with amdkfd info

2014-11-08 Thread Oded Gabbay
On 11/08/2014 08:46 PM, Joe Perches wrote: > On Sat, 2014-11-08 at 20:37 +0200, Oded Gabbay wrote: > [] >> diff --git a/MAINTAINERS b/MAINTAINERS > [] >> @@ -610,6 +610,16 @@ F: drivers/crypto/geode* >> F: drivers/video/fbdev/geode/ >> F: arch/x86/inc

[PATCH v5 24/24] amdkfd: Implement the Get Version IOCTL

2014-11-08 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 3130265..64c73ba 100644 --- a/drivers/gpu/drm/amd

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

2014-11-08 Thread Oded Gabbay
From: Alexey Skidanov <alexey.skida...@amd.com> v3: Fixed debug messages Signed-off-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 56 +++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 6 2 files chang

[PATCH v5 22/24] amdkfd: Implement the Get Clock Counters IOCTL

2014-11-08 Thread Oded Gabbay
From: Evgeny Pinchuk <evgeny.pinc...@amd.com> Signed-off-by: Evgeny Pinchuk Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_charde

[PATCH v5 21/24] amdkfd: Implement the Set Memory Policy IOCTL

2014-11-08 Thread Oded Gabbay
From: Andrew Lewycky <andrew.lewy...@amd.com> Signed-off-by: Andrew Lewycky Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_charde

[PATCH v5 20/24] amdkfd: Implement the create/destroy/update queue IOCTLs

2014-11-08 Thread Oded Gabbay
the check of the ring size argument. v5: Add support for AQL queues creation to enable working with open-source HSA runtime Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 205 ++- 1 file changed, 202 insertions(+), 3

[PATCH v5 19/24] amdkfd: Add interrupt handling module

2014-11-08 Thread Oded Gabbay
ssible for us to lose interrupts because we have no back-pressure to the hardware. v3: Move amdkfd from drm/radeon/ to drm/amd/ Change device init Made sure spin lock is taken only if init is complete Moved bool field to the end of the structure Signed-off-by: Andrew Lewycky Signed-off-by: Oded

<    4   5   6   7   8   9   10   11   12   >