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/csf/mali_kbase_csf_trace_buffer.h |   81 +++++++++++++++++++++-------------------
 1 files changed, 43 insertions(+), 38 deletions(-)

diff --git a/kernel/drivers/gpu/arm/bifrost/csf/mali_kbase_csf_trace_buffer.h b/kernel/drivers/gpu/arm/bifrost/csf/mali_kbase_csf_trace_buffer.h
index b9f481d..0389d09 100644
--- a/kernel/drivers/gpu/arm/bifrost/csf/mali_kbase_csf_trace_buffer.h
+++ b/kernel/drivers/gpu/arm/bifrost/csf/mali_kbase_csf_trace_buffer.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *
- * (C) COPYRIGHT 2018-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 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
@@ -25,7 +25,7 @@
 #include <linux/types.h>
 
 #define CSF_FIRMWARE_TRACE_ENABLE_INIT_MASK_MAX (4)
-#define FW_TRACE_BUF_NAME "fwlog"
+#define FIRMWARE_LOG_BUF_NAME "fwlog"
 
 /* Forward declarations */
 struct firmware_trace_buffer;
@@ -33,6 +33,8 @@
 
 /**
  * kbase_csf_firmware_trace_buffers_init - Initialize trace buffers
+ *
+ * @kbdev: Device pointer
  *
  * Allocate resources for trace buffers. In particular:
  * - One memory page of GPU-readable, CPU-writable memory is used for
@@ -52,13 +54,11 @@
  * populated with data from the firmware image parsing.
  *
  * Return: 0 if success, or an error code on failure.
- *
- * @kbdev: Device pointer
  */
 int kbase_csf_firmware_trace_buffers_init(struct kbase_device *kbdev);
 
 /**
- * kbase_csf_firmware_trace_buffer_term - Terminate trace buffers
+ * kbase_csf_firmware_trace_buffers_term - Terminate trace buffers
  *
  * @kbdev: Device pointer
  */
@@ -67,6 +67,11 @@
 /**
  * kbase_csf_firmware_parse_trace_buffer_entry - Process a "trace buffer" section
  *
+ * @kbdev:     Kbase device structure
+ * @entry:     Pointer to the section
+ * @size:      Size (in bytes) of the section
+ * @updatable: Indicates whether config items can be updated with FIRMWARE_CONFIG_UPDATE
+ *
  * Read a "trace buffer" section adding metadata for the related trace buffer
  * to the kbase_device:csf.firmware_trace_buffers list.
  *
@@ -74,11 +79,6 @@
  * will not be initialized.
  *
  * Return: 0 if successful, negative error code on failure.
- *
- * @kbdev:     Kbase device structure
- * @entry:     Pointer to the section
- * @size:      Size (in bytes) of the section
- * @updatable: Indicates whether config items can be updated with FIRMWARE_CONFIG_UPDATE
  */
 int kbase_csf_firmware_parse_trace_buffer_entry(struct kbase_device *kbdev,
 						const u32 *entry,
@@ -86,8 +86,9 @@
 						bool updatable);
 
 /**
- * kbase_csf_firmware_reload_trace_buffers_data -
- * Reload trace buffers data for firmware reboot
+ * kbase_csf_firmware_reload_trace_buffers_data - Reload trace buffers data for firmware reboot
+ *
+ * @kbdev: Device pointer
  *
  * Helper function used when rebooting the firmware to reload the initial setup
  * for all the trace buffers which have been previously parsed and initialized.
@@ -99,43 +100,39 @@
  *
  * In other words, the re-initialization done by this function will be
  * equivalent but not necessarily identical to the original initialization.
- *
- * @kbdev: Device pointer
  */
 void kbase_csf_firmware_reload_trace_buffers_data(struct kbase_device *kbdev);
 
 /**
  * kbase_csf_firmware_get_trace_buffer - Get a trace buffer
  *
- * Return: handle to a trace buffer, given the name, or NULL if a trace buffer
- *         with that name couldn't be found.
- *
  * @kbdev: Device pointer
  * @name:  Name of the trace buffer to find
+ *
+ * Return: handle to a trace buffer, given the name, or NULL if a trace buffer
+ *         with that name couldn't be found.
  */
 struct firmware_trace_buffer *kbase_csf_firmware_get_trace_buffer(
 	struct kbase_device *kbdev, const char *name);
 
 /**
- * kbase_csf_firmware_trace_buffer_get_trace_enable_bits_count -
- * Get number of trace enable bits for a trace buffer
- *
- * Return: Number of trace enable bits in a trace buffer.
+ * kbase_csf_firmware_trace_buffer_get_trace_enable_bits_count - Get number of trace enable bits for a trace buffer
  *
  * @trace_buffer: Trace buffer handle
+ *
+ * Return: Number of trace enable bits in a trace buffer.
  */
 unsigned int kbase_csf_firmware_trace_buffer_get_trace_enable_bits_count(
 	const struct firmware_trace_buffer *trace_buffer);
 
 /**
- * kbase_csf_firmware_trace_buffer_update_trace_enable_bit -
- * Update a trace enable bit
- *
- * Update the value of a given trace enable bit.
+ * kbase_csf_firmware_trace_buffer_update_trace_enable_bit - Update a trace enable bit
  *
  * @trace_buffer: Trace buffer handle
  * @bit:          Bit to update
  * @value:        New value for the given bit
+ *
+ * Update the value of a given trace enable bit.
  *
  * Return: 0 if successful, negative error code on failure.
  */
