include/uapi/drm/ethosu_accel.h

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

File Facts

System
Linux kernel
Corpus path
include/uapi/drm/ethosu_accel.h
Extension
.h
Size
6537 bytes
Lines
262
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_ethosu_npu_info {
	/** @id : NPU ID. */
	__u32 id;
#define DRM_ETHOSU_ARCH_MAJOR(x)			((x) >> 28)
#define DRM_ETHOSU_ARCH_MINOR(x)			(((x) >> 20) & 0xff)
#define DRM_ETHOSU_ARCH_PATCH(x)			(((x) >> 16) & 0xf)
#define DRM_ETHOSU_PRODUCT_MAJOR(x)		(((x) >> 12) & 0xf)
#define DRM_ETHOSU_VERSION_MAJOR(x)		(((x) >> 8) & 0xf)
#define DRM_ETHOSU_VERSION_MINOR(x)		(((x) >> 4) & 0xff)
#define DRM_ETHOSU_VERSION_STATUS(x)		((x) & 0xf)

	/** @gpu_rev: GPU revision. */
	__u32 config;

	__u32 sram_size;
};

/**
 * struct drm_ethosu_dev_query - Arguments passed to DRM_ETHOSU_IOCTL_DEV_QUERY
 */
struct drm_ethosu_dev_query {
	/** @type: the query type (see drm_ethosu_dev_query_type). */
	__u32 type;

	/**
	 * @size: size of the type being queried.
	 *
	 * If pointer is NULL, size is updated by the driver to provide the
	 * output structure size. If pointer is not NULL, the driver will
	 * only copy min(size, actual_structure_size) bytes to the pointer,
	 * and update the size accordingly. This allows us to extend query
	 * types without breaking userspace.
	 */
	__u32 size;

	/**
	 * @pointer: user pointer to a query type struct.
	 *
	 * Pointer can be NULL, in which case, nothing is copied, but the
	 * actual structure size is returned. If not NULL, it must point to
	 * a location that's large enough to hold size bytes.
	 */
	__u64 pointer;
};

/**
 * enum drm_ethosu_bo_flags - Buffer object flags, passed at creation time.
 */
enum drm_ethosu_bo_flags {
	/**
	 * @DRM_ETHOSU_BO_NO_MMAP: The buffer object will never be CPU-mapped
	 * in userspace.
	 */
	DRM_ETHOSU_BO_NO_MMAP = (1 << 0),
};

/**
 * struct drm_ethosu_bo_create - Arguments passed to DRM_IOCTL_ETHOSU_BO_CREATE.
 */
struct drm_ethosu_bo_create {
	/**
	 * @size: Requested size for the object
	 *
	 * The (page-aligned) allocated size for the object will be returned.
	 */
	__u64 size;

	/**
	 * @flags: Flags. Must be a combination of drm_ethosu_bo_flags flags.
	 */
	__u32 flags;

	/**
	 * @handle: Returned handle for the object.
	 *
	 * Object handles are nonzero.
	 */
	__u32 handle;
};

/**
 * struct drm_ethosu_bo_mmap_offset - Arguments passed to DRM_IOCTL_ETHOSU_BO_MMAP_OFFSET.
 */
struct drm_ethosu_bo_mmap_offset {
	/** @handle: Handle of the object we want an mmap offset for. */
	__u32 handle;

	/** @pad: MBZ. */
	__u32 pad;

Annotation

Implementation Notes