gpu: nvgpu: allocate channel inst blocks in vidmem

Use gk20a_gmmu_alloc() to allocate channel inst block
which first tries to allocate in vidmem

Jira DNVGPU-22

Change-Id: Ib4d92bf4d2bc0c3d53a82812d635fa8abca4340a
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1206274
(cherry picked from commit 0c81c8984c42df27d3520f800eb87728f67d4453)
Reviewed-on: http://git-master/r/1219701
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Konsta Holtta
2016-06-17 15:28:27 +03:00
committed by mobile promotions
parent 130dd3dd3e
commit 2e2f8f1505
2 changed files with 2 additions and 5 deletions

View File

@@ -118,9 +118,6 @@ int channel_gk20a_commit_va(struct channel_gk20a *c)
{
gk20a_dbg_fn("");
if (!c->inst_block.cpu_va)
return -ENOMEM;
gk20a_init_inst_block(&c->inst_block, c->vm,
c->vm->gmmu_page_sizes[gmmu_page_size_big]);
@@ -391,7 +388,7 @@ int channel_gk20a_alloc_inst(struct gk20a *g, struct channel_gk20a *ch)
gk20a_dbg_fn("");
err = gk20a_alloc_inst_block(g, &ch->inst_block);
err = gk20a_gmmu_alloc(g, ram_in_alloc_size_v(), &ch->inst_block);
if (err)
return err;

View File

@@ -973,7 +973,7 @@ channel_from_inst_ptr(struct fifo_gk20a *f, u64 inst_ptr)
continue;
ch_inst_ptr = gk20a_mm_inst_block_addr(g, &ch->inst_block);
if (ch->inst_block.cpu_va && inst_ptr == ch_inst_ptr)
if (inst_ptr == ch_inst_ptr)
return ch;
gk20a_channel_put(ch);