summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAparna Das <aparnad@nvidia.com>2017-11-30 04:11:36 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-12 16:26:41 -0500
commit47c794ab5238482d15448a862dbd63530f261952 (patch)
tree7d68c36cb4bc59ab24a304a154234cfa2e39ac80
parent9dd3bb2e62c321bb48c14f3e76c00a754cd12c5f (diff)
gpu: nvgpu: vgpu: add l3 allocation support
Modify rpc command parameter to support l3 cache allocation. Jira EVLR-1752 Change-Id: I1be00e04ee01c0763f46c0d0da6a112316cc7e1d Signed-off-by: Aparna Das <aparnad@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1616566 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c6
-rw-r--r--include/linux/tegra_vgpu.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c
index b857ea95..d343da03 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Virtualized GPU Memory Management 2 * Virtualized GPU Memory Management
3 * 3 *
4 * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -169,6 +169,10 @@ u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm,
169 p->flags = TEGRA_VGPU_MAP_CACHEABLE; 169 p->flags = TEGRA_VGPU_MAP_CACHEABLE;
170 if (flags & NVGPU_VM_MAP_IO_COHERENT) 170 if (flags & NVGPU_VM_MAP_IO_COHERENT)
171 p->flags |= TEGRA_VGPU_MAP_IO_COHERENT; 171 p->flags |= TEGRA_VGPU_MAP_IO_COHERENT;
172#ifdef CONFIG_TEGRA_19x_GPU
173 if (flags & NVGPU_VM_MAP_L3_ALLOC)
174 p->flags |= TEGRA_VGPU_MAP_L3_ALLOC;
175#endif
172 p->prot = prot; 176 p->prot = prot;
173 p->ctag_offset = ctag_offset; 177 p->ctag_offset = ctag_offset;
174 p->clear_ctags = clear_ctags; 178 p->clear_ctags = clear_ctags;
diff --git a/include/linux/tegra_vgpu.h b/include/linux/tegra_vgpu.h
index 105870dc..9980f4bc 100644
--- a/include/linux/tegra_vgpu.h
+++ b/include/linux/tegra_vgpu.h
@@ -163,6 +163,7 @@ struct tegra_vgpu_as_map_params {
163 163
164#define TEGRA_VGPU_MAP_CACHEABLE (1 << 0) 164#define TEGRA_VGPU_MAP_CACHEABLE (1 << 0)
165#define TEGRA_VGPU_MAP_IO_COHERENT (1 << 1) 165#define TEGRA_VGPU_MAP_IO_COHERENT (1 << 1)
166#define TEGRA_VGPU_MAP_L3_ALLOC (1 << 2)
166 167
167struct tegra_vgpu_as_map_ex_params { 168struct tegra_vgpu_as_map_ex_params {
168 u64 handle; 169 u64 handle;