video: tegra: nvmap: Deprecate nvmap_ioctl_get_heap_size

Remove function nvmap_ioctl_get_heap_size from nvmap, as the ioctl NVMAP_IOC_GET_HEAP_SIZE is being deprecated and its functionality is being replaced with NVMAP_IOC_QUERY_HEAP_PARAMS.

Bug 4479027

Change-Id: I8a60810ff8b474f32413c9afe2ba3a0d7336a4d0
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110262
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Yash Bhatt
2024-04-05 10:47:56 +00:00
committed by mobile promotions
parent c934b1b477
commit 6200c05e7d
4 changed files with 2 additions and 38 deletions

View File

@@ -450,10 +450,6 @@ static long nvmap_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
err = nvmap_ioctl_get_available_heaps(filp, uarg);
break;
case NVMAP_IOC_GET_HEAP_SIZE:
err = nvmap_ioctl_get_heap_size(filp, uarg);
break;
case NVMAP_IOC_PARAMETERS:
err = nvmap_ioctl_get_handle_parameters(filp, uarg);
break;

View File

@@ -1024,29 +1024,6 @@ int nvmap_ioctl_get_available_heaps(struct file *filp, void __user *arg)
return 0;
}
int nvmap_ioctl_get_heap_size(struct file *filp, void __user *arg)
{
struct nvmap_heap_size op;
struct nvmap_heap *heap;
int i;
memset(&op, 0, sizeof(op));
if (copy_from_user(&op, arg, sizeof(op)))
return -EFAULT;
for (i = 0; i < nvmap_dev->nr_carveouts; i++) {
if (op.heap & nvmap_dev->heaps[i].heap_bit) {
heap = nvmap_dev->heaps[i].carveout;
op.size = nvmap_query_heap_size(heap);
if (copy_to_user(arg, &op, sizeof(op)))
return -EFAULT;
return 0;
}
}
return -ENODEV;
}
int nvmap_ioctl_get_handle_parameters(struct file *filp, void __user *arg)
{
struct nvmap_client *client = filp->private_data;

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2010-2023, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2010-2024, NVIDIA CORPORATION. All rights reserved.
*
* ioctl declarations for nvmap
*/
@@ -50,7 +50,6 @@ int nvmap_ioctl_set_tag_label(struct file *filp, void __user *arg);
int nvmap_ioctl_get_available_heaps(struct file *filp, void __user *arg);
int nvmap_ioctl_get_heap_size(struct file *filp, void __user *arg);
void kasan_memcpy_toio(void __iomem *to, const void *from,
size_t count);

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2009-2023, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2009-2024, NVIDIA CORPORATION. All rights reserved.
*
* structure declarations for nvmem and nvmap user-space ioctls
*/
@@ -204,11 +204,6 @@ struct nvmap_available_heaps {
__u64 heaps; /* heaps bitmask */
};
struct nvmap_heap_size {
__u32 heap;
__u64 size;
};
struct nvmap_sciipc_map {
__u64 auth_token; /* AuthToken */
__u32 flags; /* Exporter permission flags */
@@ -337,9 +332,6 @@ struct nvmap_fd_for_range_from_list {
#define NVMAP_IOC_GET_AVAILABLE_HEAPS \
_IOR(NVMAP_IOC_MAGIC, 25, struct nvmap_available_heaps)
#define NVMAP_IOC_GET_HEAP_SIZE \
_IOR(NVMAP_IOC_MAGIC, 26, struct nvmap_heap_size)
#define NVMAP_IOC_PARAMETERS \
_IOR(NVMAP_IOC_MAGIC, 27, struct nvmap_handle_parameters)