aboutsummaryrefslogtreecommitdiff
path: root/kernel/uapi/ethosu.h
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2022-03-10 11:17:29 +0100
committerKristofer Jonsson <kristofer.jonsson@arm.com>2022-03-14 11:14:06 +0100
commit3c6a260a705a668b5ff8e8159f04c257273fb458 (patch)
tree3661451b5d0e2675534c290f36c2cf834fc1f4a6 /kernel/uapi/ethosu.h
parent35de9e63d9c2fe0a557637ac104d7d73382d2d4a (diff)
downloadethos-u-linux-driver-stack-3c6a260a705a668b5ff8e8159f04c257273fb458.tar.gz
Network info
Add UAPI and core message that allows user space space to fetch information about network models built into the firmware. Change-Id: Ic92529bce3edd0a5499e691a566bd065da2a72ad
Diffstat (limited to 'kernel/uapi/ethosu.h')
-rw-r--r--kernel/uapi/ethosu.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/uapi/ethosu.h b/kernel/uapi/ethosu.h
index 335c769..fda7fc2 100644
--- a/kernel/uapi/ethosu.h
+++ b/kernel/uapi/ethosu.h
@@ -53,6 +53,8 @@ namespace EthosU {
struct ethosu_uapi_buffer)
#define ETHOSU_IOCTL_NETWORK_CREATE ETHOSU_IOR(0x20, \
struct ethosu_uapi_network_create)
+#define ETHOSU_IOCTL_NETWORK_INFO ETHOSU_IOR(0x21, \
+ struct ethosu_uapi_network_info)
#define ETHOSU_IOCTL_INFERENCE_CREATE ETHOSU_IOR(0x30, \
struct ethosu_uapi_inference_create)
#define ETHOSU_IOCTL_INFERENCE_STATUS ETHOSU_IOR(0x31, \
@@ -122,6 +124,22 @@ struct ethosu_uapi_network_create {
};
/**
+ * struct ethosu_uapi_network_info - Network info
+ * @desc: Network description
+ * @ifm_count: Number of IFM buffers
+ * @ifm_size: IFM buffer sizes
+ * @ofm_count: Number of OFM buffers
+ * @ofm_size: OFM buffer sizes
+ */
+struct ethosu_uapi_network_info {
+ char desc[32];
+ __u32 ifm_count;
+ __u32 ifm_size[ETHOSU_FD_MAX];
+ __u32 ofm_count;
+ __u32 ofm_size[ETHOSU_FD_MAX];
+};
+
+/**
* struct ethosu_uapi_pmu_config - Configure performance counters
* @events: Array of counters to configure, set to non-zero for
* each counter to enable corresponding event.