summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/common/hw_queue.c
diff options
context:
space:
mode:
authorOfir Bitton <obitton@habana.ai>2020-09-10 09:40:35 +0300
committerOded Gabbay <ogabbay@kernel.org>2020-11-30 10:47:28 +0200
commit2992c1dcd314b8140131298d3ad245de1ba1821b (patch)
tree420f9323e6e99daf552874b8aec0c987ea55f5bf /drivers/misc/habanalabs/common/hw_queue.c
parent3cf74b3656a24bd4d3862354ec2c8f205ff464f0 (diff)
downloadlwn-2992c1dcd314b8140131298d3ad245de1ba1821b.tar.gz
lwn-2992c1dcd314b8140131298d3ad245de1ba1821b.zip
habanalabs: add support for multiple SOBs per monitor
Support advanced monitor functionality to monitor more than a single SOB. In addition expand all CB generation functions with buffer offset in order to put in them multiple packets that are generated by different functions. Signed-off-by: Ofir Bitton <obitton@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/hw_queue.c')
-rw-r--r--drivers/misc/habanalabs/common/hw_queue.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/common/hw_queue.c b/drivers/misc/habanalabs/common/hw_queue.c
index f2d094063159..be1d0e2c99d8 100644
--- a/drivers/misc/habanalabs/common/hw_queue.c
+++ b/drivers/misc/habanalabs/common/hw_queue.c
@@ -407,7 +407,7 @@ static void init_signal_cs(struct hl_device *hdev,
cs_cmpl->hw_sob->sob_id, cs_cmpl->sob_val, q_idx);
hdev->asic_funcs->gen_signal_cb(hdev, job->patched_cb,
- cs_cmpl->hw_sob->sob_id);
+ cs_cmpl->hw_sob->sob_id, 0);
kref_get(&hw_sob->kref);
@@ -454,10 +454,12 @@ static void init_wait_cs(struct hl_device *hdev, struct hl_cs *cs,
prop->base_mon_id, q_idx);
wait_prop.data = (void *) job->patched_cb;
- wait_prop.sob_id = cs_cmpl->hw_sob->sob_id;
+ wait_prop.sob_base = cs_cmpl->hw_sob->sob_id;
+ wait_prop.sob_mask = 0x1;
wait_prop.sob_val = cs_cmpl->sob_val;
wait_prop.mon_id = prop->base_mon_id;
wait_prop.q_idx = q_idx;
+ wait_prop.size = 0;
hdev->asic_funcs->gen_wait_cb(hdev, &wait_prop);
kref_get(&cs_cmpl->hw_sob->kref);