From d33fb5a9645ef95a97fcf6b3f8f10d9a812ade6d Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 7 Jul 2016 10:36:46 +0300 Subject: 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 Reviewed-on: http://git-master/r/1176805 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c') 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) runlist_size = ram_rl_entry_size_v() * f->num_runlist_entries; for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) { - int err = gk20a_gmmu_alloc(g, runlist_size, &runlist->mem[i]); + int err = gk20a_gmmu_alloc_sys(g, runlist_size, + &runlist->mem[i]); if (err) { dev_err(d, "memory allocation failed\n"); goto clean_up_runlist; @@ -766,7 +767,7 @@ static int gk20a_init_fifo_setup_sw(struct gk20a *g) f->userd_entry_size = 1 << ram_userd_base_shift_v(); - err = gk20a_gmmu_alloc_map(&g->mm.bar1.vm, + err = gk20a_gmmu_alloc_map_sys(&g->mm.bar1.vm, f->userd_entry_size * f->num_channels, &f->userd); if (err) { -- cgit v1.2.2