forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/gpu/arm/bifrost/tests/include/kutf/kutf_helpers.h
....@@ -1,7 +1,7 @@
11 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22 /*
33 *
4
- * (C) COPYRIGHT 2017, 2020-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2017, 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
....@@ -31,6 +31,7 @@
3131 */
3232
3333 #include <kutf/kutf_suite.h>
34
+#include <linux/device.h>
3435
3536 /**
3637 * kutf_helper_pending_input() - Check any pending lines sent by user space
....@@ -81,4 +82,28 @@
8182 */
8283 void kutf_helper_input_enqueue_end_of_data(struct kutf_context *context);
8384
85
+/**
86
+ * kutf_helper_ignore_dmesg() - Write message in dmesg to instruct parser
87
+ * to ignore errors, until the counterpart
88
+ * is written to dmesg to stop ignoring errors.
89
+ * @dev: Device pointer to write to dmesg using.
90
+ *
91
+ * This function writes "Start ignoring dmesg warnings" to dmesg, which
92
+ * the parser will read and not log any errors. Only to be used in cases where
93
+ * we expect an error to be produced in dmesg but that we do not want to be
94
+ * flagged as an error.
95
+ */
96
+void kutf_helper_ignore_dmesg(struct device *dev);
97
+
98
+/**
99
+ * kutf_helper_stop_ignoring_dmesg() - Write message in dmesg to instruct parser
100
+ * to stop ignoring errors.
101
+ * @dev: Device pointer to write to dmesg using.
102
+ *
103
+ * This function writes "Stop ignoring dmesg warnings" to dmesg, which
104
+ * the parser will read and continue to log any errors. Counterpart to
105
+ * kutf_helper_ignore_dmesg().
106
+ */
107
+void kutf_helper_stop_ignoring_dmesg(struct device *dev);
108
+
84109 #endif /* _KERNEL_UTF_HELPERS_H_ */