From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/gpu/arm/bifrost/mali_kbase_sync.h | 49 +++++++++++++++++--------------------------------
1 files changed, 17 insertions(+), 32 deletions(-)
diff --git a/kernel/drivers/gpu/arm/bifrost/mali_kbase_sync.h b/kernel/drivers/gpu/arm/bifrost/mali_kbase_sync.h
index e20edec..3d2053b 100644
--- a/kernel/drivers/gpu/arm/bifrost/mali_kbase_sync.h
+++ b/kernel/drivers/gpu/arm/bifrost/mali_kbase_sync.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
*
- * (C) COPYRIGHT 2012-2016, 2018-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2012-2016, 2018-2022 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
@@ -30,9 +30,6 @@
#include <linux/fdtable.h>
#include <linux/syscalls.h>
-#if IS_ENABLED(CONFIG_SYNC)
-#include <sync.h>
-#endif
#if IS_ENABLED(CONFIG_SYNC_FILE)
#include "mali_kbase_fence_defs.h"
#include <linux/sync_file.h>
@@ -66,41 +63,43 @@
* - dup to add a ref
* - close to remove a ref
*
- * return: 0 on success, < 0 on error
+ * Return: 0 on success, < 0 on error
*/
int kbase_sync_fence_stream_create(const char *name, int *const out_fd);
#if !MALI_USE_CSF
/**
- * kbase_sync_fence_out_create Create an explicit output fence to specified atom
+ * kbase_sync_fence_out_create - Create an explicit output fence to specified atom
+ *
* @katom: Atom to assign the new explicit fence to
* @stream_fd: File descriptor for stream object to create fence on
*
- * return: Valid file descriptor to fence or < 0 on error
+ * Return: Valid file descriptor to fence or < 0 on error
*/
int kbase_sync_fence_out_create(struct kbase_jd_atom *katom, int stream_fd);
/**
- * kbase_sync_fence_in_from_fd() Assigns an existing fence to specified atom
+ * kbase_sync_fence_in_from_fd() - Assigns an existing fence to specified atom
* @katom: Atom to assign the existing explicit fence to
* @fd: File descriptor to an existing fence
*
* Assigns an explicit input fence to atom.
* This can later be waited for by calling @kbase_sync_fence_in_wait
*
- * return: 0 on success, < 0 on error
+ * Return: 0 on success, < 0 on error
*/
int kbase_sync_fence_in_from_fd(struct kbase_jd_atom *katom, int fd);
#endif /* !MALI_USE_CSF */
/**
* kbase_sync_fence_validate() - Validate a fd to be a valid fence
+ *
* @fd: File descriptor to check
*
* This function is only usable to catch unintentional user errors early,
* it does not stop malicious code changing the fd after this function returns.
*
- * return 0: if fd is for a valid fence, < 0 if invalid
+ * Return: 0 if fd is for a valid fence, < 0 if invalid
*/
int kbase_sync_fence_validate(int fd);
@@ -112,7 +111,7 @@
*
* Signal output fence attached on katom and remove the fence from the atom.
*
- * return: The "next" event code for atom, typically JOB_CANCELLED or EVENT_DONE
+ * Return: The "next" event code for atom, typically JOB_CANCELLED or EVENT_DONE
*/
enum base_jd_event_code
kbase_sync_fence_out_trigger(struct kbase_jd_atom *katom, int result);
@@ -127,7 +126,7 @@
* If the fence isn't already signaled, then this kbase_sync framework will
* take responsibility to continue the processing once the fence is signaled.
*
- * return: 0 if already signaled, otherwise 1
+ * Return: 0 if already signaled, otherwise 1
*/
int kbase_sync_fence_in_wait(struct kbase_jd_atom *katom);
@@ -157,28 +156,13 @@
void kbase_sync_fence_out_remove(struct kbase_jd_atom *katom);
#endif /* !MALI_USE_CSF */
-/**
- * kbase_sync_fence_close_fd() - Close a file descriptor representing a fence
- * @fd: File descriptor to close
- */
-static inline void kbase_sync_fence_close_fd(int fd)
-{
-#if KERNEL_VERSION(5, 11, 0) <= LINUX_VERSION_CODE
- close_fd(fd);
-#elif KERNEL_VERSION(4, 17, 0) <= LINUX_VERSION_CODE
- ksys_close(fd);
-#else
- sys_close(fd);
-#endif
-}
-
#if !MALI_USE_CSF
/**
* kbase_sync_fence_in_info_get() - Retrieves information about input fence
* @katom: Atom to get fence information from
* @info: Struct to be filled with fence information
*
- * return: 0 on success, < 0 on error
+ * Return: 0 on success, < 0 on error
*/
int kbase_sync_fence_in_info_get(struct kbase_jd_atom *katom,
struct kbase_sync_fence_info *info);
@@ -188,13 +172,13 @@
* @katom: Atom to get fence information from
* @info: Struct to be filled with fence information
*
- * return: 0 on success, < 0 on error
+ * Return: 0 on success, < 0 on error
*/
int kbase_sync_fence_out_info_get(struct kbase_jd_atom *katom,
struct kbase_sync_fence_info *info);
#endif /* !MALI_USE_CSF */
-#if defined(CONFIG_SYNC_FILE)
+#if IS_ENABLED(CONFIG_SYNC_FILE)
#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
void kbase_sync_fence_info_get(struct fence *fence,
struct kbase_sync_fence_info *info);
@@ -208,7 +192,7 @@
* kbase_sync_status_string() - Get string matching @status
* @status: Value of fence status.
*
- * return: Pointer to string describing @status.
+ * Return: Pointer to string describing @status.
*/
const char *kbase_sync_status_string(int status);
@@ -221,7 +205,8 @@
#ifdef CONFIG_MALI_BIFROST_FENCE_DEBUG
/**
- * kbase_sync_fence_in_dump() Trigger a debug dump of atoms input fence state
+ * kbase_sync_fence_in_dump() - Trigger a debug dump of atoms input fence state
+ *
* @katom: Atom to trigger fence debug dump for
*/
void kbase_sync_fence_in_dump(struct kbase_jd_atom *katom);
--
Gitblit v1.6.2