From 91ada92f61eeb41026a678b58863acafa7a33674 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Fri, 5 Sep 2014 10:59:05 +0300 Subject: gpu: nvgpu: ioctl support flags in gpu characteristics Expose supported nvgpu ioctls to userspace via bits in the flags field of nvhost_gpu_characteristics; currently define two bits for special memory allocation support. Bug 1539747 Change-Id: I1bc9333b12825d07a00b7a4136ae9d35816a5855 Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/495942 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.c | 3 ++- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 2ed7b737..7d744f42 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -1907,7 +1907,8 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) gpu->compression_page_size = g->mm.compression_page_size; gpu->pde_coverage_bit_count = g->mm.pde_stride_shift; - gpu->flags = 0; + gpu->flags = NVHOST_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS + | NVHOST_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS; if (IS_ENABLED(CONFIG_TEGRA_GK20A) && gk20a_platform_has_syncpoints(g->dev)) diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 9191cfe9..7660c949 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -3147,9 +3147,12 @@ bool gk20a_mm_mmu_debug_mode_enabled(struct gk20a *g) void gk20a_init_mm(struct gpu_ops *gops) { + /* remember to remove NVHOST_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS in + * characteristics flags if sparse support is removed */ gops->mm.set_sparse = gk20a_vm_put_sparse; gops->mm.put_empty = gk20a_vm_put_empty; gops->mm.clear_sparse = gk20a_vm_clear_sparse; + gops->mm.is_debug_mode_enabled = gk20a_mm_mmu_debug_mode_enabled; gops->mm.gmmu_map = gk20a_locked_gmmu_map; gops->mm.gmmu_unmap = gk20a_locked_gmmu_unmap; -- cgit v1.2.2