From 021748b782b054ed11d02341ee373f60b1ae0cb3 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 2 Jun 2015 16:13:01 +0530 Subject: gpu: nvgpu: fix allocator_init() calls Change for new VA space allocator is being reverted with http://git-master/r/#/c/749291/ but only for Kernel3.18 In Kernel3.10, we support the new VA allocator Since we support both the kernel versions as of now, use a KERNEL_VERSION based mechanism to select appropriate call Define new macro NVGPU_USE_NEW_ALLOCATOR for Kernel3.10 where we want to use new allocator Bug 200106514 Change-Id: I9af26d555278c40e03fe82b0912961a862c8bf55 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/751353 Reviewed-by: Terje Bergstrom Reviewed-by: Bharat Nihalani --- drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/gpu/nvgpu/gp10b/ltc_gp10b.c') diff --git a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c index 68f4eafa..9db18aa6 100644 --- a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c @@ -15,6 +15,7 @@ #include +#include "gp10b/mm_gp10b.h" #include "gk20a/gk20a.h" #include "gk20a/gk20a_allocator.h" #include "gm20b/ltc_gm20b.h" @@ -112,8 +113,14 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) if (err) return err; +#if NVGPU_USE_NEW_ALLOCATOR __gk20a_allocator_init(&gr->comp_tags, NULL, "comptag", 1, max_comptag_lines - 1, 1, 10, 0); +#else + gk20a_allocator_init(&gr->comp_tags, "comptag", + 1, /* start */ + max_comptag_lines - 1); /* length*/ +#endif gr->comptags_per_cacheline = comptags_per_cacheline; gr->slices_per_ltc = slices_per_ltc; -- cgit v1.2.2