diff options
author | Alon Mizrahi <amizrahi@habana.ai> | 2021-02-22 15:53:24 +0200 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-04-09 14:09:24 +0300 |
commit | cf39395034c6b927d49abe554fb4e93730d00543 (patch) | |
tree | c67d8a4e50c5b02c934e32f7019cf588ea610e32 /include/uapi/misc | |
parent | cd5def8020637836b7836fc8228b70cdc9af4ea1 (diff) |
habanalabs: add custom timeout flag per cs
There is a need to allow to user to send command submissions with
custom timeout as some CS take longer than the max timeout that is
used by default.
Signed-off-by: Alon Mizrahi <amizrahi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'include/uapi/misc')
-rw-r--r-- | include/uapi/misc/habanalabs.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h index 92fd000ce0d3..90798eaac728 100644 --- a/include/uapi/misc/habanalabs.h +++ b/include/uapi/misc/habanalabs.h @@ -630,6 +630,7 @@ struct hl_cs_chunk { #define HL_CS_FLAGS_STAGED_SUBMISSION 0x40 #define HL_CS_FLAGS_STAGED_SUBMISSION_FIRST 0x80 #define HL_CS_FLAGS_STAGED_SUBMISSION_LAST 0x100 +#define HL_CS_FLAGS_CUSTOM_TIMEOUT 0x200 #define HL_CS_STATUS_SUCCESS 0 @@ -665,8 +666,18 @@ struct hl_cs_in { */ __u32 num_chunks_execute; - /* Number of chunks in restore phase array - Currently not in use */ - __u32 num_chunks_store; + union { + /* Number of chunks in restore phase array - + * Currently not in use + */ + __u32 num_chunks_store; + + /* timeout in seconds - valid only if HL_CS_FLAGS_CUSTOM_TIMEOUT + * is set. this parameter is ignored in case of future multiple + * users support. + */ + __u32 timeout; + }; /* HL_CS_FLAGS_* */ __u32 cs_flags; |