XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Enumerations
ethosu_accel.h File Reference
#include "drm.h"
Include dependency graph for ethosu_accel.h:

Go to the source code of this file.

Classes

struct  drm_ethosu_npu_info
 
struct  drm_ethosu_dev_query
 
struct  drm_ethosu_bo_create
 
struct  drm_ethosu_bo_mmap_offset
 
struct  drm_ethosu_bo_wait
 
struct  drm_ethosu_cmdstream_bo_create
 
struct  drm_ethosu_job
 
struct  drm_ethosu_submit
 

Macros

#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)
 
#define ETHOSU_MAX_REGIONS   8
 
#define DRM_IOCTL_ETHOSU(__access, __id, __type)
 

Enumerations

enum  drm_ethosu_ioctl_id {
  DRM_ETHOSU_DEV_QUERY = 0 , DRM_ETHOSU_BO_CREATE , DRM_ETHOSU_BO_WAIT , DRM_ETHOSU_BO_MMAP_OFFSET ,
  DRM_ETHOSU_CMDSTREAM_BO_CREATE , DRM_ETHOSU_SUBMIT
}
 
enum  drm_ethosu_dev_query_type { DRM_ETHOSU_DEV_QUERY_NPU_INFO = 0 }
 
enum  drm_ethosu_bo_flags { DRM_ETHOSU_BO_NO_MMAP = (1 << 0) }
 
enum  {
  DRM_IOCTL_ETHOSU_DEV_QUERY , DRM_IOCTL_ETHOSU_BO_CREATE , DRM_IOCTL_ETHOSU_BO_WAIT , DRM_IOCTL_ETHOSU_BO_MMAP_OFFSET ,
  DRM_IOCTL_ETHOSU_CMDSTREAM_BO_CREATE , DRM_IOCTL_ETHOSU_SUBMIT
}
 

Macro Definition Documentation

◆ DRM_ETHOSU_ARCH_MAJOR

#define DRM_ETHOSU_ARCH_MAJOR (   x)    ((x) >> 28)

◆ DRM_ETHOSU_ARCH_MINOR

#define DRM_ETHOSU_ARCH_MINOR (   x)    (((x) >> 20) & 0xff)

◆ DRM_ETHOSU_ARCH_PATCH

#define DRM_ETHOSU_ARCH_PATCH (   x)    (((x) >> 16) & 0xf)

◆ DRM_ETHOSU_PRODUCT_MAJOR

#define DRM_ETHOSU_PRODUCT_MAJOR (   x)    (((x) >> 12) & 0xf)

◆ DRM_ETHOSU_VERSION_MAJOR

#define DRM_ETHOSU_VERSION_MAJOR (   x)    (((x) >> 8) & 0xf)

◆ DRM_ETHOSU_VERSION_MINOR

#define DRM_ETHOSU_VERSION_MINOR (   x)    (((x) >> 4) & 0xff)

◆ DRM_ETHOSU_VERSION_STATUS

#define DRM_ETHOSU_VERSION_STATUS (   x)    ((x) & 0xf)

◆ DRM_IOCTL_ETHOSU

#define DRM_IOCTL_ETHOSU (   __access,
  __id,
  __type 
)
Value:
DRM_IO ## __access(DRM_COMMAND_BASE + DRM_ETHOSU_ ## __id, \
struct drm_ethosu_ ## __type)
#define DRM_COMMAND_BASE
Definition drm.h:1363
#define DRM_IO(nr)
Definition drm.h:1077

DRM_IOCTL_ETHOSU() - Build a ethosu IOCTL number @__access: Access type. Must be R, W or RW. @__id: One of the DRM_ETHOSU_xxx id. @__type: Suffix of the type being passed to the IOCTL.

Don't use this macro directly, use the DRM_IOCTL_ETHOSU_xxx values instead.

Return: An IOCTL number to be passed to ioctl() from userspace.

◆ ETHOSU_MAX_REGIONS

#define ETHOSU_MAX_REGIONS   8

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DRM_IOCTL_ETHOSU_DEV_QUERY 
DRM_IOCTL_ETHOSU_BO_CREATE 
DRM_IOCTL_ETHOSU_BO_WAIT 
DRM_IOCTL_ETHOSU_BO_MMAP_OFFSET 
DRM_IOCTL_ETHOSU_CMDSTREAM_BO_CREATE 
DRM_IOCTL_ETHOSU_SUBMIT 

◆ drm_ethosu_bo_flags

enum drm_ethosu_bo_flags - Buffer object flags, passed at creation time.

Enumerator
DRM_ETHOSU_BO_NO_MMAP 

@DRM_ETHOSU_BO_NO_MMAP: The buffer object will never be CPU-mapped in userspace.

◆ drm_ethosu_dev_query_type

DOC: IOCTL arguments enum drm_ethosu_dev_query_type - Query type

Place new types at the end, don't re-order, don't remove or replace.

Enumerator
DRM_ETHOSU_DEV_QUERY_NPU_INFO 

@DRM_ETHOSU_DEV_QUERY_NPU_INFO: Query NPU information.

◆ drm_ethosu_ioctl_id

DOC: IOCTL IDs

enum drm_ethosu_ioctl_id - IOCTL IDs

Place new ioctls at the end, don't re-order, don't replace or remove entries.

These IDs are not meant to be used directly. Use the DRM_IOCTL_ETHOSU_xxx definitions instead.

Enumerator
DRM_ETHOSU_DEV_QUERY 

@DRM_ETHOSU_DEV_QUERY: Query device information.

DRM_ETHOSU_BO_CREATE 

@DRM_ETHOSU_BO_CREATE: Create a buffer object.

DRM_ETHOSU_BO_WAIT 

@DRM_ETHOSU_BO_WAIT: Wait on a buffer object's fence.

DRM_ETHOSU_BO_MMAP_OFFSET 

@DRM_ETHOSU_BO_MMAP_OFFSET: Get the file offset to pass to mmap to map a GEM object.

DRM_ETHOSU_CMDSTREAM_BO_CREATE 

@DRM_ETHOSU_CMDSTREAM_BO_CREATE: Create a command stream buffer object.

DRM_ETHOSU_SUBMIT 

@DRM_ETHOSU_SUBMIT: Submit a job and BOs to run.