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/debug/mali_kbase_debug_ktrace.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/drivers/gpu/arm/bifrost/debug/mali_kbase_debug_ktrace.c b/kernel/drivers/gpu/arm/bifrost/debug/mali_kbase_debug_ktrace.c
index 9bf8610..f521b47 100644
--- a/kernel/drivers/gpu/arm/bifrost/debug/mali_kbase_debug_ktrace.c
+++ b/kernel/drivers/gpu/arm/bifrost/debug/mali_kbase_debug_ktrace.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
/*
*
- * (C) COPYRIGHT 2020-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2020-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
@@ -27,13 +27,13 @@
#if KBASE_KTRACE_TARGET_RBUF
struct kbase_ktrace_msg *rbuf;
+ spin_lock_init(&kbdev->ktrace.lock);
rbuf = kmalloc_array(KBASE_KTRACE_SIZE, sizeof(*rbuf), GFP_KERNEL);
if (!rbuf)
return -EINVAL;
kbdev->ktrace.rbuf = rbuf;
- spin_lock_init(&kbdev->ktrace.lock);
#endif /* KBASE_KTRACE_TARGET_RBUF */
return 0;
}
@@ -42,6 +42,7 @@
{
#if KBASE_KTRACE_TARGET_RBUF
kfree(kbdev->ktrace.rbuf);
+ kbdev->ktrace.rbuf = NULL;
#endif /* KBASE_KTRACE_TARGET_RBUF */
}
@@ -183,6 +184,9 @@
unsigned long irqflags;
struct kbase_ktrace_msg *trace_msg;
+ if (unlikely(!kbasep_ktrace_initialized(&kbdev->ktrace)))
+ return;
+
WARN_ON((flags & ~KBASE_KTRACE_FLAG_COMMON_ALL));
spin_lock_irqsave(&kbdev->ktrace.lock, irqflags);
--
Gitblit v1.6.2