From e8530a7c63dfb4a46eec51295b17fba60de8f5c7 Mon Sep 17 00:00:00 2001 From: Arvind M Date: Tue, 25 Aug 2020 17:04:27 +0530 Subject: nvdla: kmd: handle {RELEASE,ALLOC}_QUEUE ioctls [1] This commit separates the allocation and deallocation of mission critical resources away from open() and close() [2] It is achieved through introduction of NVDLA_IOCTL_{ALLOC,RELEASE} IOCTLs. [3] nvdla_buffer_* APIs introduced to facilitate easier split. Jira DLA-4175 Bug 3200422 Bug 200628173 Change-Id: I3fb07ecaff69c62ec5eb9e5bea39b07ae1624240 Signed-off-by: Arvind M Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2403689 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2412585 GVS: Gerrit_Virtual_Submit Tested-by: Bharat Nihalani Tested-by: mobile promotions Reviewed-by: Mitch Harwell Reviewed-by: Bharat Nihalani Reviewed-by: mobile promotions --- include/uapi/linux/nvhost_nvdla_ioctl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/uapi/linux/nvhost_nvdla_ioctl.h b/include/uapi/linux/nvhost_nvdla_ioctl.h index 3bb1a8183..b203fda63 100644 --- a/include/uapi/linux/nvhost_nvdla_ioctl.h +++ b/include/uapi/linux/nvhost_nvdla_ioctl.h @@ -254,8 +254,12 @@ struct nvdla_status_notify { _IOWR(NVHOST_NVDLA_IOCTL_MAGIC, 7, struct nvdla_get_q_status_args) #define NVDLA_IOCTL_EMU_TASK_SUBMIT \ _IOWR(NVHOST_NVDLA_IOCTL_MAGIC, 8, struct nvdla_submit_args) +#define NVDLA_IOCTL_ALLOC_QUEUE \ + _IO(NVHOST_NVDLA_IOCTL_MAGIC, 9) +#define NVDLA_IOCTL_RELEASE_QUEUE \ + _IO(NVHOST_NVDLA_IOCTL_MAGIC, 10) #define NVDLA_IOCTL_LAST \ - _IOC_NR(NVDLA_IOCTL_EMU_TASK_SUBMIT) + _IOC_NR(NVDLA_IOCTL_RELEASE_QUEUE) #define NVDLA_IOCTL_MAX_ARG_SIZE \ sizeof(struct nvdla_pin_unpin_args) -- cgit v1.2.2