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/mm_gp10b.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/gpu/nvgpu/gp10b/mm_gp10b.h') diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.h b/drivers/gpu/nvgpu/gp10b/mm_gp10b.h index 034944e0..f34200a0 100644 --- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.h @@ -14,8 +14,16 @@ #ifndef MM_GP10B_H #define MM_GP10B_H +#include + #define NVGPU_MM_GET_IO_COHERENCE_BIT 35 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) +#define NVGPU_USE_NEW_ALLOCATOR 1 +#else +#define NVGPU_USE_NEW_ALLOCATOR 0 +#endif + struct gpu_ops; void gp10b_init_mm(struct gpu_ops *gops); -- cgit v1.2.2