From fda4ddfa79f3a78becfe44fd558974bd274c03a9 Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Wed, 27 Jul 2016 17:06:36 -0700 Subject: gpu: nvgpu: userd allocation from sysmem When bar1 memory is not supported then userd will be allocated from sysmem. Functions gp_get and gp_put are updated accordingly. JIRA GV11B-1 Change-Id: Ia895712a110f6cca26474228141488f5f8ace756 Signed-off-by: seshendra Gadagottu Reviewed-on: http://git-master/r/1225384 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gm20b/mm_gm20b.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/gpu/nvgpu/gm20b/mm_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c index 8aa14662..36d1192a 100644 --- a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c @@ -163,6 +163,11 @@ static int gm20b_mm_bar1_bind(struct gk20a *g, struct mem_desc *bar1_inst) return retry ? -EINVAL : 0; } +static bool gm20b_mm_is_bar1_supported(struct gk20a *g) +{ + return true; +} + void gm20b_init_mm(struct gpu_ops *gops) { gops->mm.support_sparse = gm20b_mm_support_sparse; @@ -186,4 +191,5 @@ void gm20b_init_mm(struct gpu_ops *gops) gops->mm.init_pdb = gk20a_mm_init_pdb; gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw; gops->mm.bar1_bind = gm20b_mm_bar1_bind; + gops->mm.is_bar1_supported = gm20b_mm_is_bar1_supported; } -- cgit v1.2.2