hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/gpu/arm/bifrost/debug/backend/mali_kbase_debug_ktrace_csf.c
....@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
22 /*
33 *
4
- * (C) COPYRIGHT 2020-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2020-2022 ARM Limited. All rights reserved.
55 *
66 * This program is free software and is provided to you under the terms of the
77 * GNU General Public License version 2 as published by the Free Software
....@@ -98,6 +98,9 @@
9898 struct kbase_ktrace_msg *trace_msg;
9999 struct kbase_context *kctx = NULL;
100100
101
+ if (unlikely(!kbasep_ktrace_initialized(&kbdev->ktrace)))
102
+ return;
103
+
101104 spin_lock_irqsave(&kbdev->ktrace.lock, irqflags);
102105
103106 /* Reserve and update indices */
....@@ -165,6 +168,9 @@
165168 struct kbase_ktrace_msg *trace_msg;
166169 struct kbase_context *kctx = queue->kctx;
167170
171
+ if (unlikely(!kbasep_ktrace_initialized(&kbdev->ktrace)))
172
+ return;
173
+
168174 spin_lock_irqsave(&kbdev->ktrace.lock, irqflags);
169175
170176 /* Reserve and update indices */