habanalabs: handle barriers in DMA QMAN streams
authorOded Gabbay <oded.gabbay@gmail.com>
Tue, 31 Mar 2020 08:57:11 +0000 (11:57 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Sun, 17 May 2020 09:06:22 +0000 (12:06 +0300)
commit926ba4cce10ee08512bf298d92c236955fc0994e
treefd1fcdc764c559f041f5d6a220007a19c7213c29
parentcb056b9fd5138748dca7b679ea5f16b6bd24fb6c
habanalabs: handle barriers in DMA QMAN streams

When we have DMA QMAN with multiple streams, we need to know whether the
command buffer contains at least one DMA packet in order to configure the
barriers correctly when adding the 2xMSG_PROT at the end of the JOB. If
there is no DMA packet, then there is no need to put engine barrier. This
is relevant only for GAUDI as GOYA doesn't have streams so the engine can't
be busy by another stream.

Reviewed-by: Tomer Tayar <ttayar@habana.ai>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/command_submission.c
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/goya/goyaP.h
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/hw_queue.c