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_jd_debugfs.c | 67 ++++-----------------------------
1 files changed, 9 insertions(+), 58 deletions(-)
diff --git a/kernel/drivers/gpu/arm/bifrost/mali_kbase_jd_debugfs.c b/kernel/drivers/gpu/arm/bifrost/mali_kbase_jd_debugfs.c
index 7cf038a..6196c09 100644
--- a/kernel/drivers/gpu/arm/bifrost/mali_kbase_jd_debugfs.c
+++ b/kernel/drivers/gpu/arm/bifrost/mali_kbase_jd_debugfs.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
/*
*
- * (C) COPYRIGHT 2014-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2014-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
@@ -24,8 +24,7 @@
#include <linux/seq_file.h>
#include <mali_kbase.h>
#include <mali_kbase_jd_debugfs.h>
-#include <mali_kbase_dma_fence.h>
-#if defined(CONFIG_SYNC) || defined(CONFIG_SYNC_FILE)
+#if IS_ENABLED(CONFIG_SYNC_FILE)
#include <mali_kbase_sync.h>
#endif
#include <uapi/gpu/arm/bifrost/mali_kbase_ioctl.h>
@@ -38,7 +37,7 @@
static void kbase_jd_debugfs_fence_info(struct kbase_jd_atom *atom,
struct seq_file *sfile)
{
-#if defined(CONFIG_SYNC) || defined(CONFIG_SYNC_FILE)
+#if IS_ENABLED(CONFIG_SYNC_FILE)
struct kbase_sync_fence_info info;
int res;
@@ -58,51 +57,7 @@
default:
break;
}
-#endif /* CONFIG_SYNC || CONFIG_SYNC_FILE */
-
-#ifdef CONFIG_MALI_BIFROST_DMA_FENCE
- if (atom->core_req & BASE_JD_REQ_EXTERNAL_RESOURCES) {
- struct kbase_fence_cb *cb;
-
- if (atom->dma_fence.fence) {
-#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
- struct fence *fence = atom->dma_fence.fence;
-#else
- struct dma_fence *fence = atom->dma_fence.fence;
-#endif
-
- seq_printf(sfile,
-#if (KERNEL_VERSION(4, 8, 0) > LINUX_VERSION_CODE)
- "Sd(%u#%u: %s) ",
-#else
- "Sd(%llu#%u: %s) ",
-#endif
- fence->context, fence->seqno,
- dma_fence_is_signaled(fence) ? "signaled" :
- "active");
- }
-
- list_for_each_entry(cb, &atom->dma_fence.callbacks,
- node) {
-#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE)
- struct fence *fence = cb->fence;
-#else
- struct dma_fence *fence = cb->fence;
-#endif
-
- seq_printf(sfile,
-#if (KERNEL_VERSION(4, 8, 0) > LINUX_VERSION_CODE)
- "Wd(%u#%u: %s) ",
-#else
- "Wd(%llu#%u: %s) ",
-#endif
- fence->context, fence->seqno,
- dma_fence_is_signaled(fence) ? "signaled" :
- "active");
- }
- }
-#endif /* CONFIG_MALI_BIFROST_DMA_FENCE */
-
+#endif /* CONFIG_SYNC_FILE */
}
static void kbasep_jd_debugfs_atom_deps(
@@ -113,7 +68,7 @@
int i;
for (i = 0; i < 2; i++) {
- deps[i].id = (unsigned)(atom->dep[i].atom ?
+ deps[i].id = (unsigned int)(atom->dep[i].atom ?
kbase_jd_atom_id(kctx, atom->dep[i].atom) : 0);
switch (atom->dep[i].dep_type) {
@@ -160,7 +115,7 @@
BASE_UK_VERSION_MINOR);
/* Print table heading */
- seq_puts(sfile, " ID, Core req, St, CR, Predeps, Start time, Additional info...\n");
+ seq_puts(sfile, " ID, Core req, St, Predeps, Start time, Additional info...\n");
atoms = kctx->jctx.atoms;
/* General atom states */
@@ -180,8 +135,8 @@
* it is valid
*/
if (ktime_to_ns(atom->start_timestamp))
- start_timestamp = ktime_to_ns(
- ktime_sub(ktime_get(), atom->start_timestamp));
+ start_timestamp =
+ ktime_to_ns(ktime_sub(ktime_get_raw(), atom->start_timestamp));
kbasep_jd_debugfs_atom_deps(deps, atom);
@@ -226,11 +181,7 @@
void kbasep_jd_debugfs_ctx_init(struct kbase_context *kctx)
{
-#if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE)
- const mode_t mode = S_IRUGO;
-#else
- const mode_t mode = S_IRUSR;
-#endif
+ const mode_t mode = 0444;
/* Caller already ensures this, but we keep the pattern for
* maintenance safety.
--
Gitblit v1.6.2