include/uapi/drm/rocket_accel.h

Source file repositories/reference/linux-study-clean/include/uapi/drm/rocket_accel.h

File Facts

System
Linux kernel
Corpus path
include/uapi/drm/rocket_accel.h
Extension
.h
Size
4281 bytes
Lines
193
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

struct drm_rocket_create_bo {
	/**
	 * @size: Input: Size of the requested BO.
	 */
	__u32 size;

	/**
	 * @handle: Output: GEM handle for the BO.
	 */
	__u32 handle;

	/**
	 * @dma_address: Output: DMA address for the BO in the NPU address
	 * space.  This address is private to the DRM fd and is valid for
	 * the lifetime of the GEM handle.
	 */
	__u64 dma_address;

	/**
	 * @offset: Output: Offset into the drm node to use for subsequent
	 * mmap call.
	 */
	__u64 offset;
};

/**
 * struct drm_rocket_prep_bo - ioctl argument for starting CPU ownership of the BO.
 *
 * Takes care of waiting for any NPU jobs that might still use the NPU and performs cache
 * synchronization.
 */
struct drm_rocket_prep_bo {
	/**
	 * @handle: Input: GEM handle of the buffer object.
	 */
	__u32 handle;

	/**
	 * @reserved: Reserved, must be zero.
	 */
	__u32 reserved;

	/**
	 * @timeout_ns: Input: Amount of time to wait for NPU jobs.
	 */
	__s64 timeout_ns;
};

/**
 * struct drm_rocket_fini_bo - ioctl argument for finishing CPU ownership of the BO.
 *
 * Synchronize caches for NPU access.
 */
struct drm_rocket_fini_bo {
	/**
	 * @handle: Input: GEM handle of the buffer object.
	 */
	__u32 handle;

	/**
	 * @reserved: Reserved, must be zero.
	 */
	__u32 reserved;
};

/**
 * struct drm_rocket_task - A task to be run on the NPU
 *
 * A task is the smallest unit of work that can be run on the NPU.
 */
struct drm_rocket_task {
	/**
	 * @regcmd: Input: DMA address to NPU mapping of register command buffer
	 */
	__u32 regcmd;

	/**
	 * @regcmd_count: Input: Number of commands in the register command
	 * buffer
	 */
	__u32 regcmd_count;
};

/**
 * struct drm_rocket_job - A job to be run on the NPU
 *
 * The kernel will schedule the execution of this job taking into account its
 * dependencies with other jobs. All tasks in the same job will be executed
 * sequentially on the same core, to benefit from memory residency in SRAM.
 */

Annotation

Implementation Notes