diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2017-03-14 07:37:58 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-21 18:01:48 -0400 |
commit | e83372e0cc78a16777f0d2f43936e772f40308d2 (patch) | |
tree | 02da68ade108b1144e80e37aefbded1dba73fbca /drivers/gpu | |
parent | 8929fb2b1db9ddb986070efd998772e56e669e70 (diff) |
gpu: nvgpu: gv11b: abstract away dma alloc attrs
Don't use gk20a_gmmu_free_attr because the attrs are embedded in struct
mem_desc now.
Bug 1853519
Change-Id: Iaa4309d4c2cd334346e09c4fbf15ce826f2ff640
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1321314
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/mm_gv11b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | 9 |
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/mm_gv11b.c b/drivers/gpu/nvgpu/gv11b/mm_gv11b.c index 404ee921..d49c3b73 100644 --- a/drivers/gpu/nvgpu/gv11b/mm_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/mm_gv11b.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/pm_runtime.h> | 16 | #include <linux/pm_runtime.h> |
17 | #include <linux/dma-mapping.h> | ||
18 | 17 | ||
19 | #include "gk20a/gk20a.h" | 18 | #include "gk20a/gk20a.h" |
20 | 19 | ||
diff --git a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c index 63cce491..6344b5fb 100644 --- a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | |||
@@ -37,7 +37,7 @@ void gv11b_free_subctx_header(struct channel_gk20a *c) | |||
37 | gk20a_gmmu_unmap(c->vm, ctx->mem.gpu_va, | 37 | gk20a_gmmu_unmap(c->vm, ctx->mem.gpu_va, |
38 | ctx->mem.size, gk20a_mem_flag_none); | 38 | ctx->mem.size, gk20a_mem_flag_none); |
39 | 39 | ||
40 | gk20a_gmmu_free_attr(g, DMA_ATTR_NO_KERNEL_MAPPING, &ctx->mem); | 40 | gk20a_gmmu_free(g, &ctx->mem); |
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
@@ -51,8 +51,8 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c) | |||
51 | gk20a_dbg_fn(""); | 51 | gk20a_dbg_fn(""); |
52 | 52 | ||
53 | if (ctx->mem.gpu_va == 0) { | 53 | if (ctx->mem.gpu_va == 0) { |
54 | ret = gk20a_gmmu_alloc_attr_sys(g, | 54 | ret = gk20a_gmmu_alloc_flags_sys(g, |
55 | DMA_ATTR_NO_KERNEL_MAPPING, | 55 | NVGPU_DMA_NO_KERNEL_MAPPING, |
56 | gr->ctx_vars.golden_image_size, | 56 | gr->ctx_vars.golden_image_size, |
57 | &ctx->mem); | 57 | &ctx->mem); |
58 | if (ret) { | 58 | if (ret) { |
@@ -69,8 +69,7 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c) | |||
69 | if (!ctx->mem.gpu_va) { | 69 | if (!ctx->mem.gpu_va) { |
70 | gk20a_err(dev_from_gk20a(g), | 70 | gk20a_err(dev_from_gk20a(g), |
71 | "failed to map ctx header"); | 71 | "failed to map ctx header"); |
72 | gk20a_gmmu_free_attr(g, DMA_ATTR_NO_KERNEL_MAPPING, | 72 | gk20a_gmmu_free(g, &ctx->mem); |
73 | &ctx->mem); | ||
74 | return -ENOMEM; | 73 | return -ENOMEM; |
75 | } | 74 | } |
76 | /* Now clear the buffer */ | 75 | /* Now clear the buffer */ |