summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_sync_file.c
diff options
context:
space:
mode:
authorSidath Senanayake <sidaths@google.com>2019-06-27 14:37:54 +0200
committerSidath Senanayake <sidaths@google.com>2019-06-27 14:37:54 +0200
commit228451ed83f4840e863beff27b33ca9a460f820b (patch)
treedd7cbcae7ac302e9d381d95251ad5a0298bec5ae /mali_kbase/mali_kbase_sync_file.c
parentac90f0dd5fbae0b94e9720203a8bb2e81fd4b679 (diff)
downloadgpu-228451ed83f4840e863beff27b33ca9a460f820b.tar.gz
Mali Valhall DDK r19p0 KMD
Provenance: 95928c7e8 (collaborate/EAC/v_r19p0) VX504X08X-BU-00000-r19p0-01rel0 - Android DDK NOTE: This is identical to the Bifrost r19p0 KMD as the only differences between b_r19p0 and v_r19p0 are outside of the KMD. So as far as the KMD goes, 95928c7e8 and d441d721a in Collaborate are identical. Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I261cba9d04daaf8c5ca55e4cb319cf47402dc5f4
Diffstat (limited to 'mali_kbase/mali_kbase_sync_file.c')
-rw-r--r--mali_kbase/mali_kbase_sync_file.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/mali_kbase/mali_kbase_sync_file.c b/mali_kbase/mali_kbase_sync_file.c
index bb94aee..0679c48 100644
--- a/mali_kbase/mali_kbase_sync_file.c
+++ b/mali_kbase/mali_kbase_sync_file.c
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2012-2018 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2012-2019 ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -85,7 +85,9 @@ int kbase_sync_fence_out_create(struct kbase_jd_atom *katom, int stream_fd)
/* create a sync_file fd representing the fence */
sync_file = sync_file_create(fence);
if (!sync_file) {
+#if (KERNEL_VERSION(4, 9, 67) >= LINUX_VERSION_CODE)
dma_fence_put(fence);
+#endif
kbase_fence_out_remove(katom);
return -ENOMEM;
}
@@ -272,12 +274,12 @@ void kbase_sync_fence_in_remove(struct kbase_jd_atom *katom)
kbase_fence_in_remove(katom);
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
-static void kbase_sync_fence_info_get(struct fence *fence,
- struct kbase_sync_fence_info *info)
+#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
+void kbase_sync_fence_info_get(struct fence *fence,
+ struct kbase_sync_fence_info *info)
#else
-static void kbase_sync_fence_info_get(struct dma_fence *fence,
- struct kbase_sync_fence_info *info)
+void kbase_sync_fence_info_get(struct dma_fence *fence,
+ struct kbase_sync_fence_info *info)
#endif
{
info->fence = fence;
@@ -303,12 +305,15 @@ static void kbase_sync_fence_info_get(struct dma_fence *fence,
info->status = 0; /* still active (unsignaled) */
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0))
+#if (KERNEL_VERSION(4, 8, 0) > LINUX_VERSION_CODE)
scnprintf(info->name, sizeof(info->name), "%u#%u",
fence->context, fence->seqno);
-#else
+#elif (KERNEL_VERSION(5, 1, 0) > LINUX_VERSION_CODE)
scnprintf(info->name, sizeof(info->name), "%llu#%u",
fence->context, fence->seqno);
+#else
+ scnprintf(info->name, sizeof(info->name), "%llu#%llu",
+ fence->context, fence->seqno);
#endif
}