diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2016-05-16 04:33:38 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-24 15:39:06 -0400 |
commit | 3e431e26c5c3aba6da8a6555ec3d7b7df53f534a (patch) | |
tree | de7baabb5bbc4a5d27af36d62c00827b7bad3f54 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |
parent | dc7af18bf8056c213165d4cd1c55ea0fba9f1341 (diff) |
gpu: nvgpu: add PRAMIN support for mem accessors
To support vidmem, implement a way to access buffers via the PRAMIN
window instead of just kernel-mapped sysmem buffers for iGPU as of now.
Depending on the buffer aperture, choose between the two access types in
the buffer memory accessor functions.
vmap()/vunmap() pairs are no-ops for buffers that can't be cpu-mapped.
Two uses of DMA_ATTR_READ_ONLY are removed in the ucode loading path to
support writing to them too via the indirection in addition to cpu.
JIRA DNVGPU-23
Change-Id: I282dba6741c6b8224bc12e69c1fb3936bde7e6ed
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1141314
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index a5caf048..076ddd12 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -2036,8 +2036,7 @@ int gr_gk20a_init_ctxsw_ucode(struct gk20a *g) | |||
2036 | g->gr.ctx_vars.ucode.gpccs.inst.count * sizeof(u32), | 2036 | g->gr.ctx_vars.ucode.gpccs.inst.count * sizeof(u32), |
2037 | g->gr.ctx_vars.ucode.gpccs.data.count * sizeof(u32)); | 2037 | g->gr.ctx_vars.ucode.gpccs.data.count * sizeof(u32)); |
2038 | 2038 | ||
2039 | err = gk20a_gmmu_alloc_attr(g, DMA_ATTR_READ_ONLY, ucode_size, | 2039 | err = gk20a_gmmu_alloc(g, ucode_size, &ucode_info->surface_desc); |
2040 | &ucode_info->surface_desc); | ||
2041 | if (err) | 2040 | if (err) |
2042 | goto clean_up; | 2041 | goto clean_up; |
2043 | 2042 | ||