summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/sync_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-08-22 11:31:32 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-22 15:44:41 -0400
commitbc87e8989ddf2f74ff2c988a25e4a81e559a5c30 (patch)
treeb8c45cecf50e3e3bb8967952de9f5047de60683f /drivers/gpu/nvgpu/gk20a/sync_gk20a.c
parent587666bd6cbb60e52698052c2b5c4a74f2165ecd (diff)
gpu: nvgpu: Remove support for old kernel version
Remove support for pre-4.4 kernels. This allows deleting the checks for kernel version, and usage of linux/version.h. Change-Id: I4d6cb30512ea164d27549f4f4d096e5931bb1379 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1543499 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/sync_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/sync_gk20a.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c
index 247f3d63..deaf19a1 100644
--- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c
@@ -13,7 +13,6 @@
13 * more details. 13 * more details.
14 */ 14 */
15 15
16#include <linux/version.h>
17#include <linux/file.h> 16#include <linux/file.h>
18#include <linux/fs.h> 17#include <linux/fs.h>
19#include <linux/hrtimer.h> 18#include <linux/hrtimer.h>
@@ -75,23 +74,6 @@ int gk20a_is_sema_backed_sync_fence(struct sync_fence *fence)
75{ 74{
76 struct sync_timeline *t; 75 struct sync_timeline *t;
77 76
78#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
79 struct sync_pt *spt;
80 int i = 0;
81
82 if (list_empty(&fence->pt_list_head))
83 return 0;
84
85 list_for_each_entry(spt, &fence->pt_list_head, pt_list) {
86 i++;
87
88 if (i >= 2)
89 return 0;
90 }
91
92 spt = list_first_entry(&fence->pt_list_head, struct sync_pt, pt_list);
93 t = spt->parent;
94#else
95 struct fence *pt = fence->cbs[0].sync_pt; 77 struct fence *pt = fence->cbs[0].sync_pt;
96 struct sync_pt *spt = sync_pt_from_fence(pt); 78 struct sync_pt *spt = sync_pt_from_fence(pt);
97 79
@@ -102,7 +84,6 @@ int gk20a_is_sema_backed_sync_fence(struct sync_fence *fence)
102 return 0; 84 return 0;
103 85
104 t = sync_pt_parent(spt); 86 t = sync_pt_parent(spt);
105#endif
106 87
107 if (t->ops == &gk20a_sync_timeline_ops) 88 if (t->ops == &gk20a_sync_timeline_ops)
108 return 1; 89 return 1;
@@ -114,15 +95,6 @@ struct nvgpu_semaphore *gk20a_sync_fence_get_sema(struct sync_fence *f)
114 struct sync_pt *spt; 95 struct sync_pt *spt;
115 struct gk20a_sync_pt_inst *pti; 96 struct gk20a_sync_pt_inst *pti;
116 97
117#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
118 if (!f)
119 return NULL;
120
121 if (!gk20a_is_sema_backed_sync_fence(f))
122 return NULL;
123
124 spt = list_first_entry(&f->pt_list_head, struct sync_pt, pt_list);
125#else
126 struct fence *pt; 98 struct fence *pt;
127 99
128 if (!f) 100 if (!f)
@@ -133,7 +105,6 @@ struct nvgpu_semaphore *gk20a_sync_fence_get_sema(struct sync_fence *f)
133 105
134 pt = f->cbs[0].sync_pt; 106 pt = f->cbs[0].sync_pt;
135 spt = sync_pt_from_fence(pt); 107 spt = sync_pt_from_fence(pt);
136#endif
137 pti = container_of(spt, struct gk20a_sync_pt_inst, pt); 108 pti = container_of(spt, struct gk20a_sync_pt_inst, pt);
138 109
139 return pti->shared->sema; 110 return pti->shared->sema;