[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 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 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/a

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

2014-12-14 Thread Oded Gabbay
From: Alexey Skidanov 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_priv.h | 1 + drivers/gpu/drm/amd

[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 4/4] amdkfd: Process-device data creation and lookup split

2014-12-14 Thread Oded Gabbay
: 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 +-- drivers/gpu/drm/amd/amdkfd

[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

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

2014-12-14 Thread Oded Gabbay
those 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: Implem

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

2014-12-14 Thread Oded Gabbay
. 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/include/kgd_kfd_interface.h index 47b5519

[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 | 132

[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 --- drivers/gpu/drm/amd/amd

[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 +++-- .../gpu/drm/amd/amdkfd/kfd_

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

2014-12-14 Thread Oded Gabbay
From: Ben Goz 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 --git a/drivers/gpu/drm

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

2014-12-14 Thread Oded Gabbay
From: Ben Goz 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 deletions(-) diff --git a

[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

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

2014-12-14 Thread Oded Gabbay
From: Ben Goz 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 changed, 1 insertion(+), 1

[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 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 *kfd2k

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

2014-12-20 Thread Oded Gabbay
l BUG. 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/a

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

2014-12-20 Thread Oded Gabbay
know 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/

[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 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 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/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 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
;t be happy to do that in -rc stages. So 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 G

[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-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 da

[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 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 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

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

2014-12-22 Thread Oded Gabbay
y, 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(-)

[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] drm/radeon: Try to init amdkfd only if 64 bit kernel

2014-12-22 Thread Oded Gabbay
esn't 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

[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 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

[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/

[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 >> C

[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

[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 >>

[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 require

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

2014-12-29 Thread Oded Gabbay
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/

[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 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 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 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 >> if

[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 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 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:32 PM, Christian König wrote: > Am 29.12.2014 um 14:17 schrieb 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

[PULL] amdkfd-fixes

2014-12-30 Thread Oded Gabbay
amdkfd: Fixing topology bug in building sysfs nodes Oded Gabbay (5): amdkfd: Fix accounting of device queues amdkfd: Remove duplicate include drivers: Move iommu/ before gpu/ in Makefile drm: Put amdkfd before radeon in drm Makefile drm/radeon: Init amdkfd only

[PATCH 0/9] Replace use of radeon_sa with a new sub allocator

2014-12-31 Thread Oded Gabbay
eatures radeon_sa provides. Oded Oded Gabbay (9): drm/amd: Add new kfd-->kgd interface for gart usage drm/radeon: Impl. new gtt allocate/free functions drm/amdkfd: Add gtt sa related data to kfd_dev struct drm/amdkfd: Add kfd gtt sub-allocator functions drm/amdkfd: Fixed calculation of

[PATCH 1/9] drm/amd: Add new kfd-->kgd interface for gart usage

2014-12-31 Thread Oded Gabbay
the maximum number of HSA processes and maximum number of queues per HSA process (two amdkfd kernel module parameters). free_gtt_mem, which frees a buffer that was allocated on the gart aperture. Reviewed-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/incl

[PATCH 2/9] drm/radeon: Impl. new gtt allocate/free functions

2014-12-31 Thread Oded Gabbay
This patch adds the implementation of the gtt interface functions. The allocate function will allocate a single bo, pin and map it to kernel memory. It will return the gpu address and cpu ptr as arguments. Reviewed-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon

[PATCH 3/9] drm/amdkfd: Add gtt sa related data to kfd_dev struct

2014-12-31 Thread Oded Gabbay
This patch adds new fields to kfd_dev struct that are necessary for the new kfd gtt sa module Reviewed-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/gpu

[PATCH 4/9] drm/amdkfd: Add kfd gtt sub-allocator functions

2014-12-31 Thread Oded Gabbay
allocation function will allocate contiguous chunks from that memory area, according to the requested size. If the requested size is smaller than the chunk size, a single chunk will be allocated. Reviewed-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device.c

[PATCH 5/9] drm/amdkfd: Fixed calculation of gart buffer size

2014-12-31 Thread Oded Gabbay
s per process, which are the defaults for amdkfd kernel module parameters. Reviewed-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/a

[PATCH 6/9] drm/amdkfd: Allocate gart memory using new interface

2014-12-31 Thread Oded Gabbay
. Reviewed-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 163b1a4..ac94dc3 100644

[PATCH 7/9] drm/amdkfd: Using new gtt sa in amdkfd

2014-12-31 Thread Oded Gabbay
This patch change the calls throughout the amdkfd driver from the old kfd-->kgd interface to the new kfd gtt sa inside amdkfd Reviewed-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 23 drivers/gpu/drm/amd/amd

[PATCH 8/9] drm/radeon: Remove old radeon_sa usage from kfd-->kgd interface

2014-12-31 Thread Oded Gabbay
Reviewed-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- drivers/gpu/drm/radeon/radeon_kfd.c | 99 + 1 file changed, 1 insertion(+), 98 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c index ddd2afd

[PATCH 9/9] drm/amd: Remove old radeon_sa funcs from kfd-->kgd interface

2014-12-31 Thread Oded Gabbay
Reviewed-by: Alexey Skidanov Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h index 47d0b87

[PATCH 0/9] Replace use of radeon_sa with a new sub allocator

2014-12-31 Thread Oded Gabbay
On 12/31/2014 03:49 PM, Christian König wrote: > Am 31.12.2014 um 14:39 schrieb Oded Gabbay: >> Background: >> >> amdkfd needs GART memory for several things, such as runlist packets, >> MQDs, HPDs and more. Unfortunately, all of this memory must be always >&g

[PATCH 0/9] Replace use of radeon_sa with a new sub allocator

2015-01-01 Thread Oded Gabbay
m that the patches look fine to me, but I need more time to review > them > in detail. Thanks! I hope we can push it to 3.20 > > Regards, > Christian. > > Am 31.12.2014 um 15:06 schrieb Oded Gabbay: >> >> On 12/31/2014 03:49 PM, Christian König wrote: >>

[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

[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 >>

[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. >&

[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

[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. >&

[PATCH v3 00/23] AMDKFD Kernel Driver

2014-08-05 Thread Oded Gabbay
kfd: 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 Gabbay (9

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

2014-08-05 Thread Oded Gabbay
e 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/gp

[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 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 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 05/23] drm/radeon: Add radeon <--> amdkfd interface

2014-08-05 Thread Oded Gabbay
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 07/23] amdkfd: Add IOCTL set definitions of amdkfd

2014-08-05 Thread Oded Gabbay
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 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 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 +- dr

[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 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 10/23] amdkfd: Add basic modules to amdkfd

2014-08-05 Thread Oded Gabbay
rt mmap 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/rad

[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 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 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 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 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 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 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 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 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 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 19/23] amdkfd: Add interrupt handling module

2014-08-05 Thread Oded Gabbay
us to lose 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 +- d

[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 >> of

[PULL] drm-amdkfd-next-fixes

2015-01-25 Thread Oded Gabbay
2 17:53:03 +0200) ---- Oded Gabbay (5): drm/amdkfd: Remove negative check of uint variable drm/amdkfd: Add break at the end of case drm/amdkfd: Handle case of invalid queue type drm/amdkfd: Fix sparse errors

[PULL] drm-amdkfd-fixes

2015-01-26 Thread Oded Gabbay
n Goz (1): drm/amdkfd: PQM handle queue creation fault Oded Gabbay (4): drm/amdkfd: Allow user to limit only queues per device drm/radeon: Don't increment pipe_id in kgd_init_pipeline drm/amdkfd: Fix bug in pipelines initialization drm/amdkfd: Fix bug in call to init_

[PATCH] drm/radeon: don't init gpuvm if accel is disabled

2015-01-29 Thread Oded Gabbay
On 01/28/2015 09:41 PM, Alex Deucher wrote: > If acceleration is disabled, it does not make sense > to init gpuvm since nothing will use it. Moreover, > if radeon_vm_init() gets called it uses accel to try > and clear the pde tables, etc. which results in a bug. > > Bug: > https://bugs.freedeskt

conflicts in amdkfd between -next and -fixes

2015-01-29 Thread Oded Gabbay
On 01/29/2015 03:49 AM, Dave Airlie wrote: > Hey Oded, > > so I pulled -fixes into -next this morning and made amdkfd build > again, it had a few conflicts in it, > > I've pushed a drm-next branch with the conflicts resolved and amdkfd > that builds, the only one I'm a bit scared on was the size

[PATCH 1/3] drm/amdkfd: Fix bug in accounting of queues

2015-01-29 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0d8694f..0fd5927 100644

[PATCH 2/3] drm/amdkfd: max num of queues can't be 0

2015-01-29 Thread Oded Gabbay
Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/amdkfd/kfd_module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c b/drivers/gpu/drm/amd/amdkfd/kfd_module.c index a8be6df..1c385c2 100644 --- a/drivers/gpu/drm/amd/amdkfd

[PATCH 3/3] drm/amdkfd: Don't create BUG due to incorrect user parameter

2015-01-29 Thread Oded Gabbay
This patch changes a BUG_ON() statement to pr_debug, in case the user tries to update a non-existing queue. Signed-off-by: Oded Gabbay Reviewed-by: Ben Goz --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a

<    5   6   7   8   9   10   11   12   >