]> asedeno.scripts.mit.edu Git - linux.git/commit
habanalabs: add h/w queues module
authorOded Gabbay <oded.gabbay@gmail.com>
Fri, 15 Feb 2019 22:39:17 +0000 (00:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Feb 2019 08:46:45 +0000 (09:46 +0100)
commit9494a8dd8d22cbff8ce358aaa223fffe1b070cb0
tree8a7b51e6440aa5248026140fa33d42172dde26de
parent839c48030d27a690cc85f0762f9f6f07a3349fb3
habanalabs: add h/w queues module

This patch adds the H/W queues module and the code to initialize Goya's
various compute and DMA engines and their queues.

Goya has 5 DMA channels, 8 TPC engines and a single MME engine. For each
channel/engine, there is a H/W queue logic which is used to pass commands
from the user to the H/W. That logic is called QMAN.

There are two types of QMANs: external and internal. The DMA QMANs are
considered external while the TPC and MME QMANs are considered internal.
For each external queue there is a completion queue, which is located on
the Host memory.

The differences between external and internal QMANs are:

1. The location of the queue's memory. External QMANs are located on the
   Host memory while internal QMANs are located on the on-chip memory.

2. The external QMAN write an entry to a completion queue and sends an
   MSI-X interrupt upon completion of a command buffer that was given to
   it. The internal QMAN doesn't do that.

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>
13 files changed:
drivers/misc/habanalabs/Makefile
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/goya/goyaP.h
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/habanalabs_drv.c
drivers/misc/habanalabs/hw_queue.c [new file with mode: 0644]
drivers/misc/habanalabs/include/armcp_if.h
drivers/misc/habanalabs/include/goya/goya_async_events.h [new file with mode: 0644]
drivers/misc/habanalabs/include/goya/goya_packets.h [new file with mode: 0644]
drivers/misc/habanalabs/include/qman_if.h [new file with mode: 0644]
drivers/misc/habanalabs/irq.c [new file with mode: 0644]
include/uapi/misc/habanalabs.h