diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c index 5719b748..ef04850e 100644 --- a/drivers/video/tegra/nvmap/nvmap_dev.c +++ b/drivers/video/tegra/nvmap/nvmap_dev.c @@ -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; diff --git a/drivers/video/tegra/nvmap/nvmap_ioctl.c b/drivers/video/tegra/nvmap/nvmap_ioctl.c index 062cf305..352f5fde 100644 --- a/drivers/video/tegra/nvmap/nvmap_ioctl.c +++ b/drivers/video/tegra/nvmap/nvmap_ioctl.c @@ -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; diff --git a/drivers/video/tegra/nvmap/nvmap_ioctl.h b/drivers/video/tegra/nvmap/nvmap_ioctl.h index d3221656..3aaa291e 100644 --- a/drivers/video/tegra/nvmap/nvmap_ioctl.h +++ b/drivers/video/tegra/nvmap/nvmap_ioctl.h @@ -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); diff --git a/include/uapi/linux/nvmap.h b/include/uapi/linux/nvmap.h index 5bd92a6d..a2d388bd 100644 --- a/include/uapi/linux/nvmap.h +++ b/include/uapi/linux/nvmap.h @@ -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)