gpu: nvgpu: allocate blob space early

Allocting blob space for pmu might need fixed address
allocation in vidmem and during boot up

But if some page tables are allocated before blob space,
blob space allocation could fail

Fix this by allocating blob space early during boot up

Jira DNVGPU-20

Change-Id: I30eca1023c8f8f8be101bb7e160ba57a7040911a
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1206402
(cherry picked from commit fad4309ce345ed3879f497bda27f2eceb1084dbb)
Reviewed-on: http://git-master/r/1210956
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Deepak Nibade
2016-08-23 14:17:05 +05:30
committed by mobile promotions
parent 8de995d4af
commit 93a436f581
2 changed files with 13 additions and 0 deletions

View File

@@ -940,6 +940,16 @@ int gk20a_init_mm_setup_sw(struct gk20a *g)
if (err)
return err;
/*
* this requires fixed allocations in vidmem which must be
* allocated before all other buffers
*/
if (g->ops.pmu.alloc_blob_space && g->mm.vidmem_is_vidmem) {
err = g->ops.pmu.alloc_blob_space(g, 0, &g->acr.ucode_blob);
if (err)
return err;
}
err = gk20a_alloc_sysmem_flush(g);
if (err)
return err;

View File

@@ -58,6 +58,9 @@ int gm206_alloc_blob_space(struct gk20a *g,
{
struct wpr_carveout_info wpr_inf;
if (mem->size)
return 0;
g->ops.pmu.get_wpr(g, &wpr_inf);
return gk20a_gmmu_alloc_attr_vid_at(g, 0, wpr_inf.size, mem,