Remove buffer capacity, offset and resize in UAPI

The UAPI no longer supports the buffer capacity, offset and resize
functionality. Instead, the UAPI now only accepts a fixed size given at
the creation of the buffer. This change was made because the features
were not used and made the buffer handling more complicated. The user
knows how big buffers they need for their networks so they don't need
resize support or partial buffer usage support by having separate size
and capacity with an offset.

Without these features, the buffer instance no longer needs any IOCTL
call support so it has been removed. However, to still be able to check
the size of a buffer from its file descriptor, seek support has been
implemented so lseek and similar functions can be used to get the size.

The driver library's clear function that previously only reset the size
and offset values of the buffer will now clear the buffer content
instead.

These are breaking changes so the Linux kernel NPU driver version and
the driver library version have been given major version bumps. All the
tests and other applications affected by these changes have been updated
accordingly.

Change-Id: Ifc34cf04724a95853ad23fd7398dd286f73bcdab
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
diff --git a/kernel/uapi/ethosu.h b/kernel/uapi/ethosu.h
index 69f8d3a..4e4d180 100644
--- a/kernel/uapi/ethosu.h
+++ b/kernel/uapi/ethosu.h
@@ -49,10 +49,6 @@
 						   struct ethosu_uapi_kernel_driver_version)
 #define ETHOSU_IOCTL_BUFFER_CREATE      ETHOSU_IOR(0x10, \
 						   struct ethosu_uapi_buffer_create)
-#define ETHOSU_IOCTL_BUFFER_SET         ETHOSU_IOR(0x11, \
-						   struct ethosu_uapi_buffer)
-#define ETHOSU_IOCTL_BUFFER_GET         ETHOSU_IOW(0x12, \
-						   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, \
@@ -71,7 +67,7 @@
 #define ETHOSU_PMU_EVENT_MAX             8
 
 /* Kernel driver version */
-#define ETHOSU_KERNEL_DRIVER_VERSION_MAJOR 1
+#define ETHOSU_KERNEL_DRIVER_VERSION_MAJOR 2
 #define ETHOSU_KERNEL_DRIVER_VERSION_MINOR 0
 #define ETHOSU_KERNEL_DRIVER_VERSION_PATCH 0
 
@@ -105,21 +101,9 @@
 
 /**
  * struct ethosu_uapi_buffer_create - Create buffer request
- * @capacity:	Maximum capacity of the buffer
+ * @size:	Size of the requested buffer
  */
 struct ethosu_uapi_buffer_create {
-	__u32 capacity;
-};
-
-/**
- * struct ethosu_uapi_buffer - Buffer descriptor
- * @offset:	Offset to where the data starts
- * @size:	Size of the data
- *
- * 'offset + size' must not exceed the capacity of the buffer.
- */
-struct ethosu_uapi_buffer {
-	__u32 offset;
 	__u32 size;
 };