mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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:
committed by
mobile promotions
parent
130dd3dd3e
commit
2e2f8f1505
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user