diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2016-09-20 06:34:52 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-14 11:12:34 -0400 |
commit | fa6ab1943e2977c64f62ba5b9c05b6d7fba234f3 (patch) | |
tree | 6fd04ad08ee38c0cc66ed34e12e21a9ac07e41c9 /drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |
parent | 4d07572c8279f199c220e7c606cc9ffb73216d83 (diff) |
gpu: nvgpu: add ioctl for querying memory state
Add NVGPU_GPU_IOCTL_GET_MEMORY_STATE to read the amount of free
device-local video memory, if applicable.
Some reserved fields are added to support different types of queries in
the future (e.g. context-local free amount).
Bug 1787771
Bug 200233138
Change-Id: Id5ffd02ad4d6ed3a6dc196541938573c27b340ac
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1223762
(cherry picked from commit 96221d96c7972c6387944603e974f7639d6dbe70)
Reviewed-on: http://git-master/r/1235980
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index b25a7789..e8f7da98 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -755,6 +755,7 @@ void gk20a_vm_mapping_batch_finish_locked( | |||
755 | 755 | ||
756 | 756 | ||
757 | int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes); | 757 | int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes); |
758 | int gk20a_vidmem_get_space(struct gk20a *g, u64 *space); | ||
758 | 759 | ||
759 | /* Note: batch may be NULL if map op is not part of a batch */ | 760 | /* Note: batch may be NULL if map op is not part of a batch */ |
760 | int gk20a_vm_map_buffer(struct vm_gk20a *vm, | 761 | int gk20a_vm_map_buffer(struct vm_gk20a *vm, |