habanalabs: export uapi defines to user-space
The two defines that control the maximum size of a command buffer and the maximum number of JOBS per CS need to be exported to the user as they are part of the API towards user-space. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Omer Shpigelman <oshpigelman@habana.ai>
This commit is contained in:
parent
eda58bf786
commit
5d1012576d
@ -40,8 +40,6 @@
|
|||||||
|
|
||||||
#define HL_MAX_QUEUES 128
|
#define HL_MAX_QUEUES 128
|
||||||
|
|
||||||
#define HL_MAX_JOBS_PER_CS 512
|
|
||||||
|
|
||||||
/* MUST BE POWER OF 2 and larger than 1 */
|
/* MUST BE POWER OF 2 and larger than 1 */
|
||||||
#define HL_MAX_PENDING_CS 64
|
#define HL_MAX_PENDING_CS 64
|
||||||
|
|
||||||
@ -242,8 +240,6 @@ struct hl_dma_fence {
|
|||||||
* Command Buffers
|
* Command Buffers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define HL_MAX_CB_SIZE 0x200000 /* 2MB */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct hl_cb_mgr - describes a Command Buffer Manager.
|
* struct hl_cb_mgr - describes a Command Buffer Manager.
|
||||||
* @cb_lock: protects cb_handles.
|
* @cb_lock: protects cb_handles.
|
||||||
|
@ -192,13 +192,15 @@ struct hl_info_args {
|
|||||||
/* Opcode to destroy previously created command buffer */
|
/* Opcode to destroy previously created command buffer */
|
||||||
#define HL_CB_OP_DESTROY 1
|
#define HL_CB_OP_DESTROY 1
|
||||||
|
|
||||||
|
#define HL_MAX_CB_SIZE 0x200000 /* 2MB */
|
||||||
|
|
||||||
struct hl_cb_in {
|
struct hl_cb_in {
|
||||||
/* Handle of CB or 0 if we want to create one */
|
/* Handle of CB or 0 if we want to create one */
|
||||||
__u64 cb_handle;
|
__u64 cb_handle;
|
||||||
/* HL_CB_OP_* */
|
/* HL_CB_OP_* */
|
||||||
__u32 op;
|
__u32 op;
|
||||||
/* Size of CB. Maximum size is 2MB. The minimum size that will be
|
/* Size of CB. Maximum size is HL_MAX_CB_SIZE. The minimum size that
|
||||||
* allocated, regardless of this parameter's value, is PAGE_SIZE
|
* will be allocated, regardless of this parameter's value, is PAGE_SIZE
|
||||||
*/
|
*/
|
||||||
__u32 cb_size;
|
__u32 cb_size;
|
||||||
/* Context ID - Currently not in use */
|
/* Context ID - Currently not in use */
|
||||||
@ -244,6 +246,8 @@ struct hl_cs_chunk {
|
|||||||
|
|
||||||
#define HL_CS_STATUS_SUCCESS 0
|
#define HL_CS_STATUS_SUCCESS 0
|
||||||
|
|
||||||
|
#define HL_MAX_JOBS_PER_CS 512
|
||||||
|
|
||||||
struct hl_cs_in {
|
struct hl_cs_in {
|
||||||
/* this holds address of array of hl_cs_chunk for restore phase */
|
/* this holds address of array of hl_cs_chunk for restore phase */
|
||||||
__u64 chunks_restore;
|
__u64 chunks_restore;
|
||||||
@ -253,9 +257,13 @@ struct hl_cs_in {
|
|||||||
* Currently not in use
|
* Currently not in use
|
||||||
*/
|
*/
|
||||||
__u64 chunks_store;
|
__u64 chunks_store;
|
||||||
/* Number of chunks in restore phase array */
|
/* Number of chunks in restore phase array. Maximum number is
|
||||||
|
* HL_MAX_JOBS_PER_CS
|
||||||
|
*/
|
||||||
__u32 num_chunks_restore;
|
__u32 num_chunks_restore;
|
||||||
/* Number of chunks in execution array */
|
/* Number of chunks in execution array. Maximum number is
|
||||||
|
* HL_MAX_JOBS_PER_CS
|
||||||
|
*/
|
||||||
__u32 num_chunks_execute;
|
__u32 num_chunks_execute;
|
||||||
/* Number of chunks in restore phase array - Currently not in use */
|
/* Number of chunks in restore phase array - Currently not in use */
|
||||||
__u32 num_chunks_store;
|
__u32 num_chunks_store;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user