From d0cbf337d60aef7a6d96fc8c965e22c987f094a1 Mon Sep 17 00:00:00 2001 From: Anup Mahindre Date: Tue, 23 Mar 2021 12:37:06 +0530 Subject: video: tegra: host: nvdla: Add support for internal buffers - Add buffer type field to nvdla_mem_handle - For internal buffers, skip pin and unpin operations and pass the offset as final adress - Also update error handling in nvdla_map_task_memory to match with convention Jira DLA-4376 JIRA DLA-4908 Bug 3352716 Change-Id: I662da30cb9c606d2f67b792f09e026af391c89d1 Signed-off-by: Anup Mahindre Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2503708 (cherry picked from commit a2cc66a3f318394e65f6f126bbb7eaa5ccdae3e2) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2572190 Tested-by: Bharat Nihalani Tested-by: mobile promotions Reviewed-by: Bharat Nihalani Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- include/uapi/linux/nvhost_nvdla_ioctl.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/uapi') diff --git a/include/uapi/linux/nvhost_nvdla_ioctl.h b/include/uapi/linux/nvhost_nvdla_ioctl.h index b203fda63..bd427e789 100644 --- a/include/uapi/linux/nvhost_nvdla_ioctl.h +++ b/include/uapi/linux/nvhost_nvdla_ioctl.h @@ -3,7 +3,7 @@ * * Tegra NvDLA Driver * - * Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2021, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -127,11 +127,18 @@ struct nvdla_get_q_status_args { * * @handle handle to buffer allocated in userspace * @offset offset in buffer + * @type buffer heap type + * @reserved reserved for future use * */ struct nvdla_mem_handle { __u32 handle; __u32 offset; +#define NVDLA_BUFFER_TYPE_MC 0U +#define NVDLA_BUFFER_TYPE_CV 1U +#define NVDLA_BUFFER_TYPE_INTERNAL 2U + __u8 type; + __u8 reserved[3]; }; /** -- cgit v1.2.2