summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_sync_file.c
diff options
context:
space:
mode:
authorSidath Senanayake <sidaths@google.com>2021-02-05 01:51:51 +0000
committerSidath Senanayake <sidaths@google.com>2021-02-10 12:02:48 +0000
commite6fbaabd258bfe4cc3d75fa0bbeef0c6c5138740 (patch)
tree4531266fcab676cde143e57a056f24b94e218466 /mali_kbase/mali_kbase_sync_file.c
parent56b86e48fffad349cccb1c3831a9cd58562abed6 (diff)
parent9748305a584b9f1f7705303ce6e33a5e8b923e60 (diff)
downloadgpu-e6fbaabd258bfe4cc3d75fa0bbeef0c6c5138740.tar.gz
Merge r29p0 from upstream into android-gs-pixel-mainline
This commit updates the Mali KMD to version r29p0 from commit 9748305a584b9f1f7705303ce6e33a5e8b923e60 Bug: 178778804 Change-Id: Ie20425d4ea5c1529e299ca9a0454a56afb0fba95
Diffstat (limited to 'mali_kbase/mali_kbase_sync_file.c')
-rw-r--r--mali_kbase/mali_kbase_sync_file.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/mali_kbase/mali_kbase_sync_file.c b/mali_kbase/mali_kbase_sync_file.c
index c3f84ae..f52ad43 100644
--- a/mali_kbase/mali_kbase_sync_file.c
+++ b/mali_kbase/mali_kbase_sync_file.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
*
* (C) COPYRIGHT 2012-2020 ARM Limited. All rights reserved.
@@ -62,7 +63,7 @@ int kbase_sync_fence_stream_create(const char *name, int *const out_fd)
#if !MALI_USE_CSF
int kbase_sync_fence_out_create(struct kbase_jd_atom *katom, int stream_fd)
{
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
+#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
struct fence *fence;
#else
struct dma_fence *fence;
@@ -107,7 +108,7 @@ int kbase_sync_fence_out_create(struct kbase_jd_atom *katom, int stream_fd)
int kbase_sync_fence_in_from_fd(struct kbase_jd_atom *katom, int fd)
{
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
+#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
struct fence *fence = sync_file_get_fence(fd);
#else
struct dma_fence *fence = sync_file_get_fence(fd);
@@ -124,7 +125,7 @@ int kbase_sync_fence_in_from_fd(struct kbase_jd_atom *katom, int fd)
int kbase_sync_fence_validate(int fd)
{
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
+#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
struct fence *fence = sync_file_get_fence(fd);
#else
struct dma_fence *fence = sync_file_get_fence(fd);
@@ -160,7 +161,7 @@ kbase_sync_fence_out_trigger(struct kbase_jd_atom *katom, int result)
return (result != 0) ? BASE_JD_EVENT_JOB_CANCELLED : BASE_JD_EVENT_DONE;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
+#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
static void kbase_fence_wait_callback(struct fence *fence,
struct fence_cb *cb)
#else
@@ -203,7 +204,7 @@ static void kbase_fence_wait_callback(struct dma_fence *fence,
int kbase_sync_fence_in_wait(struct kbase_jd_atom *katom)
{
int err;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
+#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
struct fence *fence;
#else
struct dma_fence *fence;
@@ -236,8 +237,8 @@ int kbase_sync_fence_in_wait(struct kbase_jd_atom *katom)
katom->event_code = BASE_JD_EVENT_JOB_CANCELLED;
/* We should cause the dependent jobs in the bag to be failed,
- * to do this we schedule the work queue to complete this job */
-
+ * to do this we schedule the work queue to complete this job
+ */
kthread_init_work(&katom->work, kbase_sync_fence_wait_worker);
kthread_queue_work(&katom->kctx->kbdev->job_done_worker, &katom->work);
}
@@ -249,7 +250,8 @@ void kbase_sync_fence_in_cancel_wait(struct kbase_jd_atom *katom)
{
if (!kbase_fence_free_callbacks(katom)) {
/* The wait wasn't cancelled -
- * leave the cleanup for kbase_fence_wait_callback */
+ * leave the cleanup for kbase_fence_wait_callback
+ */
return;
}
@@ -325,7 +327,7 @@ void kbase_sync_fence_info_get(struct dma_fence *fence,
int kbase_sync_fence_in_info_get(struct kbase_jd_atom *katom,
struct kbase_sync_fence_info *info)
{
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
+#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
struct fence *fence;
#else
struct dma_fence *fence;
@@ -345,7 +347,7 @@ int kbase_sync_fence_in_info_get(struct kbase_jd_atom *katom,
int kbase_sync_fence_out_info_get(struct kbase_jd_atom *katom,
struct kbase_sync_fence_info *info)
{
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
+#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
struct fence *fence;
#else
struct dma_fence *fence;