diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2016-07-07 03:36:46 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-07-08 07:19:04 -0400 |
commit | d33fb5a9645ef95a97fcf6b3f8f10d9a812ade6d (patch) | |
tree | cfd53a1fb88e044b8b7004ff9b32f1093efd4f1c /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | e27c72446bf09196d6d66f28389f00565273a13f (diff) |
gpu: nvgpu: use vidmem by default in gmmu_alloc variants
For devices that have vidmem available, use the vidmem allocator in
gk20a_gmmu_alloc{,attr,_map,_map_attr}. For others, use sysmem.
Because all of the buffers haven't been tested to work in vidmem yet,
rename calls to gk20a_gmmu_alloc{,attr,_map,_map_attr} to have _sys at
the end to declare explicitly that vidmem is used. Enabling vidmem for
each now is a matter of removing "_sys" from the function call.
Jira DNVGPU-18
Change-Id: Ibe42f67eff2c2b68c36582e978ace419dc815dc5
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1176805
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 0e006cb6..3e55e3c1 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -591,7 +591,8 @@ static int init_runlist(struct gk20a *g, struct fifo_gk20a *f) | |||
591 | 591 | ||
592 | runlist_size = ram_rl_entry_size_v() * f->num_runlist_entries; | 592 | runlist_size = ram_rl_entry_size_v() * f->num_runlist_entries; |
593 | for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) { | 593 | for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) { |
594 | int err = gk20a_gmmu_alloc(g, runlist_size, &runlist->mem[i]); | 594 | int err = gk20a_gmmu_alloc_sys(g, runlist_size, |
595 | &runlist->mem[i]); | ||
595 | if (err) { | 596 | if (err) { |
596 | dev_err(d, "memory allocation failed\n"); | 597 | dev_err(d, "memory allocation failed\n"); |
597 | goto clean_up_runlist; | 598 | goto clean_up_runlist; |
@@ -766,7 +767,7 @@ static int gk20a_init_fifo_setup_sw(struct gk20a *g) | |||
766 | 767 | ||
767 | f->userd_entry_size = 1 << ram_userd_base_shift_v(); | 768 | f->userd_entry_size = 1 << ram_userd_base_shift_v(); |
768 | 769 | ||
769 | err = gk20a_gmmu_alloc_map(&g->mm.bar1.vm, | 770 | err = gk20a_gmmu_alloc_map_sys(&g->mm.bar1.vm, |
770 | f->userd_entry_size * f->num_channels, | 771 | f->userd_entry_size * f->num_channels, |
771 | &f->userd); | 772 | &f->userd); |
772 | if (err) { | 773 | if (err) { |