Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

habanalabs: add comments in uapi/misc/habanalabs.h

Add comment about minimum and maximum size of command buffer.
Add some text about the expected input of CS IOCTL.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Oded Gabbay and committed by
Greg Kroah-Hartman
541664d3 3dccd187

+9 -1
+9 -1
include/uapi/misc/habanalabs.h
··· 112 112 __u64 cb_handle; 113 113 /* HL_CB_OP_* */ 114 114 __u32 op; 115 - /* Size of CB. Minimum requested size must be PAGE_SIZE */ 115 + /* Size of CB. Maximum size is 2MB. The minimum size that will be 116 + * allocated, regardless of this parameter's value, is PAGE_SIZE 117 + */ 116 118 __u32 cb_size; 117 119 /* Context ID - Currently not in use */ 118 120 __u32 ctx_id; ··· 365 363 * are DMA queues which transfer data from/to the Host. All other queues are 366 364 * internal. The driver will get completion notifications from the device only 367 365 * on JOBS which are enqueued in the external queues. 366 + * 367 + * For jobs on external queues, the user needs to create command buffers 368 + * through the CB ioctl and give the CB's handle to the CS ioctl. For jobs on 369 + * internal queues, the user needs to prepare a "command buffer" with packets 370 + * on either the SRAM or DRAM, and give the device address of that buffer to 371 + * the CS ioctl. 368 372 * 369 373 * This IOCTL is asynchronous in regard to the actual execution of the CS. This 370 374 * means it returns immediately after ALL the JOBS were enqueued on their