diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-18 15:35:57 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-28 15:47:04 -0400 |
commit | 556643179f1223555e352b48be31df3eda9390b6 (patch) | |
tree | 4359a0ff2de7f549b9e0b83ffc24347b6466f1bd /drivers/gpu/nvgpu/vgpu | |
parent | 610a523b7d9c62e5b4d6444f738acc62d779713b (diff) |
gpu: nvgpu: Allocate channel table with vmalloc
Channel table can be bigger than one page, so allocate it with
vmalloc.
Also add a free for tsg table, which did not exist before, and
remove per-channel remove_channel callback which was never used.
JIRA DNVGPU-50
Change-Id: I3ee84b65d94881df52bf0618bf4c5f2e85758223
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1129244
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index 294581b9..dc82d57b 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | |||
@@ -267,10 +267,8 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g) | |||
267 | 267 | ||
268 | gk20a_dbg(gpu_dbg_map, "userd bar1 va = 0x%llx", f->userd.gpu_va); | 268 | gk20a_dbg(gpu_dbg_map, "userd bar1 va = 0x%llx", f->userd.gpu_va); |
269 | 269 | ||
270 | f->channel = kzalloc(f->num_channels * sizeof(*f->channel), | 270 | f->channel = vzalloc(f->num_channels * sizeof(*f->channel)); |
271 | GFP_KERNEL); | 271 | f->tsg = vzalloc(f->num_channels * sizeof(*f->tsg)); |
272 | f->tsg = kzalloc(f->num_channels * sizeof(*f->tsg), | ||
273 | GFP_KERNEL); | ||
274 | f->engine_info = kzalloc(f->max_engines * sizeof(*f->engine_info), | 272 | f->engine_info = kzalloc(f->max_engines * sizeof(*f->engine_info), |
275 | GFP_KERNEL); | 273 | GFP_KERNEL); |
276 | 274 | ||
@@ -315,9 +313,9 @@ clean_up: | |||
315 | 313 | ||
316 | memset(&f->userd, 0, sizeof(f->userd)); | 314 | memset(&f->userd, 0, sizeof(f->userd)); |
317 | 315 | ||
318 | kfree(f->channel); | 316 | vfree(f->channel); |
319 | f->channel = NULL; | 317 | f->channel = NULL; |
320 | kfree(f->tsg); | 318 | vfree(f->tsg); |
321 | f->tsg = NULL; | 319 | f->tsg = NULL; |
322 | kfree(f->engine_info); | 320 | kfree(f->engine_info); |
323 | f->engine_info = NULL; | 321 | f->engine_info = NULL; |