summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/Makefile
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2019-02-16 01:39:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-18 11:46:44 +0300
commitbe5d926b5c10430671ae975b80efb7a5652e3f9a (patch)
tree38c079a6a92c81202e58da64fc6e0b3365ade1da /drivers/misc/habanalabs/Makefile
parent0861e41de53044694bfdf2e8f246a0d8fb077e5d (diff)
downloadlinux-be5d926b5c10430671ae975b80efb7a5652e3f9a.tar.xz
habanalabs: add command buffer module
This patch adds the command buffer (CB) module, which allows the user to create and destroy CBs and to map them to the user's process address-space. A command buffer is a memory blocks that reside in DMA-able address-space and is physically contiguous so it can be accessed by the device without MMU translation. The command buffer memory is allocated using the coherent DMA API. When creating a new CB, the IOCTL returns a handle of it, and the user-space process needs to use that handle to mmap the buffer to get a VA in the user's address-space. Before destroying (freeing) a CB, the user must unmap the CB's VA using the CB handle. Each CB has a reference counter, which tracks its usage in command submissions and also its mmaps (only a single mmap is allowed). The driver maintains a pool of pre-allocated CBs in order to reduce latency during command submissions. In case the pool is empty, the driver will go to the slow-path of allocating a new CB, i.e. calling dma_alloc_coherent. Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/habanalabs/Makefile')
-rw-r--r--drivers/misc/habanalabs/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/Makefile b/drivers/misc/habanalabs/Makefile
index 3ffbadc2ca01..2530c9b78ca4 100644
--- a/drivers/misc/habanalabs/Makefile
+++ b/drivers/misc/habanalabs/Makefile
@@ -4,7 +4,8 @@
obj-m := habanalabs.o
-habanalabs-y := habanalabs_drv.o device.o context.o asid.o
+habanalabs-y := habanalabs_drv.o device.o context.o asid.o habanalabs_ioctl.o \
+ command_buffer.o
include $(src)/goya/Makefile
habanalabs-y += $(HL_GOYA_FILES)