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

Change-Id: I662da30cb9c606d2f67b792f09e026af391c89d1
Signed-off-by: Anup Mahindre <amahindre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2503708
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Anup Mahindre
2021-03-23 12:37:06 +05:30
committed by Laxman Dewangan
parent 65f1839c50
commit 6242fdd281
2 changed files with 25 additions and 4 deletions

View File

@@ -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];
};
/**