summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/command_submission.c
diff options
context:
space:
mode:
authorTomer Tayar <ttayar@habana.ai>2019-10-03 18:22:35 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2019-11-21 12:35:45 +0300
commitdf762375f17e1765bc3a0b345378e1726d85ca75 (patch)
tree9ec79c1aa0ec497e2ff8912a7175d1f01b1cd758 /drivers/misc/habanalabs/command_submission.c
parentf435614ff55c6783919028cb914ffd7422e0b03b (diff)
downloadlinux-df762375f17e1765bc3a0b345378e1726d85ca75.tar.xz
habanalabs: Mark queue as expecting CB handle or address
Jobs on some queues must be provided with a handle to a driver command buffer object, while for other queues, jobs must be provided with an address to a command buffer. Currently the distinction is done based on the queue type, which is less flexible if the same queue type behaves differently on different types of ASICs. This patch adds a new queue property for this target, which is configured per queue type per ASIC type. Signed-off-by: Tomer Tayar <ttayar@habana.ai> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs/command_submission.c')
-rw-r--r--drivers/misc/habanalabs/command_submission.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/command_submission.c b/drivers/misc/habanalabs/command_submission.c
index a9ac045dcfde..f44205540520 100644
--- a/drivers/misc/habanalabs/command_submission.c
+++ b/drivers/misc/habanalabs/command_submission.c
@@ -414,7 +414,9 @@ static struct hl_cb *validate_queue_index(struct hl_device *hdev,
"Queue index %d is restricted for the kernel driver\n",
chunk->queue_index);
return NULL;
- } else if (hw_queue_prop->type == QUEUE_TYPE_INT) {
+ }
+
+ if (!hw_queue_prop->requires_kernel_cb) {
*ext_queue = false;
return (struct hl_cb *) (uintptr_t) chunk->cb_handle;
}