diff options
| author | puneet saxena <puneets@nvidia.com> | 2020-06-29 10:30:37 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2020-07-06 12:10:33 -0400 |
| commit | 66d34be2111cbce34f5b50ff6d353481caf82c3c (patch) | |
| tree | fa26f9dec7b63c67d16fa7077dd525b641cc9e28 /include/uapi/linux | |
| parent | cec1348f1cb13babeeb1d989d5c5009840571820 (diff) | |
drivers: tegra: nvmap: Add NVMAP_IOC_PARAMETERS ioctl
Add NVMAP_IOC_PARAMETERS to return nvmap handle's
contig; Phys_Contig
import_id; NA
handle;
heap_number; Only valid for IVM carveout
access_flags; NA
heap; Heap Type
align; Alignement
coherency; Coherency flag
size; Handle Size
Bug 3038325
Change-Id: I6fcfce7c3808e21084b543fa87ff8e48431b19f5
Signed-off-by: puneet saxena <puneets@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2368252
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Kai Zhang (SW-TEGRA) <kazhang@nvidia.com>
Reviewed-by: Tuomas Kulve <tkulve@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/nvmap.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/uapi/linux/nvmap.h b/include/uapi/linux/nvmap.h index 667dcdc8e..66eda75ce 100644 --- a/include/uapi/linux/nvmap.h +++ b/include/uapi/linux/nvmap.h | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * structure declarations for nvmem and nvmap user-space ioctls | 4 | * structure declarations for nvmem and nvmap user-space ioctls |
| 5 | * | 5 | * |
| 6 | * Copyright (c) 2009-2019, NVIDIA CORPORATION. All rights reserved. | 6 | * Copyright (c) 2009-2020, NVIDIA CORPORATION. All rights reserved. |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * under the terms and conditions of the GNU General Public License, | 9 | * under the terms and conditions of the GNU General Public License, |
| @@ -275,6 +275,18 @@ struct nvmap_query_heap_params { | |||
| 275 | __u64 largest_free_block; | 275 | __u64 largest_free_block; |
| 276 | }; | 276 | }; |
| 277 | 277 | ||
| 278 | struct nvmap_handle_parameters { | ||
| 279 | __u8 contig; | ||
| 280 | __u32 import_id; | ||
| 281 | __u32 handle; | ||
| 282 | __u32 heap_number; | ||
| 283 | __u32 access_flags; | ||
| 284 | __u64 heap; | ||
| 285 | __u64 align; | ||
| 286 | __u64 coherency; | ||
| 287 | __u64 size; | ||
| 288 | }; | ||
| 289 | |||
| 278 | #define NVMAP_IOC_MAGIC 'N' | 290 | #define NVMAP_IOC_MAGIC 'N' |
| 279 | 291 | ||
| 280 | /* Creates a new memory handle. On input, the argument is the size of the new | 292 | /* Creates a new memory handle. On input, the argument is the size of the new |
| @@ -373,6 +385,8 @@ struct nvmap_query_heap_params { | |||
| 373 | #define NVMAP_IOC_GET_HEAP_SIZE \ | 385 | #define NVMAP_IOC_GET_HEAP_SIZE \ |
| 374 | _IOR(NVMAP_IOC_MAGIC, 26, struct nvmap_heap_size) | 386 | _IOR(NVMAP_IOC_MAGIC, 26, struct nvmap_heap_size) |
| 375 | 387 | ||
| 388 | #define NVMAP_IOC_PARAMETERS \ | ||
| 389 | _IOR(NVMAP_IOC_MAGIC, 27, struct nvmap_handle_parameters) | ||
| 376 | /* START of T124 IOCTLS */ | 390 | /* START of T124 IOCTLS */ |
| 377 | /* Actually allocates memory for the specified handle, with kind */ | 391 | /* Actually allocates memory for the specified handle, with kind */ |
| 378 | #define NVMAP_IOC_ALLOC_KIND _IOW(NVMAP_IOC_MAGIC, 100, struct nvmap_alloc_kind_handle) | 392 | #define NVMAP_IOC_ALLOC_KIND _IOW(NVMAP_IOC_MAGIC, 100, struct nvmap_alloc_kind_handle) |
