summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-04-06 18:30:01 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-20 19:14:32 -0400
commite32f62fadfcde413bcd9b5af61ad884e27ba2bf1 (patch)
treeeff606a0826841eae6ade5906acd9da589d1179a /drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
parent52bd58b560d0b3b49c03ef5c2637b67adeac8193 (diff)
gpu: nvgpu: Move Linux nvgpu_mem fields
Hide the Linux specific nvgpu_mem fields so that in subsequent patches core code can instead of using struct sg_table it can use mem_desc. Routines for accessing system specific fields will be added as needed. This is the first step in a fairly major overhaul of the GMMU mapping routines. There are numerous issues with the current design (or lack there of): massively coupled code, system dependencies, disorganization, etc. JIRA NVGPU-12 JIRA NVGPU-30 Change-Id: I2e7d3ae3a07468cfc17c1c642d28ed1b0952474d Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1464076 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c')
-rw-r--r--drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
index 7ce66707..852dcdf2 100644
--- a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
@@ -138,13 +138,13 @@ static void gk20a_tegra_secure_destroy(struct gk20a *g,
138{ 138{
139 DEFINE_DMA_ATTRS(attrs); 139 DEFINE_DMA_ATTRS(attrs);
140 140
141 if (desc->mem.sgt) { 141 if (desc->mem.priv.sgt) {
142 phys_addr_t pa = sg_phys(desc->mem.sgt->sgl); 142 phys_addr_t pa = sg_phys(desc->mem.priv.sgt->sgl);
143 dma_free_attrs(&tegra_vpr_dev, desc->mem.size, 143 dma_free_attrs(&tegra_vpr_dev, desc->mem.size,
144 (void *)(uintptr_t)pa, 144 (void *)(uintptr_t)pa,
145 pa, __DMA_ATTR(attrs)); 145 pa, __DMA_ATTR(attrs));
146 gk20a_free_sgtable(g, &desc->mem.sgt); 146 gk20a_free_sgtable(g, &desc->mem.priv.sgt);
147 desc->mem.sgt = NULL; 147 desc->mem.priv.sgt = NULL;
148 } 148 }
149} 149}
150 150
@@ -184,7 +184,7 @@ int gk20a_tegra_secure_alloc(struct device *dev,
184 184
185 desc->destroy = gk20a_tegra_secure_destroy; 185 desc->destroy = gk20a_tegra_secure_destroy;
186 186
187 desc->mem.sgt = sgt; 187 desc->mem.priv.sgt = sgt;
188 desc->mem.size = size; 188 desc->mem.size = size;
189 desc->mem.aperture = APERTURE_SYSMEM; 189 desc->mem.aperture = APERTURE_SYSMEM;
190 190