summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2016-07-07 03:36:46 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-07-08 07:19:04 -0400
commitd33fb5a9645ef95a97fcf6b3f8f10d9a812ade6d (patch)
treecfd53a1fb88e044b8b7004ff9b32f1093efd4f1c /drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
parente27c72446bf09196d6d66f28389f00565273a13f (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/vgpu/fifo_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/fifo_vgpu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
index ffa16cd3..29692573 100644
--- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
@@ -217,7 +217,8 @@ static int init_runlist(struct gk20a *g, struct fifo_gk20a *f)
217 217
218 runlist_size = sizeof(u16) * f->num_channels; 218 runlist_size = sizeof(u16) * f->num_channels;
219 for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) { 219 for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) {
220 int err = gk20a_gmmu_alloc(g, runlist_size, &runlist->mem[i]); 220 int err = gk20a_gmmu_alloc_sys(g, runlist_size,
221 &runlist->mem[i]);
221 if (err) { 222 if (err) {
222 dev_err(d, "memory allocation failed\n"); 223 dev_err(d, "memory allocation failed\n");
223 goto clean_up_runlist; 224 goto clean_up_runlist;
@@ -265,7 +266,7 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g)
265 266
266 f->userd_entry_size = 1 << ram_userd_base_shift_v(); 267 f->userd_entry_size = 1 << ram_userd_base_shift_v();
267 268
268 err = gk20a_gmmu_alloc(g, f->userd_entry_size * f->num_channels, 269 err = gk20a_gmmu_alloc_sys(g, f->userd_entry_size * f->num_channels,
269 &f->userd); 270 &f->userd);
270 if (err) { 271 if (err) {
271 dev_err(d, "memory allocation failed\n"); 272 dev_err(d, "memory allocation failed\n");