From b8915ab5aabb02866019221c51d96f304658207f Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Fri, 17 Jun 2016 15:56:07 +0300 Subject: gpu: nvgpu: support in-kernel vidmem mappings Propagate the buffer aperture flag in gk20a_locked_gmmu_map up so that buffers represented as a mem_desc and present in vidmem can be mapped to gpu. JIRA DNVGPU-18 JIRA DNVGPU-76 Change-Id: I46cf87e27229123016727339b9349d5e2c835b3e Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/1169308 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gm20b/acr_gm20b.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b/acr_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c index eb9ae08c..c503bc48 100644 --- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c @@ -412,7 +412,8 @@ int prepare_ucode_blob(struct gk20a *g) sg_dma_address(sgt->sgl) = 0; g->pmu.wpr_buf.gpu_va = gk20a_gmmu_map(vm, &sgt, wprsize, - 0, gk20a_mem_flag_none, false); + 0, gk20a_mem_flag_none, false, + APERTURE_SYSMEM); gm20b_dbg_pmu("wpr mapped gpu va :%llx\n", g->pmu.wpr_buf.gpu_va); /* Discover all managed falcons*/ @@ -1412,7 +1413,8 @@ int pmu_exec_gen_bl(struct gk20a *g, void *desc, u8 b_wait_for_halt) acr->hsbl_ucode.gpu_va = gk20a_gmmu_map(vm, &acr->hsbl_ucode.sgt, bl_sz, 0, /* flags */ - gk20a_mem_flag_read_only, false); + gk20a_mem_flag_read_only, false, + acr->hsbl_ucode.aperture); if (!acr->hsbl_ucode.gpu_va) { gk20a_err(d, "failed to map pmu ucode memory!!"); goto err_free_ucode; -- cgit v1.2.2