summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/hw_queue.c
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2020-03-31 11:57:11 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2020-05-17 12:06:22 +0300
commit926ba4cce10ee08512bf298d92c236955fc0994e (patch)
treefd1fcdc764c559f041f5d6a220007a19c7213c29 /drivers/misc/habanalabs/hw_queue.c
parentcb056b9fd5138748dca7b679ea5f16b6bd24fb6c (diff)
downloadlinux-926ba4cce10ee08512bf298d92c236955fc0994e.tar.xz
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>
Diffstat (limited to 'drivers/misc/habanalabs/hw_queue.c')
-rw-r--r--drivers/misc/habanalabs/hw_queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/hw_queue.c b/drivers/misc/habanalabs/hw_queue.c
index 8248adcc7ef8..a5abc224399d 100644
--- a/drivers/misc/habanalabs/hw_queue.c
+++ b/drivers/misc/habanalabs/hw_queue.c
@@ -314,7 +314,8 @@ static void ext_queue_schedule_job(struct hl_cs_job *job)
hdev->asic_funcs->add_end_of_cb_packets(hdev, cb->kernel_address, len,
cq_addr,
le32_to_cpu(cq_pkt.data),
- q->msi_vec);
+ q->msi_vec,
+ job->contains_dma_pkt);
q->shadow_queue[hl_pi_2_offset(q->pi)] = job;