diff options
author | Ofir Bitton <obitton@habana.ai> | 2022-06-28 17:34:58 +0200 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-07-12 08:09:29 +0200 |
commit | d6a66d59609fc45afc91149e13dddafb8faff0d6 (patch) | |
tree | 03757fc384834ffd1ba9f650eccb9b26d86a9fd7 /drivers/misc/habanalabs/common/command_submission.c | |
parent | habanalabs: naming refactor of user interrupt flow (diff) | |
download | linux-d6a66d59609fc45afc91149e13dddafb8faff0d6.tar.xz linux-d6a66d59609fc45afc91149e13dddafb8faff0d6.zip |
habanalabs: add support for common decoder interrupts
User application should be able to get notification for any decoder
completion. Hence, we introduce a new interface in which a user
can wait for all current decoder pending interrupts.
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/command_submission.c')
-rw-r--r-- | drivers/misc/habanalabs/common/command_submission.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/command_submission.c b/drivers/misc/habanalabs/common/command_submission.c index 275dcb69a40e..eb5f1aee15fc 100644 --- a/drivers/misc/habanalabs/common/command_submission.c +++ b/drivers/misc/habanalabs/common/command_submission.c @@ -1082,6 +1082,9 @@ void hl_release_pending_user_interrupts(struct hl_device *hdev) interrupt = &hdev->common_user_cq_interrupt; wake_pending_user_interrupt_threads(interrupt); + + interrupt = &hdev->common_decoder_interrupt; + wake_pending_user_interrupt_threads(interrupt); } static void job_wq_completion(struct work_struct *work) @@ -3375,6 +3378,8 @@ static int hl_interrupt_wait_ioctl(struct hl_fpriv *hpriv, void *data) } else if (interrupt_id == HL_COMMON_USER_CQ_INTERRUPT_ID) { interrupt = &hdev->common_user_cq_interrupt; + } else if (interrupt_id == HL_COMMON_DEC_INTERRUPT_ID) { + interrupt = &hdev->common_decoder_interrupt; } else { dev_err(hdev->dev, "invalid user interrupt %u", interrupt_id); return -EINVAL; |