diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-03-20 15:59:09 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-04-04 22:17:24 -0400 |
commit | 1b7b271980094637cf34a9d8ad14cb36f2c36363 (patch) | |
tree | a897b5d9a013c14866f938673da6a8d8fe80ef51 /drivers/gpu/nvgpu/gm20b | |
parent | 21f1396d1c80010470e0f071fabe84279b3aebae (diff) |
gpu: nvgpu: Use common allocator for context
Reduce amount of duplicate code around memory allocation by using
common helpers, and common data structure for storing results of
allocations.
Bug 1605769
Change-Id: I10c226e2377aa867a5cf11be61d08a9d67206b1d
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/720507
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index c7479078..e318f002 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |||
@@ -978,8 +978,8 @@ static int gr_gm20b_update_pc_sampling(struct channel_gk20a *c, | |||
978 | if (!ch_ctx || !ch_ctx->gr_ctx || c->vpr) | 978 | if (!ch_ctx || !ch_ctx->gr_ctx || c->vpr) |
979 | return -EINVAL; | 979 | return -EINVAL; |
980 | 980 | ||
981 | ctx_ptr = vmap(ch_ctx->gr_ctx->pages, | 981 | ctx_ptr = vmap(ch_ctx->gr_ctx->mem.pages, |
982 | PAGE_ALIGN(ch_ctx->gr_ctx->size) >> PAGE_SHIFT, | 982 | PAGE_ALIGN(ch_ctx->gr_ctx->mem.size) >> PAGE_SHIFT, |
983 | 0, pgprot_writecombine(PAGE_KERNEL)); | 983 | 0, pgprot_writecombine(PAGE_KERNEL)); |
984 | if (!ctx_ptr) | 984 | if (!ctx_ptr) |
985 | return -ENOMEM; | 985 | return -ENOMEM; |