From 93a436f581ced27efe2e600bb16b2e50b5696c12 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 23 Aug 2016 14:17:05 +0530 Subject: 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 Reviewed-on: http://git-master/r/1206402 (cherry picked from commit fad4309ce345ed3879f497bda27f2eceb1084dbb) Reviewed-on: http://git-master/r/1210956 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 4872bb95..bcde1746 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -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; -- cgit v1.2.2