diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-04-06 18:30:01 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-20 19:14:32 -0400 |
commit | e32f62fadfcde413bcd9b5af61ad884e27ba2bf1 (patch) | |
tree | eff606a0826841eae6ade5906acd9da589d1179a /drivers/gpu/nvgpu/vgpu | |
parent | 52bd58b560d0b3b49c03ef5c2637b67adeac8193 (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/vgpu')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gr_vgpu.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index 67def777..9122e48b 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | |||
@@ -270,7 +270,7 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g) | |||
270 | } | 270 | } |
271 | 271 | ||
272 | /* bar1 va */ | 272 | /* bar1 va */ |
273 | f->userd.gpu_va = vgpu_bar1_map(g, &f->userd.sgt, f->userd.size); | 273 | f->userd.gpu_va = vgpu_bar1_map(g, &f->userd.priv.sgt, f->userd.size); |
274 | if (!f->userd.gpu_va) { | 274 | if (!f->userd.gpu_va) { |
275 | dev_err(d, "gmmu mapping failed\n"); | 275 | dev_err(d, "gmmu mapping failed\n"); |
276 | goto clean_up; | 276 | goto clean_up; |
@@ -304,7 +304,7 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g) | |||
304 | 304 | ||
305 | for (chid = 0; chid < f->num_channels; chid++) { | 305 | for (chid = 0; chid < f->num_channels; chid++) { |
306 | f->channel[chid].userd_iova = | 306 | f->channel[chid].userd_iova = |
307 | g->ops.mm.get_iova_addr(g, f->userd.sgt->sgl, 0) | 307 | g->ops.mm.get_iova_addr(g, f->userd.priv.sgt->sgl, 0) |
308 | + chid * f->userd_entry_size; | 308 | + chid * f->userd_entry_size; |
309 | f->channel[chid].userd_gpu_va = | 309 | f->channel[chid].userd_gpu_va = |
310 | f->userd.gpu_va + chid * f->userd_entry_size; | 310 | f->userd.gpu_va + chid * f->userd_entry_size; |
diff --git a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c index 702ae97b..2a674feb 100644 --- a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c | |||
@@ -558,7 +558,7 @@ static int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, | |||
558 | } | 558 | } |
559 | 559 | ||
560 | /* allocate patch buffer */ | 560 | /* allocate patch buffer */ |
561 | if (ch_ctx->patch_ctx.mem.pages == NULL) { | 561 | if (ch_ctx->patch_ctx.mem.priv.pages == NULL) { |
562 | err = vgpu_gr_alloc_channel_patch_ctx(g, c); | 562 | err = vgpu_gr_alloc_channel_patch_ctx(g, c); |
563 | if (err) { | 563 | if (err) { |
564 | nvgpu_err(g, "fail to allocate patch buffer"); | 564 | nvgpu_err(g, "fail to allocate patch buffer"); |