summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_sync_file.c
diff options
context:
space:
mode:
authorSidath Senanayake <sidaths@google.com>2018-07-31 15:28:14 +0200
committerSidath Senanayake <sidaths@google.com>2018-07-31 15:28:14 +0200
commitf32af5a9ba3c2b556d92827a96dbeec3df200968 (patch)
treef408feaf7cd8b87a980575c132f11d3ba45a3f8d /mali_kbase/mali_kbase_sync_file.c
parent5574d60cda52fa08ca2cc714ae051ee2b6f850d7 (diff)
downloadgpu-f32af5a9ba3c2b556d92827a96dbeec3df200968.tar.gz
Mali Bifrost DDK r14p0 KMD
Provenance: 37fe8262c (collaborate/EAC/b_r14p0) BX304L01B-BU-00000-r14p0-01rel0 BX304L06A-BU-00000-r14p0-01rel0 BX304X07X-BU-00000-r14p0-01rel0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I0eb3b666045d72d33e2953954de5b416f909da0f
Diffstat (limited to 'mali_kbase/mali_kbase_sync_file.c')
-rw-r--r--mali_kbase/mali_kbase_sync_file.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mali_kbase/mali_kbase_sync_file.c b/mali_kbase/mali_kbase_sync_file.c
index 64ca6d7..bb94aee 100644
--- a/mali_kbase/mali_kbase_sync_file.c
+++ b/mali_kbase/mali_kbase_sync_file.c
@@ -73,10 +73,14 @@ int kbase_sync_fence_out_create(struct kbase_jd_atom *katom, int stream_fd)
if (!fence)
return -ENOMEM;
- /* Take an extra reference to the fence on behalf of the katom.
- * This is needed because sync_file_create() will take ownership of
- * one of these refs */
+#if (KERNEL_VERSION(4, 9, 67) >= LINUX_VERSION_CODE)
+ /* Take an extra reference to the fence on behalf of the sync_file.
+ * This is only needed on older kernels where sync_file_create()
+ * does not take its own reference. This was changed in v4.9.68,
+ * where sync_file_create() now takes its own reference.
+ */
dma_fence_get(fence);
+#endif
/* create a sync_file fd representing the fence */
sync_file = sync_file_create(fence);