summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2015-06-02 06:43:01 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:52:06 -0500
commit021748b782b054ed11d02341ee373f60b1ae0cb3 (patch)
tree87bc67bdeda08acc3f7a46d2c662e73a5948538a /drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
parent65ef5bc238a782e76c5d104ef90562b1fe6dd038 (diff)
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 <dnibade@nvidia.com> Reviewed-on: http://git-master/r/751353 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/ltc_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/ltc_gp10b.c7
1 files changed, 7 insertions, 0 deletions
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 @@
15 15
16#include <linux/types.h> 16#include <linux/types.h>
17 17
18#include "gp10b/mm_gp10b.h"
18#include "gk20a/gk20a.h" 19#include "gk20a/gk20a.h"
19#include "gk20a/gk20a_allocator.h" 20#include "gk20a/gk20a_allocator.h"
20#include "gm20b/ltc_gm20b.h" 21#include "gm20b/ltc_gm20b.h"
@@ -112,8 +113,14 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
112 if (err) 113 if (err)
113 return err; 114 return err;
114 115
116#if NVGPU_USE_NEW_ALLOCATOR
115 __gk20a_allocator_init(&gr->comp_tags, NULL, "comptag", 117 __gk20a_allocator_init(&gr->comp_tags, NULL, "comptag",
116 1, max_comptag_lines - 1, 1, 10, 0); 118 1, max_comptag_lines - 1, 1, 10, 0);
119#else
120 gk20a_allocator_init(&gr->comp_tags, "comptag",
121 1, /* start */
122 max_comptag_lines - 1); /* length*/
123#endif
117 124
118 gr->comptags_per_cacheline = comptags_per_cacheline; 125 gr->comptags_per_cacheline = comptags_per_cacheline;
119 gr->slices_per_ltc = slices_per_ltc; 126 gr->slices_per_ltc = slices_per_ltc;