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_as_fault_debugfs.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/kernel/drivers/gpu/arm/bifrost/mali_kbase_as_fault_debugfs.c b/kernel/drivers/gpu/arm/bifrost/mali_kbase_as_fault_debugfs.c
index 5cf8009..10dbeee 100644
--- a/kernel/drivers/gpu/arm/bifrost/mali_kbase_as_fault_debugfs.c
+++ b/kernel/drivers/gpu/arm/bifrost/mali_kbase_as_fault_debugfs.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
/*
*
- * (C) COPYRIGHT 2016-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2016-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
@@ -93,20 +93,17 @@
debugfs_directory = debugfs_create_dir("address_spaces",
kbdev->mali_debugfs_directory);
- if (debugfs_directory) {
- for (i = 0; i < kbdev->nr_hw_address_spaces; i++) {
- snprintf(as_name, ARRAY_SIZE(as_name), "as%u", i);
- debugfs_create_file(as_name, S_IRUGO,
- debugfs_directory,
- (void *)(uintptr_t)i,
- &as_fault_fops);
- }
- } else {
+ if (IS_ERR_OR_NULL(debugfs_directory)) {
dev_warn(kbdev->dev,
"unable to create address_spaces debugfs directory");
+ } else {
+ for (i = 0; i < kbdev->nr_hw_address_spaces; i++) {
+ if (likely(scnprintf(as_name, ARRAY_SIZE(as_name), "as%u", i)))
+ debugfs_create_file(as_name, 0444, debugfs_directory,
+ (void *)(uintptr_t)i, &as_fault_fops);
+ }
}
#endif /* CONFIG_MALI_BIFROST_DEBUG */
#endif /* CONFIG_DEBUG_FS */
- return;
}
--
Gitblit v1.6.2