@@ -146,9 +143,9 @@
 /**
  * kbase_csf_firmware_trace_buffer_is_empty - Empty trace buffer predicate
  *
- * Return: True if the trace buffer is empty, or false otherwise.
- *
  * @trace_buffer: Trace buffer handle
+ *
+ * Return: True if the trace buffer is empty, or false otherwise.
  */
 bool kbase_csf_firmware_trace_buffer_is_empty(
 	const struct firmware_trace_buffer *trace_buffer);
@@ -156,27 +153,35 @@
 /**
  * kbase_csf_firmware_trace_buffer_read_data - Read data from a trace buffer
  *
+ * @trace_buffer: Trace buffer handle
+ * @data:         Pointer to a client-allocated where data shall be written.
+ * @num_bytes:    Maximum number of bytes to read from the trace buffer.
+ *
  * Read available data from a trace buffer. The client provides a data buffer
  * of a given size and the maximum number of bytes to read.
  *
  * Return: Number of bytes read from the trace buffer.
- *
- * @trace_buffer: Trace buffer handle
- * @data:         Pointer to a client-allocated where data shall be written.
- * @num_bytes:    Maximum number of bytes to read from the trace buffer.
  */
 unsigned int kbase_csf_firmware_trace_buffer_read_data(
 	struct firmware_trace_buffer *trace_buffer, u8 *data, unsigned int num_bytes);
 
-#if IS_ENABLED(CONFIG_DEBUG_FS)
 /**
- * kbase_csf_fw_trace_buffer_debugfs_init() - Add debugfs entries for setting
- *                                         enable mask and dumping the binary
- *                                         firmware trace buffer
+ * kbase_csf_firmware_trace_buffer_get_active_mask64 - Get trace buffer active mask
  *
- * @kbdev: Pointer to the device
+ * @tb: Trace buffer handle
+ *
+ * Return: Trace buffer active mask.
  */
-void kbase_csf_firmware_trace_buffer_debugfs_init(struct kbase_device *kbdev);
-#endif /* CONFIG_DEBUG_FS */
+u64 kbase_csf_firmware_trace_buffer_get_active_mask64(struct firmware_trace_buffer *tb);
+
+/**
+ * kbase_csf_firmware_trace_buffer_set_active_mask64 - Set trace buffer active mask
+ *
+ * @tb: Trace buffer handle
+ * @mask: New active mask
+ *
+ * Return: 0 if successful, negative error code on failure.
+ */
+int kbase_csf_firmware_trace_buffer_set_active_mask64(struct firmware_trace_buffer *tb, u64 mask);
 
 #endif /* _KBASE_CSF_TRACE_BUFFER_H_ */

--
Gitblit v1.6.2