diff options
author | Aparna Das <aparnad@nvidia.com> | 2017-11-30 04:08:52 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-12-30 21:50:40 -0500 |
commit | 4f67a794ddbb9e5c1ce66461fabdf3f27708945a (patch) | |
tree | 7e4d379d6bb10792060a55b5648d53dee38ea69d | |
parent | b983c67d846547d047156d12a64cb7b216598738 (diff) |
gpu: nvgpu: vgpu: add io coherency support
Modify command message parameter to support io
coherency.
Jira EVLR-2025
Change-Id: I38b21c72d85f559555c4d97dab73d0f715ecc655
Signed-off-by: Aparna Das <aparnad@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1614388
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.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c | 1 | ||||
-rw-r--r-- | include/linux/tegra_vgpu.h | 5 |
3 files changed, 9 insertions, 2 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 8c5a6d27..b857ea95 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 | |||
@@ -165,7 +165,10 @@ u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm, | |||
165 | p->pgsz_idx = pgsz_idx; | 165 | p->pgsz_idx = pgsz_idx; |
166 | p->iova = 0; | 166 | p->iova = 0; |
167 | p->kind = kind_v; | 167 | p->kind = kind_v; |
168 | p->cacheable = (flags & NVGPU_VM_MAP_CACHEABLE) ? 1 : 0; | 168 | if (flags & NVGPU_VM_MAP_CACHEABLE) |
169 | p->flags = TEGRA_VGPU_MAP_CACHEABLE; | ||
170 | if (flags & NVGPU_VM_MAP_IO_COHERENT) | ||
171 | p->flags |= TEGRA_VGPU_MAP_IO_COHERENT; | ||
169 | p->prot = prot; | 172 | p->prot = prot; |
170 | p->ctag_offset = ctag_offset; | 173 | p->ctag_offset = ctag_offset; |
171 | p->clear_ctags = clear_ctags; | 174 | p->clear_ctags = clear_ctags; |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c index 9ba1892b..93e26541 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c | |||
@@ -35,6 +35,7 @@ int vgpu_gv11b_init_gpu_characteristics(struct gk20a *g) | |||
35 | } | 35 | } |
36 | 36 | ||
37 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); | 37 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); |
38 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true); | ||
38 | 39 | ||
39 | return 0; | 40 | return 0; |
40 | } | 41 | } |
diff --git a/include/linux/tegra_vgpu.h b/include/linux/tegra_vgpu.h index 5c81e8c9..7b5c9e11 100644 --- a/include/linux/tegra_vgpu.h +++ b/include/linux/tegra_vgpu.h | |||
@@ -160,6 +160,9 @@ struct tegra_vgpu_as_map_params { | |||
160 | u32 ctag_offset; | 160 | u32 ctag_offset; |
161 | }; | 161 | }; |
162 | 162 | ||
163 | #define TEGRA_VGPU_MAP_CACHEABLE (1 << 0) | ||
164 | #define TEGRA_VGPU_MAP_IO_COHERENT (1 << 1) | ||
165 | |||
163 | struct tegra_vgpu_as_map_ex_params { | 166 | struct tegra_vgpu_as_map_ex_params { |
164 | u64 handle; | 167 | u64 handle; |
165 | u64 gpu_va; | 168 | u64 gpu_va; |
@@ -168,7 +171,7 @@ struct tegra_vgpu_as_map_ex_params { | |||
168 | u8 pgsz_idx; | 171 | u8 pgsz_idx; |
169 | u8 iova; | 172 | u8 iova; |
170 | u8 kind; | 173 | u8 kind; |
171 | u8 cacheable; | 174 | u32 flags; |
172 | u8 clear_ctags; | 175 | u8 clear_ctags; |
173 | u8 prot; | 176 | u8 prot; |
174 | u32 ctag_offset; | 177 | u32 ctag_offset; |