From 9748305a584b9f1f7705303ce6e33a5e8b923e60 Mon Sep 17 00:00:00 2001 From: Sidath Senanayake Date: Fri, 29 Jan 2021 15:03:53 +0000 Subject: Mali Valhall DDK r29p0 KMD Provenance: afaca8da1 (collaborate/EAC/v_r29p0) VX504X08X-BU-00000-r29p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r29p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r29p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r29p0-01eac0 - Valhall Android Renderscript AOSP parts Signed-off-by: Sidath Senanayake Change-Id: Ie0904c9223b7ec9311b848a52d3159ac2b07530e --- mali_kbase/mali_kbase_sync_file.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'mali_kbase/mali_kbase_sync_file.c') diff --git a/mali_kbase/mali_kbase_sync_file.c b/mali_kbase/mali_kbase_sync_file.c index 5020692..2be6699 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 + */ INIT_WORK(&katom->work, kbase_sync_fence_wait_worker); queue_work(katom->kctx->jctx.job_done_wq, &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; -- cgit v1.2.3