forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/arm/bifrost/csf/ipa_control/mali_kbase_csf_ipa_control.h
....@@ -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
....@@ -24,7 +24,7 @@
2424
2525 #include <mali_kbase.h>
2626
27
-/**
27
+/*
2828 * Maximum index accepted to configure an IPA Control performance counter.
2929 */
3030 #define KBASE_IPA_CONTROL_CNT_MAX_IDX ((u8)64 * 3)
....@@ -198,6 +198,33 @@
198198 */
199199 void kbase_ipa_control_handle_gpu_reset_post(struct kbase_device *kbdev);
200200
201
+#ifdef KBASE_PM_RUNTIME
202
+/**
203
+ * kbase_ipa_control_handle_gpu_sleep_enter - Handle the pre GPU Sleep event
204
+ *
205
+ * @kbdev: Pointer to kbase device.
206
+ *
207
+ * This function is called after MCU has been put to sleep state & L2 cache has
208
+ * been powered down. The top level part of GPU is still powered up when this
209
+ * function is called.
210
+ */
211
+void kbase_ipa_control_handle_gpu_sleep_enter(struct kbase_device *kbdev);
212
+
213
+/**
214
+ * kbase_ipa_control_handle_gpu_sleep_exit - Handle the post GPU Sleep event
215
+ *
216
+ * @kbdev: Pointer to kbase device.
217
+ *
218
+ * This function is called when L2 needs to be powered up and MCU can exit the
219
+ * sleep state. The top level part of GPU is powered up when this function is
220
+ * called.
221
+ *
222
+ * This function must be called only if kbase_ipa_control_handle_gpu_sleep_enter()
223
+ * was called previously.
224
+ */
225
+void kbase_ipa_control_handle_gpu_sleep_exit(struct kbase_device *kbdev);
226
+#endif
227
+
201228 #if MALI_UNIT_TEST
202229 /**
203230 * kbase_ipa_control_rate_change_notify_test - Notify GPU rate change